taglinefilesource code
drive76drivers/block/blk.hextern void resetup_one_dev(struct gendisk *dev, int drive);
drive682drivers/block/floppy.cint drive = MINOR(CURRENT->dev);
drive684drivers/block/floppy.cif (ftd_msg[drive])
drive686drivers/block/floppy.cfloppy->name,drive);
drive687drivers/block/floppy.ccurrent_type[drive] = floppy;
drive688drivers/block/floppy.cfloppy_sizes[drive] = floppy->size >> 1;
drive1111drivers/block/floppy.cint i,drive,cnt,okay;
drive1117drivers/block/floppy.cdrive = MINOR(inode->i_rdev);
drive1127drivers/block/floppy.cfake_change |= 1 << (drive & 3);
drive1129drivers/block/floppy.cdrive &= 3;
drive1133drivers/block/floppy.cif (drive > 3) this_floppy = &floppy_type[drive >> 2];
drive1134drivers/block/floppy.celse if ((this_floppy = current_type[drive & 3]) == NULL)
drive1146drivers/block/floppy.cif (fd_ref[drive & 3] != 1)
drive1154drivers/block/floppy.cformat_req.device = drive;
drive1171drivers/block/floppy.cfloppy_off(drive & 3);
drive1178drivers/block/floppy.cfake_change |= 1 << (drive & 3);
drive1185drivers/block/floppy.cif (drive < 0 || drive > 3)
drive1189drivers/block/floppy.ccurrent_type[drive] = NULL;
drive1190drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive1191drivers/block/floppy.ckeep_data[drive] = 0;
drive1195drivers/block/floppy.cmemcpy_fromfs(user_params+drive,
drive1198drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive1199drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive1201drivers/block/floppy.ckeep_data[drive] = -1;
drive1207drivers/block/floppy.coutb_p((current_DOR & 0xfc) | drive |
drive1208drivers/block/floppy.c(0x10 << drive),FD_DOR);
drive1211drivers/block/floppy.ckeep_data[drive] = 1;
drive1213drivers/block/floppy.ckeep_data[drive] = 0;
drive1220drivers/block/floppy.cftd_msg[drive] = 1;
drive1223drivers/block/floppy.cftd_msg[drive] = 0;
drive1226drivers/block/floppy.cmin_report_error_cnt[drive] = (unsigned short) (param & 0x0f);
drive1239drivers/block/floppy.cstatic struct floppy_struct *find_base(int drive,int code)
drive1245drivers/block/floppy.cprintk("fd%d is %s",drive,base->name);
drive1248drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,code);
drive1273drivers/block/floppy.cint drive;
drive1276drivers/block/floppy.cdrive = inode->i_rdev & 3;
drive1277drivers/block/floppy.cold_dev = fd_device[drive];
drive1278drivers/block/floppy.cif (fd_ref[drive])
drive1281drivers/block/floppy.cfd_ref[drive]++;
drive1282drivers/block/floppy.cfd_device[drive] = inode->i_rdev;
drive160drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive163drivers/block/genhd.cint start = drive<<dev->minor_shift;
drive167drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive168drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive179drivers/block/genhd.cint drive;
drive187drivers/block/genhd.cfor (drive=0 ; drive<dev->nr_real ; drive++) {
drive188drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive189drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive147drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive154drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive187drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive193drivers/block/hd.cif (drive>1 || head>15)
drive201drivers/block/hd.cif (!controller_ready(drive, head)) {
drive206drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive208drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive213drivers/block/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive645drivers/block/hd.cint drive, i;
drive651drivers/block/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive652drivers/block/hd.chd_info[drive].cyl = *(unsigned short *) BIOS;
drive653drivers/block/hd.chd_info[drive].head = *(2+BIOS);
drive654drivers/block/hd.chd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive655drivers/block/hd.chd_info[drive].ctl = *(8+BIOS);
drive656drivers/block/hd.chd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive657drivers/block/hd.chd_info[drive].sect = *(14+BIOS);
drive278drivers/block/xd.cstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
drive285drivers/block/xd.cprintk("xd_readwrite: operation = %s, drive = %d, buffer = 0x%X, block = %d, count = %d\n",operation == READ ? "read" : "write",drive,buffer,block,count);
drive288drivers/block/xd.ccontrol = xd_info[drive].control;
drive292drivers/block/xd.ctrack = block / xd_info[drive].sectors;
drive293drivers/block/xd.chead = track % xd_info[drive].heads;
drive294drivers/block/xd.ccylinder = track / xd_info[drive].heads;
drive295drivers/block/xd.csector = block % xd_info[drive].sectors;
drive298drivers/block/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive302drivers/block/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive305drivers/block/xd.ccase 1: printk("xd_readwrite: timeout, recalibrating drive\n"); xd_recalibrate(drive); return (0);
drive324drivers/block/xd.cstatic void xd_recalibrate (u_char drive)
drive328drivers/block/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive372drivers/block/xd.cstatic u_char *xd_build (u_char *cmdblk,u_char command,u_char drive,u_char head,u_short cylinder,u_char sector,u_char count,u_char control)
drive375drivers/block/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive456drivers/block/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive485drivers/block/xd.cstatic void xd_dtc_init_drive (u_char drive)
drive489drivers/block/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive491drivers/block/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive492drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive493drivers/block/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive495drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive496drivers/block/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive497drivers/block/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive499drivers/block/xd.cxd_info[drive].control = 0;        /* control byte */
drive501drivers/block/xd.cxd_setparam(CMD_DTCSETPARAM,drive,xd_info[drive].heads,xd_info[drive].cylinders,((u_short *) (buf + 1))[0x05],((u_short *) (buf + 1))[0x06],buf[0x0F]);
drive502drivers/block/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive504drivers/block/xd.cprintk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive);
drive507drivers/block/xd.cprintk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive);
drive529drivers/block/xd.cstatic void xd_wd_init_drive (u_char drive)
drive533drivers/block/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive535drivers/block/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive536drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive537drivers/block/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive539drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive540drivers/block/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive541drivers/block/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive543drivers/block/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive545drivers/block/xd.cxd_setparam(CMD_WDSETPARAM,drive,xd_info[drive].heads,xd_info[drive].cylinders,((u_short *) (buf))[0xD8],((u_short *) (buf))[0xDA],buf[0x1B4]);
drive548drivers/block/xd.cprintk("xd_wd_init_drive: error reading geometry for drive %d\n",drive);  
drive568drivers/block/xd.cstatic void xd_seagate_init_drive (u_char drive)
drive572drivers/block/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive574drivers/block/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive575drivers/block/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive576drivers/block/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive577drivers/block/xd.cxd_info[drive].control = 0;          /* control byte */
drive580drivers/block/xd.cprintk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive);
drive585drivers/block/xd.cstatic void xd_override_init_drive (u_char drive)
drive593drivers/block/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive601drivers/block/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive602drivers/block/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive603drivers/block/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive604drivers/block/xd.cxd_info[drive].control = 0;
drive621drivers/block/xd.cstatic void xd_setparam (u_char command,u_char drive,u_char heads,u_short cylinders,u_short rwrite,u_short wprecomp,u_char ecc)
drive625drivers/block/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive636drivers/block/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);
drive1431drivers/scsi/fdomain.cint    drive;
drive1470drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1473drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1478drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 );
drive1486drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 );
drive103include/linux/xd.hvoid (*init_drive)(u_char drive);
drive110include/linux/xd.hstatic u_char xd_initdrives (void (*init_drive)(u_char drive));
drive118include/linux/xd.hstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count);
drive119include/linux/xd.hstatic void xd_recalibrate (u_char drive);
drive123include/linux/xd.hstatic u_char *xd_build (u_char *cmdblk,u_char command,u_char drive,u_char head,u_short cylinder,u_char sector,u_char count,u_char control);
drive129include/linux/xd.hstatic void xd_dtc_init_drive (u_char drive);
drive131include/linux/xd.hstatic void xd_wd_init_drive (u_char drive);
drive133include/linux/xd.hstatic void xd_seagate_init_drive (u_char drive);
drive134include/linux/xd.hstatic void xd_setparam (u_char command,u_char drive,u_char heads,u_short cylinders,u_short rwrite,u_short wprecomp,u_char ecc);
drive135include/linux/xd.hstatic void xd_override_init_drive (u_char drive);