taglinefilesource code
drive76drivers/block/blk.hextern void resetup_one_dev(struct gendisk *dev, int drive);
drive679drivers/block/floppy.cint drive = MINOR(CURRENT->dev);
drive681drivers/block/floppy.cif (ftd_msg[drive])
drive683drivers/block/floppy.cfloppy->name,drive);
drive684drivers/block/floppy.ccurrent_type[drive] = floppy;
drive685drivers/block/floppy.cfloppy_sizes[drive] = floppy->size >> 1;
drive1108drivers/block/floppy.cint i,drive,cnt,okay;
drive1114drivers/block/floppy.cdrive = MINOR(inode->i_rdev);
drive1124drivers/block/floppy.cfake_change |= 1 << (drive & 3);
drive1126drivers/block/floppy.cdrive &= 3;
drive1130drivers/block/floppy.cif (drive > 3) this_floppy = &floppy_type[drive >> 2];
drive1131drivers/block/floppy.celse if ((this_floppy = current_type[drive & 3]) == NULL)
drive1143drivers/block/floppy.cif (fd_ref[drive & 3] != 1)
drive1151drivers/block/floppy.cformat_req.device = drive;
drive1168drivers/block/floppy.cfloppy_off(drive & 3);
drive1175drivers/block/floppy.cfake_change |= 1 << (drive & 3);
drive1182drivers/block/floppy.cif (drive < 0 || drive > 3)
drive1186drivers/block/floppy.ccurrent_type[drive] = NULL;
drive1187drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive1188drivers/block/floppy.ckeep_data[drive] = 0;
drive1192drivers/block/floppy.cmemcpy_fromfs(user_params+drive,
drive1195drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive1196drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive1198drivers/block/floppy.ckeep_data[drive] = -1;
drive1204drivers/block/floppy.coutb_p((current_DOR & 0xfc) | drive |
drive1205drivers/block/floppy.c(0x10 << drive),FD_DOR);
drive1208drivers/block/floppy.ckeep_data[drive] = 1;
drive1210drivers/block/floppy.ckeep_data[drive] = 0;
drive1217drivers/block/floppy.cftd_msg[drive] = 1;
drive1220drivers/block/floppy.cftd_msg[drive] = 0;
drive1223drivers/block/floppy.cmin_report_error_cnt[drive] = (unsigned short) (param & 0x0f);
drive1236drivers/block/floppy.cstatic struct floppy_struct *find_base(int drive,int code)
drive1242drivers/block/floppy.cprintk("fd%d is %s",drive,base->name);
drive1245drivers/block/floppy.cprintk("fd%d is not installed", drive);
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));
drive141drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive148drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive181drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive187drivers/block/hd.cif (drive>1 || head>15)
drive195drivers/block/hd.cif (!controller_ready(drive, head)) {
drive200drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive202drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive207drivers/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);
drive322drivers/block/xd.cstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
drive329drivers/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);
drive332drivers/block/xd.ccontrol = xd_info[drive].control;
drive336drivers/block/xd.ctrack = block / xd_info[drive].sectors;
drive337drivers/block/xd.chead = track % xd_info[drive].heads;
drive338drivers/block/xd.ccylinder = track / xd_info[drive].heads;
drive339drivers/block/xd.csector = block % xd_info[drive].sectors;
drive342drivers/block/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive346drivers/block/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive351drivers/block/xd.cxd_recalibrate(drive);
drive372drivers/block/xd.cstatic void xd_recalibrate (u_char drive)
drive376drivers/block/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive420drivers/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)
drive423drivers/block/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive507drivers/block/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive536drivers/block/xd.cstatic void xd_dtc_init_drive (u_char drive)
drive540drivers/block/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive542drivers/block/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive543drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive544drivers/block/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive546drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive547drivers/block/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive548drivers/block/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive550drivers/block/xd.cxd_info[drive].control = 0;        /* control byte */
drive552drivers/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]);
drive553drivers/block/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive555drivers/block/xd.cprintk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive);
drive558drivers/block/xd.cprintk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive);
drive580drivers/block/xd.cstatic void xd_wd_init_drive (u_char drive)
drive584drivers/block/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive586drivers/block/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive587drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive588drivers/block/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive590drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive591drivers/block/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive592drivers/block/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive594drivers/block/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive596drivers/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]);
drive599drivers/block/xd.cprintk("xd_wd_init_drive: error reading geometry for drive %d\n",drive);  
drive619drivers/block/xd.cstatic void xd_seagate_init_drive (u_char drive)
drive623drivers/block/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive625drivers/block/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive626drivers/block/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive627drivers/block/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive628drivers/block/xd.cxd_info[drive].control = 0;          /* control byte */
drive631drivers/block/xd.cprintk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive);
drive653drivers/block/xd.cstatic void xd_omti_init_drive (u_char drive)
drive656drivers/block/xd.cxd_override_init_drive(drive);
drive659drivers/block/xd.cxd_info[drive].control = 2;
drive664drivers/block/xd.cstatic void xd_override_init_drive (u_char drive)
drive672drivers/block/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive680drivers/block/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive681drivers/block/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive682drivers/block/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive683drivers/block/xd.cxd_info[drive].control = 0;
drive700drivers/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)
drive704drivers/block/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive715drivers/block/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);
drive1474drivers/scsi/fdomain.cint              drive;
drive1519drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1520drivers/scsi/fdomain.cdisk  = rscsi_disks[ drive ].device;
drive1523drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1528drivers/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);
drive135include/linux/xd.hstatic void xd_omti_init_drive (u_char drive);
drive136include/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);
drive137include/linux/xd.hstatic void xd_override_init_drive (u_char drive);