taglinefilesource code
drive486drivers/block/cmd640.cvoid cmd640_tune_drive(ide_drive_t* drive) {
drive498drivers/block/cmd640.cinterface_number = HWIF(drive) - ide_hwifs;
drive502drivers/block/cmd640.cdrive_number = drive - HWIF(drive)->drives;
drive504drivers/block/cmd640.cid = drive->id;
drive223drivers/block/floppy.c#define UDP (&drive_params[drive])
drive224drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive225drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive226drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive575drivers/block/floppy.cstatic void reschedule_timeout(int drive, const char *message, int marg)
drive577drivers/block/floppy.cif (drive == CURRENTD)
drive578drivers/block/floppy.cdrive = current_drive;
drive580drivers/block/floppy.cif (drive < 0 || drive > N_DRIVE) {
drive582drivers/block/floppy.cdrive=0;
drive646drivers/block/floppy.cstatic int disk_change(int drive)
drive648drivers/block/floppy.cint fdc=FDC(drive);
drive652drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))) ||
drive653drivers/block/floppy.c(FDCS->dor & 3) != UNIT(drive) ||
drive654drivers/block/floppy.cfdc != FDC(drive)){
drive656drivers/block/floppy.cDPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive),
drive663drivers/block/floppy.cDPRINT1("checking disk change line for drive %d\n",drive);
drive680drivers/block/floppy.ccurrent_type[drive] != NULL)
drive683drivers/block/floppy.ccurrent_type[drive] = NULL;
drive703drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive713drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive719drivers/block/floppy.cdisk_change(drive);
drive726drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive750drivers/block/floppy.cint drive;
drive756drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++)
drive757drivers/block/floppy.cif (FDC(drive) == fdc &&
drive763drivers/block/floppy.cstatic void set_fdc(int drive)
drive765drivers/block/floppy.cif (drive >= 0 && drive < N_DRIVE){
drive766drivers/block/floppy.cfdc = FDC(drive);
drive767drivers/block/floppy.ccurrent_drive = drive;
drive782drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive799drivers/block/floppy.creschedule_timeout(drive, "lock fdc", 0);
drive800drivers/block/floppy.cset_fdc(drive);
drive804drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive805drivers/block/floppy.cif (lock_fdc(drive,interruptible)) return -EINTR;
drive846drivers/block/floppy.cstatic void floppy_off(unsigned int drive)
drive849drivers/block/floppy.cregister int fdc=FDC(drive);
drive851drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))))
drive854drivers/block/floppy.cdel_timer(motor_off_timer+drive);
drive862drivers/block/floppy.cmotor_off_timer[drive].expires = jiffies + UDP->spindown - delta;
drive864drivers/block/floppy.cadd_timer(motor_off_timer+drive);
drive874drivers/block/floppy.cint i, drive, saved_drive;
drive881drivers/block/floppy.cdrive = (saved_drive + i + 1) % N_DRIVE;
drive884drivers/block/floppy.cset_fdc(drive);
drive885drivers/block/floppy.cif (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
drive886drivers/block/floppy.c(0x10 << UNIT(drive))))
drive889drivers/block/floppy.cset_dor(fdc, ~(0x10 << UNIT(drive)), 0);
drive2047drivers/block/floppy.cint drive=DRIVE(device);
drive2049drivers/block/floppy.cLOCK_FDC(drive,1);
drive2728drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2733drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2772drivers/block/floppy.cstatic inline const char *drive_name(int type, int drive)
drive2959drivers/block/floppy.cint drive, ret, ret2;
drive2964drivers/block/floppy.cfor (drive= 0; drive < N_DRIVE; drive++){
drive2965drivers/block/floppy.cif (FDC(drive) != fdc)
drive2967drivers/block/floppy.cif (drive == current_drive){
drive3018drivers/block/floppy.cstatic inline void clear_write_error(int drive)
drive3024drivers/block/floppy.cint drive, int type, int device)
drive3039drivers/block/floppy.cLOCK_FDC(drive,1);
drive3043drivers/block/floppy.cset_bit(drive, &fake_change);
drive3059drivers/block/floppy.cLOCK_FDC(drive,1);
drive3064drivers/block/floppy.cuser_params[drive] = *g;
drive3065drivers/block/floppy.cif (buffer_drive == drive)
drive3066drivers/block/floppy.cSUPBOUND(buffer_max, user_params[drive].sect);
drive3067drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive3068drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive3078drivers/block/floppy.cif (DRS->maxblock > user_params[drive].sect || DRS->maxtrack)
drive3182drivers/block/floppy.cint i,drive,type;
drive3199drivers/block/floppy.cdrive = DRIVE(device);
drive3225drivers/block/floppy.cLOCK_FDC(drive,1);
drive3226drivers/block/floppy.ccurrent_type[drive] = NULL;
drive3227drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive3233drivers/block/floppy.cdrive, type, device);
drive3238drivers/block/floppy.coutparam = (char *) current_type[drive];
drive3258drivers/block/floppy.cLOCK_FDC(drive,1);
drive3269drivers/block/floppy.coutparam = drive_name(type,drive);
drive3277drivers/block/floppy.cLOCK_FDC(drive,1);
drive3284drivers/block/floppy.creturn user_reset_fdc(drive, (int)param, 1);
drive3297drivers/block/floppy.cLOCK_FDC(drive,1);
drive3304drivers/block/floppy.cLOCK_FDC(drive,1);
drive3325drivers/block/floppy.cint drive;
drive3328drivers/block/floppy.cdrive=0;
drive3331drivers/block/floppy.cdrive=1;
drive3338drivers/block/floppy.cfor (drive=0; drive < N_DRIVE; drive++){
drive3350drivers/block/floppy.callowed_drive_mask |= 1 << drive;
drive3351drivers/block/floppy.cprintk("fd%d is %s", drive,
drive3354drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,
drive3365drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3378drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3395drivers/block/floppy.cint drive;
drive3397drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3422drivers/block/floppy.cint drive;
drive3432drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3433drivers/block/floppy.cif (drive >= N_DRIVE ||
drive3434drivers/block/floppy.c!(allowed_drive_mask & (1 << drive)) ||
drive3435drivers/block/floppy.cfdc_state[FDC(drive)].version == FDC_NONE)
drive3490drivers/block/floppy.cif (buffer_drive == drive)
drive3523drivers/block/floppy.cint drive = DRIVE(dev);
drive3534drivers/block/floppy.clock_fdc(drive,0);
drive3541drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3542drivers/block/floppy.c(!TYPE(dev) && !current_type[drive]))
drive3553drivers/block/floppy.c#define NO_GEOM (!current_type[drive] && !TYPE(dev))
drive3555drivers/block/floppy.cint drive=DRIVE(dev);
drive3560drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3562drivers/block/floppy.clock_fdc(drive,0);
drive3564drivers/block/floppy.cif (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){
drive3570drivers/block/floppy.cif (buffer_drive == drive)
drive3572drivers/block/floppy.cclear_bit(drive, &fake_change);
drive3824drivers/block/floppy.cint i,unit,drive;
drive3866drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++) {
drive3961drivers/block/floppy.cint drive;
drive3994drivers/block/floppy.cfor (drive=0; drive < N_FDC * 4; drive++)
drive3995drivers/block/floppy.cif (motor_off_timer[drive].next)
drive3996drivers/block/floppy.cprintk("motor off timer %d still active\n", drive);
drive511drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive514drivers/block/genhd.cint first_minor  = drive << dev->minor_shift;
drive534drivers/block/genhd.cint i, drive;
drive543drivers/block/genhd.cfor (drive = 0 ; drive < dev->nr_real ; drive++) {
drive544drivers/block/genhd.cint first_minor  = drive << dev->minor_shift;
drive206drivers/block/hd.cstatic int controller_ready(unsigned int drive, unsigned int head)
drive213drivers/block/hd.coutb_p(0xA0 | (drive<<4) | head, HD_CURRENT);
drive220drivers/block/hd.cstatic void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
drive232drivers/block/hd.cif (!controller_ready(drive, head)) {
drive237drivers/block/hd.coutb_p(hd_info[drive].ctl,HD_CMD);
drive239drivers/block/hd.coutb_p(hd_info[drive].wpcom>>2,++port);
drive244drivers/block/hd.coutb_p(0xA0|(drive<<4)|head,++port);
drive962drivers/block/hd.cint cmos_disks, drive;
drive964drivers/block/hd.cfor (drive=0 ; drive<2 ; drive++) {
drive965drivers/block/hd.cbios_info[drive].cyl   = hd_info[drive].cyl = *(unsigned short *) BIOS;
drive966drivers/block/hd.cbios_info[drive].head  = hd_info[drive].head = *(2+BIOS);
drive967drivers/block/hd.cbios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
drive968drivers/block/hd.cbios_info[drive].ctl   = hd_info[drive].ctl = *(8+BIOS);
drive969drivers/block/hd.cbios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
drive970drivers/block/hd.cbios_info[drive].sect  = hd_info[drive].sect = *(14+BIOS);
drive972drivers/block/hd.cif (hd_info[drive].cyl && NR_HD == drive)
drive195drivers/block/ide-cd.c#define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect))
drive207drivers/block/ide-cd.c#define CDROM_STATE_FLAGS(drive)  ((struct ide_cd_state_flags *)&((drive)->bios_head))
drive225drivers/block/ide-cd.cvoid cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive228drivers/block/ide-cd.cide_input_data (drive, buffer, bytecount / 4);
drive237drivers/block/ide-cd.cvoid cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive240drivers/block/ide-cd.cide_output_data (drive, buffer, bytecount / 4);
drive397drivers/block/ide-cd.cvoid cdrom_analyze_sense_data (ide_drive_t *drive, 
drive415drivers/block/ide-cd.cprintk ("ATAPI device %s:\n", drive->name);
drive502drivers/block/ide-cd.cdrive->name,
drive523drivers/block/ide-cd.cstatic void cdrom_queue_request_sense (ide_drive_t *drive, 
drive535drivers/block/ide-cd.creqbuf = &drive->cdrom_info.sense_data;
drive539drivers/block/ide-cd.cpc = &HWIF(drive)->request_sense_pc;
drive557drivers/block/ide-cd.crq = &HWIF(drive)->request_sense_request;
drive562drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive566drivers/block/ide-cd.cstatic void cdrom_end_request (int uptodate, ide_drive_t *drive)
drive568drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive582drivers/block/ide-cd.ccdrom_analyze_sense_data (drive,
drive587drivers/block/ide-cd.cide_end_request (uptodate, HWGROUP(drive));
drive593drivers/block/ide-cd.cstatic void cdrom_saw_media_change (ide_drive_t *drive)
drive595drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 1;
drive596drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 0;
drive597drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive603drivers/block/ide-cd.cstatic int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret)
drive605drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive620drivers/block/ide-cd.cprintk ("%s : missing request in cdrom_decode_status\n", drive->name);
drive633drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive634drivers/block/ide-cd.cide_error (drive, "request sense failure", stat);
drive648drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive656drivers/block/ide-cd.cprintk ("%s : tray open or drive not ready\n", drive->name);
drive662drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive663drivers/block/ide-cd.cprintk ("%s: media changed\n", drive->name);
drive669drivers/block/ide-cd.cide_dump_status (drive, "packet command error", stat);
drive687drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive690drivers/block/ide-cd.ccdrom_queue_request_sense (drive, sem, pc->sense_data, pc);
drive700drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive703drivers/block/ide-cd.cprintk ("%s : tray open\n", drive->name);
drive704drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive710drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive716drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive723drivers/block/ide-cd.cide_dump_status (drive, "command error", stat);
drive724drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive730drivers/block/ide-cd.cide_error (drive, "cdrom_decode_status", stat);
drive737drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive743drivers/block/ide-cd.ccdrom_queue_request_sense (drive, NULL, NULL, NULL);
drive759drivers/block/ide-cd.cstatic int cdrom_start_packet_command (ide_drive_t *drive, int xferlen,
drive763drivers/block/ide-cd.cif (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1;
drive772drivers/block/ide-cd.cOUT_BYTE (drive->ctl, IDE_CONTROL_REG);
drive774drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive776drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive782drivers/block/ide-cd.c(*handler) (drive);
drive794drivers/block/ide-cd.cstatic int cdrom_transfer_packet_command (ide_drive_t *drive,
drive798drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive805drivers/block/ide-cd.cif (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1;
drive810drivers/block/ide-cd.cif (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1;
drive814drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive817drivers/block/ide-cd.ccdrom_out_bytes (drive, cmd_buf, cmd_len);
drive835drivers/block/ide-cd.cstatic void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector,
drive838drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive867drivers/block/ide-cd.ccdrom_in_bytes (drive, dest, SECTOR_SIZE);
drive878drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive890drivers/block/ide-cd.cint cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
drive900drivers/block/ide-cd.cdrive->name);
drive907drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive916drivers/block/ide-cd.cdrive->name, ireason);
drive919drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive927drivers/block/ide-cd.cstatic void cdrom_read_intr (ide_drive_t *drive)
drive932drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive935drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive949drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive950drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive953drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive959drivers/block/ide-cd.cif (cdrom_read_check_ireason (drive, len, ireason)) return;
drive966drivers/block/ide-cd.cdrive->name, len);
drive968drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive983drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive999drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1005drivers/block/ide-cd.ccdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer);
drive1019drivers/block/ide-cd.ccdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE);
drive1032drivers/block/ide-cd.cide_set_handler (drive, &cdrom_read_intr, WAIT_CMD);
drive1040drivers/block/ide-cd.cstatic int cdrom_read_from_buffer (ide_drive_t *drive)
drive1042drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive1043drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1055drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1070drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1076drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1086drivers/block/ide-cd.cdrive->name, rq->sector);
drive1087drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1102drivers/block/ide-cd.cstatic void cdrom_start_read_continuation (ide_drive_t *drive)
drive1105drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1128drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive1129drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1154drivers/block/ide-cd.c(void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c),
drive1162drivers/block/ide-cd.cstatic void cdrom_start_read (ide_drive_t *drive, unsigned int block)
drive1164drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1180drivers/block/ide-cd.cif (cdrom_read_from_buffer (drive))
drive1184drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive1187drivers/block/ide-cd.ccdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation);
drive1199drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1205drivers/block/ide-cd.cstatic void cdrom_pc_intr (ide_drive_t *drive)
drive1208drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1212drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive1232drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1236drivers/block/ide-cd.cdrive->name, pc->buflen);
drive1238drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1255drivers/block/ide-cd.cdrive->name);
drive1261drivers/block/ide-cd.ccdrom_out_bytes (drive, pc->buffer, thislen);
drive1268drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive1284drivers/block/ide-cd.cdrive->name);
drive1290drivers/block/ide-cd.ccdrom_in_bytes (drive, pc->buffer, thislen);
drive1297drivers/block/ide-cd.ccdrom_in_bytes (drive, &dum, sizeof (dum));
drive1309drivers/block/ide-cd.cdrive->name, ireason);
drive1314drivers/block/ide-cd.cide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD);
drive1318drivers/block/ide-cd.cstatic void cdrom_do_pc_continuation (ide_drive_t *drive)
drive1320drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1324drivers/block/ide-cd.ccdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr);
drive1328drivers/block/ide-cd.cstatic void cdrom_do_packet_command (ide_drive_t *drive)
drive1331drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1340drivers/block/ide-cd.ccdrom_start_packet_command (drive, len, cdrom_do_pc_continuation);
drive1355drivers/block/ide-cd.cint cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc)
drive1372drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, &req, ide_wait);
drive1412drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->door_locked == 0 &&
drive1417drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, NULL);
drive1429drivers/block/ide-cd.cvoid ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block)
drive1431drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1434drivers/block/ide-cd.ccdrom_do_packet_command (drive);
drive1438drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1439drivers/block/ide-cd.cide_do_reset (drive);
drive1446drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1449drivers/block/ide-cd.ccdrom_start_read (drive, block);
drive1500drivers/block/ide-cd.ccdrom_check_status (ide_drive_t  *drive,
drive1510drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1516drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1527drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_doorlock)
drive1536drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1540drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1547drivers/block/ide-cd.cprintk ("%s: door locking not supported\n", drive->name);
drive1548drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
drive1550drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1560drivers/block/ide-cd.ccdrom_eject (ide_drive_t *drive, int ejectflag,
drive1570drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1575drivers/block/ide-cd.ccdrom_pause (ide_drive_t *drive, int pauseflag,
drive1585drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1590drivers/block/ide-cd.ccdrom_startstop (ide_drive_t *drive, int startflag,
drive1601drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1606drivers/block/ide-cd.ccdrom_read_capacity (ide_drive_t *drive, unsigned *capacity,
drive1624drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1635drivers/block/ide-cd.ccdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag,
drive1652drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1658drivers/block/ide-cd.ccdrom_read_toc (ide_drive_t *drive,
drive1663drivers/block/ide-cd.cstruct atapi_toc *toc = drive->cdrom_info.toc;
drive1674drivers/block/ide-cd.cdrive->cdrom_info.toc = toc;
drive1679drivers/block/ide-cd.cprintk ("%s: No cdrom TOC buffer!\n", drive->name);
drive1685drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid)
drive1686drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive1688drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid) return 0;
drive1694drivers/block/ide-cd.cmsf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc);
drive1698drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1705drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1718drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1726drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1739drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1756drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 1,
drive1772drivers/block/ide-cd.cstat = cdrom_read_capacity (drive, &toc->capacity, reqbuf);
drive1775drivers/block/ide-cd.cHWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS]
drive1777drivers/block/ide-cd.cdrive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME;
drive1780drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 1;
drive1787drivers/block/ide-cd.ccdrom_read_subchannel (ide_drive_t *drive,
drive1803drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1809drivers/block/ide-cd.ccdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag,
drive1824drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1829drivers/block/ide-cd.ccdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen,
drive1844drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1849drivers/block/ide-cd.ccdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end,
drive1861drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1867drivers/block/ide-cd.ccdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end,
drive1879drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd)
drive1889drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1897drivers/block/ide-cd.ccdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
drive1912drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_playaudio12)
drive1913drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive1923drivers/block/ide-cd.cstat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf);
drive1933drivers/block/ide-cd.c"trying PLAYAUDIO_MSF\n", drive->name);
drive1934drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive1935drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive1936drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive1947drivers/block/ide-cd.cint cdrom_get_toc_entry (ide_drive_t *drive, int track,
drive1955drivers/block/ide-cd.cstat = cdrom_read_toc (drive, reqbuf);
drive1958drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive1975drivers/block/ide-cd.ccdrom_read_block (ide_drive_t *drive, int format, int lba,
drive1993drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->old_readcd)
drive2004drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2010drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd == 0)
drive2013drivers/block/ide-cd.cdrive->name);
drive2014drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 1;
drive2015drivers/block/ide-cd.creturn cdrom_read_block (drive, format, lba, buf, buflen, reqbuf);
drive2023drivers/block/ide-cd.cint ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
drive2032drivers/block/ide-cd.cif (drive->usage > 1)
drive2035drivers/block/ide-cd.cstat = cdrom_lockdoor (drive, 0, NULL);
drive2038drivers/block/ide-cd.creturn cdrom_eject (drive, 0, NULL);
drive2043drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close = arg;
drive2048drivers/block/ide-cd.creturn cdrom_pause (drive, 1, NULL);
drive2051drivers/block/ide-cd.creturn cdrom_pause (drive, 0, NULL);
drive2054drivers/block/ide-cd.creturn cdrom_startstop (drive, 1, NULL);
drive2060drivers/block/ide-cd.cstat = cdrom_startstop (drive, 0, NULL);
drive2063drivers/block/ide-cd.creturn cdrom_eject (drive, 1, NULL);
drive2083drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2099drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL);
drive2101drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL);
drive2110drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2123drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2126drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2148drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL);
drive2183drivers/block/ide-cd.cstat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf),
drive2188drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive2242drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL);
drive2244drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 1, mask  , sizeof (buffer),NULL);
drive2254drivers/block/ide-cd.creturn cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL);
drive2266drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL);
drive2293drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2296drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2326drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2329drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2360drivers/block/ide-cd.cstat = cdrom_read_block (drive, 1, lba, buf,
drive2401drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2404drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2409drivers/block/ide-cd.cstat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL);
drive2422drivers/block/ide-cd.creturn ide_do_drive_cmd (drive, &req, ide_wait);
drive2461drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2483drivers/block/ide-cd.cint ide_cdrom_check_media_change (ide_drive_t *drive)
drive2487drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive2489drivers/block/ide-cd.cretval = CDROM_STATE_FLAGS (drive)->media_changed;
drive2490drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2496drivers/block/ide-cd.cint ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive)
drive2501drivers/block/ide-cd.c--drive->usage;
drive2506drivers/block/ide-cd.cif (drive->usage == 1)
drive2513drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2518drivers/block/ide-cd.ccdrom_eject (drive, 1, &my_reqbuf);
drive2519drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2525drivers/block/ide-cd.c--drive->usage;
drive2530drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, &my_reqbuf);
drive2533drivers/block/ide-cd.c(void) cdrom_read_toc (drive, &my_reqbuf);
drive2544drivers/block/ide-cd.cvoid ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive)
drive2546drivers/block/ide-cd.cif (drive->usage == 0)
drive2551drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 0, NULL);
drive2554drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->eject_on_close)
drive2555drivers/block/ide-cd.c(void) cdrom_eject (drive, 0, NULL);
drive2565drivers/block/ide-cd.cvoid ide_cdrom_setup (ide_drive_t *drive)
drive2567drivers/block/ide-cd.cblksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE;
drive2569drivers/block/ide-cd.cdrive->special.all = 0;
drive2570drivers/block/ide-cd.cdrive->ready_stat = 0;
drive2572drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2573drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid     = 0;
drive2574drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked   = 0;
drive2577drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close= 0;
drive2579drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 0;
drive2580drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->drq_interrupt =
drive2581drivers/block/ide-cd.c((drive->id->config & 0x0060) == 0x20);
drive2584drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0;
drive2585drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 0;
drive2586drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0;
drive2587drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0;
drive2588drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0;
drive2591drivers/block/ide-cd.cif (strcmp (drive->id->model, "CD220E") == 0 ||
drive2592drivers/block/ide-cd.cstrcmp (drive->id->model, "CD")     == 0)        /* Creative Labs */
drive2593drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2595drivers/block/ide-cd.celse if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 ||  /* Acer CD525E */
drive2596drivers/block/ide-cd.cstrcmp (drive->id->model, "OTI-SCYLLA") == 0)
drive2597drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2601drivers/block/ide-cd.celse if (strcmp (drive->id->model, "DCI-2S10") == 0)
drive2602drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2604drivers/block/ide-cd.celse if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */
drive2606drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2609drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2612drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V003S0DS") == 0 ||  /* Vertos */
drive2613drivers/block/ide-cd.cstrcmp (drive->id->model, "0V300SSD") == 0)
drive2615drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1;
drive2616drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive2617drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2620drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V004E0DT") == 0 ||
drive2621drivers/block/ide-cd.cstrcmp (drive->id->model, "0V400ETD") == 0)
drive2622drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2625drivers/block/ide-cd.cdrive->cdrom_info.toc               = NULL;
drive2626drivers/block/ide-cd.cdrive->cdrom_info.sector_buffer     = NULL;
drive2627drivers/block/ide-cd.cdrive->cdrom_info.sector_buffered   = 0;
drive2628drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive443drivers/block/ide-tape.c#define  IDETAPE_DATA_REG    (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET)
drive444drivers/block/ide-tape.c#define IDETAPE_ERROR_REG    (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET)
drive445drivers/block/ide-tape.c#define  IDETAPE_IREASON_REG    (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET)
drive446drivers/block/ide-tape.c#define IDETAPE_RESERVED3_REG    (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET)
drive447drivers/block/ide-tape.c#define IDETAPE_BCOUNTL_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET)
drive448drivers/block/ide-tape.c#define  IDETAPE_BCOUNTH_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET)
drive449drivers/block/ide-tape.c#define IDETAPE_DRIVESEL_REG    (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET)
drive450drivers/block/ide-tape.c#define  IDETAPE_STATUS_REG    (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET)
drive457drivers/block/ide-tape.c#define IDETAPE_FEATURES_REG    (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET)
drive458drivers/block/ide-tape.c#define IDETAPE_ATACOMMAND_REG    (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET)
drive459drivers/block/ide-tape.c#define IDETAPE_CONTROL_REG    (HWIF(drive)->ctl_port)
drive580drivers/block/ide-tape.cide_drive_t *drive;
drive787drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive788drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive789drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount);
drive795drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler);
drive796drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive);
drive802drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive);
drive805drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive);
drive806drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive);
drive812drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive);
drive813drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive);
drive815drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq);
drive816drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result);
drive818drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive);
drive819drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive);
drive833drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive);
drive842drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive);
drive844drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive);
drive846drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive);
drive849drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive);
drive876drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count);
drive883drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count);
drive891drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer);
drive898drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer);
drive906drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer);
drive913drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc);
drive915drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block);
drive916drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive);
drive917drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive);
drive923drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive);
drive936drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive);
drive940drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive);
drive941drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage);
drive942drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive);
drive943drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive);
drive944drivers/block/ide-tape.cvoid idetape_empty_read_pipeline (ide_drive_t *drive);
drive945drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive);
drive946drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive);
drive1001drivers/block/ide-tape.cint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id)
drive1144drivers/block/ide-tape.cidetape_chrdev.drive=drive;
drive1168drivers/block/ide-tape.cide_drive_t *drive;
drive1173drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive1183drivers/block/ide-tape.cdrive->name,idetape_chrdev.name,major);
drive1201drivers/block/ide-tape.cvoid idetape_setup (ide_drive_t *drive)
drive1204drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1212drivers/block/ide-tape.cdrive->ready_stat = 0;      /* With an ATAPI device, we can issue packet commands */
drive1214drivers/block/ide-tape.cHWIF(drive)->tape_drive=drive;
drive1237drivers/block/ide-tape.cidetape_get_mode_sense_results (drive);
drive1318drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive)
drive1322drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1331drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive1428drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler)
drive1435drivers/block/ide-tape.ctape=&(drive->tape);
drive1456drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1467drivers/block/ide-tape.c(*pc->callback)(drive);
drive1489drivers/block/ide-tape.cOUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG);
drive1491drivers/block/ide-tape.cide_set_handler (drive,handler,WAIT_CMD);      /* Set the interrupt routine */
drive1493drivers/block/ide-tape.cif (ide_wait_stat (drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) {   /* Wait for DRQ to be ready - Assuming Accelerated DRQ */  
drive1513drivers/block/ide-tape.cide_output_data (drive,pc->c,12/4);      /* Send the actual packet */
drive1526drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive)
drive1529drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1556drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1558drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive1564drivers/block/ide-tape.cidetape_postpone_request (drive);    /* Allow ide.c to handle other requests */
drive1574drivers/block/ide-tape.c(*pc->callback)(drive);      /* Command finished - Call the callback function */
drive1598drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1599drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1612drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1613drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1621drivers/block/ide-tape.cidetape_output_data (drive,pc->current_position,bcount.all);  /* Write the current buffer */
drive1623drivers/block/ide-tape.cidetape_input_data (drive,pc->current_position,bcount.all);  /* Read the current buffer */
drive1630drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);    /* And set the interrupt handler again */
drive1639drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive)
drive1642drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1656drivers/block/ide-tape.ctape->dsc_timer.data=(unsigned long) drive;
drive1664drivers/block/ide-tape.ctape->postponed_rq = rq = HWGROUP(drive)->rq;
drive1667drivers/block/ide-tape.cHWGROUP(drive)->rq = NULL;
drive1690drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1691drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1695drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc_direct called\n",drive->name);
drive1698drivers/block/ide-tape.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive1704drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);  /* request in the request queue */
drive1712drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1745drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1746drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive1747drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1753drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc called\n",drive->name);
drive1778drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1842drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1892drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1911drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1932drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive)
drive1935drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive1946drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
drive1960drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive)
drive1963drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1976drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1977drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive1988drivers/block/ide-tape.c(*pc->callback)(drive);
drive1993drivers/block/ide-tape.cprintk ("ide-tape: %s: DSC timeout.\n",drive->name);
drive2002drivers/block/ide-tape.c(*pc->callback)(drive);
drive2014drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive)
drive2022drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive2023drivers/block/ide-tape.cnew_rq=idetape_next_rq_storage (drive);
drive2028drivers/block/ide-tape.cidetape_queue_pc_head (drive,pc,new_rq);
drive2035drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive)
drive2041drivers/block/ide-tape.ctape=&(drive->tape);
drive2042drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2051drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2054drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2060drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive)
drive2066drivers/block/ide-tape.ctape=&(drive->tape);  
drive2067drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2079drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2088drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2093drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive)
drive2099drivers/block/ide-tape.ctape=&(drive->tape);
drive2100drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2112drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2115drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2120drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive)
drive2125drivers/block/ide-tape.ctape=&(drive->tape);
drive2128drivers/block/ide-tape.cidetape_pc_callback (drive);
drive2139drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2148drivers/block/ide-tape.cide_input_data (drive,buffer,wcount);
drive2160drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2169drivers/block/ide-tape.cide_output_data (drive,buffer,wcount);
drive2182drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount)
drive2310drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive)
drive2313drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2322drivers/block/ide-tape.cidetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer);
drive2323drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2327drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2338drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result)
drive2341drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2647drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive)
drive2654drivers/block/ide-tape.ctape=&(drive->tape);
drive2660drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2674drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2682drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2687drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2700drivers/block/ide-tape.cint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive2722drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive2728drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive2735drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive2757drivers/block/ide-tape.cide_drive_t *drive = hwgroup->drive;
drive2759drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive2760drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2789drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive2793drivers/block/ide-tape.cidetape_increase_max_pipeline_stages (drive);
drive2794drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2798drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive2808drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end);
drive2810drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next);
drive2813drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2820drivers/block/ide-tape.cvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block)
drive2823drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2825drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2848drivers/block/ide-tape.cide_end_request (0,HWGROUP (drive));      /* Let the common code handle it */
drive2878drivers/block/ide-tape.cidetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr);
drive2888drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2897drivers/block/ide-tape.cidetape_media_access_finished (drive);
drive2918drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive2922drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive2931drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive2941drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive2945drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive2954drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive2972drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive2977drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive2982drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive3008drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc)
drive3015drivers/block/ide-tape.creturn ide_do_drive_cmd (drive, &rq, ide_wait);
drive3038drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq)
drive3041drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive3044drivers/block/ide-tape.cbdev->current_request=HWGROUP (drive)->rq;    /* Since we may have taken it out */
drive3049drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive3086drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer)
drive3089drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3104drivers/block/ide-tape.creturn ide_do_drive_cmd (drive, &rq, ide_wait);
drive3112drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer)
drive3115drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3132drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3136drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3138drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3141drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);
drive3151drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer));
drive3163drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3179drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer)
drive3182drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3194drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3208drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3217drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer));
drive3232drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3245drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3250drivers/block/ide-tape.cvoid idetape_empty_read_pipeline (ide_drive_t *drive)
drive3253drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3273drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3283drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive)
drive3286drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3297drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3401drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive)
drive3406drivers/block/ide-tape.ctape=&(drive->tape);
drive3428drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive)
drive3433drivers/block/ide-tape.ctape=&(drive->tape);
drive3451drivers/block/ide-tape.cint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3454drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3474drivers/block/ide-tape.cvoid idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3477drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3525drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3526drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3537drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3538drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3547drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->temp_data_buffer);
drive3564drivers/block/ide-tape.cretval=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->temp_data_buffer);
drive3589drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3590drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3610drivers/block/ide-tape.cretval=idetape_add_chrdev_read_request (drive,blocks,tape->temp_data_buffer);
drive3632drivers/block/ide-tape.cide_drive_t *drive;
drive3642drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive3643drivers/block/ide-tape.ctape=&(drive->tape);
drive3647drivers/block/ide-tape.cidetape_empty_read_pipeline (drive);
drive3655drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->temp_data_buffer);
drive3674drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->temp_data_buffer);
drive3697drivers/block/ide-tape.cide_drive_t *drive;
drive3707drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive3708drivers/block/ide-tape.ctape=&(drive->tape);
drive3731drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,blocks,tape->temp_data_buffer);
drive3778drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3779drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3791drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3792drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3798drivers/block/ide-tape.cidetape_empty_read_pipeline (drive);
drive3811drivers/block/ide-tape.creturn (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count));
drive3820drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3828drivers/block/ide-tape.creturn (idetape_blkdev_ioctl (drive,inode,file,cmd,arg));
drive3885drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count)
drive3888drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3909drivers/block/ide-tape.creturn (idetape_space_over_filemarks (drive,mt_op,mt_count));
drive3919drivers/block/ide-tape.cidetape_empty_read_pipeline (drive);
drive3927drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3932drivers/block/ide-tape.creturn (idetape_rewind_tape (drive));
drive3935drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3937drivers/block/ide-tape.creturn (idetape_flush_tape_buffers (drive));
drive3940drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3943drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3945drivers/block/ide-tape.cretval=idetape_rewind_tape (drive);
drive3948drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3950drivers/block/ide-tape.creturn (idetape_position_tape (drive,mt_count));
drive3967drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count)
drive3970drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4001drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4006drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4023drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4027drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTFSF,mt_count-count);
drive4029drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTBSF,1));
drive4034drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4038drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTBSF,mt_count+count);
drive4040drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTFSF,1));
drive4054drivers/block/ide-tape.cide_drive_t *drive;
drive4066drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive4067drivers/block/ide-tape.ctape=&(drive->tape);
drive4084drivers/block/ide-tape.cif (idetape_rewind_tape (drive)) {
drive4101drivers/block/ide-tape.cide_drive_t *drive;
drive4112drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive4113drivers/block/ide-tape.ctape=&(drive->tape);
drive4117drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive4120drivers/block/ide-tape.cif (idetape_queue_pc_tail (drive,&pc)) {
drive4128drivers/block/ide-tape.cidetape_empty_read_pipeline (drive);
drive4129drivers/block/ide-tape.cif (idetape_rewind_tape (drive)) {
drive4152drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block)
drive4159drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4166drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4175drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive)
drive4185drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4192drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4195drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive)
drive4201drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4222drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive)
drive4225drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4394drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive)
drive4397drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4422drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage)
drive4425drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4449drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive)
drive4452drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4488drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive)
drive4491drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4497drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive4498drivers/block/ide-tape.c(void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end));
drive4507drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive)
drive4510drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive263drivers/block/ide.c#define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive)
drive267drivers/block/ide.c#define SET_RECOVERY_TIMER(drive)
drive325drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive328drivers/block/ide.cdrive->select.all    = (unit<<4)|0xa0;
drive329drivers/block/ide.cdrive->hwif      = hwif;
drive330drivers/block/ide.cdrive->ctl      = 0x08;
drive331drivers/block/ide.cdrive->ready_stat    = READY_STAT;
drive332drivers/block/ide.cdrive->bad_wstat    = BAD_W_STAT;
drive333drivers/block/ide.cdrive->special.b.recalibrate  = 1;
drive334drivers/block/ide.cdrive->special.b.set_geometry  = 1;
drive335drivers/block/ide.cdrive->name[0]      = 'h';
drive336drivers/block/ide.cdrive->name[1]      = 'd';
drive337drivers/block/ide.cdrive->name[2]      = 'a' + (h * MAX_DRIVES) + unit;
drive359drivers/block/ide.cvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive361drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive364drivers/block/ide.cif (drive->vlb_32bit) {
drive366drivers/block/ide.cif (drive->vlb_sync) {
drive370drivers/block/ide.cif (drive->unmask)
drive382drivers/block/ide.cvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive384drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive387drivers/block/ide.cif (drive->vlb_32bit) {
drive389drivers/block/ide.cif (drive->vlb_sync) {
drive393drivers/block/ide.cif (drive->unmask)
drive453drivers/block/ide.cvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout)
drive455drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive459drivers/block/ide.cdrive->name, hwgroup->handler, handler);
drive497drivers/block/ide.cstatic unsigned long current_capacity (ide_drive_t  *drive)
drive499drivers/block/ide.cstruct hd_driveid *id = drive->id;
drive502drivers/block/ide.cif (!drive->present)
drive504drivers/block/ide.cif (drive->media != ide_disk)
drive508drivers/block/ide.cdrive->select.b.lba = 1;
drive511drivers/block/ide.cdrive->select.b.lba = 0;
drive512drivers/block/ide.ccapacity = drive->cyl * drive->head * drive->sect;
drive514drivers/block/ide.creturn (capacity - drive->sect0);
drive527drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive529drivers/block/ide.cif (drive->present && drive->media == ide_cdrom)
drive530drivers/block/ide.cide_cdrom_setup(drive);
drive533drivers/block/ide.cif (drive->present && drive->media == ide_tape)
drive534drivers/block/ide.cidetape_setup(drive);
drive536drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive537drivers/block/ide.cif (!drive->present || drive->media != ide_disk) {
drive538drivers/block/ide.cdrive->part[0].start_sect = -1; /* skip partition check */
drive603drivers/block/ide.cstatic void atapi_reset_pollfunc (ide_drive_t *drive)
drive605drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive608drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive612drivers/block/ide.cprintk("%s: ATAPI reset complete\n", drive->name);
drive615drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive619drivers/block/ide.cprintk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat);
drive620drivers/block/ide.cdo_reset1 (drive, 1);  /* do it the old fashioned way */
drive632drivers/block/ide.cstatic void reset_pollfunc (ide_drive_t *drive)
drive634drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive635drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive640drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive686drivers/block/ide.cstatic void do_reset1 (ide_drive_t *drive, int  do_not_try_atapi)
drive690drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive691drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive698drivers/block/ide.cif (drive->media != ide_disk) {
drive700drivers/block/ide.cif (!drive->keep_settings)
drive701drivers/block/ide.cdrive->unmask = 0;
drive702drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive706drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive741drivers/block/ide.cOUT_BYTE(drive->ctl|6,IDE_CONTROL_REG);  /* set SRST and nIEN */
drive743drivers/block/ide.cOUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);  /* clear SRST, leave nIEN */
drive745drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive754drivers/block/ide.cvoid ide_do_reset (ide_drive_t *drive)
drive756drivers/block/ide.cdo_reset1 (drive, 0);
drive762drivers/block/ide.cvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err)
drive765drivers/block/ide.cstruct request *rq = HWGROUP(drive)->rq;
drive779drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive789drivers/block/ide.cbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat)
drive796drivers/block/ide.cprintk("%s: %s: status=0x%02x", drive->name, msg, stat);
drive798drivers/block/ide.cif (drive->media == ide_disk) {
drive817drivers/block/ide.cprintk("%s: %s: error=0x%02x", drive->name, msg, err);
drive819drivers/block/ide.cif (drive->media == ide_disk) {
drive843drivers/block/ide.cif (HWGROUP(drive)->rq)
drive844drivers/block/ide.cprintk(", sector=%ld", HWGROUP(drive)->rq->sector);
drive861drivers/block/ide.cstatic void try_to_flush_leftover_data (ide_drive_t *drive)
drive863drivers/block/ide.cint i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS;
drive869drivers/block/ide.cide_input_data (drive, buffer, wcount);
drive876drivers/block/ide.cvoid ide_error (ide_drive_t *drive, const char *msg, byte stat)
drive881drivers/block/ide.cerr = ide_dump_status(drive, msg, stat);
drive882drivers/block/ide.cif ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL)
drive886drivers/block/ide.cide_end_drive_cmd(drive, stat, err);
drive892drivers/block/ide.cif (drive->media == ide_disk && (stat & ERR_STAT)) {
drive900drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive906drivers/block/ide.cif (rq->errors > 3 && drive->using_dma) {  /* DMA troubles? */
drive907drivers/block/ide.cdrive->using_dma = 0;
drive908drivers/block/ide.cprintk("%s: DMA disabled\n", drive->name);
drive914drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive918drivers/block/ide.cide_do_reset(drive);
drive921drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive929drivers/block/ide.cstatic void read_intr (ide_drive_t *drive)
drive937drivers/block/ide.cide_error(drive, "read_intr", stat);
drive940drivers/block/ide.cmsect = drive->mult_count;
drive942drivers/block/ide.crq = HWGROUP(drive)->rq;
drive949drivers/block/ide.cide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
drive952drivers/block/ide.cdrive->name, rq->sector, rq->sector+nsect-1,
drive960drivers/block/ide.cide_end_request(1, HWGROUP(drive));
drive964drivers/block/ide.cide_set_handler (drive, &read_intr, WAIT_CMD);
drive971drivers/block/ide.cstatic void write_intr (ide_drive_t *drive)
drive975drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive978drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive981drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive993drivers/block/ide.cide_output_data (drive, rq->buffer, SECTOR_WORDS);
drive994drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive999drivers/block/ide.cide_error(drive, "write_intr", stat);
drive1006drivers/block/ide.cstatic void multwrite (ide_drive_t *drive)
drive1008drivers/block/ide.cstruct request *rq = &HWGROUP(drive)->wrq;
drive1009drivers/block/ide.cunsigned int mcount = drive->mult_count;
drive1017drivers/block/ide.cide_output_data(drive, rq->buffer, nsect<<7);
drive1020drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive1030drivers/block/ide.cpanic("%s: buffer list corrupted\n", drive->name);
drive1042drivers/block/ide.cstatic void multwrite_intr (ide_drive_t *drive)
drive1046drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive1049drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive1052drivers/block/ide.cmultwrite(drive);
drive1053drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1067drivers/block/ide.cide_error(drive, "multwrite_intr", stat);
drive1074drivers/block/ide.cstatic void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler)
drive1076drivers/block/ide.cide_set_handler (drive, handler, WAIT_CMD);
drive1077drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1085drivers/block/ide.cstatic void set_multmode_intr (ide_drive_t *drive)
drive1091drivers/block/ide.cdrive->mult_count = drive->mult_req;
drive1093drivers/block/ide.cdrive->mult_req = drive->mult_count = 0;
drive1094drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive1095drivers/block/ide.c(void) ide_dump_status(drive, "set_multmode", stat);
drive1102drivers/block/ide.cstatic void set_geometry_intr (ide_drive_t *drive)
drive1108drivers/block/ide.cide_error(drive, "set_geometry_intr", stat);
drive1114drivers/block/ide.cstatic void recal_intr (ide_drive_t *drive)
drive1120drivers/block/ide.cide_error(drive, "recal_intr", stat);
drive1126drivers/block/ide.cstatic void drive_cmd_intr (ide_drive_t *drive)
drive1132drivers/block/ide.cide_end_drive_cmd (drive, stat, GET_ERR());
drive1134drivers/block/ide.cide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */
drive1142drivers/block/ide.cstatic inline void do_special (ide_drive_t *drive)
drive1144drivers/block/ide.cspecial_t *s = &drive->special;
drive1146drivers/block/ide.cprintk("%s: do_special: 0x%02x\n", drive->name, s->all);
drive1150drivers/block/ide.cif (drive->media == ide_disk) {
drive1151drivers/block/ide.cOUT_BYTE(drive->sect,IDE_SECTOR_REG);
drive1152drivers/block/ide.cOUT_BYTE(drive->cyl,IDE_LCYL_REG);
drive1153drivers/block/ide.cOUT_BYTE(drive->cyl>>8,IDE_HCYL_REG);
drive1154drivers/block/ide.cOUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG);
drive1155drivers/block/ide.cide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr);
drive1159drivers/block/ide.cif (drive->media == ide_disk) {
drive1160drivers/block/ide.cide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr);
drive1164drivers/block/ide.cif (drive->media == ide_disk) {
drive1165drivers/block/ide.cif (drive->id && drive->mult_req > drive->id->max_multsect)
drive1166drivers/block/ide.cdrive->mult_req = drive->id->max_multsect;
drive1167drivers/block/ide.cide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr);
drive1169drivers/block/ide.cdrive->mult_req = 0;
drive1172drivers/block/ide.cprintk("%s: bad special flag: 0x%02x\n", drive->name, s->all);
drive1187drivers/block/ide.cint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout)
drive1197drivers/block/ide.cide_error(drive, "status error", stat);
drive1212drivers/block/ide.cide_error(drive, "status timeout", GET_STAT());
drive1221drivers/block/ide.cstatic inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block)
drive1223drivers/block/ide.cunsigned short io_base = HWIF(drive)->io_base;
drive1225drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1227drivers/block/ide.cif (drive->select.b.lba) {
drive1230drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ",
drive1236drivers/block/ide.cOUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1239drivers/block/ide.ctrack = block / drive->sect;
drive1240drivers/block/ide.csect  = block % drive->sect + 1;
drive1242drivers/block/ide.chead  = track % drive->head;
drive1243drivers/block/ide.ccyl   = track / drive->head;
drive1246drivers/block/ide.cOUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1249drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ", cyl,
drive1255drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive)))
drive1258drivers/block/ide.cide_set_handler(drive, &read_intr, WAIT_CMD);
drive1259drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET);
drive1264drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive)))
drive1267drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET);
drive1268drivers/block/ide.cif (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
drive1269drivers/block/ide.cprintk("%s: no DRQ after issuing %s\n", drive->name,
drive1270drivers/block/ide.cdrive->mult_count ? "MULTWRITE" : "WRITE");
drive1273drivers/block/ide.cif (!drive->unmask)
drive1275drivers/block/ide.cif (drive->mult_count) {
drive1276drivers/block/ide.cHWGROUP(drive)->wrq = *rq; /* scratchpad */
drive1277drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1278drivers/block/ide.cmultwrite(drive);
drive1280drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive1281drivers/block/ide.cide_output_data(drive, rq->buffer, SECTOR_WORDS);
drive1290drivers/block/ide.cdrive->name, args[0], args[1], args[2]);
drive1293drivers/block/ide.cide_cmd(drive, args[0], args[1], &drive_cmd_intr);
drive1301drivers/block/ide.cprintk("%s: DRIVE_CMD (null)\n", drive->name);
drive1303drivers/block/ide.cide_end_drive_cmd(drive, GET_STAT(), GET_ERR());
drive1307drivers/block/ide.cprintk("%s: bad command: %d\n", drive->name, rq->cmd);
drive1308drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive1318drivers/block/ide.cide_drive_t *drive;
drive1331drivers/block/ide.cdrive = &hwif->drives[unit];
drive1334drivers/block/ide.cprintk("%s: block not locked\n", drive->name);
drive1340drivers/block/ide.cif ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {
drive1341drivers/block/ide.cprintk("%s%c: bad access: block=%ld, count=%ld\n", drive->name,
drive1345drivers/block/ide.cblock += drive->part[minor&PARTN_MASK].start_sect + drive->sect0;
drive1347drivers/block/ide.cif (block == 0 && drive->ezdrive) {
drive1349drivers/block/ide.cprintk("%s: [EZD] accessing sector 1 instead of sector 0\n", drive->name);
drive1352drivers/block/ide.c((ide_hwgroup_t *)hwif->hwgroup)->drive = drive;
drive1365drivers/block/ide.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive1366drivers/block/ide.cif (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) {
drive1367drivers/block/ide.cprintk("%s: drive not ready for command\n", drive->name);
drive1371drivers/block/ide.cif (!drive->special.all) {
drive1373drivers/block/ide.cswitch (drive->media) {
drive1375drivers/block/ide.cdo_rw_disk (drive, rq, block);
drive1379drivers/block/ide.cide_do_rw_cdrom (drive, block);
drive1385drivers/block/ide.cidetape_do_request (drive, rq, block);
drive1391drivers/block/ide.cdrive->name, drive->media);
drive1395drivers/block/ide.cdo_rw_disk (drive, rq, block); /* simpler and faster */
drive1399drivers/block/ide.cdo_special(drive);
drive1493drivers/block/ide.cide_drive_t   *drive   = hwgroup->drive;
drive1502drivers/block/ide.chandler(drive);
drive1505drivers/block/ide.cprintk("%s: marginal timeout\n", drive->name);
drive1509drivers/block/ide.c(void) hwgroup->hwif->dmaproc (ide_dma_abort, drive);
drive1510drivers/block/ide.cide_error(drive, "irq timeout", GET_STAT());
drive1556drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1557drivers/block/ide.cif (!drive->present)
drive1559drivers/block/ide.cif (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT))
drive1560drivers/block/ide.c(void) ide_dump_status(drive, "unexpected_intr", stat);
drive1562drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive1577drivers/block/ide.cide_drive_t *drive = hwgroup->drive;
drive1580drivers/block/ide.cif (drive->unmask)
drive1582drivers/block/ide.chandler(drive);
drive1585drivers/block/ide.cSET_RECOVERY_TIMER(HWIF(drive));
drive1608drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1609drivers/block/ide.cif (drive->present)
drive1610drivers/block/ide.creturn drive;
drive1670drivers/block/ide.cint ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action)
drive1673drivers/block/ide.cunsigned int major = HWIF(drive)->major;
drive1680drivers/block/ide.crq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS);
drive1691drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive1710drivers/block/ide.cide_drive_t *drive;
drive1713drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1717drivers/block/ide.cwhile (drive->busy)
drive1718drivers/block/ide.csleep_on(&drive->wqueue);
drive1719drivers/block/ide.cdrive->usage++;
drive1722drivers/block/ide.cif (drive->media == ide_cdrom)
drive1723drivers/block/ide.creturn ide_cdrom_open (inode, filp, drive);
drive1726drivers/block/ide.cif (drive->media == ide_tape)
drive1727drivers/block/ide.creturn idetape_blkdev_open (inode, filp, drive);
drive1729drivers/block/ide.cif (drive->removeable) {
drive1740drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1751drivers/block/ide.cide_drive_t *drive;
drive1753drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) != NULL) {
drive1755drivers/block/ide.cdrive->usage--;
drive1757drivers/block/ide.cif (drive->media == ide_cdrom) {
drive1758drivers/block/ide.cide_cdrom_release (inode, file, drive);
drive1763drivers/block/ide.cif (drive->media == ide_tape) {
drive1764drivers/block/ide.cidetape_blkdev_release (inode, file, drive);
drive1768drivers/block/ide.cif (drive->removeable) {
drive1774drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1789drivers/block/ide.cide_drive_t *drive;
drive1793drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive1797drivers/block/ide.cminor = drive->select.b.unit << PARTN_BITS;
drive1800drivers/block/ide.cif (drive->busy || (drive->usage > 1)) {
drive1804drivers/block/ide.cdrive->busy = 1;
drive1808drivers/block/ide.cif (drive->part[p].nr_sects > 0) {
drive1814drivers/block/ide.cdrive->part[p].start_sect = 0;
drive1815drivers/block/ide.cdrive->part[p].nr_sects   = 0;
drive1818drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive1819drivers/block/ide.cif (drive->media == ide_disk)
drive1820drivers/block/ide.cresetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
drive1822drivers/block/ide.cdrive->busy = 0;
drive1823drivers/block/ide.cwake_up(&drive->wqueue);
drive1844drivers/block/ide.cide_drive_t *drive;
drive1851drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1855drivers/block/ide.cif (!loc || drive->media != ide_disk) return -EINVAL;
drive1858drivers/block/ide.cput_user(drive->bios_head, (byte *) &loc->heads);
drive1859drivers/block/ide.cput_user(drive->bios_sect, (byte *) &loc->sectors);
drive1860drivers/block/ide.cput_user(drive->bios_cyl, (unsigned short *) &loc->cylinders);
drive1861drivers/block/ide.cput_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect,
drive1881drivers/block/ide.creturn write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects);
drive1886drivers/block/ide.creturn write_fs_long(arg, drive->keep_settings);
drive1889drivers/block/ide.creturn write_fs_long(arg, drive->unmask);
drive1892drivers/block/ide.creturn write_fs_long(arg, drive->using_dma);
drive1895drivers/block/ide.creturn write_fs_long(arg, drive->chipset);
drive1898drivers/block/ide.creturn write_fs_long(arg, drive->mult_count);
drive1903drivers/block/ide.cif (drive->id == NULL)
drive1905drivers/block/ide.cerr = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id));
drive1907drivers/block/ide.cmemcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id));
drive1911drivers/block/ide.creturn write_fs_long(arg, drive->bad_wstat == BAD_R_STAT);
drive1914drivers/block/ide.cif (drive->media != ide_disk)
drive1916drivers/block/ide.cif (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc)
drive1932drivers/block/ide.cif (!(HWIF(drive)->dmaproc)) {
drive1936drivers/block/ide.cdrive->using_dma = arg;
drive1939drivers/block/ide.cdrive->keep_settings = arg;
drive1946drivers/block/ide.cdrive->unmask = arg;
drive1949drivers/block/ide.cdrive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT;
drive1952drivers/block/ide.cdrive->chipset   = arg;
drive1953drivers/block/ide.cdrive->vlb_32bit = (arg & 1);
drive1954drivers/block/ide.cdrive->vlb_sync  = (arg & 2) >> 1;
drive1956drivers/block/ide.cif (drive->vlb_sync)
drive1957drivers/block/ide.cprintk("%s: VLB_SYNC not supported by this kernel\n", drive->name);
drive1969drivers/block/ide.cif ((drive->id != NULL) && (arg > drive->id->max_multsect))
drive1973drivers/block/ide.cif (drive->special.b.set_multmode) {
drive1977drivers/block/ide.cdrive->mult_req = arg;
drive1978drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive1980drivers/block/ide.c(void) ide_do_drive_cmd (drive, &rq, ide_wait);
drive1981drivers/block/ide.creturn (drive->mult_count == arg) ? 0 : -EIO;
drive1988drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive1995drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive2007drivers/block/ide.cif (drive->media == ide_cdrom)
drive2008drivers/block/ide.creturn ide_cdrom_ioctl(drive, inode, file, cmd, arg);
drive2011drivers/block/ide.cif (drive->media == ide_tape)
drive2012drivers/block/ide.creturn idetape_blkdev_ioctl(drive, inode, file, cmd, arg);
drive2020drivers/block/ide.cide_drive_t *drive;
drive2022drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive2025drivers/block/ide.cif (drive->media == ide_cdrom)
drive2026drivers/block/ide.creturn ide_cdrom_check_media_change (drive);
drive2028drivers/block/ide.cif (drive->removeable) /* for disks */
drive2060drivers/block/ide.cstatic inline void do_identify (ide_drive_t *drive, byte cmd)
drive2066drivers/block/ide.cid = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL);
drive2067drivers/block/ide.cide_input_data(drive, id, SECTOR_WORDS);  /* read 512 bytes of id info */
drive2075drivers/block/ide.cprintk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model);
drive2076drivers/block/ide.cdrive->present = 0;
drive2101drivers/block/ide.cprintk("%s: %s, ATAPI ", drive->name, id->model);
drive2107drivers/block/ide.cdrive->media = ide_cdrom;
drive2108drivers/block/ide.cdrive->present = 1;
drive2109drivers/block/ide.cdrive->removeable = 1;
drive2118drivers/block/ide.cif (idetape_identify_device (drive,id)) {
drive2119drivers/block/ide.cdrive->media = ide_tape;
drive2120drivers/block/ide.cdrive->present = 1;
drive2121drivers/block/ide.cdrive->removeable = 1;
drive2124drivers/block/ide.cdrive->present = 0;
drive2143drivers/block/ide.cdrive->removeable = 1;
drive2146drivers/block/ide.cdrive->media = ide_disk;
drive2148drivers/block/ide.cif (!drive->present) {
drive2149drivers/block/ide.cdrive->present = 1;
drive2150drivers/block/ide.cdrive->cyl     = drive->bios_cyl  = id->cyls;
drive2151drivers/block/ide.cdrive->head    = drive->bios_head = id->heads;
drive2152drivers/block/ide.cdrive->sect    = drive->bios_sect = id->sectors;
drive2168drivers/block/ide.cdrive->cyl  = id->cur_cyls;
drive2169drivers/block/ide.cdrive->head = id->cur_heads;
drive2170drivers/block/ide.cdrive->sect = id->cur_sectors;
drive2173drivers/block/ide.ccapacity = drive->cyl * drive->head * drive->sect;
drive2182drivers/block/ide.cif ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) {
drive2183drivers/block/ide.cdrive->cyl  = id->cyls;
drive2184drivers/block/ide.cdrive->head = id->heads;
drive2185drivers/block/ide.cdrive->sect = id->sectors;
drive2188drivers/block/ide.cif (drive->sect == drive->bios_sect && drive->head == drive->bios_head) {
drive2189drivers/block/ide.cif (drive->cyl > drive->bios_cyl)
drive2190drivers/block/ide.cdrive->bios_cyl = drive->cyl;
drive2193drivers/block/ide.c(void) current_capacity (drive); /* initialize LBA selection */
drive2196drivers/block/ide.cdrive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2,
drive2197drivers/block/ide.cdrive->select.b.lba ? "LBA, " : "",
drive2198drivers/block/ide.cdrive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2200drivers/block/ide.cdrive->mult_count = 0;
drive2202drivers/block/ide.cdrive->mult_req = INITIAL_MULT_COUNT;
drive2203drivers/block/ide.cif (drive->mult_req > id->max_multsect)
drive2204drivers/block/ide.cdrive->mult_req = id->max_multsect;
drive2205drivers/block/ide.cif (drive->mult_req || ((id->multsect_valid & 1) && id->multsect))
drive2206drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive2208drivers/block/ide.cif (HWIF(drive)->dmaproc != NULL) {  /* hwif supports DMA? */
drive2209drivers/block/ide.cif (!(HWIF(drive)->dmaproc(ide_dma_check, drive)))
drive2214drivers/block/ide.ccmd640_tune_drive(drive);  /* but can we tune a fish? */
drive2238drivers/block/ide.cstatic int try_to_identify (ide_drive_t *drive, byte cmd)
drive2244drivers/block/ide.cif (!HWIF(drive)->irq) {    /* already got an IRQ? */
drive2247drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);  /* enable device irq */
drive2252drivers/block/ide.cprintk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name);
drive2262drivers/block/ide.cif (!HWIF(drive)->irq)
drive2272drivers/block/ide.cdo_identify(drive, cmd); /* drive returned ID */
drive2276drivers/block/ide.cif (!HWIF(drive)->irq) {
drive2279drivers/block/ide.cHWIF(drive)->irq = irqs;
drive2281drivers/block/ide.cprintk("%s: IRQ probe failed (%d)\n", drive->name, irqs);
drive2302drivers/block/ide.cstatic int do_probe (ide_drive_t *drive, byte cmd)
drive2306drivers/block/ide.cif (drive->present) {  /* avoid waiting for inappropriate probes */
drive2307drivers/block/ide.cif ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY))
drive2313drivers/block/ide.cdrive->name, drive->present, drive->media,
drive2317drivers/block/ide.cif (HWIF(drive)->select)
drive2318drivers/block/ide.cide_hwif_select (HWIF(drive));
drive2320drivers/block/ide.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);  /* select target drive */
drive2322drivers/block/ide.cif (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) {
drive2328drivers/block/ide.c|| drive->present || cmd == WIN_PIDENTIFY)
drive2330drivers/block/ide.cif ((rc = try_to_identify(drive,cmd)))   /* send cmd and wait */
drive2331drivers/block/ide.crc = try_to_identify(drive,cmd); /* failed: try again */
drive2333drivers/block/ide.cprintk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT());
drive2338drivers/block/ide.cif (drive->select.b.unit != 0) {
drive2352drivers/block/ide.cstatic inline byte probe_for_drive (ide_drive_t *drive)
drive2354drivers/block/ide.cif (drive->noprobe)      /* skip probing? */
drive2355drivers/block/ide.creturn drive->present;
drive2356drivers/block/ide.cif (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */
drive2358drivers/block/ide.c(void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */
drive2361drivers/block/ide.cif (!drive->present)
drive2363drivers/block/ide.cif (drive->id == NULL) {    /* identification failed? */
drive2364drivers/block/ide.cif (drive->media == ide_disk) {
drive2366drivers/block/ide.cdrive->name, drive->cyl, drive->head, drive->sect);
drive2369drivers/block/ide.celse if (drive->media == ide_cdrom) {
drive2370drivers/block/ide.cprintk("%s: ATAPI cdrom (?)\n", drive->name);
drive2374drivers/block/ide.cdrive->present = 0;  /* nuke it */
drive2378drivers/block/ide.cif (drive->media == ide_disk && !drive->select.b.lba) {
drive2379drivers/block/ide.cif (!drive->head || drive->head > 16) {
drive2381drivers/block/ide.cdrive->name, drive->head);
drive2382drivers/block/ide.cdrive->present = 0;
drive2399drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2400drivers/block/ide.cif (drive->present) {
drive2401drivers/block/ide.cdrive->present = 0;
drive2402drivers/block/ide.cprintk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name);
drive2421drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2422drivers/block/ide.c(void) probe_for_drive (drive);
drive2425drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2426drivers/block/ide.cif (drive->present) {
drive2634drivers/block/ide.cide_drive_t *drive;
drive2651drivers/block/ide.cdrive = &hwif->drives[unit];
drive2654drivers/block/ide.cdrive->noprobe = 1;
drive2657drivers/block/ide.cdrive->bad_wstat = BAD_R_STAT;
drive2661drivers/block/ide.cdrive->present = 1;
drive2662drivers/block/ide.cdrive->media = ide_cdrom;
drive2669drivers/block/ide.cdrive->media  = ide_disk;
drive2670drivers/block/ide.cdrive->cyl  = drive->bios_cyl  = vals[0];
drive2671drivers/block/ide.cdrive->head  = drive->bios_head = vals[1];
drive2672drivers/block/ide.cdrive->sect  = drive->bios_sect = vals[2];
drive2673drivers/block/ide.cdrive->present  = 1;
drive2772drivers/block/ide.cide_drive_t *drive;
drive2777drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive2780drivers/block/ide.cif (drive->id) {
drive2781drivers/block/ide.cdrive->cyl  = drive->id->cyls;
drive2782drivers/block/ide.cdrive->head = drive->id->heads;
drive2783drivers/block/ide.cdrive->sect = drive->id->sectors;
drive2785drivers/block/ide.cdrive->bios_cyl  = drive->cyl;
drive2786drivers/block/ide.cdrive->bios_head = drive->head;
drive2787drivers/block/ide.cdrive->bios_sect = drive->sect;
drive2788drivers/block/ide.cdrive->special.b.set_geometry = 1;
drive2790drivers/block/ide.ctracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63;
drive2791drivers/block/ide.cdrive->bios_sect = 63;
drive2792drivers/block/ide.cwhile (drive->bios_cyl >= 1024) {
drive2793drivers/block/ide.cdrive->bios_head = *heads;
drive2794drivers/block/ide.cdrive->bios_cyl = tracks / drive->bios_head;
drive2801drivers/block/ide.cdrive->ezdrive = 1;
drive2805drivers/block/ide.cdrive->sect0 = 63;
drive2806drivers/block/ide.cdrive->bios_cyl = (tracks - 1) / drive->bios_head;
drive2809drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive2810drivers/block/ide.cprintk("%s [%d/%d/%d]", msg, drive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2848drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2849drivers/block/ide.cif ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) {
drive2850drivers/block/ide.cdrive->cyl   = drive->bios_cyl  = *(unsigned short *)BIOS;
drive2851drivers/block/ide.cdrive->head  = drive->bios_head = *(BIOS+2);
drive2852drivers/block/ide.cdrive->sect  = drive->bios_sect = *(BIOS+14);
drive2853drivers/block/ide.cdrive->ctl   = *(BIOS+8);
drive2854drivers/block/ide.cdrive->present = 1;
drive2904drivers/block/ide.chwgroup->drive   = &hwif->drives[0];
drive91drivers/block/ide.h#define HWIF(drive)    ((ide_hwif_t *)drive->hwif)
drive92drivers/block/ide.h#define HWGROUP(drive)    ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))
drive105drivers/block/ide.h#define IDE_DATA_REG    (HWIF(drive)->io_base+IDE_DATA_OFFSET)
drive106drivers/block/ide.h#define IDE_ERROR_REG    (HWIF(drive)->io_base+IDE_ERROR_OFFSET)
drive107drivers/block/ide.h#define IDE_NSECTOR_REG    (HWIF(drive)->io_base+IDE_NSECTOR_OFFSET)
drive108drivers/block/ide.h#define IDE_SECTOR_REG    (HWIF(drive)->io_base+IDE_SECTOR_OFFSET)
drive109drivers/block/ide.h#define IDE_LCYL_REG    (HWIF(drive)->io_base+IDE_LCYL_OFFSET)
drive110drivers/block/ide.h#define IDE_HCYL_REG    (HWIF(drive)->io_base+IDE_HCYL_OFFSET)
drive111drivers/block/ide.h#define IDE_SELECT_REG    (HWIF(drive)->io_base+IDE_SELECT_OFFSET)
drive112drivers/block/ide.h#define IDE_STATUS_REG    (HWIF(drive)->io_base+IDE_STATUS_OFFSET)
drive113drivers/block/ide.h#define IDE_CONTROL_REG    (HWIF(drive)->ctl_port)
drive415drivers/block/ide.hide_drive_t    *drive;  /* current drive */
drive431drivers/block/ide.h#define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive)
drive433drivers/block/ide.h#define SET_RECOVERY_TIMER(drive)
drive439drivers/block/ide.hvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive444drivers/block/ide.hvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive450drivers/block/ide.hvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout);
drive455drivers/block/ide.hbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat);
drive461drivers/block/ide.hvoid ide_error (ide_drive_t *drive, const char *msg, byte stat);
drive478drivers/block/ide.hint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout);
drive532drivers/block/ide.hint ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action);
drive538drivers/block/ide.hvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err);
drive568drivers/block/ide.hint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id);
drive576drivers/block/ide.hvoid idetape_setup (ide_drive_t *drive);
drive583drivers/block/ide.hvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block);
drive589drivers/block/ide.hint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive591drivers/block/ide.hint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive);
drive592drivers/block/ide.hvoid idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive);
drive148drivers/block/triton.cstatic void dma_intr (ide_drive_t *drive)
drive152drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive153drivers/block/triton.cunsigned short dma_base = HWIF(drive)->dma_base;
drive158drivers/block/triton.cif (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
drive160drivers/block/triton.crq = HWGROUP(drive)->rq;
drive163drivers/block/triton.cide_end_request(1, HWGROUP(drive));
drive167drivers/block/triton.cprintk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat);
drive170drivers/block/triton.cide_error(drive, "dma_intr", stat);
drive177drivers/block/triton.cstatic int build_dmatable (ide_drive_t *drive)
drive179drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive181drivers/block/triton.cunsigned long size, addr, *table = HWIF(drive)->dmatable;
drive212drivers/block/triton.cprintk("%s: DMA table too small\n", drive->name);
drive229drivers/block/triton.cprintk("%s: empty DMA table?\n", drive->name);
drive233drivers/block/triton.cstatic int config_drive_for_dma (ide_drive_t *drive)
drive237drivers/block/triton.cstruct hd_driveid *id = drive->id;
drive241drivers/block/triton.cdrive->using_dma = 1;
drive248drivers/block/triton.cdrive->using_dma = 1;
drive267drivers/block/triton.cstatic int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
drive269drivers/block/triton.cunsigned long dma_base = HWIF(drive)->dma_base;
drive277drivers/block/triton.creturn config_drive_for_dma (drive);
drive286drivers/block/triton.cif (build_dmatable (drive))
drive288drivers/block/triton.coutl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */
drive291drivers/block/triton.cide_set_handler (drive, &dma_intr, WAIT_CMD);  /* issue cmd to drive */
drive334drivers/block/xd.cstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
drive341drivers/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);
drive344drivers/block/xd.ccontrol = xd_info[drive].control;
drive348drivers/block/xd.ctrack = block / xd_info[drive].sectors;
drive349drivers/block/xd.chead = track % xd_info[drive].heads;
drive350drivers/block/xd.ccylinder = track / xd_info[drive].heads;
drive351drivers/block/xd.csector = block % xd_info[drive].sectors;
drive354drivers/block/xd.cprintk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
drive358drivers/block/xd.cxd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control);
drive363drivers/block/xd.cxd_recalibrate(drive);
drive384drivers/block/xd.cstatic void xd_recalibrate (u_char drive)
drive388drivers/block/xd.cxd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0);
drive432drivers/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)
drive435drivers/block/xd.ccmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
drive519drivers/block/xd.cstatic u_char xd_initdrives (void (*init_drive)(u_char drive))
drive548drivers/block/xd.cstatic void xd_dtc_init_drive (u_char drive)
drive552drivers/block/xd.cxd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0);
drive554drivers/block/xd.cxd_info[drive].heads = buf[0x0A];      /* heads */
drive555drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf))[0x04];  /* cylinders */
drive556drivers/block/xd.cxd_info[drive].sectors = 17;        /* sectors */
drive558drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05];  /* reduced write */
drive559drivers/block/xd.cxd_info[drive].precomp = ((u_short *) (buf + 1))[0x06];  /* write precomp */
drive560drivers/block/xd.cxd_info[drive].ecc = buf[0x0F];        /* ecc length */
drive562drivers/block/xd.cxd_info[drive].control = 0;        /* control byte */
drive564drivers/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]);
drive565drivers/block/xd.cxd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7);
drive567drivers/block/xd.cprintk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive);
drive570drivers/block/xd.cprintk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive);
drive592drivers/block/xd.cstatic void xd_wd_init_drive (u_char drive)
drive596drivers/block/xd.cxd_build(cmdblk,CMD_READ,drive,0,0,0,1,0);
drive598drivers/block/xd.cxd_info[drive].heads = buf[0x1AF];        /* heads */
drive599drivers/block/xd.cxd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6];  /* cylinders */
drive600drivers/block/xd.cxd_info[drive].sectors = 17;          /* sectors */
drive602drivers/block/xd.cxd_info[drive].rwrite = ((u_short *) (buf))[0xD8];    /* reduced write */
drive603drivers/block/xd.cxd_info[drive].wprecomp = ((u_short *) (buf))[0xDA];    /* write precomp */
drive604drivers/block/xd.cxd_info[drive].ecc = buf[0x1B4];        /* ecc length */
drive606drivers/block/xd.cxd_info[drive].control = buf[0x1B5];        /* control byte */
drive608drivers/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]);
drive611drivers/block/xd.cprintk("xd_wd_init_drive: error reading geometry for drive %d\n",drive);  
drive631drivers/block/xd.cstatic void xd_seagate_init_drive (u_char drive)
drive635drivers/block/xd.cxd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0);
drive637drivers/block/xd.cxd_info[drive].heads = buf[0x04];        /* heads */
drive638drivers/block/xd.cxd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03];  /* cylinders */
drive639drivers/block/xd.cxd_info[drive].sectors = buf[0x05];        /* sectors */
drive640drivers/block/xd.cxd_info[drive].control = 0;          /* control byte */
drive643drivers/block/xd.cprintk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive);
drive665drivers/block/xd.cstatic void xd_omti_init_drive (u_char drive)
drive668drivers/block/xd.cxd_override_init_drive(drive);
drive671drivers/block/xd.cxd_info[drive].control = 2;
drive676drivers/block/xd.cstatic void xd_override_init_drive (u_char drive)
drive684drivers/block/xd.cxd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0);
drive692drivers/block/xd.cxd_info[drive].heads = (u_char) min[0] + 1;
drive693drivers/block/xd.cxd_info[drive].cylinders = (u_short) min[1] + 1;
drive694drivers/block/xd.cxd_info[drive].sectors = (u_char) min[2] + 1;
drive695drivers/block/xd.cxd_info[drive].control = 0;
drive712drivers/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)
drive716drivers/block/xd.cxd_build(cmdblk,command,drive,0,0,0,0,0);
drive727drivers/block/xd.cprintk("xd_setparam: error setting characteristics for drive %d\n",drive);
drive1052drivers/cdrom/mcdx.cint drive;
drive1060drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++)
drive1061drivers/cdrom/mcdx.cmcdx_stuffp[drive] = NULL;
drive1064drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++) { 
drive1071drivers/cdrom/mcdx.cTRACE((INIT, "init() try drive %d\n", drive));
drive1091drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
drive1092drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
drive1200drivers/cdrom/mcdx.cstuffp->minor = drive;
drive1206drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
drive1207drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
drive1858drivers/scsi/fdomain.cint              drive;
drive1914drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1921drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 );
drive1924drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 );
drive1927drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 );
drive1930drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1939drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 );
drive48include/linux/blkdev.hextern void resetup_one_dev(struct gendisk *dev, int drive);
drive103include/linux/xd.hvoid (*init_drive)(u_char drive);
drive109include/linux/xd.hstatic u_char xd_initdrives (void (*init_drive)(u_char drive));
drive117include/linux/xd.hstatic int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count);
drive118include/linux/xd.hstatic void xd_recalibrate (u_char drive);
drive122include/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);
drive128include/linux/xd.hstatic void xd_dtc_init_drive (u_char drive);
drive130include/linux/xd.hstatic void xd_wd_init_drive (u_char drive);
drive132include/linux/xd.hstatic void xd_seagate_init_drive (u_char drive);
drive134include/linux/xd.hstatic void xd_omti_init_drive (u_char drive);
drive135include/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);
drive136include/linux/xd.hstatic void xd_override_init_drive (u_char drive);