taglinefilesource code
drive165drivers/block/floppy.c#define UDP (&drive_params[drive])
drive166drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive167drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive168drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive500drivers/block/floppy.cstatic int disk_change(int drive)
drive508drivers/block/floppy.cset_bit(drive,&changed_floppies);
drive513drivers/block/floppy.ccurrent_type[drive] != NULL)
drive516drivers/block/floppy.ccurrent_type[drive] = NULL;
drive517drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive532drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive539drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive541drivers/block/floppy.cdisk_change(drive);
drive561drivers/block/floppy.cint drive;
drive567drivers/block/floppy.cfor ( drive = 0; drive < N_DRIVE; drive++)
drive568drivers/block/floppy.cif (FDC(drive) == fdc &&
drive575drivers/block/floppy.cstatic void set_fdc(int drive)
drive577drivers/block/floppy.cif ( drive >= 0 ){
drive578drivers/block/floppy.cfdc = FDC(drive);
drive579drivers/block/floppy.ccurrent_drive = drive;
drive593drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive611drivers/block/floppy.cset_fdc(drive);
drive615drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive616drivers/block/floppy.cif(lock_fdc(drive,interruptible)) return -EINTR;
drive682drivers/block/floppy.cint i, drive, saved_drive;
drive686drivers/block/floppy.cdrive = (saved_drive + i + 1 ) % N_DRIVE;
drive689drivers/block/floppy.cset_fdc(drive);
drive690drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))) ||
drive691drivers/block/floppy.c((FDCS->dor & 0x3) != UNIT(drive)))
drive693drivers/block/floppy.cif(! (set_dor( fdc, ~3, UNIT(drive) | ( 0x10 << UNIT(drive))) &
drive694drivers/block/floppy.c(0x10 << UNIT(drive))))
drive697drivers/block/floppy.cset_dor( fdc, ~( 0x10 << UNIT(drive) ), 0 );
drive2396drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2401drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2441drivers/block/floppy.cstatic char *drive_name(int type, int drive )
drive2466drivers/block/floppy.cstatic int raw_cmd_ioctl(int drive, void *param)
drive2475drivers/block/floppy.cif ( i == drive ){
drive2512drivers/block/floppy.cmotor_off_callback(drive);  
drive2552drivers/block/floppy.cint i,device,drive,type,cnt;
drive2561drivers/block/floppy.cdrive = DRIVE(device);
drive2567drivers/block/floppy.cname = drive_name(type,drive);
drive2580drivers/block/floppy.celse if ((this_floppy = current_type[drive]) ==
drive2610drivers/block/floppy.cLOCK_FDC(drive,1);
drive2612drivers/block/floppy.cCALL(i = raw_cmd_ioctl(drive, (void *) param));
drive2627drivers/block/floppy.cLOCK_FDC(drive,1);
drive2628drivers/block/floppy.ccurrent_type[drive] = NULL;
drive2629drivers/block/floppy.cfloppy_sizes[drive] = 2;
drive2634drivers/block/floppy.cLOCK_FDC(drive,1);
drive2653drivers/block/floppy.cset_bit(drive, &fake_change);
drive2675drivers/block/floppy.cLOCK_FDC(drive,1);
drive2682drivers/block/floppy.cuser_params[drive] = newparams;
drive2683drivers/block/floppy.cif (buffer_drive == drive &&
drive2684drivers/block/floppy.cbuffer_max > user_params[drive].sect)
drive2685drivers/block/floppy.cbuffer_max=user_params[drive].sect;
drive2686drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive2687drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive2698drivers/block/floppy.cuser_params[drive].sect ||
drive2705drivers/block/floppy.creturn user_reset_fdc( drive, (int)param, 1);
drive2717drivers/block/floppy.cLOCK_FDC(drive,1);
drive2738drivers/block/floppy.cstatic void set_base_type(int drive,int code)
drive2744drivers/block/floppy.cprintk("fd%d is %s", drive, default_drive_params[code].name);
drive2747drivers/block/floppy.cprintk("fd%d is not installed", drive);
drive2749drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,code);
drive2754drivers/block/floppy.cint drive;
drive2756drivers/block/floppy.cfor (drive=0; drive<N_DRIVE ; drive++){
drive2794drivers/block/floppy.cint drive;
drive2796drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive2820drivers/block/floppy.cint drive;
drive2828drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive2829drivers/block/floppy.cif ( drive >= N_DRIVE || !( ALLOWED_DRIVE_MASK & ( 1 << drive)) )
drive2858drivers/block/floppy.cif (buffer_drive == drive)
drive2876drivers/block/floppy.cif (user_reset_fdc(drive, FD_RESET_IF_NEEDED,0))
drive2882drivers/block/floppy.cif (test_bit(drive,&changed_floppies))
drive2900drivers/block/floppy.cint drive = DRIVE( dev );
drive2907drivers/block/floppy.cif(test_bit(drive, &changed_floppies))
drive2911drivers/block/floppy.clock_fdc(drive,0);
drive2916drivers/block/floppy.cif(test_bit(drive, &changed_floppies))
drive2918drivers/block/floppy.cif(test_bit(drive, &fake_change))
drive2937drivers/block/floppy.cint drive=DRIVE(dev);
drive2940drivers/block/floppy.ccf = test_bit(drive, &changed_floppies);
drive2941drivers/block/floppy.cif(cf || test_bit(drive, &fake_change)){
drive2942drivers/block/floppy.clock_fdc(drive,0);
drive2943drivers/block/floppy.ccf = test_bit(drive, &changed_floppies);
drive2944drivers/block/floppy.cif(! (cf || test_bit(drive, &fake_change))){
drive2950drivers/block/floppy.cif ( buffer_drive == drive)
drive2952drivers/block/floppy.cclear_bit(drive, &fake_change);
drive2953drivers/block/floppy.cclear_bit(drive, &changed_floppies);
drive2956drivers/block/floppy.cif(!current_type[drive] && !TYPE(dev)){
drive161drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive164drivers/block/genhd.cint start = drive<<dev->minor_shift;
drive168drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive169drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive180drivers/block/genhd.cint drive;
drive188drivers/block/genhd.cfor (drive=0 ; drive<dev->nr_real ; drive++) {
drive189drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive190drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive155drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive162drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive195drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive202drivers/block/hd.cif (drive>1 || head>15) {
drive204drivers/block/hd.cdrive, cyl, head, sect);
drive214drivers/block/hd.cif (!controller_ready(drive, head)) {
drive219drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive221drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive226drivers/block/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive973drivers/block/hd.cint drive, i;
drive979drivers/block/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive980drivers/block/hd.cbios_info[drive].cyl   = hd_info[drive].cyl = *(unsigned short *) BIOS;
drive981drivers/block/hd.cbios_info[drive].head  = hd_info[drive].head = *(2+BIOS);
drive982drivers/block/hd.cbios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive983drivers/block/hd.cbios_info[drive].ctl   = hd_info[drive].ctl = *(8+BIOS);
drive984drivers/block/hd.cbios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive985drivers/block/hd.cbios_info[drive].sect  = hd_info[drive].sect = *(14+BIOS);
drive987drivers/block/hd.cif (hd_info[drive].cyl && NR_HD == drive)
drive323drivers/block/xd.cstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
drive330drivers/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);
drive333drivers/block/xd.ccontrol = xd_info[drive].control;
drive337drivers/block/xd.ctrack = block / xd_info[drive].sectors;
drive338drivers/block/xd.chead = track % xd_info[drive].heads;
drive339drivers/block/xd.ccylinder = track / xd_info[drive].heads;
drive340drivers/block/xd.csector = block % xd_info[drive].sectors;
drive343drivers/block/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive347drivers/block/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive352drivers/block/xd.cxd_recalibrate(drive);
drive373drivers/block/xd.cstatic void xd_recalibrate (u_char drive)
drive377drivers/block/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive421drivers/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)
drive424drivers/block/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive508drivers/block/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive537drivers/block/xd.cstatic void xd_dtc_init_drive (u_char drive)
drive541drivers/block/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive543drivers/block/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive544drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive545drivers/block/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive547drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive548drivers/block/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive549drivers/block/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive551drivers/block/xd.cxd_info[drive].control = 0;        /* control byte */
drive553drivers/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]);
drive554drivers/block/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive556drivers/block/xd.cprintk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive);
drive559drivers/block/xd.cprintk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive);
drive581drivers/block/xd.cstatic void xd_wd_init_drive (u_char drive)
drive585drivers/block/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive587drivers/block/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive588drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive589drivers/block/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive591drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive592drivers/block/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive593drivers/block/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive595drivers/block/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive597drivers/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]);
drive600drivers/block/xd.cprintk("xd_wd_init_drive: error reading geometry for drive %d\n",drive);  
drive620drivers/block/xd.cstatic void xd_seagate_init_drive (u_char drive)
drive624drivers/block/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive626drivers/block/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive627drivers/block/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive628drivers/block/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive629drivers/block/xd.cxd_info[drive].control = 0;          /* control byte */
drive632drivers/block/xd.cprintk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive);
drive654drivers/block/xd.cstatic void xd_omti_init_drive (u_char drive)
drive657drivers/block/xd.cxd_override_init_drive(drive);
drive660drivers/block/xd.cxd_info[drive].control = 2;
drive665drivers/block/xd.cstatic void xd_override_init_drive (u_char drive)
drive673drivers/block/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive681drivers/block/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive682drivers/block/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive683drivers/block/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive684drivers/block/xd.cxd_info[drive].control = 0;
drive701drivers/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)
drive705drivers/block/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive716drivers/block/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);
drive1483drivers/scsi/fdomain.cint              drive;
drive1528drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1531drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1536drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 );
drive41include/linux/blkdev.hextern void resetup_one_dev(struct gendisk *dev, int drive);
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);