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;
drive672drivers/block/cmd640.cstatic void cmd640_set_mode(ide_drive_t* drive, int pio_mode) {
drive678drivers/block/cmd640.cinterface_number = HWIF(drive)->index;
drive679drivers/block/cmd640.cdrive_number = drive->select.b.unit;
drive697drivers/block/cmd640.cstatic void cmd640_tune_drive(ide_drive_t *drive, byte pio_mode) {
drive707drivers/block/cmd640.ccmd640_set_mode(drive, pio_mode);
drive711drivers/block/cmd640.cinterface_number = HWIF(drive)->index;
drive712drivers/block/cmd640.cdrive_number = drive->select.b.unit;
drive714drivers/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;
drive219drivers/block/floppy.c#define UDP (&drive_params[drive])
drive220drivers/block/floppy.c#define UDRS (&drive_state[drive])
drive221drivers/block/floppy.c#define UDRWE (&write_errors[drive])
drive222drivers/block/floppy.c#define UFDCS (&fdc_state[FDC(drive)])
drive570drivers/block/floppy.cstatic void reschedule_timeout(int drive, const char *message, int marg)
drive572drivers/block/floppy.cif (drive == CURRENTD)
drive573drivers/block/floppy.cdrive = current_drive;
drive575drivers/block/floppy.cif (drive < 0 || drive > N_DRIVE) {
drive577drivers/block/floppy.cdrive=0;
drive641drivers/block/floppy.cstatic int disk_change(int drive)
drive643drivers/block/floppy.cint fdc=FDC(drive);
drive647drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))) ||
drive648drivers/block/floppy.c(FDCS->dor & 3) != UNIT(drive) ||
drive649drivers/block/floppy.cfdc != FDC(drive)){
drive651drivers/block/floppy.cDPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive),
drive658drivers/block/floppy.cDPRINT1("checking disk change line for drive %d\n",drive);
drive675drivers/block/floppy.ccurrent_type[drive] != NULL)
drive678drivers/block/floppy.ccurrent_type[drive] = NULL;
drive698drivers/block/floppy.cregister unsigned char drive, unit, newdor,olddor;
drive708drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive714drivers/block/floppy.cdisk_change(drive);
drive721drivers/block/floppy.cdrive = REVDRIVE(fdc,unit);
drive745drivers/block/floppy.cint drive;
drive751drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++)
drive752drivers/block/floppy.cif (FDC(drive) == fdc &&
drive758drivers/block/floppy.cstatic void set_fdc(int drive)
drive760drivers/block/floppy.cif (drive >= 0 && drive < N_DRIVE){
drive761drivers/block/floppy.cfdc = FDC(drive);
drive762drivers/block/floppy.ccurrent_drive = drive;
drive777drivers/block/floppy.cstatic int lock_fdc(int drive, int interruptible)
drive794drivers/block/floppy.creschedule_timeout(drive, "lock fdc", 0);
drive795drivers/block/floppy.cset_fdc(drive);
drive799drivers/block/floppy.c#define LOCK_FDC(drive,interruptible) \
drive800drivers/block/floppy.cif (lock_fdc(drive,interruptible)) return -EINTR;
drive841drivers/block/floppy.cstatic void floppy_off(unsigned int drive)
drive844drivers/block/floppy.cregister int fdc=FDC(drive);
drive846drivers/block/floppy.cif (!(FDCS->dor & (0x10 << UNIT(drive))))
drive849drivers/block/floppy.cdel_timer(motor_off_timer+drive);
drive857drivers/block/floppy.cmotor_off_timer[drive].expires = jiffies + UDP->spindown - delta;
drive859drivers/block/floppy.cadd_timer(motor_off_timer+drive);
drive869drivers/block/floppy.cint i, drive, saved_drive;
drive876drivers/block/floppy.cdrive = (saved_drive + i + 1) % N_DRIVE;
drive879drivers/block/floppy.cset_fdc(drive);
drive880drivers/block/floppy.cif (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
drive881drivers/block/floppy.c(0x10 << UNIT(drive))))
drive884drivers/block/floppy.cset_dor(fdc, ~(0x10 << UNIT(drive)), 0);
drive2042drivers/block/floppy.cint drive=DRIVE(device);
drive2044drivers/block/floppy.cLOCK_FDC(drive,1);
drive2724drivers/block/floppy.cstatic int user_reset_fdc(int drive, int arg, int interruptible)
drive2729drivers/block/floppy.cLOCK_FDC(drive,interruptible);
drive2768drivers/block/floppy.cstatic inline const char *drive_name(int type, int drive)
drive2955drivers/block/floppy.cint drive, ret, ret2;
drive2960drivers/block/floppy.cfor (drive= 0; drive < N_DRIVE; drive++){
drive2961drivers/block/floppy.cif (FDC(drive) != fdc)
drive2963drivers/block/floppy.cif (drive == current_drive){
drive3014drivers/block/floppy.cstatic inline void clear_write_error(int drive)
drive3020drivers/block/floppy.cint drive, int type, kdev_t device)
drive3035drivers/block/floppy.cLOCK_FDC(drive,1);
drive3039drivers/block/floppy.cset_bit(drive, &fake_change);
drive3055drivers/block/floppy.cLOCK_FDC(drive,1);
drive3060drivers/block/floppy.cuser_params[drive] = *g;
drive3061drivers/block/floppy.cif (buffer_drive == drive)
drive3062drivers/block/floppy.cSUPBOUND(buffer_max, user_params[drive].sect);
drive3063drivers/block/floppy.ccurrent_type[drive] = &user_params[drive];
drive3064drivers/block/floppy.cfloppy_sizes[drive] = user_params[drive].size >> 1;
drive3074drivers/block/floppy.cif (DRS->maxblock > user_params[drive].sect || DRS->maxtrack)
drive3167drivers/block/floppy.cint i,drive,type;
drive3184drivers/block/floppy.cdrive = DRIVE(device);
drive3210drivers/block/floppy.cLOCK_FDC(drive,1);
drive3211drivers/block/floppy.ccurrent_type[drive] = NULL;
drive3212drivers/block/floppy.cfloppy_sizes[drive] = MAX_DISK_SIZE;
drive3218drivers/block/floppy.cdrive, type, device);
drive3223drivers/block/floppy.coutparam = (char *) current_type[drive];
drive3236drivers/block/floppy.cLOCK_FDC(drive,1);
drive3251drivers/block/floppy.cLOCK_FDC(drive,1);
drive3262drivers/block/floppy.coutparam = drive_name(type,drive);
drive3270drivers/block/floppy.cLOCK_FDC(drive,1);
drive3277drivers/block/floppy.creturn user_reset_fdc(drive, (int)param, 1);
drive3290drivers/block/floppy.cLOCK_FDC(drive,1);
drive3297drivers/block/floppy.cLOCK_FDC(drive,1);
drive3318drivers/block/floppy.cint drive;
drive3321drivers/block/floppy.cdrive=0;
drive3324drivers/block/floppy.cdrive=1;
drive3331drivers/block/floppy.cfor (drive=0; drive < N_DRIVE; drive++){
drive3343drivers/block/floppy.callowed_drive_mask |= 1 << drive;
drive3344drivers/block/floppy.cprintk("fd%d is %s", drive,
drive3347drivers/block/floppy.cprintk("fd%d is unknown type %d",drive,
drive3358drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3371drivers/block/floppy.cint drive = DRIVE(inode->i_rdev);
drive3388drivers/block/floppy.cint drive;
drive3390drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3415drivers/block/floppy.cint drive;
drive3425drivers/block/floppy.cdrive = DRIVE(inode->i_rdev);
drive3426drivers/block/floppy.cif (drive >= N_DRIVE ||
drive3427drivers/block/floppy.c!(allowed_drive_mask & (1 << drive)) ||
drive3428drivers/block/floppy.cfdc_state[FDC(drive)].version == FDC_NONE)
drive3483drivers/block/floppy.cif (buffer_drive == drive)
drive3516drivers/block/floppy.cint drive = DRIVE(dev);
drive3527drivers/block/floppy.clock_fdc(drive,0);
drive3534drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3535drivers/block/floppy.c(!TYPE(dev) && !current_type[drive]))
drive3546drivers/block/floppy.c#define NO_GEOM (!current_type[drive] && !TYPE(dev))
drive3548drivers/block/floppy.cint drive=DRIVE(dev);
drive3553drivers/block/floppy.ctest_bit(drive, &fake_change) ||
drive3555drivers/block/floppy.clock_fdc(drive,0);
drive3557drivers/block/floppy.cif (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){
drive3563drivers/block/floppy.cif (buffer_drive == drive)
drive3565drivers/block/floppy.cclear_bit(drive, &fake_change);
drive3828drivers/block/floppy.cint i,unit,drive;
drive3870drivers/block/floppy.cfor (drive = 0; drive < N_DRIVE; drive++) {
drive3965drivers/block/floppy.cint drive;
drive3998drivers/block/floppy.cfor (drive=0; drive < N_FDC * 4; drive++)
drive3999drivers/block/floppy.cif (motor_off_timer[drive].next)
drive4000drivers/block/floppy.cprintk("motor off timer %d still active\n", drive);
drive542drivers/block/genhd.cvoid resetup_one_dev(struct gendisk *dev, int drive)
drive545drivers/block/genhd.cint first_minor  = drive << dev->minor_shift;
drive565drivers/block/genhd.cint i, drive;
drive574drivers/block/genhd.cfor (drive = 0 ; drive < dev->nr_real ; drive++) {
drive575drivers/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)
drive124drivers/block/ht6560b.cstatic void ht6560b_selectproc (ide_drive_t *drive)
drive130drivers/block/ht6560b.cbyte select = ht6560b_selects[HWIF(drive)->index][drive->select.b.unit];
drive131drivers/block/ht6560b.cbyte timing = ht6560b_timings[HWIF(drive)->index][drive->select.b.unit];
drive155drivers/block/ht6560b.cprintk("ht6560b: %s: select=%#x timing=%#x\n", drive->name, t, timing);
drive158drivers/block/ht6560b.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive196drivers/block/ht6560b.cstatic void tune_ht6560b (ide_drive_t *drive, byte pio)
drive201drivers/block/ht6560b.cif (drive->media != ide_disk)
drive204drivers/block/ht6560b.cpio = ide_get_best_pio_mode (drive);
drive208drivers/block/ht6560b.cunit = drive->select.b.unit;
drive209drivers/block/ht6560b.chwif = HWIF(drive)->index;
drive214drivers/block/ide-cd.c#define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect))
drive226drivers/block/ide-cd.c#define CDROM_STATE_FLAGS(drive)  ((struct ide_cd_state_flags *)&((drive)->bios_head))
drive244drivers/block/ide-cd.cvoid cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive247drivers/block/ide-cd.cide_input_data (drive, buffer, bytecount / 4);
drive256drivers/block/ide-cd.cvoid cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount)
drive259drivers/block/ide-cd.cide_output_data (drive, buffer, bytecount / 4);
drive416drivers/block/ide-cd.cvoid cdrom_analyze_sense_data (ide_drive_t *drive, 
drive434drivers/block/ide-cd.cprintk ("ATAPI device %s:\n", drive->name);
drive521drivers/block/ide-cd.cdrive->name,
drive542drivers/block/ide-cd.cstatic void cdrom_queue_request_sense (ide_drive_t *drive, 
drive554drivers/block/ide-cd.creqbuf = &drive->cdrom_info.sense_data;
drive558drivers/block/ide-cd.cpc = &HWIF(drive)->request_sense_pc;
drive576drivers/block/ide-cd.crq = &HWIF(drive)->request_sense_request;
drive581drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive585drivers/block/ide-cd.cstatic void cdrom_end_request (int uptodate, ide_drive_t *drive)
drive587drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive601drivers/block/ide-cd.ccdrom_analyze_sense_data (drive,
drive606drivers/block/ide-cd.cide_end_request (uptodate, HWGROUP(drive));
drive612drivers/block/ide-cd.cstatic void cdrom_saw_media_change (ide_drive_t *drive)
drive614drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 1;
drive615drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 0;
drive616drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive622drivers/block/ide-cd.cstatic int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret)
drive624drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive639drivers/block/ide-cd.cprintk ("%s : missing request in cdrom_decode_status\n", drive->name);
drive652drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive653drivers/block/ide-cd.cide_error (drive, "request sense failure", stat);
drive667drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive675drivers/block/ide-cd.cprintk ("%s : tray open or drive not ready\n", drive->name);
drive681drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive682drivers/block/ide-cd.cprintk ("%s: media changed\n", drive->name);
drive688drivers/block/ide-cd.cide_dump_status (drive, "packet command error", stat);
drive706drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive709drivers/block/ide-cd.ccdrom_queue_request_sense (drive, sem, pc->sense_data, pc);
drive719drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive722drivers/block/ide-cd.cprintk ("%s : tray open\n", drive->name);
drive723drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive729drivers/block/ide-cd.ccdrom_saw_media_change (drive);
drive735drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive742drivers/block/ide-cd.cide_dump_status (drive, "command error", stat);
drive743drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive749drivers/block/ide-cd.cide_error (drive, "cdrom_decode_status", stat);
drive756drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive762drivers/block/ide-cd.ccdrom_queue_request_sense (drive, NULL, NULL, NULL);
drive778drivers/block/ide-cd.cstatic int cdrom_start_packet_command (ide_drive_t *drive, int xferlen,
drive782drivers/block/ide-cd.cif (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1;
drive791drivers/block/ide-cd.cOUT_BYTE (drive->ctl, IDE_CONTROL_REG);
drive793drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive795drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive801drivers/block/ide-cd.c(*handler) (drive);
drive813drivers/block/ide-cd.cstatic int cdrom_transfer_packet_command (ide_drive_t *drive,
drive817drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->drq_interrupt)
drive824drivers/block/ide-cd.cif (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1;
drive829drivers/block/ide-cd.cif (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1;
drive833drivers/block/ide-cd.cide_set_handler (drive, handler, WAIT_CMD);
drive836drivers/block/ide-cd.ccdrom_out_bytes (drive, cmd_buf, cmd_len);
drive854drivers/block/ide-cd.cstatic void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector,
drive857drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive886drivers/block/ide-cd.ccdrom_in_bytes (drive, dest, SECTOR_SIZE);
drive897drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive909drivers/block/ide-cd.cint cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
drive919drivers/block/ide-cd.cdrive->name);
drive926drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive935drivers/block/ide-cd.cdrive->name, ireason);
drive938drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive946drivers/block/ide-cd.cstatic void cdrom_read_intr (ide_drive_t *drive)
drive951drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive954drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive968drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive969drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive972drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive978drivers/block/ide-cd.cif (cdrom_read_check_ireason (drive, len, ireason)) return;
drive985drivers/block/ide-cd.cdrive->name, len);
drive987drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1002drivers/block/ide-cd.ccdrom_in_bytes (drive, dum, sizeof (dum));
drive1018drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1024drivers/block/ide-cd.ccdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer);
drive1038drivers/block/ide-cd.ccdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE);
drive1051drivers/block/ide-cd.cide_set_handler (drive, &cdrom_read_intr, WAIT_CMD);
drive1059drivers/block/ide-cd.cstatic int cdrom_read_from_buffer (ide_drive_t *drive)
drive1061drivers/block/ide-cd.cstruct cdrom_info *info = &drive->cdrom_info;
drive1062drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1074drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1089drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1095drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1105drivers/block/ide-cd.cdrive->name, rq->sector);
drive1106drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1121drivers/block/ide-cd.cstatic void cdrom_start_read_continuation (ide_drive_t *drive)
drive1124drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1147drivers/block/ide-cd.cdrive->name, rq->current_nr_sectors);
drive1148drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1177drivers/block/ide-cd.c(void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c),
drive1185drivers/block/ide-cd.cstatic void cdrom_start_read (ide_drive_t *drive, unsigned int block)
drive1187drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1203drivers/block/ide-cd.cif (cdrom_read_from_buffer (drive))
drive1207drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive1210drivers/block/ide-cd.ccdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation);
drive1222drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1228drivers/block/ide-cd.cstatic void cdrom_pc_intr (ide_drive_t *drive)
drive1231drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1235drivers/block/ide-cd.cif (cdrom_decode_status (drive, 0, &stat)) return;
drive1255drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1259drivers/block/ide-cd.cdrive->name, pc->buflen);
drive1261drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1278drivers/block/ide-cd.cdrive->name);
drive1284drivers/block/ide-cd.ccdrom_out_bytes (drive, pc->buffer, thislen);
drive1291drivers/block/ide-cd.ccdrom_out_bytes (drive, &dum, sizeof (dum));
drive1307drivers/block/ide-cd.cdrive->name);
drive1313drivers/block/ide-cd.ccdrom_in_bytes (drive, pc->buffer, thislen);
drive1320drivers/block/ide-cd.ccdrom_in_bytes (drive, &dum, sizeof (dum));
drive1332drivers/block/ide-cd.cdrive->name, ireason);
drive1337drivers/block/ide-cd.cide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD);
drive1341drivers/block/ide-cd.cstatic void cdrom_do_pc_continuation (ide_drive_t *drive)
drive1343drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1347drivers/block/ide-cd.ccdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr);
drive1351drivers/block/ide-cd.cstatic void cdrom_do_packet_command (ide_drive_t *drive)
drive1354drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1363drivers/block/ide-cd.ccdrom_start_packet_command (drive, len, cdrom_do_pc_continuation);
drive1378drivers/block/ide-cd.cint cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc)
drive1395drivers/block/ide-cd.c(void) ide_do_drive_cmd (drive, &req, ide_wait);
drive1435drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->door_locked == 0 &&
drive1440drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, NULL);
drive1451drivers/block/ide-cd.cvoid ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block)
drive1453drivers/block/ide-cd.cstruct request *rq = HWGROUP(drive)->rq;
drive1456drivers/block/ide-cd.ccdrom_do_packet_command (drive);
drive1460drivers/block/ide-cd.ccdrom_end_request (1, drive);
drive1461drivers/block/ide-cd.cide_do_reset (drive);
drive1468drivers/block/ide-cd.ccdrom_end_request (0, drive);
drive1471drivers/block/ide-cd.ccdrom_start_read (drive, block);
drive1522drivers/block/ide-cd.ccdrom_check_status (ide_drive_t  *drive,
drive1532drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1538drivers/block/ide-cd.ccdrom_lockdoor (ide_drive_t *drive, int lockflag,
drive1549drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_doorlock)
drive1558drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1562drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1569drivers/block/ide-cd.cprintk ("%s: door locking not supported\n", drive->name);
drive1570drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
drive1572drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked = lockflag;
drive1582drivers/block/ide-cd.ccdrom_eject (ide_drive_t *drive, int ejectflag,
drive1592drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1597drivers/block/ide-cd.ccdrom_pause (ide_drive_t *drive, int pauseflag,
drive1607drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1612drivers/block/ide-cd.ccdrom_startstop (ide_drive_t *drive, int startflag,
drive1623drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1628drivers/block/ide-cd.ccdrom_read_capacity (ide_drive_t *drive, unsigned *capacity,
drive1646drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive1657drivers/block/ide-cd.ccdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag,
drive1674drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1680drivers/block/ide-cd.ccdrom_read_toc (ide_drive_t *drive,
drive1685drivers/block/ide-cd.cstruct atapi_toc *toc = drive->cdrom_info.toc;
drive1696drivers/block/ide-cd.cdrive->cdrom_info.toc = toc;
drive1701drivers/block/ide-cd.cprintk ("%s: No cdrom TOC buffer!\n", drive->name);
drive1707drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid)
drive1708drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive1710drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->toc_valid) return 0;
drive1716drivers/block/ide-cd.cmsf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc);
drive1720drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1727drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1740drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr,
drive1748drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1761drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive1778drivers/block/ide-cd.cstat = cdrom_read_tocentry (drive, 0, msf_flag, 1,
drive1794drivers/block/ide-cd.cstat = cdrom_read_capacity (drive, &toc->capacity, reqbuf);
drive1797drivers/block/ide-cd.cHWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS]
drive1799drivers/block/ide-cd.cdrive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME;
drive1802drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid = 1;
drive1809drivers/block/ide-cd.ccdrom_read_subchannel (ide_drive_t *drive,
drive1825drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1831drivers/block/ide-cd.ccdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag,
drive1846drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1851drivers/block/ide-cd.ccdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen,
drive1866drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1871drivers/block/ide-cd.ccdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end,
drive1888drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1894drivers/block/ide-cd.ccdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end,
drive1906drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd)
drive1916drivers/block/ide-cd.creturn cdrom_queue_packet_command (drive, &pc);
drive1922drivers/block/ide-cd.ccdrom_play_lba_range_1 (ide_drive_t *drive, int lba_start, int lba_end,
drive1937drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->no_playaudio12)
drive1938drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive1948drivers/block/ide-cd.cstat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf);
drive1958drivers/block/ide-cd.c"trying PLAYAUDIO_MSF\n", drive->name);
drive1959drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive1960drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive1961drivers/block/ide-cd.creturn cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf);
drive1974drivers/block/ide-cd.ccdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
drive1989drivers/block/ide-cd.cstat = cdrom_play_lba_range_1 (drive, lba_start, lba_end, reqbuf);
drive2004drivers/block/ide-cd.cint cdrom_get_toc_entry (ide_drive_t *drive, int track,
drive2012drivers/block/ide-cd.cstat = cdrom_read_toc (drive, reqbuf);
drive2015drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2032drivers/block/ide-cd.ccdrom_read_block (ide_drive_t *drive, int format, int lba,
drive2050drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->old_readcd)
drive2065drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2071drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd == 0)
drive2074drivers/block/ide-cd.cdrive->name);
drive2075drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 1;
drive2076drivers/block/ide-cd.creturn cdrom_read_block (drive, format, lba, buf, buflen, reqbuf);
drive2084drivers/block/ide-cd.cint ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
drive2093drivers/block/ide-cd.cif (drive->usage > 1)
drive2096drivers/block/ide-cd.cstat = cdrom_lockdoor (drive, 0, NULL);
drive2099drivers/block/ide-cd.creturn cdrom_eject (drive, 0, NULL);
drive2104drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close = arg;
drive2109drivers/block/ide-cd.creturn cdrom_pause (drive, 1, NULL);
drive2112drivers/block/ide-cd.creturn cdrom_pause (drive, 0, NULL);
drive2115drivers/block/ide-cd.creturn cdrom_startstop (drive, 1, NULL);
drive2121drivers/block/ide-cd.cstat = cdrom_startstop (drive, 0, NULL);
drive2124drivers/block/ide-cd.creturn cdrom_eject (drive, 1, NULL);
drive2144drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2160drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL);
drive2162drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL);
drive2171drivers/block/ide-cd.creturn cdrom_play_lba_range (drive, lba_start, lba_end, NULL);
drive2184drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2187drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2209drivers/block/ide-cd.cstat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL);
drive2244drivers/block/ide-cd.cstat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf),
drive2249drivers/block/ide-cd.cif (CDROM_CONFIG_FLAGS (drive)->vertos_lossage)
drive2303drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL);
drive2305drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 1, mask  , sizeof (buffer),NULL);
drive2315drivers/block/ide-cd.creturn cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL);
drive2327drivers/block/ide-cd.cstat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL);
drive2354drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2357drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2387drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2390drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2421drivers/block/ide-cd.cstat = cdrom_read_block (drive, 1, lba, buf,
drive2462drivers/block/ide-cd.cstat = cdrom_read_toc (drive, NULL);
drive2465drivers/block/ide-cd.ctoc = drive->cdrom_info.toc;
drive2470drivers/block/ide-cd.cstat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL);
drive2483drivers/block/ide-cd.creturn ide_do_drive_cmd (drive, &req, ide_wait);
drive2522drivers/block/ide-cd.cstat = cdrom_queue_packet_command (drive, &pc);
drive2544drivers/block/ide-cd.cint ide_cdrom_check_media_change (ide_drive_t *drive)
drive2548drivers/block/ide-cd.c(void) cdrom_check_status (drive, NULL);
drive2550drivers/block/ide-cd.cretval = CDROM_STATE_FLAGS (drive)->media_changed;
drive2551drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2557drivers/block/ide-cd.cint ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive)
drive2562drivers/block/ide-cd.c--drive->usage;
drive2567drivers/block/ide-cd.cif (drive->usage == 1)
drive2574drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2579drivers/block/ide-cd.ccdrom_eject (drive, 1, &my_reqbuf);
drive2580drivers/block/ide-cd.cstat = cdrom_check_status (drive, &my_reqbuf);
drive2586drivers/block/ide-cd.c--drive->usage;
drive2591drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 1, &my_reqbuf);
drive2594drivers/block/ide-cd.c(void) cdrom_read_toc (drive, &my_reqbuf);
drive2605drivers/block/ide-cd.cvoid ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive)
drive2607drivers/block/ide-cd.cif (drive->usage == 0)
drive2612drivers/block/ide-cd.c(void) cdrom_lockdoor (drive, 0, NULL);
drive2615drivers/block/ide-cd.cif (CDROM_STATE_FLAGS (drive)->eject_on_close)
drive2616drivers/block/ide-cd.c(void) cdrom_eject (drive, 0, NULL);
drive2626drivers/block/ide-cd.cvoid ide_cdrom_setup (ide_drive_t *drive)
drive2628drivers/block/ide-cd.cblksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE;
drive2630drivers/block/ide-cd.cdrive->special.all = 0;
drive2631drivers/block/ide-cd.cdrive->ready_stat = 0;
drive2633drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->media_changed = 0;
drive2634drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->toc_valid     = 0;
drive2635drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->door_locked   = 0;
drive2638drivers/block/ide-cd.cCDROM_STATE_FLAGS (drive)->eject_on_close= 0;
drive2641drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
drive2643drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_doorlock = 0;
drive2646drivers/block/ide-cd.cif (drive->id != NULL) {
drive2647drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->drq_interrupt =
drive2648drivers/block/ide-cd.c((drive->id->config & 0x0060) == 0x20);
drive2650drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->drq_interrupt = 0;
drive2654drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0;
drive2655drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->old_readcd = 0;
drive2656drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0;
drive2657drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0;
drive2658drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0;
drive2660drivers/block/ide-cd.cif (drive->id != NULL) {
drive2662drivers/block/ide-cd.cif (strcmp (drive->id->model, "CD220E") == 0 ||
drive2663drivers/block/ide-cd.cstrcmp (drive->id->model, "CD")     == 0)        /* Creative Labs */
drive2664drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2666drivers/block/ide-cd.celse if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 ||  /* Acer CD525E */
drive2667drivers/block/ide-cd.cstrcmp (drive->id->model, "OTI-SCYLLA") == 0)
drive2668drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2672drivers/block/ide-cd.celse if (strcmp (drive->id->model, "DCI-2S10") == 0)
drive2673drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2675drivers/block/ide-cd.celse if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */
drive2677drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2680drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2684drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V003S0DS") == 0)
drive2686drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2689drivers/block/ide-cd.cif (drive->id->fw_rev[4] == '1' &&
drive2690drivers/block/ide-cd.cdrive->id->fw_rev[6] <= '2')
drive2692drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1;
drive2693drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1;
drive2696drivers/block/ide-cd.celse if (strcmp (drive->id->model, "0V300SSD") == 0 ||
drive2697drivers/block/ide-cd.cstrcmp (drive->id->model, "V003M0DP") == 0 ||
drive2698drivers/block/ide-cd.cstrcmp (drive->id->model, "0V300MPD") == 0 ||
drive2699drivers/block/ide-cd.cstrcmp (drive->id->model, "0V300HPD") == 0 ||
drive2700drivers/block/ide-cd.cstrcmp (drive->id->model, "V003H0DP") == 0)
drive2701drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2704drivers/block/ide-cd.celse if (strcmp (drive->id->model, "V004E0DT") == 0 ||
drive2705drivers/block/ide-cd.cstrcmp (drive->id->model, "0V400ETD") == 0 ||
drive2706drivers/block/ide-cd.cstrcmp (drive->id->model, "V004H0DT") == 0 ||
drive2707drivers/block/ide-cd.cstrcmp (drive->id->model, "0V400HTD") == 0)
drive2708drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1;
drive2710drivers/block/ide-cd.celse if ( strcmp (drive->id->model, "CD-ROM CDU55D") == 0) /*sony cdu55d */
drive2711drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2713drivers/block/ide-cd.celse if (strcmp (drive->id->model, "CD-ROM CDU55E") == 0)
drive2714drivers/block/ide-cd.cCDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1;
drive2718drivers/block/ide-cd.cdrive->cdrom_info.toc               = NULL;
drive2719drivers/block/ide-cd.cdrive->cdrom_info.sector_buffer     = NULL;
drive2720drivers/block/ide-cd.cdrive->cdrom_info.sector_buffered   = 0;
drive2721drivers/block/ide-cd.cdrive->cdrom_info.nsectors_buffered = 0;
drive457drivers/block/ide-tape.c#define  IDETAPE_DATA_REG    (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET)
drive458drivers/block/ide-tape.c#define IDETAPE_ERROR_REG    (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET)
drive459drivers/block/ide-tape.c#define  IDETAPE_IREASON_REG    (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET)
drive460drivers/block/ide-tape.c#define IDETAPE_RESERVED3_REG    (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET)
drive461drivers/block/ide-tape.c#define IDETAPE_BCOUNTL_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET)
drive462drivers/block/ide-tape.c#define  IDETAPE_BCOUNTH_REG    (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET)
drive463drivers/block/ide-tape.c#define IDETAPE_DRIVESEL_REG    (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET)
drive464drivers/block/ide-tape.c#define  IDETAPE_STATUS_REG    (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET)
drive471drivers/block/ide-tape.c#define IDETAPE_FEATURES_REG    (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET)
drive472drivers/block/ide-tape.c#define IDETAPE_ATACOMMAND_REG    (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET)
drive473drivers/block/ide-tape.c#define IDETAPE_CONTROL_REG    (HWIF(drive)->ctl_port)
drive594drivers/block/ide-tape.cide_drive_t *drive;
drive811drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive812drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount);
drive813drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount);
drive819drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler);
drive820drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive);
drive826drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive);
drive829drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive);
drive830drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive);
drive836drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive);
drive837drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive);
drive839drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq);
drive840drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result);
drive842drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive);
drive843drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive);
drive850drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive);
drive859drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive);
drive861drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive);
drive863drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive);
drive866drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive);
drive891drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count);
drive898drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count);
drive906drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer);
drive913drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer);
drive921drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer);
drive928drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc);
drive930drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block);
drive931drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive);
drive932drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive);
drive938drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive);
drive953drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive);
drive957drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive);
drive958drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage);
drive959drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive);
drive960drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive);
drive961drivers/block/ide-tape.cvoid idetape_wait_for_pipeline (ide_drive_t *drive);
drive962drivers/block/ide-tape.cvoid idetape_discard_read_pipeline (ide_drive_t *drive);
drive963drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive);
drive964drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive);
drive1019drivers/block/ide-tape.cint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id)
drive1162drivers/block/ide-tape.cidetape_chrdev.drive=drive;
drive1186drivers/block/ide-tape.cide_drive_t *drive;
drive1191drivers/block/ide-tape.cdrive=idetape_chrdev.drive;
drive1201drivers/block/ide-tape.cdrive->name,idetape_chrdev.name,major);
drive1219drivers/block/ide-tape.cvoid idetape_setup (ide_drive_t *drive)
drive1222drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1230drivers/block/ide-tape.cdrive->ready_stat = 0;      /* With an ATAPI device, we can issue packet commands */
drive1232drivers/block/ide-tape.cHWIF(drive)->tape_drive=drive;
drive1256drivers/block/ide-tape.cidetape_get_mode_sense_results (drive);
drive1343drivers/block/ide-tape.cvoid idetape_get_mode_sense_results (ide_drive_t *drive)
drive1347drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1356drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive1453drivers/block/ide-tape.cvoid idetape_issue_packet_command  (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler)
drive1461drivers/block/ide-tape.ctape=&(drive->tape);
drive1483drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1494drivers/block/ide-tape.c(*pc->callback)(drive);
drive1516drivers/block/ide-tape.cdrive->using_dma=0;
drive1519drivers/block/ide-tape.cif (pc->request_transfer && pc->dma_recommended && drive->using_dma) {
drive1520drivers/block/ide-tape.cdma_ok=!(HWIF(drive)->dmaproc(pc->writing ? ide_dma_write : ide_dma_read, drive));
drive1527drivers/block/ide-tape.cOUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG);
drive1529drivers/block/ide-tape.cide_set_handler (drive,handler,WAIT_CMD);      /* Set the interrupt routine */
drive1531drivers/block/ide-tape.cif (ide_wait_stat (drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) {   /* Wait for DRQ to be ready - Assuming Accelerated DRQ */  
drive1548drivers/block/ide-tape.cide_do_reset (drive);
drive1552drivers/block/ide-tape.cide_output_data (drive,pc->c,12/4);      /* Send the actual packet */
drive1556drivers/block/ide-tape.c(void) (HWIF(drive)->dmaproc(ide_dma_begin, drive));
drive1571drivers/block/ide-tape.cvoid idetape_pc_intr (ide_drive_t *drive)
drive1574drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1583drivers/block/ide-tape.cif ((pc->dma_error=HWIF(drive)->dmaproc(ide_dma_status_bad, drive)))
drive1588drivers/block/ide-tape.cpc->actually_transferred=HWIF(drive)->dmaproc(ide_dma_transferred, drive);
drive1591drivers/block/ide-tape.c(void) (HWIF(drive)->dmaproc(ide_dma_abort, drive));  /* End DMA */
drive1619drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive1623drivers/block/ide-tape.cide_do_reset (drive);
drive1627drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive1633drivers/block/ide-tape.cidetape_postpone_request (drive);    /* Allow ide.c to handle other requests */
drive1643drivers/block/ide-tape.c(*pc->callback)(drive);      /* Command finished - Call the callback function */
drive1651drivers/block/ide-tape.cdrive->using_dma=0;
drive1652drivers/block/ide-tape.cide_do_reset (drive);
drive1662drivers/block/ide-tape.cide_do_reset (drive);
drive1668drivers/block/ide-tape.cide_do_reset (drive);
drive1678drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1679drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1692drivers/block/ide-tape.cidetape_discard_data (drive,bcount.all);
drive1693drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);
drive1701drivers/block/ide-tape.cidetape_output_data (drive,pc->current_position,bcount.all);  /* Write the current buffer */
drive1703drivers/block/ide-tape.cidetape_input_data (drive,pc->current_position,bcount.all);  /* Read the current buffer */
drive1710drivers/block/ide-tape.cide_set_handler (drive,&idetape_pc_intr,WAIT_CMD);    /* And set the interrupt handler again */
drive1719drivers/block/ide-tape.cvoid idetape_postpone_request (ide_drive_t *drive)
drive1722drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1736drivers/block/ide-tape.ctape->dsc_timer.data=(unsigned long) drive;
drive1744drivers/block/ide-tape.ctape->postponed_rq = rq = HWGROUP(drive)->rq;
drive1747drivers/block/ide-tape.cHWGROUP(drive)->rq = NULL;
drive1770drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1771drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1775drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc_direct called\n",drive->name);
drive1778drivers/block/ide-tape.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive1784drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);  /* request in the request queue */
drive1792drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1825drivers/block/ide-tape.cide_drive_t *drive=(ide_drive_t *) data;
drive1826drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive1827drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive1834drivers/block/ide-tape.cprintk ("%s: idetape_poll_for_dsc called\n",drive->name);
drive1844drivers/block/ide-tape.cif (HWGROUP (drive)->rq == NULL) {
drive1859drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1923drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1935drivers/block/ide-tape.cif (next_rq == HWGROUP (drive)->rq)
drive1978drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive1997drivers/block/ide-tape.cidetape_put_back_postponed_request (drive);
drive2018drivers/block/ide-tape.cvoid idetape_put_back_postponed_request (ide_drive_t *drive)
drive2021drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive2032drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
drive2046drivers/block/ide-tape.cvoid idetape_media_access_finished (ide_drive_t *drive)
drive2049drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2062drivers/block/ide-tape.cprintk ("ide-tape: %s: I/O error, ",drive->name);
drive2063drivers/block/ide-tape.cidetape_retry_pc (drive);      /* Retry operation */
drive2074drivers/block/ide-tape.c(*pc->callback)(drive);
drive2079drivers/block/ide-tape.cprintk ("ide-tape: %s: DSC timeout.\n",drive->name);
drive2088drivers/block/ide-tape.c(*pc->callback)(drive);
drive2100drivers/block/ide-tape.cvoid idetape_retry_pc (ide_drive_t *drive)
drive2108drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive2109drivers/block/ide-tape.cnew_rq=idetape_next_rq_storage (drive);
drive2114drivers/block/ide-tape.cidetape_queue_pc_head (drive,pc,new_rq);
drive2121drivers/block/ide-tape.cvoid idetape_pc_callback (ide_drive_t *drive)
drive2127drivers/block/ide-tape.ctape=&(drive->tape);
drive2128drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2137drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2140drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2146drivers/block/ide-tape.cvoid idetape_read_callback (ide_drive_t *drive)
drive2149drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2150drivers/block/ide-tape.cstruct request *rq=HWGROUP(drive)->rq;
drive2161drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2169drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2174drivers/block/ide-tape.cvoid idetape_write_callback (ide_drive_t *drive)
drive2177drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2178drivers/block/ide-tape.cstruct request *rq=HWGROUP(drive)->rq;
drive2189drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2192drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2197drivers/block/ide-tape.cvoid idetape_inquiry_callback (ide_drive_t *drive)
drive2202drivers/block/ide-tape.ctape=&(drive->tape);
drive2205drivers/block/ide-tape.cidetape_pc_callback (drive);
drive2216drivers/block/ide-tape.cvoid idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2225drivers/block/ide-tape.cide_input_data (drive,buffer,wcount);
drive2237drivers/block/ide-tape.cvoid idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount)
drive2246drivers/block/ide-tape.cide_output_data (drive,buffer,wcount);
drive2259drivers/block/ide-tape.cvoid idetape_discard_data (ide_drive_t *drive, unsigned long bcount)
drive2387drivers/block/ide-tape.cvoid idetape_request_sense_callback (ide_drive_t *drive)
drive2390drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2399drivers/block/ide-tape.cidetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer);
drive2400drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2404drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2415drivers/block/ide-tape.cvoid idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result)
drive2418drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2747drivers/block/ide-tape.cvoid idetape_read_position_callback (ide_drive_t *drive)
drive2754drivers/block/ide-tape.ctape=&(drive->tape);
drive2760drivers/block/ide-tape.crq=HWGROUP(drive)->rq;
drive2774drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2782drivers/block/ide-tape.cidetape_end_request (1,HWGROUP (drive));
drive2787drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2800drivers/block/ide-tape.cint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive2829drivers/block/ide-tape.cide_drive_t *drive = hwgroup->drive;
drive2831drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive2832drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2863drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive2868drivers/block/ide-tape.cidetape_increase_max_pipeline_stages (drive);
drive2869drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2873drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive2883drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end);
drive2885drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next);
drive2888drivers/block/ide-tape.cide_end_drive_cmd (drive, 0, 0);
drive2895drivers/block/ide-tape.cvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block)
drive2898drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive2900drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive2923drivers/block/ide-tape.cide_end_request (0,HWGROUP (drive));      /* Let the common code handle it */
drive2953drivers/block/ide-tape.cidetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr);
drive2963drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive2972drivers/block/ide-tape.cidetape_media_access_finished (drive);
drive3005drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3009drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive3018drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3027drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3031drivers/block/ide-tape.cpc=idetape_next_pc_storage (drive);
drive3040drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3057drivers/block/ide-tape.cidetape_postpone_request (drive);  /* Allow ide.c to process requests from */
drive3062drivers/block/ide-tape.cidetape_issue_packet_command (drive,pc,&idetape_pc_intr);
drive3067drivers/block/ide-tape.cidetape_end_request (0,HWGROUP (drive));
drive3093drivers/block/ide-tape.cint idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc)
drive3100drivers/block/ide-tape.creturn ide_do_drive_cmd (drive, &rq, ide_wait);
drive3123drivers/block/ide-tape.cvoid idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq)
drive3126drivers/block/ide-tape.cunsigned int major = HWIF(drive)->major;
drive3129drivers/block/ide-tape.cbdev->current_request=HWGROUP (drive)->rq;    /* Since we may have taken it out */
drive3134drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, rq, ide_preempt);
drive3166drivers/block/ide-tape.cint idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer)
drive3169drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3187drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, &rq, ide_wait);
drive3197drivers/block/ide-tape.cint idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer)
drive3200drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3216drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3220drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3222drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3225drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);
drive3235drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer));
drive3248drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3270drivers/block/ide-tape.cint idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer)
drive3273drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3283drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3297drivers/block/ide-tape.cnew_stage=idetape_kmalloc_stage (drive);
drive3306drivers/block/ide-tape.creturn (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer));
drive3321drivers/block/ide-tape.cidetape_add_stage_tail (drive,new_stage);
drive3334drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3344drivers/block/ide-tape.cvoid idetape_discard_read_pipeline (ide_drive_t *drive)
drive3347drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3370drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive3384drivers/block/ide-tape.cvoid idetape_wait_for_pipeline (ide_drive_t *drive)
drive3387drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3391drivers/block/ide-tape.cidetape_insert_pipeline_into_queue (drive);    
drive3407drivers/block/ide-tape.cvoid idetape_empty_write_pipeline (ide_drive_t *drive)
drive3410drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
drive3430drivers/block/ide-tape.c(void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer);
drive3434drivers/block/ide-tape.cidetape_wait_for_pipeline (drive);
drive3531drivers/block/ide-tape.cidetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive)
drive3536drivers/block/ide-tape.ctape=&(drive->tape);
drive3558drivers/block/ide-tape.cstruct request *idetape_next_rq_storage (ide_drive_t *drive)
drive3563drivers/block/ide-tape.ctape=&(drive->tape);
drive3581drivers/block/ide-tape.cint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3584drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3604drivers/block/ide-tape.cvoid idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
drive3607drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3648drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3649drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3659drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3660drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3669drivers/block/ide-tape.cbytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer);
drive3693drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3701drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3716drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3717drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3727drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3735drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer);
drive3759drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3768drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
drive3816drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive3817drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3829drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive3830drivers/block/ide-tape.cidetape_flush_tape_buffers (drive);
drive3834drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3845drivers/block/ide-tape.creturn (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count));
drive3854drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3862drivers/block/ide-tape.creturn (idetape_blkdev_ioctl (drive,inode,file,cmd,arg));
drive3919drivers/block/ide-tape.cint idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count)
drive3922drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive3945drivers/block/ide-tape.creturn (idetape_space_over_filemarks (drive,mt_op,mt_count));
drive3955drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive3961drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive3966drivers/block/ide-tape.creturn (idetape_rewind_tape (drive));
drive3969drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3971drivers/block/ide-tape.creturn (idetape_flush_tape_buffers (drive));
drive3974drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3977drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3979drivers/block/ide-tape.cretval=idetape_rewind_tape (drive);
drive3982drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive3984drivers/block/ide-tape.creturn (idetape_position_tape (drive,mt_count));
drive4001drivers/block/ide-tape.cint idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count)
drive4004drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4036drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4041drivers/block/ide-tape.cidetape_remove_stage_head (drive);
drive4043drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive4058drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4062drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTFSF,mt_count-count);
drive4064drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTBSF,1));
drive4069drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4073drivers/block/ide-tape.cretval=idetape_mtioctop (drive,MTBSF,mt_count+count);
drive4075drivers/block/ide-tape.creturn (idetape_mtioctop (drive,MTFSF,1));
drive4089drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive4090drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4134drivers/block/ide-tape.cif (idetape_rewind_tape (drive)) {
drive4151drivers/block/ide-tape.cide_drive_t *drive=idetape_chrdev.drive;
drive4152drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4162drivers/block/ide-tape.cidetape_empty_write_pipeline (drive);
drive4164drivers/block/ide-tape.cif (idetape_queue_pc_tail (drive,&pc))
drive4170drivers/block/ide-tape.cidetape_discard_read_pipeline (drive);
drive4172drivers/block/ide-tape.cidetape_wait_for_pipeline (drive);
drive4176drivers/block/ide-tape.cif (idetape_rewind_tape (drive))
drive4205drivers/block/ide-tape.cint idetape_position_tape (ide_drive_t *drive,unsigned long block)
drive4212drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4219drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4228drivers/block/ide-tape.cint idetape_rewind_tape (ide_drive_t *drive)
drive4238drivers/block/ide-tape.cretval=idetape_queue_pc_tail (drive,&pc);
drive4245drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4248drivers/block/ide-tape.cint idetape_flush_tape_buffers (ide_drive_t *drive)
drive4254drivers/block/ide-tape.creturn (idetape_queue_pc_tail (drive,&pc));
drive4275drivers/block/ide-tape.cidetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive)
drive4278drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4447drivers/block/ide-tape.cvoid idetape_increase_max_pipeline_stages (ide_drive_t *drive)
drive4450drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4475drivers/block/ide-tape.cvoid idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage)
drive4478drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4502drivers/block/ide-tape.cvoid idetape_remove_stage_head (ide_drive_t *drive)
drive4505drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4541drivers/block/ide-tape.cvoid idetape_insert_pipeline_into_queue (ide_drive_t *drive)
drive4544drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive4550drivers/block/ide-tape.cidetape_active_next_stage (drive);
drive4551drivers/block/ide-tape.c(void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end));
drive4560drivers/block/ide-tape.cvoid idetape_active_next_stage (ide_drive_t *drive)
drive4563drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
drive266drivers/block/ide.c#define IS_PROMISE_DRIVE (HWIF(drive)->chipset == ide_promise)
drive300drivers/block/ide.c#define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive)
drive304drivers/block/ide.c#define SET_RECOVERY_TIMER(drive)
drive342drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive344drivers/block/ide.cdrive->select.all    = (unit<<4)|0xa0;
drive345drivers/block/ide.cdrive->hwif      = hwif;
drive346drivers/block/ide.cdrive->ctl      = 0x08;
drive347drivers/block/ide.cdrive->ready_stat    = READY_STAT;
drive348drivers/block/ide.cdrive->bad_wstat    = BAD_W_STAT;
drive349drivers/block/ide.cdrive->special.b.recalibrate  = 1;
drive350drivers/block/ide.cdrive->special.b.set_geometry  = 1;
drive351drivers/block/ide.cdrive->name[0]      = 'h';
drive352drivers/block/ide.cdrive->name[1]      = 'd';
drive353drivers/block/ide.cdrive->name[2]      = 'a' + (index * MAX_DRIVES) + unit;
drive403drivers/block/ide.cvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive405drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive407drivers/block/ide.cbyte io_32bit = drive->io_32bit;
drive415drivers/block/ide.cif (drive->unmask)
drive427drivers/block/ide.cvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
drive429drivers/block/ide.cunsigned short io_base  = HWIF(drive)->io_base;
drive431drivers/block/ide.cbyte io_32bit = drive->io_32bit;
drive439drivers/block/ide.cif (drive->unmask)
drive455drivers/block/ide.cvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout)
drive457drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive461drivers/block/ide.cdrive->name, hwgroup->handler, handler);
drive499drivers/block/ide.cstatic unsigned long current_capacity (ide_drive_t  *drive)
drive501drivers/block/ide.cstruct hd_driveid *id = drive->id;
drive502drivers/block/ide.cunsigned long capacity = drive->cyl * drive->head * drive->sect;
drive504drivers/block/ide.cif (!drive->present)
drive506drivers/block/ide.cif (drive->media != ide_disk)
drive509drivers/block/ide.cdrive->select.b.lba = 0;
drive514drivers/block/ide.cdrive->select.b.lba = 1;
drive518drivers/block/ide.creturn (capacity - drive->sect0);
drive531drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive533drivers/block/ide.cif (drive->present && drive->media == ide_cdrom)
drive534drivers/block/ide.cide_cdrom_setup(drive);
drive537drivers/block/ide.cif (drive->present && drive->media == ide_tape)
drive538drivers/block/ide.cidetape_setup(drive);
drive540drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive541drivers/block/ide.cif (!drive->present || drive->media != ide_disk) {
drive542drivers/block/ide.cdrive->part[0].start_sect = -1; /* skip partition check */
drive601drivers/block/ide.cstatic void atapi_reset_pollfunc (ide_drive_t *drive)
drive603drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive606drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive610drivers/block/ide.cprintk("%s: ATAPI reset complete\n", drive->name);
drive613drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive617drivers/block/ide.cprintk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat);
drive618drivers/block/ide.cdo_reset1 (drive, 1);  /* do it the old fashioned way */
drive630drivers/block/ide.cstatic void reset_pollfunc (ide_drive_t *drive)
drive632drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive633drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive638drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive688drivers/block/ide.cstatic void do_reset1 (ide_drive_t *drive, int  do_not_try_atapi)
drive692drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive693drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive700drivers/block/ide.cif (drive->media != ide_disk) {
drive702drivers/block/ide.cif (!drive->keep_settings)
drive703drivers/block/ide.cdrive->unmask = 0;
drive704drivers/block/ide.cOUT_BYTE (drive->select.all, IDE_SELECT_REG);
drive708drivers/block/ide.cide_set_handler (drive, &atapi_reset_pollfunc, HZ/20);
drive747drivers/block/ide.cOUT_BYTE(drive->ctl|6,IDE_CONTROL_REG);  /* set SRST and nIEN */
drive749drivers/block/ide.cOUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);  /* clear SRST, leave nIEN */
drive751drivers/block/ide.cide_set_handler (drive, &reset_pollfunc, HZ/20);
drive760drivers/block/ide.cvoid ide_do_reset (ide_drive_t *drive)
drive762drivers/block/ide.cdo_reset1 (drive, 0);
drive764drivers/block/ide.cif (drive->media == ide_tape)
drive765drivers/block/ide.cdrive->tape.reset_issued=1;
drive772drivers/block/ide.cvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err)
drive775drivers/block/ide.cstruct request *rq = HWGROUP(drive)->rq;
drive789drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive799drivers/block/ide.cbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat)
drive806drivers/block/ide.cprintk("%s: %s: status=0x%02x", drive->name, msg, stat);
drive808drivers/block/ide.cif (drive->media == ide_disk) {
drive827drivers/block/ide.cprintk("%s: %s: error=0x%02x", drive->name, msg, err);
drive829drivers/block/ide.cif (drive->media == ide_disk) {
drive853drivers/block/ide.cif (HWGROUP(drive)->rq)
drive854drivers/block/ide.cprintk(", sector=%ld", HWGROUP(drive)->rq->sector);
drive871drivers/block/ide.cstatic void try_to_flush_leftover_data (ide_drive_t *drive)
drive873drivers/block/ide.cint i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS;
drive879drivers/block/ide.cide_input_data (drive, buffer, wcount);
drive886drivers/block/ide.cvoid ide_error (ide_drive_t *drive, const char *msg, byte stat)
drive891drivers/block/ide.cerr = ide_dump_status(drive, msg, stat);
drive892drivers/block/ide.cif ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL)
drive897drivers/block/ide.cide_end_drive_cmd(drive, stat, err);
drive903drivers/block/ide.cif (drive->media == ide_disk && (stat & ERR_STAT)) {
drive911drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive918drivers/block/ide.cif (drive->media == ide_tape) {
drive920drivers/block/ide.cidetape_end_request(0, HWGROUP(drive));
drive924drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive929drivers/block/ide.cide_do_reset(drive);
drive932drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive940drivers/block/ide.cstatic void read_intr (ide_drive_t *drive)
drive948drivers/block/ide.cide_error(drive, "read_intr", stat);
drive951drivers/block/ide.cmsect = drive->mult_count;
drive953drivers/block/ide.crq = HWGROUP(drive)->rq;
drive960drivers/block/ide.cide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
drive963drivers/block/ide.cdrive->name, rq->sector, rq->sector+nsect-1,
drive971drivers/block/ide.cide_end_request(1, HWGROUP(drive));
drive975drivers/block/ide.cide_set_handler (drive, &read_intr, WAIT_CMD);
drive982drivers/block/ide.cstatic void write_intr (ide_drive_t *drive)
drive986drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive989drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive992drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive1004drivers/block/ide.cide_output_data (drive, rq->buffer, SECTOR_WORDS);
drive1005drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive1010drivers/block/ide.cide_error(drive, "write_intr", stat);
drive1017drivers/block/ide.cvoid ide_multwrite (ide_drive_t *drive, unsigned int mcount)
drive1019drivers/block/ide.cstruct request *rq = &HWGROUP(drive)->wrq;
drive1027drivers/block/ide.cide_output_data(drive, rq->buffer, nsect<<7);
drive1030drivers/block/ide.cdrive->name, rq->sector, (unsigned long) rq->buffer,
drive1040drivers/block/ide.cpanic("%s: buffer list corrupted\n", drive->name);
drive1052drivers/block/ide.cstatic void multwrite_intr (ide_drive_t *drive)
drive1056drivers/block/ide.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive1059drivers/block/ide.cif (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
drive1062drivers/block/ide.cide_multwrite(drive, drive->mult_count);
drive1063drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1077drivers/block/ide.cide_error(drive, "multwrite_intr", stat);
drive1084drivers/block/ide.cstatic void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler)
drive1086drivers/block/ide.cide_set_handler (drive, handler, WAIT_CMD);
drive1087drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1095drivers/block/ide.cstatic void set_multmode_intr (ide_drive_t *drive)
drive1101drivers/block/ide.cdrive->mult_count = drive->mult_req;
drive1103drivers/block/ide.cdrive->mult_req = drive->mult_count = 0;
drive1104drivers/block/ide.cdrive->special.b.recalibrate = 1;
drive1105drivers/block/ide.c(void) ide_dump_status(drive, "set_multmode", stat);
drive1112drivers/block/ide.cstatic void set_geometry_intr (ide_drive_t *drive)
drive1118drivers/block/ide.cide_error(drive, "set_geometry_intr", stat);
drive1124drivers/block/ide.cstatic void recal_intr (ide_drive_t *drive)
drive1130drivers/block/ide.cide_error(drive, "recal_intr", stat);
drive1136drivers/block/ide.cstatic void drive_cmd_intr (ide_drive_t *drive)
drive1138drivers/block/ide.cstruct request *rq = HWGROUP(drive)->rq;
drive1144drivers/block/ide.cide_input_data(drive, &args[4], args[3] * SECTOR_WORDS);
drive1148drivers/block/ide.cide_end_drive_cmd (drive, stat, GET_ERR());
drive1150drivers/block/ide.cide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */
drive1157drivers/block/ide.cstatic inline void do_special (ide_drive_t *drive)
drive1159drivers/block/ide.cspecial_t *s = &drive->special;
drive1162drivers/block/ide.cprintk("%s: do_special: 0x%02x\n", drive->name, s->all);
drive1166drivers/block/ide.cif (drive->media == ide_disk) {
drive1167drivers/block/ide.cOUT_BYTE(drive->sect,IDE_SECTOR_REG);
drive1168drivers/block/ide.cOUT_BYTE(drive->cyl,IDE_LCYL_REG);
drive1169drivers/block/ide.cOUT_BYTE(drive->cyl>>8,IDE_HCYL_REG);
drive1170drivers/block/ide.cOUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG);
drive1172drivers/block/ide.cide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr);
drive1176drivers/block/ide.cif (drive->media == ide_disk && !IS_PROMISE_DRIVE)
drive1177drivers/block/ide.cide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr);
drive1179drivers/block/ide.cide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc;
drive1182drivers/block/ide.ctuneproc(drive, drive->pio_req);
drive1186drivers/block/ide.cif (drive->media == ide_disk) {
drive1187drivers/block/ide.cif (drive->id && drive->mult_req > drive->id->max_multsect)
drive1188drivers/block/ide.cdrive->mult_req = drive->id->max_multsect;
drive1190drivers/block/ide.cide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr);
drive1192drivers/block/ide.cdrive->mult_req = 0;
drive1196drivers/block/ide.cprintk("%s: bad special flag: 0x%02x\n", drive->name, special);
drive1211drivers/block/ide.cint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout)
drive1221drivers/block/ide.cide_error(drive, "status error", stat);
drive1236drivers/block/ide.cide_error(drive, "status timeout", GET_STAT());
drive1245drivers/block/ide.cstatic inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block)
drive1247drivers/block/ide.cide_hwif_t *hwif = HWIF(drive);
drive1250drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);
drive1252drivers/block/ide.cif (drive->select.b.lba) {
drive1255drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ",
drive1261drivers/block/ide.cOUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1264drivers/block/ide.ctrack = block / drive->sect;
drive1265drivers/block/ide.csect  = block % drive->sect + 1;
drive1267drivers/block/ide.chead  = track % drive->head;
drive1268drivers/block/ide.ccyl   = track / drive->head;
drive1271drivers/block/ide.cOUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET);
drive1274drivers/block/ide.cdrive->name, (rq->cmd==READ)?"read":"writ", cyl,
drive1281drivers/block/ide.cdo_promise_io (drive, rq);
drive1288drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive)))
drive1291drivers/block/ide.cide_set_handler(drive, &read_intr, WAIT_CMD);
drive1292drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET);
drive1297drivers/block/ide.cif (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive)))
drive1300drivers/block/ide.cOUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET);
drive1301drivers/block/ide.cif (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
drive1302drivers/block/ide.cprintk("%s: no DRQ after issuing %s\n", drive->name,
drive1303drivers/block/ide.cdrive->mult_count ? "MULTWRITE" : "WRITE");
drive1306drivers/block/ide.cif (!drive->unmask)
drive1308drivers/block/ide.cif (drive->mult_count) {
drive1309drivers/block/ide.cHWGROUP(drive)->wrq = *rq; /* scratchpad */
drive1310drivers/block/ide.cide_set_handler (drive, &multwrite_intr, WAIT_CMD);
drive1311drivers/block/ide.cide_multwrite(drive, drive->mult_count);
drive1313drivers/block/ide.cide_set_handler (drive, &write_intr, WAIT_CMD);
drive1314drivers/block/ide.cide_output_data(drive, rq->buffer, SECTOR_WORDS);
drive1318drivers/block/ide.cprintk("%s: bad command: %d\n", drive->name, rq->cmd);
drive1319drivers/block/ide.cide_end_request(0, HWGROUP(drive));
drive1326drivers/block/ide.cstatic void execute_drive_cmd (ide_drive_t *drive, struct request *rq)
drive1332drivers/block/ide.cdrive->name, args[0], args[1], args[2], args[3]);
drive1335drivers/block/ide.cide_cmd(drive, args[0], args[1], &drive_cmd_intr);
drive1343drivers/block/ide.cprintk("%s: DRIVE_CMD (null)\n", drive->name);
drive1345drivers/block/ide.cide_end_drive_cmd(drive, GET_STAT(), GET_ERR());
drive1357drivers/block/ide.cide_drive_t *drive;
drive1370drivers/block/ide.cdrive = &hwif->drives[unit];
drive1373drivers/block/ide.cprintk("%s: block not locked\n", drive->name);
drive1379drivers/block/ide.cif ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {
drive1380drivers/block/ide.cprintk("%s%c: bad access: block=%ld, count=%ld\n", drive->name,
drive1384drivers/block/ide.cblock += drive->part[minor&PARTN_MASK].start_sect + drive->sect0;
drive1386drivers/block/ide.cif (block == 0 && drive->remap_0_to_1)
drive1389drivers/block/ide.c((ide_hwgroup_t *)hwif->hwgroup)->drive = drive;
drive1398drivers/block/ide.cSELECT_DRIVE(hwif,drive);
drive1399drivers/block/ide.cif (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) {
drive1400drivers/block/ide.cprintk("%s: drive not ready for command\n", drive->name);
drive1404drivers/block/ide.cif (!drive->special.all) {
drive1406drivers/block/ide.cexecute_drive_cmd(drive, rq);
drive1410drivers/block/ide.cswitch (drive->media) {
drive1412drivers/block/ide.cdo_rw_disk (drive, rq, block);
drive1416drivers/block/ide.cide_do_rw_cdrom (drive, block);
drive1421drivers/block/ide.cidetape_do_request (drive, rq, block);
drive1427drivers/block/ide.cdrive->name, drive->media);
drive1431drivers/block/ide.cdo_rw_disk (drive, rq, block); /* simpler and faster */
drive1435drivers/block/ide.cdo_special(drive);
drive1541drivers/block/ide.cide_drive_t   *drive   = hwgroup->drive;
drive1550drivers/block/ide.chandler(drive);
drive1553drivers/block/ide.cprintk("%s: marginal timeout\n", drive->name);
drive1557drivers/block/ide.c(void) hwgroup->hwif->dmaproc (ide_dma_abort, drive);
drive1558drivers/block/ide.cide_error(drive, "irq timeout", GET_STAT());
drive1600drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1601drivers/block/ide.cif (!drive->present)
drive1603drivers/block/ide.cSELECT_DRIVE(hwif,drive);
drive1604drivers/block/ide.cif (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT))
drive1605drivers/block/ide.c(void) ide_dump_status(drive, "unexpected_intr", stat);
drive1607drivers/block/ide.ctry_to_flush_leftover_data(drive);
drive1611drivers/block/ide.cSELECT_DRIVE(hwif,hwgroup->drive); /* Ugh.. probably interrupts current I/O */
drive1623drivers/block/ide.cide_drive_t *drive = hwgroup->drive;
drive1626drivers/block/ide.cif (drive->unmask)
drive1628drivers/block/ide.chandler(drive);
drive1631drivers/block/ide.cSET_RECOVERY_TIMER(HWIF(drive));
drive1654drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive1655drivers/block/ide.cif (drive->present)
drive1656drivers/block/ide.creturn drive;
drive1715drivers/block/ide.cint ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action)
drive1718drivers/block/ide.cunsigned int major = HWIF(drive)->major;
drive1727drivers/block/ide.crq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS);
drive1734drivers/block/ide.cHWGROUP(drive)->next_hwif = HWIF(drive);
drive1741drivers/block/ide.cHWGROUP(drive)->rq = NULL;
drive1743drivers/block/ide.cif (HWGROUP(drive)->rq == NULL) {  /* is this necessary (?) */
drive1763drivers/block/ide.cide_drive_t *drive;
drive1766drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1770drivers/block/ide.cwhile (drive->busy)
drive1771drivers/block/ide.csleep_on(&drive->wqueue);
drive1772drivers/block/ide.cdrive->usage++;
drive1775drivers/block/ide.cif (drive->media == ide_cdrom)
drive1776drivers/block/ide.creturn ide_cdrom_open (inode, filp, drive);
drive1779drivers/block/ide.cif (drive->media == ide_tape)
drive1780drivers/block/ide.creturn idetape_blkdev_open (inode, filp, drive);
drive1782drivers/block/ide.cif (drive->removeable) {
drive1793drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1804drivers/block/ide.cide_drive_t *drive;
drive1806drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) != NULL) {
drive1808drivers/block/ide.cdrive->usage--;
drive1810drivers/block/ide.cif (drive->media == ide_cdrom) {
drive1811drivers/block/ide.cide_cdrom_release (inode, file, drive);
drive1816drivers/block/ide.cif (drive->media == ide_tape) {
drive1817drivers/block/ide.cidetape_blkdev_release (inode, file, drive);
drive1821drivers/block/ide.cif (drive->removeable) {
drive1827drivers/block/ide.c(void) ide_do_drive_cmd(drive, &rq, ide_wait);
drive1842drivers/block/ide.cide_drive_t *drive;
drive1846drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive1850drivers/block/ide.cminor = drive->select.b.unit << PARTN_BITS;
drive1853drivers/block/ide.cif (drive->busy || (drive->usage > 1)) {
drive1857drivers/block/ide.cdrive->busy = 1;
drive1861drivers/block/ide.cif (drive->part[p].nr_sects > 0) {
drive1867drivers/block/ide.cdrive->part[p].start_sect = 0;
drive1868drivers/block/ide.cdrive->part[p].nr_sects   = 0;
drive1871drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive1872drivers/block/ide.cif (drive->media == ide_disk)
drive1873drivers/block/ide.cresetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
drive1875drivers/block/ide.cdrive->busy = 0;
drive1876drivers/block/ide.cwake_up(&drive->wqueue);
drive1896drivers/block/ide.cide_drive_t *drive;
drive1902drivers/block/ide.cif ((drive = get_info_ptr(inode->i_rdev)) == NULL)
drive1909drivers/block/ide.cif (!loc || drive->media != ide_disk) return -EINVAL;
drive1912drivers/block/ide.cput_user(drive->bios_head, (byte *) &loc->heads);
drive1913drivers/block/ide.cput_user(drive->bios_sect, (byte *) &loc->sectors);
drive1914drivers/block/ide.cput_user(drive->bios_cyl, (unsigned short *) &loc->cylinders);
drive1915drivers/block/ide.cput_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect,
drive1935drivers/block/ide.creturn write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects);
drive1941drivers/block/ide.creturn write_fs_long(arg, drive->keep_settings);
drive1944drivers/block/ide.creturn write_fs_long(arg, drive->unmask);
drive1947drivers/block/ide.creturn write_fs_long(arg, drive->using_dma);
drive1950drivers/block/ide.creturn write_fs_long(arg, drive->io_32bit);
drive1953drivers/block/ide.creturn write_fs_long(arg, drive->mult_count);
drive1958drivers/block/ide.cif (drive->id == NULL)
drive1960drivers/block/ide.cerr = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id));
drive1962drivers/block/ide.cmemcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id));
drive1966drivers/block/ide.creturn write_fs_long(arg, drive->bad_wstat == BAD_R_STAT);
drive1971drivers/block/ide.cif (drive->media == ide_cdrom)
drive1974drivers/block/ide.cif (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc)
drive1989drivers/block/ide.cif (!(HWIF(drive)->dmaproc)) {
drive1993drivers/block/ide.cdrive->using_dma = arg;
drive1996drivers/block/ide.cdrive->keep_settings = arg;
drive1999drivers/block/ide.cif (arg && HWIF(drive)->no_unmask) {
drive2003drivers/block/ide.cdrive->unmask = arg;
drive2006drivers/block/ide.cdrive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT;
drive2011drivers/block/ide.cdrive->io_32bit = arg;
drive2013drivers/block/ide.cif (HWIF(drive)->chipset == ide_dtc2278)
drive2014drivers/block/ide.cHWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
drive2025drivers/block/ide.cif (drive->id && arg > drive->id->max_multsect)
drive2029drivers/block/ide.cif (drive->special.b.set_multmode) {
drive2033drivers/block/ide.cdrive->mult_req = arg;
drive2034drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive2036drivers/block/ide.c(void) ide_do_drive_cmd (drive, &rq, ide_wait);
drive2037drivers/block/ide.creturn (drive->mult_count == arg) ? 0 : -EIO;
drive2045drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive2060drivers/block/ide.cerr = ide_do_drive_cmd(drive, &rq, ide_wait);
drive2072drivers/block/ide.cif (!HWIF(drive)->tuneproc)
drive2076drivers/block/ide.cdrive->pio_req = (int) arg;
drive2077drivers/block/ide.cdrive->special.b.set_pio = 1;
drive2085drivers/block/ide.cif (drive->media == ide_cdrom)
drive2086drivers/block/ide.creturn ide_cdrom_ioctl(drive, inode, file, cmd, arg);
drive2089drivers/block/ide.cif (drive->media == ide_tape)
drive2090drivers/block/ide.creturn idetape_blkdev_ioctl(drive, inode, file, cmd, arg);
drive2098drivers/block/ide.cide_drive_t *drive;
drive2100drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL)
drive2103drivers/block/ide.cif (drive->media == ide_cdrom)
drive2104drivers/block/ide.creturn ide_cdrom_check_media_change (drive);
drive2106drivers/block/ide.cif (drive->removeable) /* for disks */
drive2138drivers/block/ide.cstatic inline void do_identify (ide_drive_t *drive, byte cmd)
drive2144drivers/block/ide.cid = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL);
drive2145drivers/block/ide.cide_input_data(drive, id, SECTOR_WORDS);  /* read 512 bytes of id info */
drive2153drivers/block/ide.cprintk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model);
drive2154drivers/block/ide.cdrive->present = 0;
drive2179drivers/block/ide.cprintk("%s: %s, ATAPI ", drive->name, id->model);
drive2181drivers/block/ide.cif (HWIF(drive)->is_promise2) {
drive2183drivers/block/ide.cdrive->present = 0;
drive2192drivers/block/ide.cdrive->media = ide_cdrom;
drive2193drivers/block/ide.cdrive->present = 1;
drive2194drivers/block/ide.cdrive->removeable = 1;
drive2203drivers/block/ide.cif (idetape_identify_device (drive,id)) {
drive2204drivers/block/ide.cdrive->media = ide_tape;
drive2205drivers/block/ide.cdrive->present = 1;
drive2206drivers/block/ide.cdrive->removeable = 1;
drive2207drivers/block/ide.cif (HWIF(drive)->dmaproc != NULL &&
drive2208drivers/block/ide.c!HWIF(drive)->dmaproc(ide_dma_check, drive))
drive2213drivers/block/ide.cdrive->present = 0;
drive2222drivers/block/ide.cdrive->present = 0;
drive2226drivers/block/ide.cdrive->present = 0;
drive2235drivers/block/ide.cdrive->removeable = 1;
drive2240drivers/block/ide.cdrive->removeable = 0;
drive2241drivers/block/ide.cif (drive->select.all & (1<<4)) {
drive2242drivers/block/ide.cdrive->present = 0;
drive2247drivers/block/ide.cdrive->media = ide_disk;
drive2249drivers/block/ide.cif (!drive->present) {
drive2250drivers/block/ide.cdrive->present = 1;
drive2251drivers/block/ide.cdrive->cyl     = drive->bios_cyl  = id->cyls;
drive2252drivers/block/ide.cdrive->head    = drive->bios_head = id->heads;
drive2253drivers/block/ide.cdrive->sect    = drive->bios_sect = id->sectors;
drive2269drivers/block/ide.cdrive->cyl  = id->cur_cyls;
drive2270drivers/block/ide.cdrive->head = id->cur_heads;
drive2271drivers/block/ide.cdrive->sect = id->cur_sectors;
drive2274drivers/block/ide.ccapacity = drive->cyl * drive->head * drive->sect;
drive2283drivers/block/ide.cif ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) {
drive2284drivers/block/ide.cdrive->cyl  = id->cyls;
drive2285drivers/block/ide.cdrive->head = id->heads;
drive2286drivers/block/ide.cdrive->sect = id->sectors;
drive2289drivers/block/ide.cif (drive->sect == drive->bios_sect && drive->head == drive->bios_head) {
drive2290drivers/block/ide.cif (drive->cyl > drive->bios_cyl)
drive2291drivers/block/ide.cdrive->bios_cyl = drive->cyl;
drive2294drivers/block/ide.c(void) current_capacity (drive); /* initialize LBA selection */
drive2297drivers/block/ide.cdrive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2,
drive2298drivers/block/ide.cdrive->select.b.lba ? "LBA, " : "",
drive2299drivers/block/ide.cdrive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2301drivers/block/ide.cdrive->mult_count = 0;
drive2303drivers/block/ide.cdrive->mult_req = INITIAL_MULT_COUNT;
drive2304drivers/block/ide.cif (drive->mult_req > id->max_multsect)
drive2305drivers/block/ide.cdrive->mult_req = id->max_multsect;
drive2306drivers/block/ide.cif (drive->mult_req || ((id->multsect_valid & 1) && id->multsect))
drive2307drivers/block/ide.cdrive->special.b.set_multmode = 1;
drive2309drivers/block/ide.cif (HWIF(drive)->dmaproc != NULL) {  /* hwif supports DMA? */
drive2310drivers/block/ide.cif (!(HWIF(drive)->dmaproc(ide_dma_check, drive)))
drive2337drivers/block/ide.cstatic int try_to_identify (ide_drive_t *drive, byte cmd)
drive2343drivers/block/ide.cif (!HWIF(drive)->irq) {    /* already got an IRQ? */
drive2346drivers/block/ide.cOUT_BYTE(drive->ctl,IDE_CONTROL_REG);  /* enable device irq */
drive2351drivers/block/ide.cprintk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name);
drive2358drivers/block/ide.cif(promise_cmd(drive,PROMISE_IDENTIFY))
drive2367drivers/block/ide.cif (!HWIF(drive)->irq)
drive2379drivers/block/ide.cdo_identify(drive, cmd); /* drive returned ID */
drive2380drivers/block/ide.cif (drive->present && drive->media != ide_tape) {
drive2381drivers/block/ide.cide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc;
drive2382drivers/block/ide.cif (tuneproc != NULL && drive->autotune == 1)
drive2383drivers/block/ide.ctuneproc(drive, 255);  /* auto-tune PIO mode */
drive2390drivers/block/ide.cif (!HWIF(drive)->irq) {
drive2393drivers/block/ide.cHWIF(drive)->irq = irqs;
drive2395drivers/block/ide.cprintk("%s: IRQ probe failed (%d)\n", drive->name, irqs);
drive2416drivers/block/ide.cstatic int do_probe (ide_drive_t *drive, byte cmd)
drive2421drivers/block/ide.cif (drive->present) {  /* avoid waiting for inappropriate probes */
drive2422drivers/block/ide.cif ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY))
drive2428drivers/block/ide.cdrive->name, drive->present, drive->media,
drive2431drivers/block/ide.chwif = HWIF(drive);
drive2432drivers/block/ide.cSELECT_DRIVE(hwif,drive);
drive2433drivers/block/ide.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);  /* select target drive */
drive2435drivers/block/ide.cif (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) {
drive2441drivers/block/ide.c|| drive->present || cmd == WIN_PIDENTIFY)
drive2443drivers/block/ide.cif ((rc = try_to_identify(drive,cmd)))   /* send cmd and wait */
drive2444drivers/block/ide.crc = try_to_identify(drive,cmd); /* failed: try again */
drive2446drivers/block/ide.cprintk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT());
drive2451drivers/block/ide.cif (drive->select.b.unit != 0) {
drive2465drivers/block/ide.cstatic inline byte probe_for_drive (ide_drive_t *drive)
drive2467drivers/block/ide.cif (drive->noprobe)      /* skip probing? */
drive2468drivers/block/ide.creturn drive->present;
drive2469drivers/block/ide.cif (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */
drive2471drivers/block/ide.c(void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */
drive2474drivers/block/ide.cif (!drive->present)
drive2476drivers/block/ide.cif (drive->id == NULL) {    /* identification failed? */
drive2477drivers/block/ide.cif (drive->media == ide_disk) {
drive2479drivers/block/ide.cdrive->name, drive->cyl, drive->head, drive->sect);
drive2482drivers/block/ide.celse if (drive->media == ide_cdrom) {
drive2483drivers/block/ide.cprintk("%s: ATAPI cdrom (?)\n", drive->name);
drive2487drivers/block/ide.cdrive->present = 0;  /* nuke it */
drive2509drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2510drivers/block/ide.cif (drive->present) {
drive2511drivers/block/ide.cdrive->present = 0;
drive2512drivers/block/ide.cprintk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name);
drive2528drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2529drivers/block/ide.c(void) probe_for_drive (drive);
drive2530drivers/block/ide.cif (drive->present && drive->media == ide_disk) {
drive2532drivers/block/ide.cdrive->select.b.lba = 1; /* required by promise driver */
drive2533drivers/block/ide.cif ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
drive2535drivers/block/ide.cdrive->name, drive->head);
drive2536drivers/block/ide.cdrive->present = 0;
drive2539drivers/block/ide.cif (drive->present && !hwif->present) {
drive2662drivers/block/ide.cide_drive_t *drive;
drive2680drivers/block/ide.cdrive = &hwif->drives[unit];
drive2683drivers/block/ide.cdrive->noprobe = 1;
drive2686drivers/block/ide.cdrive->bad_wstat = BAD_R_STAT;
drive2690drivers/block/ide.cdrive->present = 1;
drive2691drivers/block/ide.cdrive->media = ide_cdrom;
drive2698drivers/block/ide.cdrive->autotune = 1;
drive2701drivers/block/ide.cdrive->autotune = 2;
drive2704drivers/block/ide.cdrive->media  = ide_disk;
drive2705drivers/block/ide.cdrive->cyl  = drive->bios_cyl  = vals[0];
drive2706drivers/block/ide.cdrive->head  = drive->bios_head = vals[1];
drive2707drivers/block/ide.cdrive->sect  = drive->bios_sect = vals[2];
drive2708drivers/block/ide.cdrive->present  = 1;
drive2709drivers/block/ide.cdrive->forced_geom = 1;
drive2863drivers/block/ide.cide_drive_t *drive;
drive2868drivers/block/ide.cif ((drive = get_info_ptr(i_rdev)) == NULL || drive->forced_geom)
drive2871drivers/block/ide.cif (xparm > 1 && xparm <= drive->bios_head && drive->bios_sect == 63)
drive2876drivers/block/ide.cif (drive->id) {
drive2877drivers/block/ide.cdrive->cyl  = drive->id->cyls;
drive2878drivers/block/ide.cdrive->head = drive->id->heads;
drive2879drivers/block/ide.cdrive->sect = drive->id->sectors;
drive2881drivers/block/ide.cdrive->bios_cyl  = drive->cyl;
drive2882drivers/block/ide.cdrive->bios_head = drive->head;
drive2883drivers/block/ide.cdrive->bios_sect = drive->sect;
drive2884drivers/block/ide.cdrive->special.b.set_geometry = 1;
drive2886drivers/block/ide.ctracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63;
drive2887drivers/block/ide.cdrive->bios_sect = 63;
drive2889drivers/block/ide.cdrive->bios_head = xparm;
drive2890drivers/block/ide.cdrive->bios_cyl = tracks / drive->bios_head;
drive2892drivers/block/ide.cwhile (drive->bios_cyl >= 1024) {
drive2893drivers/block/ide.cdrive->bios_head = *heads;
drive2894drivers/block/ide.cdrive->bios_cyl = tracks / drive->bios_head;
drive2900drivers/block/ide.cdrive->remap_0_to_1 = 1;
drive2905drivers/block/ide.cdrive->sect0 = 63;
drive2906drivers/block/ide.cdrive->bios_cyl = (tracks - 1) / drive->bios_head;
drive2911drivers/block/ide.cdrive->part[0].nr_sects = current_capacity(drive);
drive2912drivers/block/ide.cprintk("[%d/%d/%d]", drive->bios_cyl, drive->bios_head, drive->bios_sect);
drive2954drivers/block/ide.cide_drive_t *drive = &hwif->drives[unit];
drive2955drivers/block/ide.cif ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) {
drive2956drivers/block/ide.cdrive->cyl   = drive->bios_cyl  = *(unsigned short *)BIOS;
drive2957drivers/block/ide.cdrive->head  = drive->bios_head = *(BIOS+2);
drive2958drivers/block/ide.cdrive->sect  = drive->bios_sect = *(BIOS+14);
drive2959drivers/block/ide.cdrive->ctl   = *(BIOS+8);
drive2960drivers/block/ide.cdrive->present = 1;
drive3017drivers/block/ide.chwgroup->drive   = &hwif->drives[0];
drive3019drivers/block/ide.chwgroup->drive   = &hwif->drives[1];
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)
drive144drivers/block/ide.h#define SELECT_DRIVE(hwif,drive)        \
drive147drivers/block/ide.hhwif->selectproc(drive);      \
drive149drivers/block/ide.hOUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET); \
drive152drivers/block/ide.h#define SELECT_DRIVE(hwif,drive)  OUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET);
drive451drivers/block/ide.hide_drive_t    *drive;  /* current drive */
drive481drivers/block/ide.h#define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive)
drive483drivers/block/ide.h#define SET_RECOVERY_TIMER(drive)
drive489drivers/block/ide.hvoid ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive494drivers/block/ide.hvoid ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
drive500drivers/block/ide.hvoid ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout);
drive505drivers/block/ide.hbyte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat);
drive511drivers/block/ide.hvoid ide_error (ide_drive_t *drive, const char *msg, byte stat);
drive528drivers/block/ide.hint ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout);
drive595drivers/block/ide.hint ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action);
drive601drivers/block/ide.hvoid ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err);
drive607drivers/block/ide.hvoid ide_multwrite (ide_drive_t *drive, unsigned int mcount);
drive637drivers/block/ide.hint idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id);
drive645drivers/block/ide.hvoid idetape_setup (ide_drive_t *drive);
drive652drivers/block/ide.hvoid idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block);
drive665drivers/block/ide.hint idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
drive667drivers/block/ide.hint idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive);
drive668drivers/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))
drive75drivers/block/promise.cstatic void promise_selectproc (ide_drive_t *drive)
drive79drivers/block/promise.cOUT_BYTE(drive->select.all,IDE_SELECT_REG);
drive81drivers/block/promise.cnumber = ((HWIF(drive)->is_promise2)<<1) + drive->select.b.unit;
drive89drivers/block/promise.cint promise_cmd(ide_drive_t *drive, byte cmd)
drive94drivers/block/promise.cpromise_selectproc(drive);  /* redundant? */
drive132drivers/block/promise.cide_drive_t *drive;
drive139drivers/block/promise.cdrive = &hwif->drives[0];
drive149drivers/block/promise.cif(promise_cmd(drive,PROMISE_GET_CONFIG)) {
drive152drivers/block/promise.cif(ide_wait_stat(drive,DATA_READY,BAD_W_STAT,WAIT_DRQ)) {
drive156drivers/block/promise.cide_input_data(drive,&ident,SECTOR_WORDS);
drive191drivers/block/promise.cstatic void promise_read_intr (ide_drive_t *drive)
drive199drivers/block/promise.cide_error(drive, "promise_read_intr", stat);
drive208drivers/block/promise.crq = HWGROUP(drive)->rq;
drive212drivers/block/promise.crq = HWGROUP(drive)->rq;
drive216drivers/block/promise.cide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
drive219drivers/block/promise.c"remaining=%ld\n", drive->name, rq->sector, rq->sector+nsect-1, 
drive227drivers/block/promise.cide_end_request(1, HWGROUP(drive));
drive235drivers/block/promise.cide_set_handler (drive, &promise_read_intr, WAIT_CMD);
drive239drivers/block/promise.cide_error(drive, "promise read intr", stat);
drive246drivers/block/promise.cstatic void promise_write_pollfunc (ide_drive_t *drive)
drive249drivers/block/promise.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive254drivers/block/promise.cide_set_handler (drive, &promise_write_pollfunc, 1);
drive257drivers/block/promise.cprintk("%s: write timed-out!\n",drive->name);
drive258drivers/block/promise.cide_error (drive, "write timeout", GET_STAT());
drive262drivers/block/promise.cide_multwrite(drive, 4);
drive279drivers/block/promise.cstatic void promise_write (ide_drive_t *drive)
drive281drivers/block/promise.cide_hwgroup_t *hwgroup = HWGROUP(drive);
drive286drivers/block/promise.cide_multwrite(drive, rq->nr_sectors - 4);
drive288drivers/block/promise.cide_set_handler (drive, &promise_write_pollfunc, 1);
drive291drivers/block/promise.cide_multwrite(drive, rq->nr_sectors);
drive305drivers/block/promise.cvoid do_promise_io (ide_drive_t *drive, struct request *rq)
drive308drivers/block/promise.cunsigned short io_base = HWIF(drive)->io_base;
drive312drivers/block/promise.cide_set_handler(drive, &promise_read_intr, WAIT_CMD);
drive327drivers/block/promise.cdisable_irq(HWIF(drive)->irq);
drive328drivers/block/promise.cide_intr(HWIF(drive)->irq,HWGROUP(drive),NULL);
drive329drivers/block/promise.cenable_irq(HWIF(drive)->irq);
drive337drivers/block/promise.cdrive->name);
drive342drivers/block/promise.cif (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
drive343drivers/block/promise.cprintk("%s: no DRQ after issuing PROMISE_WRITE\n", drive->name);
drive346drivers/block/promise.cif (!drive->unmask)
drive348drivers/block/promise.cHWGROUP(drive)->wrq = *rq; /* scratchpad */
drive349drivers/block/promise.cpromise_write(drive);
drive352drivers/block/promise.cprintk("%s: bad command: %d\n", drive->name, rq->cmd);
drive353drivers/block/promise.cide_end_request(0, HWGROUP(drive));
drive43drivers/block/qd6580.cstatic void tune_qd6580 (ide_drive_t *drive, byte pio)
drive48drivers/block/qd6580.cpio = ide_get_best_pio_mode (drive);
drive150drivers/block/triton.cstatic void dma_intr (ide_drive_t *drive)
drive154drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive155drivers/block/triton.cunsigned short dma_base = HWIF(drive)->dma_base;
drive160drivers/block/triton.cif (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
drive162drivers/block/triton.crq = HWGROUP(drive)->rq;
drive165drivers/block/triton.cide_end_request(1, HWGROUP(drive));
drive169drivers/block/triton.cprintk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat);
drive172drivers/block/triton.cide_error(drive, "dma_intr", stat);
drive179drivers/block/triton.cstatic int build_dmatable (ide_drive_t *drive)
drive181drivers/block/triton.cstruct request *rq = HWGROUP(drive)->rq;
drive183drivers/block/triton.cunsigned long size, addr, *table = HWIF(drive)->dmatable;
drive197drivers/block/triton.cif (drive->media == ide_tape)
drive198drivers/block/triton.csize = drive->tape.pc->request_transfer;
drive219drivers/block/triton.cprintk("%s: DMA table too small\n", drive->name);
drive236drivers/block/triton.cprintk("%s: empty DMA table?\n", drive->name);
drive240drivers/block/triton.cstatic int config_drive_for_dma (ide_drive_t *drive)
drive244drivers/block/triton.cstruct hd_driveid *id = drive->id;
drive248drivers/block/triton.cdrive->using_dma = 1;
drive255drivers/block/triton.cdrive->using_dma = 1;
drive278drivers/block/triton.cstatic int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
drive280drivers/block/triton.cunsigned long dma_base = HWIF(drive)->dma_base;
drive288drivers/block/triton.creturn config_drive_for_dma (drive);
drive308drivers/block/triton.cif (build_dmatable (drive))
drive310drivers/block/triton.coutl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */
drive314drivers/block/triton.cif (drive->media != ide_disk)
drive317drivers/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);
drive1102drivers/cdrom/mcdx.cint drive;
drive1113drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++)
drive1114drivers/cdrom/mcdx.cmcdx_stuffp[drive] = NULL;
drive1117drivers/cdrom/mcdx.cfor (drive = 0; drive < MCDX_NDRIVES; drive++) { 
drive1122drivers/cdrom/mcdx.cmcdx_blocksizes[drive] = 0;
drive1126drivers/cdrom/mcdx.cTRACE((INIT, "init() try drive %d\n", drive));
drive1145drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
drive1146drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
drive1251drivers/cdrom/mcdx.cstuffp->minor = drive;
drive1257drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
drive1258drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
drive1871drivers/scsi/fdomain.cint              drive;
drive1927drivers/scsi/fdomain.cdrive = MINOR(dev) / 16;
drive1934drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 );
drive1937drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 );
drive1940drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 );
drive1943drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
drive1952drivers/scsi/fdomain.ci = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 );
drive51include/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);