taglinefilesource code
drive166drivers/block/floppy.c#define UDP (&drive_params[drive])
drive167drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive168drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive169drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive515drivers/block/floppy.cstatic int disk_change(int drive)
drive517drivers/block/floppy.cint fdc=FDC(drive);
drive521drivers/block/floppy.cif(! (FDCS->dor & (0x10 << UNIT(drive))) ||
drive522drivers/block/floppy.c(FDCS->dor & 3) != UNIT(drive) ||
drive523drivers/block/floppy.cfdc != FDC(drive)){
drive525drivers/block/floppy.cDPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive),
drive532drivers/block/floppy.cDPRINT1("checking disk change line for drive %d\n",drive);
drive549drivers/block/floppy.ccurrent_type[drive] != NULL)
drive552drivers/block/floppy.ccurrent_type[drive] = NULL;
drive572drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive582drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive588drivers/block/floppy.cdisk_change(drive);
drive595drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive619drivers/block/floppy.cint drive;
drive625drivers/block/floppy.cfor ( drive = 0; drive < N_DRIVE; drive++)
drive626drivers/block/floppy.cif (FDC(drive) == fdc &&
drive632drivers/block/floppy.cstatic void set_fdc(int drive)
drive634drivers/block/floppy.cif (drive >= 0 && drive < N_DRIVE){
drive635drivers/block/floppy.cfdc = FDC(drive);
drive636drivers/block/floppy.ccurrent_drive = drive;
drive649drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive668drivers/block/floppy.cset_fdc(drive);
drive672drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive673drivers/block/floppy.cif(lock_fdc(drive,interruptible)) return -EINTR;
drive718drivers/block/floppy.cstatic void floppy_off(unsigned int drive)
drive721drivers/block/floppy.cregister int fdc=FDC(drive);
drive723drivers/block/floppy.cif( !(FDCS->dor & ( 0x10 << UNIT(drive))))
drive726drivers/block/floppy.cdel_timer(motor_off_timer+drive);
drive734drivers/block/floppy.cmotor_off_timer[drive].expires = UDP->spindown - delta;
drive736drivers/block/floppy.cadd_timer(motor_off_timer+drive);
drive746drivers/block/floppy.cint i, drive, saved_drive;
drive753drivers/block/floppy.cdrive = (saved_drive + i + 1 ) % N_DRIVE;
drive756drivers/block/floppy.cset_fdc(drive);
drive757drivers/block/floppy.cif(! (set_dor( fdc, ~3, UNIT(drive) | ( 0x10 << UNIT(drive))) &
drive758drivers/block/floppy.c(0x10 << UNIT(drive))))
drive761drivers/block/floppy.cset_dor( fdc, ~( 0x10 << UNIT(drive) ), 0 );
drive1852drivers/block/floppy.cint drive=DRIVE(device);
drive1854drivers/block/floppy.cLOCK_FDC(drive,1);
drive2522drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2529drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2561drivers/block/floppy.cstatic char *drive_name(int type, int drive )
drive2588drivers/block/floppy.cint i, drive, count, ret;
drive2592drivers/block/floppy.cfor ( drive= 0; drive < N_DRIVE; drive++){
drive2593drivers/block/floppy.cif ( FDC(drive) != fdc)
drive2595drivers/block/floppy.cif ( drive == current_drive ){
drive2678drivers/block/floppy.cint i,device,drive,type,cnt;
drive2687drivers/block/floppy.cdrive = DRIVE(device);
drive2693drivers/block/floppy.cname = drive_name(type,drive);
drive2706drivers/block/floppy.celse if ((this_floppy = current_type[drive]) ==
drive2711drivers/block/floppy.cLOCK_FDC(drive,1);
drive2738drivers/block/floppy.cLOCK_FDC(drive,1);
drive2753drivers/block/floppy.cLOCK_FDC(drive,1);
drive2754drivers/block/floppy.ccurrent_type[drive] = NULL;
drive2755drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive2760drivers/block/floppy.cLOCK_FDC(drive,1);
drive2775drivers/block/floppy.cLOCK_FDC(drive,1);
drive2779drivers/block/floppy.cset_bit(drive, &fake_change);
drive2801drivers/block/floppy.cLOCK_FDC(drive,1);
drive2806drivers/block/floppy.cuser_params[drive] = newparams;
drive2807drivers/block/floppy.cif (buffer_drive == drive &&
drive2808drivers/block/floppy.cbuffer_max > user_params[drive].sect)
drive2809drivers/block/floppy.cbuffer_max=user_params[drive].sect;
drive2810drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive2811drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive2822drivers/block/floppy.cuser_params[drive].sect ||
drive2829drivers/block/floppy.creturn user_reset_fdc( drive, (int)param, 1);
drive2841drivers/block/floppy.cLOCK_FDC(drive,1);
drive2862drivers/block/floppy.cstatic void set_base_type(int drive,int code)
drive2868drivers/block/floppy.cprintk("fd%d is %s", drive, default_drive_params[code].name);
drive2871drivers/block/floppy.cprintk("fd%d is not installed", drive);
drive2873drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,code);
drive2878drivers/block/floppy.cint drive;
drive2880drivers/block/floppy.cfor (drive=0; drive<N_DRIVE ; drive++){
drive2897drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive2910drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive2928drivers/block/floppy.cint drive;
drive2930drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive2957drivers/block/floppy.cint drive;
drive2965drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive2966drivers/block/floppy.cif (drive >= N_DRIVE || 
drive2967drivers/block/floppy.c!( ALLOWED_DRIVE_MASK & ( 1 << drive)) ||
drive2968drivers/block/floppy.cfdc_state[FDC(drive)].version == FDC_NONE)
drive2997drivers/block/floppy.cif (buffer_drive == drive)
drive3030drivers/block/floppy.cint drive = DRIVE( dev );
drive3041drivers/block/floppy.clock_fdc(drive,0);
drive3047drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3048drivers/block/floppy.c(!TYPE(dev) && !current_type[drive]))
drive3059drivers/block/floppy.c#define NO_GEOM (!current_type[drive] && !TYPE(dev))
drive3061drivers/block/floppy.cint drive=DRIVE(dev);
drive3064drivers/block/floppy.cif(UTESTF(FD_DISK_CHANGED) || test_bit(drive, &fake_change) || NO_GEOM){
drive3065drivers/block/floppy.clock_fdc(drive,0);
drive3067drivers/block/floppy.cif(! (cf || test_bit(drive, &fake_change) || NO_GEOM)){
drive3073drivers/block/floppy.cif ( buffer_drive == drive)
drive3075drivers/block/floppy.cclear_bit(drive, &fake_change);
drive3171drivers/block/floppy.cint i,drive;
drive3214drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE ; drive++) {
drive3304drivers/block/floppy.cint drive;
drive3326drivers/block/floppy.cfor(drive=0; drive < N_FDC * 4; drive++)
drive3327drivers/block/floppy.cif( motor_off_timer[drive].next )
drive3328drivers/block/floppy.cprintk("motor off timer %d still active\n", drive);
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));
drive213drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive220drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive227drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive239drivers/block/hd.cif (!controller_ready(drive, head)) {
drive244drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive246drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive251drivers/block/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive976drivers/block/hd.cint drive, i;
drive982drivers/block/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive983drivers/block/hd.cbios_info[drive].cyl   = hd_info[drive].cyl = *(unsigned short *) BIOS;
drive984drivers/block/hd.cbios_info[drive].head  = hd_info[drive].head = *(2+BIOS);
drive985drivers/block/hd.cbios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive986drivers/block/hd.cbios_info[drive].ctl   = hd_info[drive].ctl = *(8+BIOS);
drive987drivers/block/hd.cbios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive988drivers/block/hd.cbios_info[drive].sect  = hd_info[drive].sect = *(14+BIOS);
drive990drivers/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);
drive1504drivers/scsi/fdomain.cint              drive;
drive1549drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1552drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1557drivers/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);