taglinefilesource code
drive120drivers/block/ali14xx.cstatic void ali14xx_tune_drive (ide_drive_t *drive, byte pio)
drive125drivers/block/ali14xx.cstruct hd_driveid *id = drive->id;
drive129drivers/block/ali14xx.cpio = ide_get_best_pio_mode(drive);
drive148drivers/block/ali14xx.cdrive->name, pio, time1, time2, param1, param2, param3, param4);
drive151drivers/block/ali14xx.cdriveNum = (HWIF(drive)->index << 1) + drive->select.b.unit;
drive648drivers/block/cmd640.cstatic void cmd640_set_mode(ide_drive_t* drive, int pio_mode) {
drive654drivers/block/cmd640.cinterface_number = HWIF(drive)->index;
drive655drivers/block/cmd640.cdrive_number = drive->select.b.unit;
drive673drivers/block/cmd640.cstatic void cmd640_tune_drive(ide_drive_t *drive, byte pio_mode) {
drive683drivers/block/cmd640.ccmd640_set_mode(drive, pio_mode);
drive687drivers/block/cmd640.cinterface_number = HWIF(drive)->index;
drive688drivers/block/cmd640.cdrive_number = drive->select.b.unit;
drive690drivers/block/cmd640.cid = drive->id;
drive69drivers/block/dtc2278.cstatic void tune_dtc2278 (ide_drive_t *drive, byte pio)
drive74drivers/block/dtc2278.cpio = ide_get_best_pio_mode(drive);
drive92drivers/block/dtc2278.cdrive->io_32bit = 1;
drive93drivers/block/dtc2278.cHWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
drive224drivers/block/floppy.c#define UDP (&drive_params[drive])
drive225drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive226drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive227drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive576drivers/block/floppy.cstatic void reschedule_timeout(int drive, const char *message, int marg)
drive578drivers/block/floppy.cif (drive == CURRENTD)
drive579drivers/block/floppy.cdrive = current_drive;
drive581drivers/block/floppy.cif (drive < 0 || drive > N_DRIVE) {
drive583drivers/block/floppy.cdrive=0;
drive647drivers/block/floppy.cstatic int disk_change(int drive)
drive649drivers/block/floppy.cint fdc=FDC(drive);
drive653drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))) ||
drive654drivers/block/floppy.c(FDCS->dor & 3) != UNIT(drive) ||
drive655drivers/block/floppy.cfdc != FDC(drive)){
drive657drivers/block/floppy.cDPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive),
drive664drivers/block/floppy.cDPRINT1("checking disk change line for drive %d\n",drive);
drive681drivers/block/floppy.ccurrent_type[drive] != NULL)
drive684drivers/block/floppy.ccurrent_type[drive] = NULL;
drive704drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive714drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive720drivers/block/floppy.cdisk_change(drive);
drive727drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive751drivers/block/floppy.cint drive;
drive757drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++)
drive758drivers/block/floppy.cif (FDC(drive) == fdc &&
drive764drivers/block/floppy.cstatic void set_fdc(int drive)
drive766drivers/block/floppy.cif (drive >= 0 && drive < N_DRIVE){
drive767drivers/block/floppy.cfdc = FDC(drive);
drive768drivers/block/floppy.ccurrent_drive = drive;
drive783drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive800drivers/block/floppy.creschedule_timeout(drive, "lock fdc", 0);
drive801drivers/block/floppy.cset_fdc(drive);
drive805drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive806drivers/block/floppy.cif (lock_fdc(drive,interruptible)) return -EINTR;
drive847drivers/block/floppy.cstatic void floppy_off(unsigned int drive)
drive850drivers/block/floppy.cregister int fdc=FDC(drive);
drive852drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))))
drive855drivers/block/floppy.cdel_timer(motor_off_timer+drive);
drive863drivers/block/floppy.cmotor_off_timer[drive].expires = jiffies + UDP->spindown - delta;
drive865drivers/block/floppy.cadd_timer(motor_off_timer+drive);
drive875drivers/block/floppy.cint i, drive, saved_drive;
drive882drivers/block/floppy.cdrive = (saved_drive + i + 1) % N_DRIVE;
drive885drivers/block/floppy.cset_fdc(drive);
drive886drivers/block/floppy.cif (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
drive887drivers/block/floppy.c(0x10 << UNIT(drive))))
drive890drivers/block/floppy.cset_dor(fdc, ~(0x10 << UNIT(drive)), 0);
drive2048drivers/block/floppy.cint drive=DRIVE(device);
drive2050drivers/block/floppy.cLOCK_FDC(drive,1);
drive2730drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2735drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2774drivers/block/floppy.cstatic inline const char *drive_name(int type, int drive)
drive2961drivers/block/floppy.cint drive, ret, ret2;
drive2966drivers/block/floppy.cfor (drive= 0; drive < N_DRIVE; drive++){
drive2967drivers/block/floppy.cif (FDC(drive) != fdc)
drive2969drivers/block/floppy.cif (drive == current_drive){
drive3020drivers/block/floppy.cstatic inline void clear_write_error(int drive)
drive3026drivers/block/floppy.cint drive, int type, kdev_t device)
drive3041drivers/block/floppy.cLOCK_FDC(drive,1);
drive3045drivers/block/floppy.cset_bit(drive, &fake_change);
drive3061drivers/block/floppy.cLOCK_FDC(drive,1);
drive3066drivers/block/floppy.cuser_params[drive] = *g;
drive3067drivers/block/floppy.cif (buffer_drive == drive)
drive3068drivers/block/floppy.cSUPBOUND(buffer_max, user_params[drive].sect);
drive3069drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive3070drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive3080drivers/block/floppy.cif (DRS->maxblock > user_params[drive].sect || DRS->maxtrack)
drive3173drivers/block/floppy.cint i,drive,type;
drive3190drivers/block/floppy.cdrive = DRIVE(device);
drive3216drivers/block/floppy.cLOCK_FDC(drive,1);
drive3217drivers/block/floppy.ccurrent_type[drive] = NULL;
drive3218drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive3224drivers/block/floppy.cdrive, type, device);
drive3229drivers/block/floppy.coutparam = (char *) current_type[drive];
drive3242drivers/block/floppy.cLOCK_FDC(drive,1);
drive3257drivers/block/floppy.cLOCK_FDC(drive,1);
drive3268drivers/block/floppy.coutparam = drive_name(type,drive);
drive3276drivers/block/floppy.cLOCK_FDC(drive,1);
drive3283drivers/block/floppy.creturn user_reset_fdc(drive, (int)param, 1);
drive3296drivers/block/floppy.cLOCK_FDC(drive,1);
drive3303drivers/block/floppy.cLOCK_FDC(drive,1);
drive3324drivers/block/floppy.cint drive;
drive3327drivers/block/floppy.cdrive=0;
drive3330drivers/block/floppy.cdrive=1;
drive3337drivers/block/floppy.cfor (drive=0; drive < N_DRIVE; drive++){
drive3349drivers/block/floppy.callowed_drive_mask |= 1 << drive;
drive3350drivers/block/floppy.cprintk("fd%d is %s", drive,
drive3353drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,
drive3364drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3377drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3394drivers/block/floppy.cint drive;
drive3396drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3421drivers/block/floppy.cint drive;
drive3431drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3432drivers/block/floppy.cif (drive >= N_DRIVE ||
drive3433drivers/block/floppy.c!(allowed_drive_mask & (1 << drive)) ||
drive3434drivers/block/floppy.cfdc_state[FDC(drive)].version == FDC_NONE)
drive3489drivers/block/floppy.cif (buffer_drive == drive)
drive3522drivers/block/floppy.cint drive = DRIVE(dev);
drive3533drivers/block/floppy.clock_fdc(drive,0);
drive3540drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3541drivers/block/floppy.c(!TYPE(dev) && !current_type[drive]))
drive3552drivers/block/floppy.c#define NO_GEOM (!current_type[drive] && !TYPE(dev))
drive3554drivers/block/floppy.cint drive=DRIVE(dev);
drive3559drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3561drivers/block/floppy.clock_fdc(drive,0);
drive3563drivers/block/floppy.cif (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){
drive3569drivers/block/floppy.cif (buffer_drive == drive)
drive3571drivers/block/floppy.cclear_bit(drive, &fake_change);
drive3834drivers/block/floppy.cint i,unit,drive;
drive3876drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++) {
drive3971drivers/block/floppy.cint drive;
drive4004drivers/block/floppy.cfor (drive=0; drive < N_FDC * 4; drive++)
drive4005drivers/block/floppy.cif (motor_off_timer[drive].next)
drive4006drivers/block/floppy.cprintk("motor off timer %d still active\n", drive);
drive538drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive541drivers/block/genhd.cint first_minor  = drive << dev->minor_shift;
drive561drivers/block/genhd.cint i, drive;
drive570drivers/block/genhd.cfor (drive = 0 ; drive < dev->nr_real ; drive++) {
drive571drivers/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)
drive126drivers/block/ht6560b.cstatic void ht6560b_selectproc (ide_drive_t *drive)
drive132drivers/block/ht6560b.cbyte select = ht6560b_selects[HWIF(drive)->index][drive->select.b.unit];
drive133drivers/block/ht6560b.cbyte timing = ht6560b_timings[HWIF(drive)->index][drive->select.b.unit];
drive194drivers/block/ht6560b.cstatic void tune_ht6560b (ide_drive_t *drive, byte pio)
drive199drivers/block/ht6560b.cif (drive->media != ide_disk)
drive202drivers/block/ht6560b.cpio = ide_get_best_pio_mode (drive);
drive206drivers/block/ht6560b.cunit = drive->select.b.unit;
drive207drivers/block/ht6560b.chwif = HWIF(drive)->index;
drive213drivers/block/ide-cd.c#define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect))
drive225drivers/block/ide-cd.c#define CDROM_STATE_FLAGS(drive)  ((struct ide_cd_state_flags *)&((drive)->bios_head))
drive243drivers/block/ide-cd.cvoid cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive246drivers/block/ide-cd.cide_input_data (drive, buffer, bytecount / 4);
drive255drivers/block/ide-cd.cvoid cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive258drivers/block/ide-cd.cide_output_data (drive, buffer, bytecount / 4);
drive415drivers/block/ide-cd.cvoid cdrom_analyze_sense_data (ide_drive_t *drive, 
drive433drivers/block/ide-cd.cprintk ("ATAPI device %s:\n", drive->name);
drive520drivers/block/ide-cd.cdrive->name,
drive541drivers/block/ide-cd.cstatic void cdrom_queue_request_sense (ide_drive_t *drive, 
drive553drivers/block/ide-cd.creqbuf = &drive->cdrom_info.sense_data;
drive557drivers/block/ide-cd.cpc = &HWIF(drive)->request_sense_pc;
drive575drivers/block/ide-cd.crq = &HWIF(drive)->request_sense_request;
drive580drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive584drivers/block/ide-cd.cstatic void cdrom_end_request (int uptodate, ide_drive_t *drive)
drive586drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive600drivers/block/ide-cd.ccdrom_analyze_sense_data (drive,
drive605drivers/block/ide-cd.cide_end_request (uptodate, HWGROUP(drive));
drive611drivers/block/ide-cd.cstatic void cdrom_saw_media_change (ide_drive_t *drive)
drive613drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 1;
drive614drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 0;
drive615drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive621drivers/block/ide-cd.cstatic int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret)
drive623drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive638drivers/block/ide-cd.cprintk ("%s : missing request in cdrom_decode_status\n", drive->name);
drive651drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive652drivers/block/ide-cd.cide_error (drive, "request sense failure", stat);
drive666drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive674drivers/block/ide-cd.cprintk ("%s : tray open or drive not ready\n", drive->name);
drive680drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive681drivers/block/ide-cd.cprintk ("%s: media changed\n", drive->name);
drive687drivers/block/ide-cd.cide_dump_status (drive, "packet command error", stat);
drive705drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive708drivers/block/ide-cd.ccdrom_queue_request_sense (drive, sem, pc->sense_data, pc);
drive718drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive721drivers/block/ide-cd.cprintk ("%s : tray open\n", drive->name);
drive722drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive728drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive734drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive741drivers/block/ide-cd.cide_dump_status (drive, "command error", stat);
drive742drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive748drivers/block/ide-cd.cide_error (drive, "cdrom_decode_status", stat);
drive755drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive761drivers/block/ide-cd.ccdrom_queue_request_sense (drive, NULL, NULL, NULL);
drive777drivers/block/ide-cd.cstatic int cdrom_start_packet_command (ide_drive_t *drive, int xferlen,
drive781drivers/block/ide-cd.cif (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1;
drive790drivers/block/ide-cd.cOUT_BYTE (drive->ctl, IDE_CONTROL_REG);
drive792drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive794drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive800drivers/block/ide-cd.c(*handler) (drive);
drive812drivers/block/ide-cd.cstatic int cdrom_transfer_packet_command (ide_drive_t *drive,
drive816drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive823drivers/block/ide-cd.cif (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1;
drive828drivers/block/ide-cd.cif (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1;
drive832drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive835drivers/block/ide-cd.ccdrom_out_bytes (drive, cmd_buf, cmd_len);
drive853drivers/block/ide-cd.cstatic void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector,
drive856drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive885drivers/block/ide-cd.ccdrom_in_bytes (drive, dest, SECTOR_SIZE);
drive896drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive908drivers/block/ide-cd.cint cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
drive918drivers/block/ide-cd.cdrive->name);
drive925drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive934drivers/block/ide-cd.cdrive->name, ireason);
drive937drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive945drivers/block/ide-cd.cstatic void cdrom_read_intr (ide_drive_t *drive)
drive950drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive953drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive967drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive968drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive971drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive977drivers/block/ide-cd.cif (cdrom_read_check_ireason (drive, len, ireason)) return;
drive984drivers/block/ide-cd.cdrive->name, len);
drive986drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1001drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive1017drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1023drivers/block/ide-cd.ccdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer);
drive1037drivers/block/ide-cd.ccdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE);
drive1050drivers/block/ide-cd.cide_set_handler (drive, &cdrom_read_intr, WAIT_CMD);
drive1058drivers/block/ide-cd.cstatic int cdrom_read_from_buffer (ide_drive_t *drive)
drive1060drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive1061drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1073drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1088drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1094drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1104drivers/block/ide-cd.cdrive->name, rq->sector);
drive1105drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1120drivers/block/ide-cd.cstatic void cdrom_start_read_continuation (ide_drive_t *drive)
drive1123drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1146drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive1147drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1176drivers/block/ide-cd.c(void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c),
drive1184drivers/block/ide-cd.cstatic void cdrom_start_read (ide_drive_t *drive, unsigned int block)
drive1186drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1202drivers/block/ide-cd.cif (cdrom_read_from_buffer (drive))
drive1206drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive1209drivers/block/ide-cd.ccdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation);
drive1221drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1227drivers/block/ide-cd.cstatic void cdrom_pc_intr (ide_drive_t *drive)
drive1230drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1234drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive1254drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1258drivers/block/ide-cd.cdrive->name, pc->buflen);
drive1260drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1277drivers/block/ide-cd.cdrive->name);
drive1283drivers/block/ide-cd.ccdrom_out_bytes (drive, pc->buffer, thislen);
drive1290drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive1306drivers/block/ide-cd.cdrive->name);
drive1312drivers/block/ide-cd.ccdrom_in_bytes (drive, pc->buffer, thislen);
drive1319drivers/block/ide-cd.ccdrom_in_bytes (drive, &dum, sizeof (dum));
drive1331drivers/block/ide-cd.cdrive->name, ireason);
drive1336drivers/block/ide-cd.cide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD);
drive1340drivers/block/ide-cd.cstatic void cdrom_do_pc_continuation (ide_drive_t *drive)
drive1342drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1346drivers/block/ide-cd.ccdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr);
drive1350drivers/block/ide-cd.cstatic void cdrom_do_packet_command (ide_drive_t *drive)
drive1353drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1362drivers/block/ide-cd.ccdrom_start_packet_command (drive, len, cdrom_do_pc_continuation);
drive1377drivers/block/ide-cd.cint cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc)
drive1394drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, &req, ide_wait);
drive1434drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->door_locked == 0 &&
drive1439drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, NULL);
drive1455drivers/block/ide-cd.cvoid cdrom_do_drive_cmd (ide_drive_t *drive)
drive1457drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1474drivers/block/ide-cd.cdrive->name, args[0], args[1], args[2]);
drive1479drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1488drivers/block/ide-cd.cvoid ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block)
drive1490drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1493drivers/block/ide-cd.ccdrom_do_packet_command (drive);
drive1497drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1498drivers/block/ide-cd.cide_do_reset (drive);
drive1503drivers/block/ide-cd.ccdrom_do_drive_cmd (drive);
drive1508drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1511drivers/block/ide-cd.ccdrom_start_read (drive, block);
drive1562drivers/block/ide-cd.ccdrom_check_status (ide_drive_t  *drive,
drive1572drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1578drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1589drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_doorlock)
drive1598drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1602drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1609drivers/block/ide-cd.cprintk ("%s: door locking not supported\n", drive->name);
drive1610drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
drive1612drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1622drivers/block/ide-cd.ccdrom_eject (ide_drive_t *drive, int ejectflag,
drive1632drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1637drivers/block/ide-cd.ccdrom_pause (ide_drive_t *drive, int pauseflag,
drive1647drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1652drivers/block/ide-cd.ccdrom_startstop (ide_drive_t *drive, int startflag,
drive1663drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1668drivers/block/ide-cd.ccdrom_read_capacity (ide_drive_t *drive, unsigned *capacity,
drive1686drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1697drivers/block/ide-cd.ccdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag,
drive1714drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1720drivers/block/ide-cd.ccdrom_read_toc (ide_drive_t *drive,
drive1725drivers/block/ide-cd.cstruct atapi_toc *toc = drive->cdrom_info.toc;
drive1736drivers/block/ide-cd.cdrive->cdrom_info.toc = toc;
drive1741drivers/block/ide-cd.cprintk ("%s: No cdrom TOC buffer!\n", drive->name);
drive1747drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid)
drive1748drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive1750drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid) return 0;
drive1756drivers/block/ide-cd.cmsf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc);
drive1760drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1767drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1780drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1788drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1801drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1818drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 1,
drive1834drivers/block/ide-cd.cstat = cdrom_read_capacity (drive, &toc->capacity, reqbuf);
drive1837drivers/block/ide-cd.cHWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS]
drive1839drivers/block/ide-cd.cdrive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME;
drive1842drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 1;
drive1849drivers/block/ide-cd.ccdrom_read_subchannel (ide_drive_t *drive,
drive1865drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1871drivers/block/ide-cd.ccdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag,
drive1886drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1891drivers/block/ide-cd.ccdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen,
drive1906drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1911drivers/block/ide-cd.ccdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end,
drive1928drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1934drivers/block/ide-cd.ccdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end,
drive1946drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd)
drive1956drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1962drivers/block/ide-cd.ccdrom_play_lba_range_1 (ide_drive_t *drive, int lba_start, int lba_end,
drive1977drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_playaudio12)
drive1978drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive1988drivers/block/ide-cd.cstat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf);
drive1998drivers/block/ide-cd.c"trying PLAYAUDIO_MSF\n", drive->name);
drive1999drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2000drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive2001drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive2014drivers/block/ide-cd.ccdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
drive2029drivers/block/ide-cd.cstat = cdrom_play_lba_range_1 (drive, lba_start, lba_end, reqbuf);
drive2044drivers/block/ide-cd.cint cdrom_get_toc_entry (ide_drive_t *drive, int track,
drive2052drivers/block/ide-cd.cstat = cdrom_read_toc (drive, reqbuf);
drive2055drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2072drivers/block/ide-cd.ccdrom_read_block (ide_drive_t *drive, int format, int lba,
drive2090drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->old_readcd)
drive2105drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2111drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd == 0)
drive2114drivers/block/ide-cd.cdrive->name);
drive2115drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 1;
drive2116drivers/block/ide-cd.creturn cdrom_read_block (drive, format, lba, buf, buflen, reqbuf);
drive2124drivers/block/ide-cd.cint ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
drive2133drivers/block/ide-cd.cif (drive->usage > 1)
drive2136drivers/block/ide-cd.cstat = cdrom_lockdoor (drive, 0, NULL);
drive2139drivers/block/ide-cd.creturn cdrom_eject (drive, 0, NULL);
drive2144drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close = arg;
drive2149drivers/block/ide-cd.creturn cdrom_pause (drive, 1, NULL);
drive2152drivers/block/ide-cd.creturn cdrom_pause (drive, 0, NULL);
drive2155drivers/block/ide-cd.creturn cdrom_startstop (drive, 1, NULL);
drive2161drivers/block/ide-cd.cstat = cdrom_startstop (drive, 0, NULL);
drive2164drivers/block/ide-cd.creturn cdrom_eject (drive, 1, NULL);
drive2184drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2200drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL);
drive2202drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL);
drive2211drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2224drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2227drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2249drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL);
drive2284drivers/block/ide-cd.cstat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf),
drive2289drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive2343drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL);
drive2345drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 1, mask  , sizeof (buffer),NULL);
drive2355drivers/block/ide-cd.creturn cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL);
drive2367drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL);
drive2394drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2397drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2427drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2430drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2461drivers/block/ide-cd.cstat = cdrom_read_block (drive, 1, lba, buf,
drive2502drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2505drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2510drivers/block/ide-cd.cstat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL);
drive2523drivers/block/ide-cd.creturn ide_do_drive_cmd (drive, &req, ide_wait);
drive2562drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2584drivers/block/ide-cd.cint ide_cdrom_check_media_change (ide_drive_t *drive)
drive2588drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive2590drivers/block/ide-cd.cretval = CDROM_STATE_FLAGS (drive)->media_changed;
drive2591drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2597drivers/block/ide-cd.cint ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive)
drive2602drivers/block/ide-cd.c--drive->usage;
drive2607drivers/block/ide-cd.cif (drive->usage == 1)
drive2614drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2619drivers/block/ide-cd.ccdrom_eject (drive, 1, &my_reqbuf);
drive2620drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2626drivers/block/ide-cd.c--drive->usage;
drive2631drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, &my_reqbuf);
drive2634drivers/block/ide-cd.c(void) cdrom_read_toc (drive, &my_reqbuf);
drive2645drivers/block/ide-cd.cvoid ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive)
drive2647drivers/block/ide-cd.cif (drive->usage == 0)
drive2652drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 0, NULL);
drive2655drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->eject_on_close)
drive2656drivers/block/ide-cd.c(void) cdrom_eject (drive, 0, NULL);
drive2666drivers/block/ide-cd.cvoid ide_cdrom_setup (ide_drive_t *drive)
drive2668drivers/block/ide-cd.cblksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE;
drive2670drivers/block/ide-cd.cdrive->special.all = 0;
drive2671drivers/block/ide-cd.cdrive->ready_stat = 0;
drive2673drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2674drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid     = 0;
drive2675drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked   = 0;
drive2678drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close= 0;
drive2681drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
drive2683drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 0;
drive2686drivers/block/ide-cd.cif (drive->id != NULL) {
drive2687drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->drq_interrupt =
drive2688drivers/block/ide-cd.c((drive->id->config & 0x0060) == 0x20);
drive2690drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->drq_interrupt = 0;
drive2694drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0;
drive2695drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 0;
drive2696drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0;
drive2697drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0;
drive2698drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0;
drive2700drivers/block/ide-cd.cif (drive->id != NULL) {
drive2702drivers/block/ide-cd.cif (strcmp (drive->id->model, "CD220E") == 0 ||
drive2703drivers/block/ide-cd.cstrcmp (drive->id->model, "CD")     == 0)        /* Creative Labs */
drive2704drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2706drivers/block/ide-cd.celse if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 ||  /* Acer CD525E */
drive2707drivers/block/ide-cd.cstrcmp (drive->id->model, "OTI-SCYLLA") == 0)
drive2708drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2712drivers/block/ide-cd.celse if (strcmp (drive->id->model, "DCI-2S10") == 0)
drive2713drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2715drivers/block/ide-cd.celse if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */
drive2717drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2720drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2727drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V003S0DS") == 0)
drive2729drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1;
drive2730drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive2731drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2733drivers/block/ide-cd.celse if (strcmp (drive->id->model, "0V300SSD") == 0 ||
drive2734drivers/block/ide-cd.cstrcmp (drive->id->model, "V003M0DP") == 0)
drive2735drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2738drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V004E0DT") == 0 ||
drive2739drivers/block/ide-cd.cstrcmp (drive->id->model, "0V400ETD") == 0)
drive2740drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2742drivers/block/ide-cd.celse if ( strcmp (drive->id->model, "CD-ROM CDU55D") == 0) /*sony cdu55d */
drive2743drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2745drivers/block/ide-cd.celse if (strcmp (drive->id->model, "CD-ROM CDU55E") == 0)
drive2746drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2750drivers/block/ide-cd.cdrive->cdrom_info.toc               = NULL;
drive2751drivers/block/ide-cd.cdrive->cdrom_info.sector_buffer     = NULL;
drive2752drivers/block/ide-cd.cdrive->cdrom_info.sector_buffered   = 0;
drive2753drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive456drivers/block/ide-tape.c#define  IDETAPE_DATA_REG    (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET)
drive457drivers/block/ide-tape.c#define IDETAPE_ERROR_REG    (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET)
drive458drivers/block/ide-tape.c#define  IDETAPE_IREASON_REG    (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET)
drive459drivers/block/ide-tape.c#define IDETAPE_RESERVED3_REG    (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET)
drive460drivers/block/ide-tape.c#define IDETAPE_BCOUNTL_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET)
drive461drivers/block/ide-tape.c#define  IDETAPE_BCOUNTH_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET)
drive462drivers/block/ide-tape.c#define IDETAPE_DRIVESEL_REG    (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET)
drive463drivers/block/ide-tape.c#define  IDETAPE_STATUS_REG    (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET)
drive470drivers/block/ide-tape.c#define IDETAPE_FEATURES_REG    (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET)
drive471drivers/block/ide-tape.c#define IDETAPE_ATACOMMAND_REG    (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET)
drive472drivers/block/ide-tape.c#define IDETAPE_CONTROL_REG    (HWIF(drive)->ctl_port)
drive593drivers/block/ide-tape.cide_drive_t *drive;
drive810drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive811drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive812drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount);
drive818drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler);
drive819drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive);
drive825drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive);
drive828drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive);
drive829drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive);
drive835drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive);
drive836drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive);
drive838drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq);
drive839drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result);
drive841drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive);
drive842drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive);
drive849drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive);
drive858drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive);
drive860drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive);
drive862drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive);
drive865drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive);
drive890drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count);
drive897drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count);
drive905drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer);
drive912drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer);
drive920drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer);
drive927drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc);
drive929drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block);
drive930drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive);
drive931drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive);
drive937drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive);
drive952drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive);
drive956drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive);
drive957drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage);
drive958drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive);
drive959drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive);
drive960drivers/block/ide-tape.cvoid idetape_wait_for_pipeline (ide_drive_t *drive);
drive961drivers/block/ide-tape.cvoid idetape_discard_read_pipeline (ide_drive_t *drive);
drive962drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive);
drive963drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive);
drive1018drivers/block/ide-tape.cint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id)
drive1161drivers/block/ide-tape.cidetape_chrdev.drive=drive;
drive1185drivers/block/ide-tape.cide_drive_t *drive;
drive1190drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive1200drivers/block/ide-tape.cdrive->name,idetape_chrdev.name,major);
drive1218drivers/block/ide-tape.cvoid idetape_setup (ide_drive_t *drive)
drive1221drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1229drivers/block/ide-tape.cdrive->ready_stat = 0;      /* With an ATAPI device, we can issue packet commands */
drive1231drivers/block/ide-tape.cHWIF(drive)->tape_drive=drive;
drive1255drivers/block/ide-tape.cidetape_get_mode_sense_results (drive);
drive1342drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive)
drive1346drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1355drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive1452drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler)
drive1460drivers/block/ide-tape.ctape=&(drive->tape);
drive1482drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1493drivers/block/ide-tape.c(*pc->callback)(drive);
drive1515drivers/block/ide-tape.cdrive->using_dma=0;
drive1518drivers/block/ide-tape.cif (pc->request_transfer && pc->dma_recommended && drive->using_dma) {
drive1519drivers/block/ide-tape.cdma_ok=!(HWIF(drive)->dmaproc(pc->writing ? ide_dma_write : ide_dma_read, drive));
drive1526drivers/block/ide-tape.cOUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG);
drive1528drivers/block/ide-tape.cide_set_handler (drive,handler,WAIT_CMD);      /* Set the interrupt routine */
drive1530drivers/block/ide-tape.cif (ide_wait_stat (drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) {   /* Wait for DRQ to be ready - Assuming Accelerated DRQ */  
drive1547drivers/block/ide-tape.cide_do_reset (drive);
drive1551drivers/block/ide-tape.cide_output_data (drive,pc->c,12/4);      /* Send the actual packet */
drive1555drivers/block/ide-tape.c(void) (HWIF(drive)->dmaproc(ide_dma_begin, drive));
drive1570drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive)
drive1573drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1582drivers/block/ide-tape.cif ((pc->dma_error=HWIF(drive)->dmaproc(ide_dma_status_bad, drive)))
drive1587drivers/block/ide-tape.cpc->actually_transferred=HWIF(drive)->dmaproc(ide_dma_transferred, drive);
drive1590drivers/block/ide-tape.c(void) (HWIF(drive)->dmaproc(ide_dma_abort, drive));  /* End DMA */
drive1618drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1622drivers/block/ide-tape.cide_do_reset (drive);
drive1626drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive1632drivers/block/ide-tape.cidetape_postpone_request (drive);    /* Allow ide.c to handle other requests */
drive1642drivers/block/ide-tape.c(*pc->callback)(drive);      /* Command finished - Call the callback function */
drive1650drivers/block/ide-tape.cdrive->using_dma=0;
drive1651drivers/block/ide-tape.cide_do_reset (drive);
drive1661drivers/block/ide-tape.cide_do_reset (drive);
drive1667drivers/block/ide-tape.cide_do_reset (drive);
drive1677drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1678drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1691drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1692drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1700drivers/block/ide-tape.cidetape_output_data (drive,pc->current_position,bcount.all);  /* Write the current buffer */
drive1702drivers/block/ide-tape.cidetape_input_data (drive,pc->current_position,bcount.all);  /* Read the current buffer */
drive1709drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);    /* And set the interrupt handler again */
drive1718drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive)
drive1721drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1735drivers/block/ide-tape.ctape->dsc_timer.data=(unsigned long) drive;
drive1743drivers/block/ide-tape.ctape->postponed_rq = rq = HWGROUP(drive)->rq;
drive1746drivers/block/ide-tape.cHWGROUP(drive)->rq = NULL;
drive1769drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1770drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1774drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc_direct called\n",drive->name);
drive1777drivers/block/ide-tape.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive1783drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);  /* request in the request queue */
drive1791drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1824drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1825drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive1826drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1832drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc called\n",drive->name);
drive1857drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1921drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1971drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1990drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive2011drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive)
drive2014drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive2025drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
drive2039drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive)
drive2042drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2055drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive2056drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive2067drivers/block/ide-tape.c(*pc->callback)(drive);
drive2072drivers/block/ide-tape.cprintk ("ide-tape: %s: DSC timeout.\n",drive->name);
drive2081drivers/block/ide-tape.c(*pc->callback)(drive);
drive2093drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive)
drive2101drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive2102drivers/block/ide-tape.cnew_rq=idetape_next_rq_storage (drive);
drive2107drivers/block/ide-tape.cidetape_queue_pc_head (drive,pc,new_rq);
drive2114drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive)
drive2120drivers/block/ide-tape.ctape=&(drive->tape);
drive2121drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2130drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2133drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2139drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive)
drive2142drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2143drivers/block/ide-tape.cstruct request *rq=HWGROUP(drive)->rq;
drive2154drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2162drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2167drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive)
drive2170drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2171drivers/block/ide-tape.cstruct request *rq=HWGROUP(drive)->rq;
drive2182drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2185drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2190drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive)
drive2195drivers/block/ide-tape.ctape=&(drive->tape);
drive2198drivers/block/ide-tape.cidetape_pc_callback (drive);
drive2209drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2218drivers/block/ide-tape.cide_input_data (drive,buffer,wcount);
drive2230drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2239drivers/block/ide-tape.cide_output_data (drive,buffer,wcount);
drive2252drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount)
drive2380drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive)
drive2383drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2392drivers/block/ide-tape.cidetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer);
drive2393drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2397drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2408drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result)
drive2411drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2740drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive)
drive2747drivers/block/ide-tape.ctape=&(drive->tape);
drive2753drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2767drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2775drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2780drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2793drivers/block/ide-tape.cint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive2822drivers/block/ide-tape.cide_drive_t *drive = hwgroup->drive;
drive2824drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive2825drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2856drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive2861drivers/block/ide-tape.cidetape_increase_max_pipeline_stages (drive);
drive2862drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2866drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive2876drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end);
drive2878drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next);
drive2881drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2888drivers/block/ide-tape.cvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block)
drive2891drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2893drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2916drivers/block/ide-tape.cide_end_request (0,HWGROUP (drive));      /* Let the common code handle it */
drive2946drivers/block/ide-tape.cidetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr);
drive2956drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2965drivers/block/ide-tape.cidetape_media_access_finished (drive);
drive2998drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3002drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive3011drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3020drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3024drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive3033drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3050drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3055drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3060drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive3086drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc)
drive3093drivers/block/ide-tape.creturn ide_do_drive_cmd (drive, &rq, ide_wait);
drive3116drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq)
drive3119drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive3122drivers/block/ide-tape.cbdev->current_request=HWGROUP (drive)->rq;    /* Since we may have taken it out */
drive3127drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive3159drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer)
drive3162drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3180drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, &rq, ide_wait);
drive3190drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer)
drive3193drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3209drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3213drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3215drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3218drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);
drive3228drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer));
drive3241drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3263drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer)
drive3266drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3276drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3290drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3299drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer));
drive3314drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3327drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3337drivers/block/ide-tape.cvoid idetape_discard_read_pipeline (ide_drive_t *drive)
drive3340drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3363drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3377drivers/block/ide-tape.cvoid idetape_wait_for_pipeline (ide_drive_t *drive)
drive3380drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3384drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3398drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive)
drive3401drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3421drivers/block/ide-tape.c(void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer);
drive3425drivers/block/ide-tape.cidetape_wait_for_pipeline (drive);
drive3522drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive)
drive3527drivers/block/ide-tape.ctape=&(drive->tape);
drive3549drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive)
drive3554drivers/block/ide-tape.ctape=&(drive->tape);
drive3572drivers/block/ide-tape.cint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3575drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3595drivers/block/ide-tape.cvoid idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3598drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3639drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3640drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3650drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3651drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3660drivers/block/ide-tape.cbytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer);
drive3684drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3692drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3707drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3708drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3718drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3726drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer);
drive3750drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3759drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3807drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3808drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3820drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3821drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3825drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3836drivers/block/ide-tape.creturn (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count));
drive3845drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3853drivers/block/ide-tape.creturn (idetape_blkdev_ioctl (drive,inode,file,cmd,arg));
drive3910drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count)
drive3913drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3936drivers/block/ide-tape.creturn (idetape_space_over_filemarks (drive,mt_op,mt_count));
drive3946drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3952drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3957drivers/block/ide-tape.creturn (idetape_rewind_tape (drive));
drive3960drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3962drivers/block/ide-tape.creturn (idetape_flush_tape_buffers (drive));
drive3965drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3968drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3970drivers/block/ide-tape.cretval=idetape_rewind_tape (drive);
drive3973drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3975drivers/block/ide-tape.creturn (idetape_position_tape (drive,mt_count));
drive3992drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count)
drive3995drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4027drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4032drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4034drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive4049drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4053drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTFSF,mt_count-count);
drive4055drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTBSF,1));
drive4060drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4064drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTBSF,mt_count+count);
drive4066drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTFSF,1));
drive4080drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive4081drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4125drivers/block/ide-tape.cif (idetape_rewind_tape (drive)) {
drive4142drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive4143drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4153drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive4155drivers/block/ide-tape.cif (idetape_queue_pc_tail (drive,&pc))
drive4161drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive4163drivers/block/ide-tape.cidetape_wait_for_pipeline (drive);
drive4167drivers/block/ide-tape.cif (idetape_rewind_tape (drive))
drive4196drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block)
drive4203drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4210drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4219drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive)
drive4229drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4236drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4239drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive)
drive4245drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4266drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive)
drive4269drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4438drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive)
drive4441drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4466drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage)
drive4469drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4493drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive)
drive4496drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4532drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive)
drive4535drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4541drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive4542drivers/block/ide-tape.c(void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end));
drive4551drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive)
drive4554drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive280drivers/block/ide.c#define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive)
drive284drivers/block/ide.c#define SET_RECOVERY_TIMER(drive)
drive343drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive345drivers/block/ide.cdrive->select.all    = (unit<<4)|0xa0;
drive346drivers/block/ide.cdrive->hwif      = hwif;
drive347drivers/block/ide.cdrive->ctl      = 0x08;
drive348drivers/block/ide.cdrive->ready_stat    = READY_STAT;
drive349drivers/block/ide.cdrive->bad_wstat    = BAD_W_STAT;
drive350drivers/block/ide.cdrive->special.b.recalibrate  = 1;
drive351drivers/block/ide.cdrive->special.b.set_geometry  = 1;
drive352drivers/block/ide.cdrive->name[0]      = 'h';
drive353drivers/block/ide.cdrive->name[1]      = 'd';
drive354drivers/block/ide.cdrive->name[2]      = 'a' + (h * MAX_DRIVES) + unit;
drive377drivers/block/ide.cvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive379drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive381drivers/block/ide.cbyte io_32bit = drive->io_32bit;
drive389drivers/block/ide.cif (drive->unmask)
drive401drivers/block/ide.cvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive403drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive405drivers/block/ide.cbyte io_32bit = drive->io_32bit;
drive413drivers/block/ide.cif (drive->unmask)
drive429drivers/block/ide.cvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout)
drive431drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive435drivers/block/ide.cdrive->name, hwgroup->handler, handler);
drive473drivers/block/ide.cstatic unsigned long current_capacity (ide_drive_t  *drive)
drive475drivers/block/ide.cstruct hd_driveid *id = drive->id;
drive476drivers/block/ide.cunsigned long capacity = drive->cyl * drive->head * drive->sect;
drive478drivers/block/ide.cif (!drive->present)
drive480drivers/block/ide.cif (drive->media != ide_disk)
drive482drivers/block/ide.cdrive->select.b.lba = 0;
drive487drivers/block/ide.cdrive->select.b.lba = 1;
drive490drivers/block/ide.creturn (capacity - drive->sect0);
drive503drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive505drivers/block/ide.cif (drive->present && drive->media == ide_cdrom)
drive506drivers/block/ide.cide_cdrom_setup(drive);
drive509drivers/block/ide.cif (drive->present && drive->media == ide_tape)
drive510drivers/block/ide.cidetape_setup(drive);
drive512drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive513drivers/block/ide.cif (!drive->present || drive->media != ide_disk) {
drive514drivers/block/ide.cdrive->part[0].start_sect = -1; /* skip partition check */
drive573drivers/block/ide.cstatic void atapi_reset_pollfunc (ide_drive_t *drive)
drive575drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive578drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive582drivers/block/ide.cprintk("%s: ATAPI reset complete\n", drive->name);
drive585drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive589drivers/block/ide.cprintk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat);
drive590drivers/block/ide.cdo_reset1 (drive, 1);  /* do it the old fashioned way */
drive602drivers/block/ide.cstatic void reset_pollfunc (ide_drive_t *drive)
drive604drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive605drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive610drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive660drivers/block/ide.cstatic void do_reset1 (ide_drive_t *drive, int  do_not_try_atapi)
drive664drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive665drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive672drivers/block/ide.cif (drive->media != ide_disk) {
drive674drivers/block/ide.cif (!drive->keep_settings)
drive675drivers/block/ide.cdrive->unmask = 0;
drive676drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive680drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive716drivers/block/ide.cOUT_BYTE(drive->ctl|6,IDE_CONTROL_REG);  /* set SRST and nIEN */
drive718drivers/block/ide.cOUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);  /* clear SRST, leave nIEN */
drive720drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive729drivers/block/ide.cvoid ide_do_reset (ide_drive_t *drive)
drive731drivers/block/ide.cdo_reset1 (drive, 0);
drive733drivers/block/ide.cif (drive->media == ide_tape)
drive734drivers/block/ide.cdrive->tape.reset_issued=1;
drive741drivers/block/ide.cvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err)
drive744drivers/block/ide.cstruct request *rq = HWGROUP(drive)->rq;
drive758drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive768drivers/block/ide.cbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat)
drive775drivers/block/ide.cprintk("%s: %s: status=0x%02x", drive->name, msg, stat);
drive777drivers/block/ide.cif (drive->media == ide_disk) {
drive796drivers/block/ide.cprintk("%s: %s: error=0x%02x", drive->name, msg, err);
drive798drivers/block/ide.cif (drive->media == ide_disk) {
drive822drivers/block/ide.cif (HWGROUP(drive)->rq)
drive823drivers/block/ide.cprintk(", sector=%ld", HWGROUP(drive)->rq->sector);
drive840drivers/block/ide.cstatic void try_to_flush_leftover_data (ide_drive_t *drive)
drive842drivers/block/ide.cint i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS;
drive848drivers/block/ide.cide_input_data (drive, buffer, wcount);
drive855drivers/block/ide.cvoid ide_error (ide_drive_t *drive, const char *msg, byte stat)
drive860drivers/block/ide.cerr = ide_dump_status(drive, msg, stat);
drive861drivers/block/ide.cif ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL)
drive864drivers/block/ide.cif (rq->cmd == IDE_DRIVE_CMD || (rq->cmd != READ && rq->cmd != WRITE && drive->media == ide_disk))
drive867drivers/block/ide.cide_end_drive_cmd(drive, stat, err);
drive873drivers/block/ide.cif (drive->media == ide_disk && (stat & ERR_STAT)) {
drive881drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive888drivers/block/ide.cif (drive->media == ide_tape) {
drive890drivers/block/ide.cidetape_end_request(0, HWGROUP(drive));
drive894drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive899drivers/block/ide.cide_do_reset(drive);
drive902drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive910drivers/block/ide.cstatic void read_intr (ide_drive_t *drive)
drive918drivers/block/ide.cide_error(drive, "read_intr", stat);
drive921drivers/block/ide.cmsect = drive->mult_count;
drive923drivers/block/ide.crq = HWGROUP(drive)->rq;
drive930drivers/block/ide.cide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
drive933drivers/block/ide.cdrive->name, rq->sector, rq->sector+nsect-1,
drive941drivers/block/ide.cide_end_request(1, HWGROUP(drive));
drive945drivers/block/ide.cide_set_handler (drive, &read_intr, WAIT_CMD);
drive952drivers/block/ide.cstatic void write_intr (ide_drive_t *drive)
drive956drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive959drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive962drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive974drivers/block/ide.cide_output_data (drive, rq->buffer, SECTOR_WORDS);
drive975drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive980drivers/block/ide.cide_error(drive, "write_intr", stat);
drive987drivers/block/ide.cstatic void multwrite (ide_drive_t *drive)
drive989drivers/block/ide.cstruct request *rq = &HWGROUP(drive)->wrq;
drive990drivers/block/ide.cunsigned int mcount = drive->mult_count;
drive998drivers/block/ide.cide_output_data(drive, rq->buffer, nsect<<7);
drive1001drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive1011drivers/block/ide.cpanic("%s: buffer list corrupted\n", drive->name);
drive1023drivers/block/ide.cstatic void multwrite_intr (ide_drive_t *drive)
drive1027drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive1030drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive1033drivers/block/ide.cmultwrite(drive);
drive1034drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1048drivers/block/ide.cide_error(drive, "multwrite_intr", stat);
drive1055drivers/block/ide.cstatic void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler)
drive1057drivers/block/ide.cide_set_handler (drive, handler, WAIT_CMD);
drive1058drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1066drivers/block/ide.cstatic void set_multmode_intr (ide_drive_t *drive)
drive1072drivers/block/ide.cdrive->mult_count = drive->mult_req;
drive1074drivers/block/ide.cdrive->mult_req = drive->mult_count = 0;
drive1075drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive1076drivers/block/ide.c(void) ide_dump_status(drive, "set_multmode", stat);
drive1083drivers/block/ide.cstatic void set_geometry_intr (ide_drive_t *drive)
drive1089drivers/block/ide.cide_error(drive, "set_geometry_intr", stat);
drive1095drivers/block/ide.cstatic void recal_intr (ide_drive_t *drive)
drive1101drivers/block/ide.cide_error(drive, "recal_intr", stat);
drive1107drivers/block/ide.cstatic void drive_cmd_intr (ide_drive_t *drive)
drive1113drivers/block/ide.cide_end_drive_cmd (drive, stat, GET_ERR());
drive1115drivers/block/ide.cide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */
drive1122drivers/block/ide.cstatic inline void do_special (ide_drive_t *drive)
drive1124drivers/block/ide.cspecial_t *s = &drive->special;
drive1127drivers/block/ide.cprintk("%s: do_special: 0x%02x\n", drive->name, s->all);
drive1131drivers/block/ide.cif (drive->media == ide_disk) {
drive1132drivers/block/ide.cOUT_BYTE(drive->sect,IDE_SECTOR_REG);
drive1133drivers/block/ide.cOUT_BYTE(drive->cyl,IDE_LCYL_REG);
drive1134drivers/block/ide.cOUT_BYTE(drive->cyl>>8,IDE_HCYL_REG);
drive1135drivers/block/ide.cOUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG);
drive1136drivers/block/ide.cide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr);
drive1140drivers/block/ide.cif (drive->media == ide_disk) {
drive1141drivers/block/ide.cide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr);
drive1144drivers/block/ide.cide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc;
drive1147drivers/block/ide.ctuneproc(drive, drive->pio_req);
drive1151drivers/block/ide.cif (drive->media == ide_disk) {
drive1152drivers/block/ide.cif (drive->id && drive->mult_req > drive->id->max_multsect)
drive1153drivers/block/ide.cdrive->mult_req = drive->id->max_multsect;
drive1154drivers/block/ide.cide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr);
drive1156drivers/block/ide.cdrive->mult_req = 0;
drive1160drivers/block/ide.cprintk("%s: bad special flag: 0x%02x\n", drive->name, special);
drive1175drivers/block/ide.cint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout)
drive1185drivers/block/ide.cide_error(drive, "status error", stat);
drive1200drivers/block/ide.cide_error(drive, "status timeout", GET_STAT());
drive1209drivers/block/ide.cstatic inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block)
drive1211drivers/block/ide.cunsigned short io_base = HWIF(drive)->io_base;
drive1213drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1215drivers/block/ide.cif (drive->select.b.lba) {
drive1218drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ",
drive1224drivers/block/ide.cOUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1227drivers/block/ide.ctrack = block / drive->sect;
drive1228drivers/block/ide.csect  = block % drive->sect + 1;
drive1230drivers/block/ide.chead  = track % drive->head;
drive1231drivers/block/ide.ccyl   = track / drive->head;
drive1234drivers/block/ide.cOUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1237drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ", cyl,
drive1243drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive)))
drive1246drivers/block/ide.cide_set_handler(drive, &read_intr, WAIT_CMD);
drive1247drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET);
drive1252drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive)))
drive1255drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET);
drive1256drivers/block/ide.cif (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
drive1257drivers/block/ide.cprintk("%s: no DRQ after issuing %s\n", drive->name,
drive1258drivers/block/ide.cdrive->mult_count ? "MULTWRITE" : "WRITE");
drive1261drivers/block/ide.cif (!drive->unmask)
drive1263drivers/block/ide.cif (drive->mult_count) {
drive1264drivers/block/ide.cHWGROUP(drive)->wrq = *rq; /* scratchpad */
drive1265drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1266drivers/block/ide.cmultwrite(drive);
drive1268drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive1269drivers/block/ide.cide_output_data(drive, rq->buffer, SECTOR_WORDS);
drive1278drivers/block/ide.cdrive->name, args[0], args[1], args[2]);
drive1281drivers/block/ide.cide_cmd(drive, args[0], args[1], &drive_cmd_intr);
drive1289drivers/block/ide.cprintk("%s: DRIVE_CMD (null)\n", drive->name);
drive1291drivers/block/ide.cide_end_drive_cmd(drive, GET_STAT(), GET_ERR());
drive1295drivers/block/ide.cprintk("%s: bad command: %d\n", drive->name, rq->cmd);
drive1296drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive1306drivers/block/ide.cide_drive_t *drive;
drive1319drivers/block/ide.cdrive = &hwif->drives[unit];
drive1322drivers/block/ide.cprintk("%s: block not locked\n", drive->name);
drive1328drivers/block/ide.cif ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {
drive1329drivers/block/ide.cprintk("%s%c: bad access: block=%ld, count=%ld\n", drive->name,
drive1333drivers/block/ide.cblock += drive->part[minor&PARTN_MASK].start_sect + drive->sect0;
drive1335drivers/block/ide.cif (block == 0 && drive->remap_0_to_1)
drive1338drivers/block/ide.c((ide_hwgroup_t *)hwif->hwgroup)->drive = drive;
drive1341drivers/block/ide.chwif->selectproc (drive);
drive1351drivers/block/ide.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive1352drivers/block/ide.cif (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) {
drive1353drivers/block/ide.cprintk("%s: drive not ready for command\n", drive->name);
drive1357drivers/block/ide.cif (!drive->special.all) {
drive1359drivers/block/ide.cswitch (drive->media) {
drive1361drivers/block/ide.cdo_rw_disk (drive, rq, block);
drive1365drivers/block/ide.cide_do_rw_cdrom (drive, block);
drive1373drivers/block/ide.cide_cmd(drive, args[0], args[1], &drive_cmd_intr);
drive1376drivers/block/ide.cidetape_do_request (drive, rq, block);
drive1382drivers/block/ide.cdrive->name, drive->media);
drive1386drivers/block/ide.cdo_rw_disk (drive, rq, block); /* simpler and faster */
drive1390drivers/block/ide.cdo_special(drive);
drive1490drivers/block/ide.cide_drive_t   *drive   = hwgroup->drive;
drive1499drivers/block/ide.chandler(drive);
drive1502drivers/block/ide.cprintk("%s: marginal timeout\n", drive->name);
drive1506drivers/block/ide.c(void) hwgroup->hwif->dmaproc (ide_dma_abort, drive);
drive1507drivers/block/ide.cide_error(drive, "irq timeout", GET_STAT());
drive1549drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1550drivers/block/ide.cif (!drive->present)
drive1554drivers/block/ide.chwif->selectproc (drive);
drive1556drivers/block/ide.cif (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT))
drive1557drivers/block/ide.c(void) ide_dump_status(drive, "unexpected_intr", stat);
drive1559drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive1565drivers/block/ide.chwif->selectproc (hwgroup->drive);
drive1578drivers/block/ide.cide_drive_t *drive = hwgroup->drive;
drive1581drivers/block/ide.cif (drive->unmask)
drive1583drivers/block/ide.chandler(drive);
drive1586drivers/block/ide.cSET_RECOVERY_TIMER(HWIF(drive));
drive1609drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1610drivers/block/ide.cif (drive->present)
drive1611drivers/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);
drive1692drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive1694drivers/block/ide.cif (HWGROUP(drive)->rq == NULL) {  /* is this necessary (?) */
drive1714drivers/block/ide.cide_drive_t *drive;
drive1717drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1721drivers/block/ide.cwhile (drive->busy)
drive1722drivers/block/ide.csleep_on(&drive->wqueue);
drive1723drivers/block/ide.cdrive->usage++;
drive1726drivers/block/ide.cif (drive->media == ide_cdrom)
drive1727drivers/block/ide.creturn ide_cdrom_open (inode, filp, drive);
drive1730drivers/block/ide.cif (drive->media == ide_tape)
drive1731drivers/block/ide.creturn idetape_blkdev_open (inode, filp, drive);
drive1733drivers/block/ide.cif (drive->removeable) {
drive1744drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1755drivers/block/ide.cide_drive_t *drive;
drive1757drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) != NULL) {
drive1759drivers/block/ide.cdrive->usage--;
drive1761drivers/block/ide.cif (drive->media == ide_cdrom) {
drive1762drivers/block/ide.cide_cdrom_release (inode, file, drive);
drive1767drivers/block/ide.cif (drive->media == ide_tape) {
drive1768drivers/block/ide.cidetape_blkdev_release (inode, file, drive);
drive1772drivers/block/ide.cif (drive->removeable) {
drive1778drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1793drivers/block/ide.cide_drive_t *drive;
drive1797drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive1801drivers/block/ide.cminor = drive->select.b.unit << PARTN_BITS;
drive1804drivers/block/ide.cif (drive->busy || (drive->usage > 1)) {
drive1808drivers/block/ide.cdrive->busy = 1;
drive1812drivers/block/ide.cif (drive->part[p].nr_sects > 0) {
drive1818drivers/block/ide.cdrive->part[p].start_sect = 0;
drive1819drivers/block/ide.cdrive->part[p].nr_sects   = 0;
drive1822drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive1823drivers/block/ide.cif (drive->media == ide_disk)
drive1824drivers/block/ide.cresetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
drive1826drivers/block/ide.cdrive->busy = 0;
drive1827drivers/block/ide.cwake_up(&drive->wqueue);
drive1848drivers/block/ide.cide_drive_t *drive;
drive1855drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1859drivers/block/ide.cif (!loc || drive->media != ide_disk) return -EINVAL;
drive1862drivers/block/ide.cput_user(drive->bios_head, (byte *) &loc->heads);
drive1863drivers/block/ide.cput_user(drive->bios_sect, (byte *) &loc->sectors);
drive1864drivers/block/ide.cput_user(drive->bios_cyl, (unsigned short *) &loc->cylinders);
drive1865drivers/block/ide.cput_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect,
drive1885drivers/block/ide.creturn write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects);
drive1890drivers/block/ide.creturn write_fs_long(arg, drive->keep_settings);
drive1893drivers/block/ide.creturn write_fs_long(arg, drive->unmask);
drive1896drivers/block/ide.creturn write_fs_long(arg, drive->using_dma);
drive1899drivers/block/ide.creturn write_fs_long(arg, drive->io_32bit);
drive1902drivers/block/ide.creturn write_fs_long(arg, drive->mult_count);
drive1907drivers/block/ide.cif (drive->id == NULL)
drive1909drivers/block/ide.cerr = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id));
drive1911drivers/block/ide.cmemcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id));
drive1915drivers/block/ide.creturn write_fs_long(arg, drive->bad_wstat == BAD_R_STAT);
drive1919drivers/block/ide.cif (drive->media == ide_cdrom)
drive1922drivers/block/ide.cif (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc)
drive1938drivers/block/ide.cif (!(HWIF(drive)->dmaproc)) {
drive1942drivers/block/ide.cdrive->using_dma = arg;
drive1945drivers/block/ide.cdrive->keep_settings = arg;
drive1948drivers/block/ide.cif (arg && HWIF(drive)->no_unmask) {
drive1952drivers/block/ide.cdrive->unmask = arg;
drive1955drivers/block/ide.cdrive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT;
drive1960drivers/block/ide.cdrive->io_32bit = arg;
drive1962drivers/block/ide.cif (HWIF(drive)->chipset == ide_dtc2278)
drive1963drivers/block/ide.cHWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
drive1975drivers/block/ide.cif (drive->id && arg > drive->id->max_multsect)
drive1979drivers/block/ide.cif (drive->special.b.set_multmode) {
drive1983drivers/block/ide.cdrive->mult_req = arg;
drive1984drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive1986drivers/block/ide.c(void) ide_do_drive_cmd (drive, &rq, ide_wait);
drive1987drivers/block/ide.creturn (drive->mult_count == arg) ? 0 : -EIO;
drive1994drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive2001drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive2013drivers/block/ide.cif (!HWIF(drive)->tuneproc)
drive2017drivers/block/ide.cdrive->pio_req = (int) arg;
drive2018drivers/block/ide.cdrive->special.b.set_pio = 1;
drive2026drivers/block/ide.cif (drive->media == ide_cdrom)
drive2027drivers/block/ide.creturn ide_cdrom_ioctl(drive, inode, file, cmd, arg);
drive2030drivers/block/ide.cif (drive->media == ide_tape)
drive2031drivers/block/ide.creturn idetape_blkdev_ioctl(drive, inode, file, cmd, arg);
drive2039drivers/block/ide.cide_drive_t *drive;
drive2041drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive2044drivers/block/ide.cif (drive->media == ide_cdrom)
drive2045drivers/block/ide.creturn ide_cdrom_check_media_change (drive);
drive2047drivers/block/ide.cif (drive->removeable) /* for disks */
drive2079drivers/block/ide.cstatic inline void do_identify (ide_drive_t *drive, byte cmd)
drive2085drivers/block/ide.cid = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL);
drive2086drivers/block/ide.cide_input_data(drive, id, SECTOR_WORDS);  /* read 512 bytes of id info */
drive2094drivers/block/ide.cprintk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model);
drive2095drivers/block/ide.cdrive->present = 0;
drive2120drivers/block/ide.cprintk("%s: %s, ATAPI ", drive->name, id->model);
drive2126drivers/block/ide.cdrive->media = ide_cdrom;
drive2127drivers/block/ide.cdrive->present = 1;
drive2128drivers/block/ide.cdrive->removeable = 1;
drive2137drivers/block/ide.cif (idetape_identify_device (drive,id)) {
drive2138drivers/block/ide.cdrive->media = ide_tape;
drive2139drivers/block/ide.cdrive->present = 1;
drive2140drivers/block/ide.cdrive->removeable = 1;
drive2141drivers/block/ide.cif (HWIF(drive)->dmaproc != NULL &&
drive2142drivers/block/ide.c!HWIF(drive)->dmaproc(ide_dma_check, drive))
drive2147drivers/block/ide.cdrive->present = 0;
drive2156drivers/block/ide.cdrive->present = 0;
drive2160drivers/block/ide.cdrive->present = 0;
drive2169drivers/block/ide.cdrive->removeable = 1;
drive2174drivers/block/ide.cdrive->removeable = 0;
drive2175drivers/block/ide.cif (drive->select.all & (1<<4)) {
drive2176drivers/block/ide.cdrive->present = 0;
drive2181drivers/block/ide.cdrive->media = ide_disk;
drive2183drivers/block/ide.cif (!drive->present) {
drive2184drivers/block/ide.cdrive->present = 1;
drive2185drivers/block/ide.cdrive->cyl     = drive->bios_cyl  = id->cyls;
drive2186drivers/block/ide.cdrive->head    = drive->bios_head = id->heads;
drive2187drivers/block/ide.cdrive->sect    = drive->bios_sect = id->sectors;
drive2203drivers/block/ide.cdrive->cyl  = id->cur_cyls;
drive2204drivers/block/ide.cdrive->head = id->cur_heads;
drive2205drivers/block/ide.cdrive->sect = id->cur_sectors;
drive2208drivers/block/ide.ccapacity = drive->cyl * drive->head * drive->sect;
drive2217drivers/block/ide.cif ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) {
drive2218drivers/block/ide.cdrive->cyl  = id->cyls;
drive2219drivers/block/ide.cdrive->head = id->heads;
drive2220drivers/block/ide.cdrive->sect = id->sectors;
drive2223drivers/block/ide.cif (drive->sect == drive->bios_sect && drive->head == drive->bios_head) {
drive2224drivers/block/ide.cif (drive->cyl > drive->bios_cyl)
drive2225drivers/block/ide.cdrive->bios_cyl = drive->cyl;
drive2228drivers/block/ide.c(void) current_capacity (drive); /* initialize LBA selection */
drive2231drivers/block/ide.cdrive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2,
drive2232drivers/block/ide.cdrive->select.b.lba ? "LBA, " : "",
drive2233drivers/block/ide.cdrive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2235drivers/block/ide.cdrive->mult_count = 0;
drive2237drivers/block/ide.cdrive->mult_req = INITIAL_MULT_COUNT;
drive2238drivers/block/ide.cif (drive->mult_req > id->max_multsect)
drive2239drivers/block/ide.cdrive->mult_req = id->max_multsect;
drive2240drivers/block/ide.cif (drive->mult_req || ((id->multsect_valid & 1) && id->multsect))
drive2241drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive2243drivers/block/ide.cif (HWIF(drive)->dmaproc != NULL) {  /* hwif supports DMA? */
drive2244drivers/block/ide.cif (!(HWIF(drive)->dmaproc(ide_dma_check, drive)))
drive2271drivers/block/ide.cstatic int try_to_identify (ide_drive_t *drive, byte cmd)
drive2277drivers/block/ide.cif (!HWIF(drive)->irq) {    /* already got an IRQ? */
drive2280drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);  /* enable device irq */
drive2285drivers/block/ide.cprintk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name);
drive2295drivers/block/ide.cif (!HWIF(drive)->irq)
drive2305drivers/block/ide.cdo_identify(drive, cmd); /* drive returned ID */
drive2306drivers/block/ide.cif (drive->present && drive->media != ide_tape) {
drive2307drivers/block/ide.cide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc;
drive2308drivers/block/ide.cif (tuneproc != NULL && drive->autotune == 1)
drive2309drivers/block/ide.ctuneproc(drive, 255);  /* auto-tune PIO mode */
drive2314drivers/block/ide.cif (!HWIF(drive)->irq) {
drive2317drivers/block/ide.cHWIF(drive)->irq = irqs;
drive2319drivers/block/ide.cprintk("%s: IRQ probe failed (%d)\n", drive->name, irqs);
drive2340drivers/block/ide.cstatic int do_probe (ide_drive_t *drive, byte cmd)
drive2344drivers/block/ide.cif (drive->present) {  /* avoid waiting for inappropriate probes */
drive2345drivers/block/ide.cif ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY))
drive2351drivers/block/ide.cdrive->name, drive->present, drive->media,
drive2355drivers/block/ide.cif (HWIF(drive)->selectproc)
drive2356drivers/block/ide.cHWIF(drive)->selectproc (drive);
drive2358drivers/block/ide.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);  /* select target drive */
drive2360drivers/block/ide.cif (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) {
drive2366drivers/block/ide.c|| drive->present || cmd == WIN_PIDENTIFY)
drive2368drivers/block/ide.cif ((rc = try_to_identify(drive,cmd)))   /* send cmd and wait */
drive2369drivers/block/ide.crc = try_to_identify(drive,cmd); /* failed: try again */
drive2371drivers/block/ide.cprintk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT());
drive2376drivers/block/ide.cif (drive->select.b.unit != 0) {
drive2390drivers/block/ide.cstatic inline byte probe_for_drive (ide_drive_t *drive)
drive2392drivers/block/ide.cif (drive->noprobe)      /* skip probing? */
drive2393drivers/block/ide.creturn drive->present;
drive2394drivers/block/ide.cif (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */
drive2396drivers/block/ide.c(void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */
drive2399drivers/block/ide.cif (!drive->present)
drive2401drivers/block/ide.cif (drive->id == NULL) {    /* identification failed? */
drive2402drivers/block/ide.cif (drive->media == ide_disk) {
drive2404drivers/block/ide.cdrive->name, drive->cyl, drive->head, drive->sect);
drive2407drivers/block/ide.celse if (drive->media == ide_cdrom) {
drive2408drivers/block/ide.cprintk("%s: ATAPI cdrom (?)\n", drive->name);
drive2412drivers/block/ide.cdrive->present = 0;  /* nuke it */
drive2429drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2430drivers/block/ide.cif (drive->present) {
drive2431drivers/block/ide.cdrive->present = 0;
drive2432drivers/block/ide.cprintk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name);
drive2448drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2449drivers/block/ide.c(void) probe_for_drive (drive);
drive2450drivers/block/ide.cif (drive->present && drive->media == ide_disk) {
drive2451drivers/block/ide.cif ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
drive2453drivers/block/ide.cdrive->name, drive->head);
drive2454drivers/block/ide.cdrive->present = 0;
drive2457drivers/block/ide.cif (drive->present && !hwif->present) {
drive2580drivers/block/ide.cide_drive_t *drive;
drive2598drivers/block/ide.cdrive = &hwif->drives[unit];
drive2601drivers/block/ide.cdrive->noprobe = 1;
drive2604drivers/block/ide.cdrive->bad_wstat = BAD_R_STAT;
drive2608drivers/block/ide.cdrive->present = 1;
drive2609drivers/block/ide.cdrive->media = ide_cdrom;
drive2616drivers/block/ide.cdrive->autotune = 1;
drive2619drivers/block/ide.cdrive->autotune = 2;
drive2622drivers/block/ide.cdrive->media  = ide_disk;
drive2623drivers/block/ide.cdrive->cyl  = drive->bios_cyl  = vals[0];
drive2624drivers/block/ide.cdrive->head  = drive->bios_head = vals[1];
drive2625drivers/block/ide.cdrive->sect  = drive->bios_sect = vals[2];
drive2626drivers/block/ide.cdrive->present  = 1;
drive2627drivers/block/ide.cdrive->forced_geom = 1;
drive2774drivers/block/ide.cide_drive_t *drive;
drive2779drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL || drive->forced_geom)
drive2782drivers/block/ide.cif (xparm > 1 && xparm <= drive->bios_head && drive->bios_sect == 63)
drive2787drivers/block/ide.cif (drive->id) {
drive2788drivers/block/ide.cdrive->cyl  = drive->id->cyls;
drive2789drivers/block/ide.cdrive->head = drive->id->heads;
drive2790drivers/block/ide.cdrive->sect = drive->id->sectors;
drive2792drivers/block/ide.cdrive->bios_cyl  = drive->cyl;
drive2793drivers/block/ide.cdrive->bios_head = drive->head;
drive2794drivers/block/ide.cdrive->bios_sect = drive->sect;
drive2795drivers/block/ide.cdrive->special.b.set_geometry = 1;
drive2797drivers/block/ide.ctracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63;
drive2798drivers/block/ide.cdrive->bios_sect = 63;
drive2800drivers/block/ide.cdrive->bios_head = xparm;
drive2801drivers/block/ide.cdrive->bios_cyl = tracks / drive->bios_head;
drive2803drivers/block/ide.cwhile (drive->bios_cyl >= 1024) {
drive2804drivers/block/ide.cdrive->bios_head = *heads;
drive2805drivers/block/ide.cdrive->bios_cyl = tracks / drive->bios_head;
drive2811drivers/block/ide.cdrive->remap_0_to_1 = 1;
drive2816drivers/block/ide.cdrive->sect0 = 63;
drive2817drivers/block/ide.cdrive->bios_cyl = (tracks - 1) / drive->bios_head;
drive2822drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive2823drivers/block/ide.cprintk("[%d/%d/%d]", drive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2861drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2862drivers/block/ide.cif ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) {
drive2863drivers/block/ide.cdrive->cyl   = drive->bios_cyl  = *(unsigned short *)BIOS;
drive2864drivers/block/ide.cdrive->head  = drive->bios_head = *(BIOS+2);
drive2865drivers/block/ide.cdrive->sect  = drive->bios_sect = *(BIOS+14);
drive2866drivers/block/ide.cdrive->ctl   = *(BIOS+8);
drive2867drivers/block/ide.cdrive->present = 1;
drive2917drivers/block/ide.chwgroup->drive   = &hwif->drives[0];
drive77drivers/block/ide.h#define HWIF(drive)    ((ide_hwif_t *)drive->hwif)
drive78drivers/block/ide.h#define HWGROUP(drive)    ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))
drive91drivers/block/ide.h#define IDE_DATA_REG    (HWIF(drive)->io_base+IDE_DATA_OFFSET)
drive92drivers/block/ide.h#define IDE_ERROR_REG    (HWIF(drive)->io_base+IDE_ERROR_OFFSET)
drive93drivers/block/ide.h#define IDE_NSECTOR_REG    (HWIF(drive)->io_base+IDE_NSECTOR_OFFSET)
drive94drivers/block/ide.h#define IDE_SECTOR_REG    (HWIF(drive)->io_base+IDE_SECTOR_OFFSET)
drive95drivers/block/ide.h#define IDE_LCYL_REG    (HWIF(drive)->io_base+IDE_LCYL_OFFSET)
drive96drivers/block/ide.h#define IDE_HCYL_REG    (HWIF(drive)->io_base+IDE_HCYL_OFFSET)
drive97drivers/block/ide.h#define IDE_SELECT_REG    (HWIF(drive)->io_base+IDE_SELECT_OFFSET)
drive98drivers/block/ide.h#define IDE_STATUS_REG    (HWIF(drive)->io_base+IDE_STATUS_OFFSET)
drive99drivers/block/ide.h#define IDE_CONTROL_REG    (HWIF(drive)->ctl_port)
drive434drivers/block/ide.hide_drive_t    *drive;  /* current drive */
drive463drivers/block/ide.h#define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive)
drive465drivers/block/ide.h#define SET_RECOVERY_TIMER(drive)
drive471drivers/block/ide.hvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive476drivers/block/ide.hvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive482drivers/block/ide.hvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout);
drive487drivers/block/ide.hbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat);
drive493drivers/block/ide.hvoid ide_error (ide_drive_t *drive, const char *msg, byte stat);
drive510drivers/block/ide.hint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout);
drive577drivers/block/ide.hint ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action);
drive583drivers/block/ide.hvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err);
drive613drivers/block/ide.hint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id);
drive621drivers/block/ide.hvoid idetape_setup (ide_drive_t *drive);
drive628drivers/block/ide.hvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block);
drive641drivers/block/ide.hint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive643drivers/block/ide.hint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive);
drive644drivers/block/ide.hvoid idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive);
drive21drivers/block/ide_modes.hunsigned int ide_get_best_pio_mode (ide_drive_t *drive);
drive118drivers/block/ide_modes.hunsigned int ide_get_best_pio_mode (ide_drive_t *drive)
drive121drivers/block/ide_modes.hstruct hd_driveid *id = drive->id;
drive124drivers/block/ide_modes.hif (HWIF(drive)->chipset != ide_cmd640 && !strcmp("QUANTUM FIREBALL1080A", id->model))
drive43drivers/block/qd6580.cstatic void tune_qd6580 (ide_drive_t *drive, byte pio)
drive48drivers/block/qd6580.cpio = ide_get_best_pio_mode (drive);
drive149drivers/block/triton.cstatic void dma_intr (ide_drive_t *drive)
drive153drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive154drivers/block/triton.cunsigned short dma_base = HWIF(drive)->dma_base;
drive159drivers/block/triton.cif (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
drive161drivers/block/triton.crq = HWGROUP(drive)->rq;
drive164drivers/block/triton.cide_end_request(1, HWGROUP(drive));
drive168drivers/block/triton.cprintk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat);
drive171drivers/block/triton.cide_error(drive, "dma_intr", stat);
drive178drivers/block/triton.cstatic int build_dmatable (ide_drive_t *drive)
drive180drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive182drivers/block/triton.cunsigned long size, addr, *table = HWIF(drive)->dmatable;
drive196drivers/block/triton.cif (drive->media == ide_tape)
drive197drivers/block/triton.csize = drive->tape.pc->request_transfer;
drive218drivers/block/triton.cprintk("%s: DMA table too small\n", drive->name);
drive235drivers/block/triton.cprintk("%s: empty DMA table?\n", drive->name);
drive239drivers/block/triton.cstatic int config_drive_for_dma (ide_drive_t *drive)
drive243drivers/block/triton.cstruct hd_driveid *id = drive->id;
drive247drivers/block/triton.cdrive->using_dma = 1;
drive254drivers/block/triton.cdrive->using_dma = 1;
drive277drivers/block/triton.cstatic int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
drive279drivers/block/triton.cunsigned long dma_base = HWIF(drive)->dma_base;
drive287drivers/block/triton.creturn config_drive_for_dma (drive);
drive307drivers/block/triton.cif (build_dmatable (drive))
drive309drivers/block/triton.coutl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */
drive313drivers/block/triton.cif (drive->media != ide_disk)
drive316drivers/block/triton.cide_set_handler(drive, &dma_intr, WAIT_CMD);  /* issue cmd to drive */
drive110drivers/block/umc8672.cstatic void tune_umc (ide_drive_t *drive, byte pio)
drive113drivers/block/umc8672.cpio = ide_get_best_pio_mode(drive);
drive117drivers/block/umc8672.ccurrent_speeds[drive->name[2] - 'a'] = pio_to_umc[pio];
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);
drive1096drivers/cdrom/mcdx.cint drive;
drive1102drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++)
drive1103drivers/cdrom/mcdx.cmcdx_stuffp[drive] = NULL;
drive1106drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++) { 
drive1111drivers/cdrom/mcdx.cmcdx_blocksizes[drive] = 0;
drive1115drivers/cdrom/mcdx.cTRACE((INIT, "init() try drive %d\n", drive));
drive1134drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
drive1135drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
drive1240drivers/cdrom/mcdx.cstuffp->minor = drive;
drive1246drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
drive1247drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
drive1868drivers/scsi/fdomain.cint              drive;
drive1924drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1931drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 );
drive1934drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 );
drive1937drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 );
drive1940drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1949drivers/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);