taglinefilesource code
drive104include/linux/xd.hvoid (*init_drive)(u_char drive);
drive108include/linux/xd.hextern void resetup_one_dev (struct gendisk *dev,unsigned int drive);
drive112include/linux/xd.hstatic u_char xd_initdrives (void (*init_drive)(u_char drive));
drive120include/linux/xd.hstatic int xd_readwrite (u_char operation,u_char drive,u_char *buffer,u_int block,u_int count);
drive121include/linux/xd.hstatic void xd_recalibrate (u_char drive);
drive125include/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);
drive132include/linux/xd.hstatic void xd_dtc5150x_init_drive (u_char drive);
drive134include/linux/xd.hstatic void xd_wd1004a27x_init_drive (u_char drive);
drive136include/linux/xd.hstatic void xd_seagate11_init_drive (u_char drive);
drive137include/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);
drive141include/linux/xd.hstatic void xd_override_init_drive (u_char drive);
drive675kernel/blk_drv/floppy.cint drive = MINOR(CURRENT->dev);
drive677kernel/blk_drv/floppy.cif (ftd_msg[drive])
drive679kernel/blk_drv/floppy.cfloppy->name,drive);
drive680kernel/blk_drv/floppy.ccurrent_type[drive] = floppy;
drive681kernel/blk_drv/floppy.cfloppy_sizes[drive] = floppy->size >> 1;
drive1100kernel/blk_drv/floppy.cint i,drive,cnt,okay;
drive1106kernel/blk_drv/floppy.cdrive = MINOR(inode->i_rdev);
drive1116kernel/blk_drv/floppy.cfake_change |= 1 << (drive & 3);
drive1118kernel/blk_drv/floppy.cdrive &= 3;
drive1122kernel/blk_drv/floppy.cif (drive > 3) this = &floppy_type[drive >> 2];
drive1123kernel/blk_drv/floppy.celse if ((this = current_type[drive & 3]) == NULL)
drive1141kernel/blk_drv/floppy.cformat_req.device = drive;
drive1164kernel/blk_drv/floppy.cfake_change |= 1 << (drive & 3);
drive1171kernel/blk_drv/floppy.cif (drive < 0 || drive > 3)
drive1175kernel/blk_drv/floppy.ccurrent_type[drive] = NULL;
drive1176kernel/blk_drv/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive1177kernel/blk_drv/floppy.ckeep_data[drive] = 0;
drive1182kernel/blk_drv/floppy.c((char *) &user_params[drive])[cnt] =
drive1184kernel/blk_drv/floppy.ccurrent_type[drive] = &user_params[drive];
drive1185kernel/blk_drv/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive1186kernel/blk_drv/floppy.cif (cmd == FDDEFPRM) keep_data[drive] = -1;
drive1192kernel/blk_drv/floppy.coutb_p((current_DOR & 0xfc) | drive |
drive1193kernel/blk_drv/floppy.c(0x10 << drive),FD_DOR);
drive1195kernel/blk_drv/floppy.ckeep_data[drive] = (inb(FD_DIR) & 0x80) ? 1 : 0;
drive1202kernel/blk_drv/floppy.cftd_msg[drive] = 1;
drive1205kernel/blk_drv/floppy.cftd_msg[drive] = 0;
drive1208kernel/blk_drv/floppy.cmin_report_error_cnt[drive] = (unsigned short) (param & 0x0f);
drive1221kernel/blk_drv/floppy.cstatic struct floppy_struct *find_base(int drive,int code)
drive1227kernel/blk_drv/floppy.cprintk("fd%d is %s",drive,base->name);
drive1230kernel/blk_drv/floppy.cprintk("fd%d is unknown type %d",drive,code);
drive1255kernel/blk_drv/floppy.cint drive;
drive1258kernel/blk_drv/floppy.cdrive = inode->i_rdev & 3;
drive1259kernel/blk_drv/floppy.cold_dev = fd_device[drive];
drive1260kernel/blk_drv/floppy.cif (fd_ref[drive])
drive1263kernel/blk_drv/floppy.cfd_ref[drive]++;
drive1264kernel/blk_drv/floppy.cfd_device[drive] = inode->i_rdev;
drive160kernel/blk_drv/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive163kernel/blk_drv/genhd.cint start = drive<<dev->minor_shift;
drive167kernel/blk_drv/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive168kernel/blk_drv/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive179kernel/blk_drv/genhd.cint drive;
drive187kernel/blk_drv/genhd.cfor (drive=0 ; drive<dev->nr_real ; drive++) {
drive188kernel/blk_drv/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive189kernel/blk_drv/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive131kernel/blk_drv/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive138kernel/blk_drv/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive171kernel/blk_drv/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive177kernel/blk_drv/hd.cif (drive>1 || head>15)
drive185kernel/blk_drv/hd.cif (!controller_ready(drive, head)) {
drive190kernel/blk_drv/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive192kernel/blk_drv/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive197kernel/blk_drv/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive622kernel/blk_drv/hd.cint drive, i;
drive628kernel/blk_drv/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive629kernel/blk_drv/hd.chd_info[drive].cyl = *(unsigned short *) BIOS;
drive630kernel/blk_drv/hd.chd_info[drive].head = *(unsigned char *) (2+BIOS);
drive631kernel/blk_drv/hd.chd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive632kernel/blk_drv/hd.chd_info[drive].ctl = *(unsigned char *) (8+BIOS);
drive633kernel/blk_drv/hd.chd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive634kernel/blk_drv/hd.chd_info[drive].sect = *(unsigned char *) (14+BIOS);
drive1394kernel/blk_drv/scsi/fdomain.cint    drive;
drive1425kernel/blk_drv/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1426kernel/blk_drv/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive265kernel/blk_drv/xd.cstatic int xd_readwrite (u_char operation,u_char drive,u_char *buffer,u_int block,u_int count)
drive272kernel/blk_drv/xd.cprintk("xd_readwrite: operation = %s, drive = %d, buffer = 0x%X, block = %d, count = %d\n",operation == READ ? "read" : "write",drive,buffer,block,count);
drive275kernel/blk_drv/xd.ccontrol = xd_info[drive].control;
drive279kernel/blk_drv/xd.ctrack = block / xd_info[drive].sectors;
drive280kernel/blk_drv/xd.chead = track % xd_info[drive].heads;
drive281kernel/blk_drv/xd.ccylinder = track / xd_info[drive].heads;
drive282kernel/blk_drv/xd.csector = block % xd_info[drive].sectors;
drive285kernel/blk_drv/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive293kernel/blk_drv/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive296kernel/blk_drv/xd.ccase 1: printk("xd_readwrite: timeout, recalibrating drive\n"); xd_recalibrate(drive); xd_busy = 0; wake_up(&xd_wait_exclusive); return (0);
drive318kernel/blk_drv/xd.cstatic void xd_recalibrate (u_char drive)
drive322kernel/blk_drv/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive366kernel/blk_drv/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)
drive369kernel/blk_drv/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive450kernel/blk_drv/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive478kernel/blk_drv/xd.cstatic void xd_dtc5150x_init_drive (u_char drive)
drive482kernel/blk_drv/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive484kernel/blk_drv/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive485kernel/blk_drv/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive486kernel/blk_drv/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive488kernel/blk_drv/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive489kernel/blk_drv/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive490kernel/blk_drv/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive492kernel/blk_drv/xd.cxd_info[drive].control = 0;        /* control byte */
drive494kernel/blk_drv/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]);
drive495kernel/blk_drv/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive497kernel/blk_drv/xd.cprintk("xd_dtc5150x_init_drive: error setting step rate for drive %d\n",drive);
drive500kernel/blk_drv/xd.cprintk("xd_dtc5150x_init_drive: error reading geometry for drive %d\n",drive);
drive518kernel/blk_drv/xd.cstatic void xd_wd1004a27x_init_drive (u_char drive)
drive522kernel/blk_drv/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive524kernel/blk_drv/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive525kernel/blk_drv/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive526kernel/blk_drv/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive528kernel/blk_drv/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive529kernel/blk_drv/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive530kernel/blk_drv/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive532kernel/blk_drv/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive534kernel/blk_drv/xd.cxd_setparam(CMD_WDSETPARAM,drive,xd_info[drive].heads,xd_info[drive].cylinders,((u_short *) (buf))[0xD8],((u_short *) (buf))[0xDA],buf[0x1B4]);
drive537kernel/blk_drv/xd.cprintk("xd_wd1004a27x_init_drive: error reading geometry for drive %d\n",drive);  
drive555kernel/blk_drv/xd.cstatic void xd_seagate11_init_drive (u_char drive)
drive559kernel/blk_drv/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive561kernel/blk_drv/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive562kernel/blk_drv/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive563kernel/blk_drv/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive564kernel/blk_drv/xd.cxd_info[drive].control = 0;          /* control byte */
drive567kernel/blk_drv/xd.cprintk("xd_seagate11_init_drive: error reading geometry from drive %d\n",drive);
drive584kernel/blk_drv/xd.cstatic void xd_override_init_drive (u_char drive)
drive592kernel/blk_drv/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive600kernel/blk_drv/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive601kernel/blk_drv/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive602kernel/blk_drv/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive603kernel/blk_drv/xd.cxd_info[drive].control = 0;
drive608kernel/blk_drv/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)
drive612kernel/blk_drv/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive623kernel/blk_drv/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);