taglinefilesource code
drive170drivers/block/floppy.c#define UDP (&drive_params[drive])
drive171drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive172drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive173drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive519drivers/block/floppy.cstatic int disk_change(int drive)
drive521drivers/block/floppy.cint fdc=FDC(drive);
drive525drivers/block/floppy.cif(! (FDCS->dor & (0x10 << UNIT(drive))) ||
drive526drivers/block/floppy.c(FDCS->dor & 3) != UNIT(drive) ||
drive527drivers/block/floppy.cfdc != FDC(drive)){
drive529drivers/block/floppy.cDPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive),
drive536drivers/block/floppy.cDPRINT1("checking disk change line for drive %d\n",drive);
drive553drivers/block/floppy.ccurrent_type[drive] != NULL)
drive556drivers/block/floppy.ccurrent_type[drive] = NULL;
drive576drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive586drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive592drivers/block/floppy.cdisk_change(drive);
drive599drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive623drivers/block/floppy.cint drive;
drive629drivers/block/floppy.cfor ( drive = 0; drive < N_DRIVE; drive++)
drive630drivers/block/floppy.cif (FDC(drive) == fdc &&
drive636drivers/block/floppy.cstatic void set_fdc(int drive)
drive638drivers/block/floppy.cif (drive >= 0 && drive < N_DRIVE){
drive639drivers/block/floppy.cfdc = FDC(drive);
drive640drivers/block/floppy.ccurrent_drive = drive;
drive651drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive670drivers/block/floppy.cset_fdc(drive);
drive674drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive675drivers/block/floppy.cif(lock_fdc(drive,interruptible)) return -EINTR;
drive717drivers/block/floppy.cstatic void floppy_off(unsigned int drive)
drive720drivers/block/floppy.cregister int fdc=FDC(drive);
drive722drivers/block/floppy.cif( !(FDCS->dor & ( 0x10 << UNIT(drive))))
drive725drivers/block/floppy.cdel_timer(motor_off_timer+drive);
drive733drivers/block/floppy.cmotor_off_timer[drive].expires = UDP->spindown - delta;
drive735drivers/block/floppy.cadd_timer(motor_off_timer+drive);
drive745drivers/block/floppy.cint i, drive, saved_drive;
drive752drivers/block/floppy.cdrive = (saved_drive + i + 1 ) % N_DRIVE;
drive755drivers/block/floppy.cset_fdc(drive);
drive756drivers/block/floppy.cif(! (set_dor( fdc, ~3, UNIT(drive) | ( 0x10 << UNIT(drive))) &
drive757drivers/block/floppy.c(0x10 << UNIT(drive))))
drive760drivers/block/floppy.cset_dor( fdc, ~( 0x10 << UNIT(drive) ), 0 );
drive1891drivers/block/floppy.cint drive=DRIVE(device);
drive1893drivers/block/floppy.cLOCK_FDC(drive,1);
drive2562drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2569drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2601drivers/block/floppy.cstatic char *drive_name(int type, int drive )
drive2628drivers/block/floppy.cint i, drive, count, ret;
drive2632drivers/block/floppy.cfor ( drive= 0; drive < N_DRIVE; drive++){
drive2633drivers/block/floppy.cif ( FDC(drive) != fdc)
drive2635drivers/block/floppy.cif ( drive == current_drive ){
drive2718drivers/block/floppy.cint i,device,drive,type,cnt;
drive2727drivers/block/floppy.cdrive = DRIVE(device);
drive2733drivers/block/floppy.cname = drive_name(type,drive);
drive2746drivers/block/floppy.celse if ((this_floppy = current_type[drive]) ==
drive2751drivers/block/floppy.cLOCK_FDC(drive,1);
drive2778drivers/block/floppy.cLOCK_FDC(drive,1);
drive2793drivers/block/floppy.cLOCK_FDC(drive,1);
drive2794drivers/block/floppy.ccurrent_type[drive] = NULL;
drive2795drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive2800drivers/block/floppy.cLOCK_FDC(drive,1);
drive2815drivers/block/floppy.cLOCK_FDC(drive,1);
drive2819drivers/block/floppy.cset_bit(drive, &fake_change);
drive2839drivers/block/floppy.cLOCK_FDC(drive,1);
drive2844drivers/block/floppy.cuser_params[drive] = newparams;
drive2845drivers/block/floppy.cif (buffer_drive == drive &&
drive2846drivers/block/floppy.cbuffer_max > user_params[drive].sect)
drive2847drivers/block/floppy.cbuffer_max=user_params[drive].sect;
drive2848drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive2849drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive2860drivers/block/floppy.cuser_params[drive].sect ||
drive2867drivers/block/floppy.creturn user_reset_fdc( drive, (int)param, 1);
drive2879drivers/block/floppy.cLOCK_FDC(drive,1);
drive2898drivers/block/floppy.cint drive;
drive2901drivers/block/floppy.cdrive=0;
drive2904drivers/block/floppy.cdrive=1;
drive2911drivers/block/floppy.cfor (drive=0; drive < N_DRIVE; drive++){
drive2923drivers/block/floppy.cALLOWED_DRIVE_MASK |= 1 << drive;
drive2924drivers/block/floppy.cprintk("fd%d is %s", drive,
drive2927drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,
drive2938drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive2951drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive2969drivers/block/floppy.cint drive;
drive2971drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive2998drivers/block/floppy.cint drive;
drive3006drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3007drivers/block/floppy.cif (drive >= N_DRIVE || 
drive3008drivers/block/floppy.c!( ALLOWED_DRIVE_MASK & ( 1 << drive)) ||
drive3009drivers/block/floppy.cfdc_state[FDC(drive)].version == FDC_NONE)
drive3038drivers/block/floppy.cif (buffer_drive == drive)
drive3071drivers/block/floppy.cint drive = DRIVE( dev );
drive3082drivers/block/floppy.clock_fdc(drive,0);
drive3088drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3089drivers/block/floppy.c(!TYPE(dev) && !current_type[drive]))
drive3100drivers/block/floppy.c#define NO_GEOM (!current_type[drive] && !TYPE(dev))
drive3102drivers/block/floppy.cint drive=DRIVE(dev);
drive3105drivers/block/floppy.cif(UTESTF(FD_DISK_CHANGED) || test_bit(drive, &fake_change) || NO_GEOM){
drive3106drivers/block/floppy.clock_fdc(drive,0);
drive3108drivers/block/floppy.cif(! (cf || test_bit(drive, &fake_change) || NO_GEOM)){
drive3114drivers/block/floppy.cif ( buffer_drive == drive)
drive3116drivers/block/floppy.cclear_bit(drive, &fake_change);
drive3336drivers/block/floppy.cint i,drive;
drive3379drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE ; drive++) {
drive3475drivers/block/floppy.cint drive;
drive3497drivers/block/floppy.cfor(drive=0; drive < N_FDC * 4; drive++)
drive3498drivers/block/floppy.cif( motor_off_timer[drive].next )
drive3499drivers/block/floppy.cprintk("motor off timer %d still active\n", drive);
drive175drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive178drivers/block/genhd.cint start = drive<<dev->minor_shift;
drive182drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive183drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive194drivers/block/genhd.cint drive;
drive202drivers/block/genhd.cfor (drive=0 ; drive<dev->nr_real ; drive++) {
drive203drivers/block/genhd.ccurrent_minor = 1+(drive<<dev->minor_shift);
drive204drivers/block/genhd.ccheck_partition(dev, major+(drive<<dev->minor_shift));
drive208drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive215drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive222drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive234drivers/block/hd.cif (!controller_ready(drive, head)) {
drive239drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive241drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive246drivers/block/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive955drivers/block/hd.cint drive, i;
drive961drivers/block/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive962drivers/block/hd.cbios_info[drive].cyl   = hd_info[drive].cyl = *(unsigned short *) BIOS;
drive963drivers/block/hd.cbios_info[drive].head  = hd_info[drive].head = *(2+BIOS);
drive964drivers/block/hd.cbios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive965drivers/block/hd.cbios_info[drive].ctl   = hd_info[drive].ctl = *(8+BIOS);
drive966drivers/block/hd.cbios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive967drivers/block/hd.cbios_info[drive].sect  = hd_info[drive].sect = *(14+BIOS);
drive969drivers/block/hd.cif (hd_info[drive].cyl && NR_HD == drive)
drive176drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].nsectors_buffered = 0;
drive332drivers/block/ide-cd.cstruct cdrom_info *info = &cdrom_info[dev->hwif][dev->select.b.drive];
drive537drivers/block/ide-cd.cstruct cdrom_info *info = &cdrom_info[dev->hwif][dev->select.b.drive];
drive874drivers/block/ide-cd.creq.dev = MKDEV (major, (dev->select.b.drive) << PARTN_BITS);
drive1098drivers/block/ide-cd.cstruct atapi_toc *toc = cdrom_info[dev->hwif][dev->select.b.drive].toc;
drive1105drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].toc = toc;
drive1298drivers/block/ide-cd.ctoc = cdrom_info[dev->hwif][dev->select.b.drive].toc;
drive1394drivers/block/ide-cd.ctoc = cdrom_info[dev->hwif][dev->select.b.drive].toc;
drive1611drivers/block/ide-cd.cide_capacity[dev->hwif][dev->select.b.drive] = 0x1fffff;
drive1613drivers/block/ide-cd.cide_blksizes[dev->hwif][dev->select.b.drive << PARTN_BITS] = CD_FRAMESIZE;
drive1623drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].toc               = NULL;
drive1624drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].sector_buffer     = NULL;
drive1625drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].sector_buffered   = 0;
drive1626drivers/block/ide-cd.ccdrom_info[dev->hwif][dev->select.b.drive].nsectors_buffered = 0;
drive284drivers/block/ide.cunsigned drive    : 1;  /* drive number */
drive1036drivers/block/ide.cunsigned int minor, drive;
drive1066drivers/block/ide.cdrive = minor >> PARTN_BITS;
drive1067drivers/block/ide.cide_cur_dev[HWIF] = dev = &ide_dev[HWIF][drive];
drive1068drivers/block/ide.cif ((MAJOR(rq->dev) != ide_major[HWIF]) || (drive >= MAX_DRIVES)) {
drive1243drivers/block/ide.cunsigned int drive = DEVICE_NR(i_rdev);
drive1246drivers/block/ide.cif (drive < MAX_DRIVES) {
drive1248drivers/block/ide.ccase IDE0_MAJOR:  dev = &ide_dev[0][drive];
drive1251drivers/block/ide.ccase IDE1_MAJOR:  dev = &ide_dev[1][drive];
drive1307drivers/block/ide.cunsigned int i, major, start, drive = DEVICE_NR(i_rdev);
drive1326drivers/block/ide.cstart = drive << PARTN_BITS;
drive1337drivers/block/ide.cgd->part[start].nr_sects = ide_capacity[DEV_HWIF][drive];
drive1338drivers/block/ide.cresetup_one_dev(gd, drive);
drive1706drivers/block/ide.cide_capacity[DEV_HWIF][dev->select.b.drive] = capacity;
drive1844drivers/block/ide.cif (dev->select.b.drive == 1) {
drive1935drivers/block/ide.cint i, hwif, drive = next_drive++;
drive1939drivers/block/ide.cif (drive < 2) {
drive1944drivers/block/ide.chwif = (drive > 1);
drive1946drivers/block/ide.cif (drive > 3) {
drive1950drivers/block/ide.cdrive = drive & 1;
drive1951drivers/block/ide.cprintk("%s: ", ide_devname[hwif][drive]);
drive1956drivers/block/ide.cdev = &ide_dev[hwif][drive];
drive1987drivers/block/ide.cide_capacity[HWIF][drive] = BIOS_SECTORS(dev);
drive2032drivers/block/ide.cbyte drive, cmos_disks, *BIOS = (byte *) &drive_info;
drive2037drivers/block/ide.cfor (drive = 0; drive < MAX_DRIVES; drive++) {
drive2038drivers/block/ide.cide_dev_t *dev = &ide_dev[0][drive];
drive2039drivers/block/ide.cif ((cmos_disks & (0xf0 >> (drive*4))) && !dev->present) {
drive2048drivers/block/ide.cide_capacity[0][drive] = BIOS_SECTORS(dev);
drive2057drivers/block/ide.cint drive;
drive2059drivers/block/ide.cfor (drive = 0; drive < (MAX_DRIVES<<PARTN_BITS); drive++)
drive2060drivers/block/ide.cide_blksizes[hwif][drive] = 1024;
drive2064drivers/block/ide.cfor (drive = 0; drive < MAX_DRIVES; drive++) {
drive2065drivers/block/ide.cide_dev_t *dev = &ide_dev[hwif][drive];
drive2066drivers/block/ide.cdev->select.all      = (drive<<4)|0xa0;
drive2080drivers/block/ide.cide_hd[hwif][drive<<PARTN_BITS].start_sect = 0;
drive2081drivers/block/ide.cdev->name = ide_devname[hwif][drive];
drive2122drivers/block/ide.cstatic int drive;
drive2124drivers/block/ide.cfor (drive = 0; drive < MAX_DRIVES; drive++) {
drive2125drivers/block/ide.cide_dev_t *dev = &ide_dev[HWIF][drive];
drive2127drivers/block/ide.cide_hd[HWIF][drive<<PARTN_BITS].nr_sects = ide_capacity[HWIF][drive];
drive2130drivers/block/ide.cide_hd[HWIF][drive<<PARTN_BITS].start_sect = -1;
drive324drivers/block/xd.cstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
drive331drivers/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);
drive334drivers/block/xd.ccontrol = xd_info[drive].control;
drive338drivers/block/xd.ctrack = block / xd_info[drive].sectors;
drive339drivers/block/xd.chead = track % xd_info[drive].heads;
drive340drivers/block/xd.ccylinder = track / xd_info[drive].heads;
drive341drivers/block/xd.csector = block % xd_info[drive].sectors;
drive344drivers/block/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive348drivers/block/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive353drivers/block/xd.cxd_recalibrate(drive);
drive374drivers/block/xd.cstatic void xd_recalibrate (u_char drive)
drive378drivers/block/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive422drivers/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)
drive425drivers/block/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive509drivers/block/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive538drivers/block/xd.cstatic void xd_dtc_init_drive (u_char drive)
drive542drivers/block/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive544drivers/block/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive545drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive546drivers/block/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive548drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive549drivers/block/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive550drivers/block/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive552drivers/block/xd.cxd_info[drive].control = 0;        /* control byte */
drive554drivers/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]);
drive555drivers/block/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive557drivers/block/xd.cprintk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive);
drive560drivers/block/xd.cprintk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive);
drive582drivers/block/xd.cstatic void xd_wd_init_drive (u_char drive)
drive586drivers/block/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive588drivers/block/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive589drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive590drivers/block/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive592drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive593drivers/block/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive594drivers/block/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive596drivers/block/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive598drivers/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]);
drive601drivers/block/xd.cprintk("xd_wd_init_drive: error reading geometry for drive %d\n",drive);  
drive621drivers/block/xd.cstatic void xd_seagate_init_drive (u_char drive)
drive625drivers/block/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive627drivers/block/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive628drivers/block/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive629drivers/block/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive630drivers/block/xd.cxd_info[drive].control = 0;          /* control byte */
drive633drivers/block/xd.cprintk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive);
drive655drivers/block/xd.cstatic void xd_omti_init_drive (u_char drive)
drive658drivers/block/xd.cxd_override_init_drive(drive);
drive661drivers/block/xd.cxd_info[drive].control = 2;
drive666drivers/block/xd.cstatic void xd_override_init_drive (u_char drive)
drive674drivers/block/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive682drivers/block/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive683drivers/block/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive684drivers/block/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive685drivers/block/xd.cxd_info[drive].control = 0;
drive702drivers/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)
drive706drivers/block/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive717drivers/block/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);
drive1547drivers/scsi/fdomain.cint              drive;
drive1603drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1607drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 );
drive1609drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1617drivers/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);