tag | line | file | source code |
drive | 120 | drivers/block/ali14xx.c | static void ali14xx_tune_drive (ide_drive_t *drive, byte pio) |
drive | 125 | drivers/block/ali14xx.c | struct hd_driveid *id = drive->id; |
drive | 129 | drivers/block/ali14xx.c | pio = ide_get_best_pio_mode(drive); |
drive | 148 | drivers/block/ali14xx.c | drive->name, pio, time1, time2, param1, param2, param3, param4); |
drive | 151 | drivers/block/ali14xx.c | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; |
drive | 672 | drivers/block/cmd640.c | static void cmd640_set_mode(ide_drive_t* drive, int pio_mode) { |
drive | 678 | drivers/block/cmd640.c | interface_number = HWIF(drive)->index; |
drive | 679 | drivers/block/cmd640.c | drive_number = drive->select.b.unit; |
drive | 697 | drivers/block/cmd640.c | static void cmd640_tune_drive(ide_drive_t *drive, byte pio_mode) { |
drive | 707 | drivers/block/cmd640.c | cmd640_set_mode(drive, pio_mode); |
drive | 711 | drivers/block/cmd640.c | interface_number = HWIF(drive)->index; |
drive | 712 | drivers/block/cmd640.c | drive_number = drive->select.b.unit; |
drive | 714 | drivers/block/cmd640.c | id = drive->id; |
drive | 69 | drivers/block/dtc2278.c | static void tune_dtc2278 (ide_drive_t *drive, byte pio) |
drive | 74 | drivers/block/dtc2278.c | pio = ide_get_best_pio_mode(drive); |
drive | 92 | drivers/block/dtc2278.c | drive->io_32bit = 1; |
drive | 93 | drivers/block/dtc2278.c | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1; |
drive | 219 | drivers/block/floppy.c | #define UDP (&drive_params[drive]) |
drive | 220 | drivers/block/floppy.c | #define UDRS (&drive_state[drive]) |
drive | 221 | drivers/block/floppy.c | #define UDRWE (&write_errors[drive]) |
drive | 222 | drivers/block/floppy.c | #define UFDCS (&fdc_state[FDC(drive)]) |
drive | 570 | drivers/block/floppy.c | static void reschedule_timeout(int drive, const char *message, int marg) |
drive | 572 | drivers/block/floppy.c | if (drive == CURRENTD) |
drive | 573 | drivers/block/floppy.c | drive = current_drive; |
drive | 575 | drivers/block/floppy.c | if (drive < 0 || drive > N_DRIVE) { |
drive | 577 | drivers/block/floppy.c | drive=0; |
drive | 641 | drivers/block/floppy.c | static int disk_change(int drive) |
drive | 643 | drivers/block/floppy.c | int fdc=FDC(drive); |
drive | 647 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive))) || |
drive | 648 | drivers/block/floppy.c | (FDCS->dor & 3) != UNIT(drive) || |
drive | 649 | drivers/block/floppy.c | fdc != FDC(drive)){ |
drive | 651 | drivers/block/floppy.c | DPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive), |
drive | 658 | drivers/block/floppy.c | DPRINT1("checking disk change line for drive %d\n",drive); |
drive | 675 | drivers/block/floppy.c | current_type[drive] != NULL) |
drive | 678 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 698 | drivers/block/floppy.c | register unsigned char drive, unit, newdor,olddor; |
drive | 708 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 714 | drivers/block/floppy.c | disk_change(drive); |
drive | 721 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 745 | drivers/block/floppy.c | int drive; |
drive | 751 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) |
drive | 752 | drivers/block/floppy.c | if (FDC(drive) == fdc && |
drive | 758 | drivers/block/floppy.c | static void set_fdc(int drive) |
drive | 760 | drivers/block/floppy.c | if (drive >= 0 && drive < N_DRIVE){ |
drive | 761 | drivers/block/floppy.c | fdc = FDC(drive); |
drive | 762 | drivers/block/floppy.c | current_drive = drive; |
drive | 777 | drivers/block/floppy.c | static int lock_fdc(int drive, int interruptible) |
drive | 794 | drivers/block/floppy.c | reschedule_timeout(drive, "lock fdc", 0); |
drive | 795 | drivers/block/floppy.c | set_fdc(drive); |
drive | 799 | drivers/block/floppy.c | #define LOCK_FDC(drive,interruptible) \ |
drive | 800 | drivers/block/floppy.c | if (lock_fdc(drive,interruptible)) return -EINTR; |
drive | 841 | drivers/block/floppy.c | static void floppy_off(unsigned int drive) |
drive | 844 | drivers/block/floppy.c | register int fdc=FDC(drive); |
drive | 846 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive)))) |
drive | 849 | drivers/block/floppy.c | del_timer(motor_off_timer+drive); |
drive | 857 | drivers/block/floppy.c | motor_off_timer[drive].expires = jiffies + UDP->spindown - delta; |
drive | 859 | drivers/block/floppy.c | add_timer(motor_off_timer+drive); |
drive | 869 | drivers/block/floppy.c | int i, drive, saved_drive; |
drive | 876 | drivers/block/floppy.c | drive = (saved_drive + i + 1) % N_DRIVE; |
drive | 879 | drivers/block/floppy.c | set_fdc(drive); |
drive | 880 | drivers/block/floppy.c | if (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) & |
drive | 881 | drivers/block/floppy.c | (0x10 << UNIT(drive)))) |
drive | 884 | drivers/block/floppy.c | set_dor(fdc, ~(0x10 << UNIT(drive)), 0); |
drive | 2042 | drivers/block/floppy.c | int drive=DRIVE(device); |
drive | 2044 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2724 | drivers/block/floppy.c | static int user_reset_fdc(int drive, int arg, int interruptible) |
drive | 2729 | drivers/block/floppy.c | LOCK_FDC(drive,interruptible); |
drive | 2768 | drivers/block/floppy.c | static inline const char *drive_name(int type, int drive) |
drive | 2955 | drivers/block/floppy.c | int drive, ret, ret2; |
drive | 2960 | drivers/block/floppy.c | for (drive= 0; drive < N_DRIVE; drive++){ |
drive | 2961 | drivers/block/floppy.c | if (FDC(drive) != fdc) |
drive | 2963 | drivers/block/floppy.c | if (drive == current_drive){ |
drive | 3014 | drivers/block/floppy.c | static inline void clear_write_error(int drive) |
drive | 3020 | drivers/block/floppy.c | int drive, int type, kdev_t device) |
drive | 3035 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3039 | drivers/block/floppy.c | set_bit(drive, &fake_change); |
drive | 3055 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3060 | drivers/block/floppy.c | user_params[drive] = *g; |
drive | 3061 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3062 | drivers/block/floppy.c | SUPBOUND(buffer_max, user_params[drive].sect); |
drive | 3063 | drivers/block/floppy.c | current_type[drive] = &user_params[drive]; |
drive | 3064 | drivers/block/floppy.c | floppy_sizes[drive] = user_params[drive].size >> 1; |
drive | 3074 | drivers/block/floppy.c | if (DRS->maxblock > user_params[drive].sect || DRS->maxtrack) |
drive | 3167 | drivers/block/floppy.c | int i,drive,type; |
drive | 3184 | drivers/block/floppy.c | drive = DRIVE(device); |
drive | 3210 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3211 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 3212 | drivers/block/floppy.c | floppy_sizes[drive] = MAX_DISK_SIZE; |
drive | 3218 | drivers/block/floppy.c | drive, type, device); |
drive | 3223 | drivers/block/floppy.c | outparam = (char *) current_type[drive]; |
drive | 3236 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3251 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3262 | drivers/block/floppy.c | outparam = drive_name(type,drive); |
drive | 3270 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3277 | drivers/block/floppy.c | return user_reset_fdc(drive, (int)param, 1); |
drive | 3290 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3297 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3318 | drivers/block/floppy.c | int drive; |
drive | 3321 | drivers/block/floppy.c | drive=0; |
drive | 3324 | drivers/block/floppy.c | drive=1; |
drive | 3331 | drivers/block/floppy.c | for (drive=0; drive < N_DRIVE; drive++){ |
drive | 3343 | drivers/block/floppy.c | allowed_drive_mask |= 1 << drive; |
drive | 3344 | drivers/block/floppy.c | printk("fd%d is %s", drive, |
drive | 3347 | drivers/block/floppy.c | printk("fd%d is unknown type %d",drive, |
drive | 3358 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3371 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3388 | drivers/block/floppy.c | int drive; |
drive | 3390 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3415 | drivers/block/floppy.c | int drive; |
drive | 3425 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3426 | drivers/block/floppy.c | if (drive >= N_DRIVE || |
drive | 3427 | drivers/block/floppy.c | !(allowed_drive_mask & (1 << drive)) || |
drive | 3428 | drivers/block/floppy.c | fdc_state[FDC(drive)].version == FDC_NONE) |
drive | 3483 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3516 | drivers/block/floppy.c | int drive = DRIVE(dev); |
drive | 3527 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3534 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3535 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
drive | 3546 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
drive | 3548 | drivers/block/floppy.c | int drive=DRIVE(dev); |
drive | 3553 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3555 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3557 | drivers/block/floppy.c | if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){ |
drive | 3563 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3565 | drivers/block/floppy.c | clear_bit(drive, &fake_change); |
drive | 3828 | drivers/block/floppy.c | int i,unit,drive; |
drive | 3870 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) { |
drive | 3965 | drivers/block/floppy.c | int drive; |
drive | 3998 | drivers/block/floppy.c | for (drive=0; drive < N_FDC * 4; drive++) |
drive | 3999 | drivers/block/floppy.c | if (motor_off_timer[drive].next) |
drive | 4000 | drivers/block/floppy.c | printk("motor off timer %d still active\n", drive); |
drive | 542 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
drive | 545 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
drive | 565 | drivers/block/genhd.c | int i, drive; |
drive | 574 | drivers/block/genhd.c | for (drive = 0 ; drive < dev->nr_real ; drive++) { |
drive | 575 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
drive | 206 | drivers/block/hd.c | static int controller_ready(unsigned int drive, unsigned int head) |
drive | 213 | drivers/block/hd.c | outb_p(0xA0 | (drive<<4) | head, HD_CURRENT); |
drive | 220 | drivers/block/hd.c | static void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect, |
drive | 232 | drivers/block/hd.c | if (!controller_ready(drive, head)) { |
drive | 237 | drivers/block/hd.c | outb_p(hd_info[drive].ctl,HD_CMD); |
drive | 239 | drivers/block/hd.c | outb_p(hd_info[drive].wpcom>>2,++port); |
drive | 244 | drivers/block/hd.c | outb_p(0xA0|(drive<<4)|head,++port); |
drive | 962 | drivers/block/hd.c | int cmos_disks, drive; |
drive | 964 | drivers/block/hd.c | for (drive=0 ; drive<2 ; drive++) { |
drive | 965 | drivers/block/hd.c | bios_info[drive].cyl = hd_info[drive].cyl = *(unsigned short *) BIOS; |
drive | 966 | drivers/block/hd.c | bios_info[drive].head = hd_info[drive].head = *(2+BIOS); |
drive | 967 | drivers/block/hd.c | bios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS); |
drive | 968 | drivers/block/hd.c | bios_info[drive].ctl = hd_info[drive].ctl = *(8+BIOS); |
drive | 969 | drivers/block/hd.c | bios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS); |
drive | 970 | drivers/block/hd.c | bios_info[drive].sect = hd_info[drive].sect = *(14+BIOS); |
drive | 972 | drivers/block/hd.c | if (hd_info[drive].cyl && NR_HD == drive) |
drive | 124 | drivers/block/ht6560b.c | static void ht6560b_selectproc (ide_drive_t *drive) |
drive | 130 | drivers/block/ht6560b.c | byte select = ht6560b_selects[HWIF(drive)->index][drive->select.b.unit]; |
drive | 131 | drivers/block/ht6560b.c | byte timing = ht6560b_timings[HWIF(drive)->index][drive->select.b.unit]; |
drive | 155 | drivers/block/ht6560b.c | printk("ht6560b: %s: select=%#x timing=%#x\n", drive->name, t, timing); |
drive | 158 | drivers/block/ht6560b.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 196 | drivers/block/ht6560b.c | static void tune_ht6560b (ide_drive_t *drive, byte pio) |
drive | 201 | drivers/block/ht6560b.c | if (drive->media != ide_disk) |
drive | 204 | drivers/block/ht6560b.c | pio = ide_get_best_pio_mode (drive); |
drive | 208 | drivers/block/ht6560b.c | unit = drive->select.b.unit; |
drive | 209 | drivers/block/ht6560b.c | hwif = HWIF(drive)->index; |
drive | 214 | drivers/block/ide-cd.c | #define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect)) |
drive | 226 | drivers/block/ide-cd.c | #define CDROM_STATE_FLAGS(drive) ((struct ide_cd_state_flags *)&((drive)->bios_head)) |
drive | 244 | drivers/block/ide-cd.c | void cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 247 | drivers/block/ide-cd.c | ide_input_data (drive, buffer, bytecount / 4); |
drive | 256 | drivers/block/ide-cd.c | void cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 259 | drivers/block/ide-cd.c | ide_output_data (drive, buffer, bytecount / 4); |
drive | 416 | drivers/block/ide-cd.c | void cdrom_analyze_sense_data (ide_drive_t *drive, |
drive | 434 | drivers/block/ide-cd.c | printk ("ATAPI device %s:\n", drive->name); |
drive | 521 | drivers/block/ide-cd.c | drive->name, |
drive | 542 | drivers/block/ide-cd.c | static void cdrom_queue_request_sense (ide_drive_t *drive, |
drive | 554 | drivers/block/ide-cd.c | reqbuf = &drive->cdrom_info.sense_data; |
drive | 558 | drivers/block/ide-cd.c | pc = &HWIF(drive)->request_sense_pc; |
drive | 576 | drivers/block/ide-cd.c | rq = &HWIF(drive)->request_sense_request; |
drive | 581 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 585 | drivers/block/ide-cd.c | static void cdrom_end_request (int uptodate, ide_drive_t *drive) |
drive | 587 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 601 | drivers/block/ide-cd.c | cdrom_analyze_sense_data (drive, |
drive | 606 | drivers/block/ide-cd.c | ide_end_request (uptodate, HWGROUP(drive)); |
drive | 612 | drivers/block/ide-cd.c | static void cdrom_saw_media_change (ide_drive_t *drive) |
drive | 614 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 1; |
drive | 615 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 616 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 622 | drivers/block/ide-cd.c | static int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret) |
drive | 624 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 639 | drivers/block/ide-cd.c | printk ("%s : missing request in cdrom_decode_status\n", drive->name); |
drive | 652 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 653 | drivers/block/ide-cd.c | ide_error (drive, "request sense failure", stat); |
drive | 667 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 675 | drivers/block/ide-cd.c | printk ("%s : tray open or drive not ready\n", drive->name); |
drive | 681 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 682 | drivers/block/ide-cd.c | printk ("%s: media changed\n", drive->name); |
drive | 688 | drivers/block/ide-cd.c | ide_dump_status (drive, "packet command error", stat); |
drive | 706 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 709 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, sem, pc->sense_data, pc); |
drive | 719 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 722 | drivers/block/ide-cd.c | printk ("%s : tray open\n", drive->name); |
drive | 723 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 729 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 735 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 742 | drivers/block/ide-cd.c | ide_dump_status (drive, "command error", stat); |
drive | 743 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 749 | drivers/block/ide-cd.c | ide_error (drive, "cdrom_decode_status", stat); |
drive | 756 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 762 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, NULL, NULL, NULL); |
drive | 778 | drivers/block/ide-cd.c | static int cdrom_start_packet_command (ide_drive_t *drive, int xferlen, |
drive | 782 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1; |
drive | 791 | drivers/block/ide-cd.c | OUT_BYTE (drive->ctl, IDE_CONTROL_REG); |
drive | 793 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 795 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 801 | drivers/block/ide-cd.c | (*handler) (drive); |
drive | 813 | drivers/block/ide-cd.c | static int cdrom_transfer_packet_command (ide_drive_t *drive, |
drive | 817 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 824 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1; |
drive | 829 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1; |
drive | 833 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 836 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, cmd_buf, cmd_len); |
drive | 854 | drivers/block/ide-cd.c | static void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector, |
drive | 857 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 886 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dest, SECTOR_SIZE); |
drive | 897 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 909 | drivers/block/ide-cd.c | int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) |
drive | 919 | drivers/block/ide-cd.c | drive->name); |
drive | 926 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 935 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 938 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 946 | drivers/block/ide-cd.c | static void cdrom_read_intr (ide_drive_t *drive) |
drive | 951 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 954 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 968 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 969 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 972 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 978 | drivers/block/ide-cd.c | if (cdrom_read_check_ireason (drive, len, ireason)) return; |
drive | 985 | drivers/block/ide-cd.c | drive->name, len); |
drive | 987 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1002 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 1018 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1024 | drivers/block/ide-cd.c | cdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer); |
drive | 1038 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE); |
drive | 1051 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_read_intr, WAIT_CMD); |
drive | 1059 | drivers/block/ide-cd.c | static int cdrom_read_from_buffer (ide_drive_t *drive) |
drive | 1061 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 1062 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1074 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1089 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1095 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1105 | drivers/block/ide-cd.c | drive->name, rq->sector); |
drive | 1106 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1121 | drivers/block/ide-cd.c | static void cdrom_start_read_continuation (ide_drive_t *drive) |
drive | 1124 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1147 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 1148 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1177 | drivers/block/ide-cd.c | (void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c), |
drive | 1185 | drivers/block/ide-cd.c | static void cdrom_start_read (ide_drive_t *drive, unsigned int block) |
drive | 1187 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1203 | drivers/block/ide-cd.c | if (cdrom_read_from_buffer (drive)) |
drive | 1207 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 1210 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation); |
drive | 1222 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1228 | drivers/block/ide-cd.c | static void cdrom_pc_intr (ide_drive_t *drive) |
drive | 1231 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1235 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 1255 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1259 | drivers/block/ide-cd.c | drive->name, pc->buflen); |
drive | 1261 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1278 | drivers/block/ide-cd.c | drive->name); |
drive | 1284 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, pc->buffer, thislen); |
drive | 1291 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 1307 | drivers/block/ide-cd.c | drive->name); |
drive | 1313 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, pc->buffer, thislen); |
drive | 1320 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, &dum, sizeof (dum)); |
drive | 1332 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 1337 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD); |
drive | 1341 | drivers/block/ide-cd.c | static void cdrom_do_pc_continuation (ide_drive_t *drive) |
drive | 1343 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1347 | drivers/block/ide-cd.c | cdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr); |
drive | 1351 | drivers/block/ide-cd.c | static void cdrom_do_packet_command (ide_drive_t *drive) |
drive | 1354 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1363 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, len, cdrom_do_pc_continuation); |
drive | 1378 | drivers/block/ide-cd.c | int cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc) |
drive | 1395 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 1435 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->door_locked == 0 && |
drive | 1440 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, NULL); |
drive | 1451 | drivers/block/ide-cd.c | void ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block) |
drive | 1453 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1456 | drivers/block/ide-cd.c | cdrom_do_packet_command (drive); |
drive | 1460 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1461 | drivers/block/ide-cd.c | ide_do_reset (drive); |
drive | 1468 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1471 | drivers/block/ide-cd.c | cdrom_start_read (drive, block); |
drive | 1522 | drivers/block/ide-cd.c | cdrom_check_status (ide_drive_t *drive, |
drive | 1532 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1538 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1549 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_doorlock) |
drive | 1558 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1562 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1569 | drivers/block/ide-cd.c | printk ("%s: door locking not supported\n", drive->name); |
drive | 1570 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1; |
drive | 1572 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1582 | drivers/block/ide-cd.c | cdrom_eject (ide_drive_t *drive, int ejectflag, |
drive | 1592 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1597 | drivers/block/ide-cd.c | cdrom_pause (ide_drive_t *drive, int pauseflag, |
drive | 1607 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1612 | drivers/block/ide-cd.c | cdrom_startstop (ide_drive_t *drive, int startflag, |
drive | 1623 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1628 | drivers/block/ide-cd.c | cdrom_read_capacity (ide_drive_t *drive, unsigned *capacity, |
drive | 1646 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1657 | drivers/block/ide-cd.c | cdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag, |
drive | 1674 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1680 | drivers/block/ide-cd.c | cdrom_read_toc (ide_drive_t *drive, |
drive | 1685 | drivers/block/ide-cd.c | struct atapi_toc *toc = drive->cdrom_info.toc; |
drive | 1696 | drivers/block/ide-cd.c | drive->cdrom_info.toc = toc; |
drive | 1701 | drivers/block/ide-cd.c | printk ("%s: No cdrom TOC buffer!\n", drive->name); |
drive | 1707 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) |
drive | 1708 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 1710 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) return 0; |
drive | 1716 | drivers/block/ide-cd.c | msf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc); |
drive | 1720 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1727 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1740 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1748 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1761 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1778 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 1, |
drive | 1794 | drivers/block/ide-cd.c | stat = cdrom_read_capacity (drive, &toc->capacity, reqbuf); |
drive | 1797 | drivers/block/ide-cd.c | HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] |
drive | 1799 | drivers/block/ide-cd.c | drive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME; |
drive | 1802 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 1; |
drive | 1809 | drivers/block/ide-cd.c | cdrom_read_subchannel (ide_drive_t *drive, |
drive | 1825 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1831 | drivers/block/ide-cd.c | cdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag, |
drive | 1846 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1851 | drivers/block/ide-cd.c | cdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen, |
drive | 1866 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1871 | drivers/block/ide-cd.c | cdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1888 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1894 | drivers/block/ide-cd.c | cdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1906 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd) |
drive | 1916 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1922 | drivers/block/ide-cd.c | cdrom_play_lba_range_1 (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1937 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_playaudio12) |
drive | 1938 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 1948 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf); |
drive | 1958 | drivers/block/ide-cd.c | "trying PLAYAUDIO_MSF\n", drive->name); |
drive | 1959 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 1960 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 1961 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 1974 | drivers/block/ide-cd.c | cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1989 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_1 (drive, lba_start, lba_end, reqbuf); |
drive | 2004 | drivers/block/ide-cd.c | int cdrom_get_toc_entry (ide_drive_t *drive, int track, |
drive | 2012 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, reqbuf); |
drive | 2015 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2032 | drivers/block/ide-cd.c | cdrom_read_block (ide_drive_t *drive, int format, int lba, |
drive | 2050 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->old_readcd) |
drive | 2065 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2071 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd == 0) |
drive | 2074 | drivers/block/ide-cd.c | drive->name); |
drive | 2075 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 1; |
drive | 2076 | drivers/block/ide-cd.c | return cdrom_read_block (drive, format, lba, buf, buflen, reqbuf); |
drive | 2084 | drivers/block/ide-cd.c | int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode, |
drive | 2093 | drivers/block/ide-cd.c | if (drive->usage > 1) |
drive | 2096 | drivers/block/ide-cd.c | stat = cdrom_lockdoor (drive, 0, NULL); |
drive | 2099 | drivers/block/ide-cd.c | return cdrom_eject (drive, 0, NULL); |
drive | 2104 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close = arg; |
drive | 2109 | drivers/block/ide-cd.c | return cdrom_pause (drive, 1, NULL); |
drive | 2112 | drivers/block/ide-cd.c | return cdrom_pause (drive, 0, NULL); |
drive | 2115 | drivers/block/ide-cd.c | return cdrom_startstop (drive, 1, NULL); |
drive | 2121 | drivers/block/ide-cd.c | stat = cdrom_startstop (drive, 0, NULL); |
drive | 2124 | drivers/block/ide-cd.c | return cdrom_eject (drive, 1, NULL); |
drive | 2144 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2160 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL); |
drive | 2162 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL); |
drive | 2171 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2184 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2187 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2209 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL); |
drive | 2244 | drivers/block/ide-cd.c | stat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf), |
drive | 2249 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 2303 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL); |
drive | 2305 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 1, mask , sizeof (buffer),NULL); |
drive | 2315 | drivers/block/ide-cd.c | return cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL); |
drive | 2327 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL); |
drive | 2354 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2357 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2387 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2390 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2421 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, 1, lba, buf, |
drive | 2462 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2465 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2470 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL); |
drive | 2483 | drivers/block/ide-cd.c | return ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 2522 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2544 | drivers/block/ide-cd.c | int ide_cdrom_check_media_change (ide_drive_t *drive) |
drive | 2548 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 2550 | drivers/block/ide-cd.c | retval = CDROM_STATE_FLAGS (drive)->media_changed; |
drive | 2551 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2557 | drivers/block/ide-cd.c | int ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive) |
drive | 2562 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2567 | drivers/block/ide-cd.c | if (drive->usage == 1) |
drive | 2574 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2579 | drivers/block/ide-cd.c | cdrom_eject (drive, 1, &my_reqbuf); |
drive | 2580 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2586 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2591 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, &my_reqbuf); |
drive | 2594 | drivers/block/ide-cd.c | (void) cdrom_read_toc (drive, &my_reqbuf); |
drive | 2605 | drivers/block/ide-cd.c | void ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive) |
drive | 2607 | drivers/block/ide-cd.c | if (drive->usage == 0) |
drive | 2612 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 0, NULL); |
drive | 2615 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->eject_on_close) |
drive | 2616 | drivers/block/ide-cd.c | (void) cdrom_eject (drive, 0, NULL); |
drive | 2626 | drivers/block/ide-cd.c | void ide_cdrom_setup (ide_drive_t *drive) |
drive | 2628 | drivers/block/ide-cd.c | blksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE; |
drive | 2630 | drivers/block/ide-cd.c | drive->special.all = 0; |
drive | 2631 | drivers/block/ide-cd.c | drive->ready_stat = 0; |
drive | 2633 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2634 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 2635 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = 0; |
drive | 2638 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close= 0; |
drive | 2641 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1; |
drive | 2643 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 0; |
drive | 2646 | drivers/block/ide-cd.c | if (drive->id != NULL) { |
drive | 2647 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->drq_interrupt = |
drive | 2648 | drivers/block/ide-cd.c | ((drive->id->config & 0x0060) == 0x20); |
drive | 2650 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->drq_interrupt = 0; |
drive | 2654 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0; |
drive | 2655 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 0; |
drive | 2656 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0; |
drive | 2657 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0; |
drive | 2658 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0; |
drive | 2660 | drivers/block/ide-cd.c | if (drive->id != NULL) { |
drive | 2662 | drivers/block/ide-cd.c | if (strcmp (drive->id->model, "CD220E") == 0 || |
drive | 2663 | drivers/block/ide-cd.c | strcmp (drive->id->model, "CD") == 0) /* Creative Labs */ |
drive | 2664 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2666 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 || /* Acer CD525E */ |
drive | 2667 | drivers/block/ide-cd.c | strcmp (drive->id->model, "OTI-SCYLLA") == 0) |
drive | 2668 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2672 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "DCI-2S10") == 0) |
drive | 2673 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2675 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */ |
drive | 2677 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2680 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2684 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V003S0DS") == 0) |
drive | 2686 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2689 | drivers/block/ide-cd.c | if (drive->id->fw_rev[4] == '1' && |
drive | 2690 | drivers/block/ide-cd.c | drive->id->fw_rev[6] <= '2') |
drive | 2692 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1; |
drive | 2693 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 2696 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "0V300SSD") == 0 || |
drive | 2697 | drivers/block/ide-cd.c | strcmp (drive->id->model, "V003M0DP") == 0 || |
drive | 2698 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V300MPD") == 0 || |
drive | 2699 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V300HPD") == 0 || |
drive | 2700 | drivers/block/ide-cd.c | strcmp (drive->id->model, "V003H0DP") == 0) |
drive | 2701 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2704 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V004E0DT") == 0 || |
drive | 2705 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V400ETD") == 0 || |
drive | 2706 | drivers/block/ide-cd.c | strcmp (drive->id->model, "V004H0DT") == 0 || |
drive | 2707 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V400HTD") == 0) |
drive | 2708 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2710 | drivers/block/ide-cd.c | else if ( strcmp (drive->id->model, "CD-ROM CDU55D") == 0) /*sony cdu55d */ |
drive | 2711 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2713 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "CD-ROM CDU55E") == 0) |
drive | 2714 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2718 | drivers/block/ide-cd.c | drive->cdrom_info.toc = NULL; |
drive | 2719 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffer = NULL; |
drive | 2720 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffered = 0; |
drive | 2721 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 457 | drivers/block/ide-tape.c | #define IDETAPE_DATA_REG (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET) |
drive | 458 | drivers/block/ide-tape.c | #define IDETAPE_ERROR_REG (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET) |
drive | 459 | drivers/block/ide-tape.c | #define IDETAPE_IREASON_REG (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET) |
drive | 460 | drivers/block/ide-tape.c | #define IDETAPE_RESERVED3_REG (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET) |
drive | 461 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTL_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET) |
drive | 462 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTH_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET) |
drive | 463 | drivers/block/ide-tape.c | #define IDETAPE_DRIVESEL_REG (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET) |
drive | 464 | drivers/block/ide-tape.c | #define IDETAPE_STATUS_REG (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET) |
drive | 471 | drivers/block/ide-tape.c | #define IDETAPE_FEATURES_REG (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET) |
drive | 472 | drivers/block/ide-tape.c | #define IDETAPE_ATACOMMAND_REG (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET) |
drive | 473 | drivers/block/ide-tape.c | #define IDETAPE_CONTROL_REG (HWIF(drive)->ctl_port) |
drive | 594 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 811 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 812 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 813 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount); |
drive | 819 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler); |
drive | 820 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive); |
drive | 826 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive); |
drive | 829 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive); |
drive | 830 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive); |
drive | 836 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive); |
drive | 837 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive); |
drive | 839 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq); |
drive | 840 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result); |
drive | 842 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive); |
drive | 843 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive); |
drive | 850 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive); |
drive | 859 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive); |
drive | 861 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive); |
drive | 863 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive); |
drive | 866 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive); |
drive | 891 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 898 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 906 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 913 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 921 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer); |
drive | 928 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc); |
drive | 930 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block); |
drive | 931 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive); |
drive | 932 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive); |
drive | 938 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive); |
drive | 953 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive); |
drive | 957 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive); |
drive | 958 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage); |
drive | 959 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive); |
drive | 960 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive); |
drive | 961 | drivers/block/ide-tape.c | void idetape_wait_for_pipeline (ide_drive_t *drive); |
drive | 962 | drivers/block/ide-tape.c | void idetape_discard_read_pipeline (ide_drive_t *drive); |
drive | 963 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive); |
drive | 964 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive); |
drive | 1019 | drivers/block/ide-tape.c | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id) |
drive | 1162 | drivers/block/ide-tape.c | idetape_chrdev.drive=drive; |
drive | 1186 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 1191 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 1201 | drivers/block/ide-tape.c | drive->name,idetape_chrdev.name,major); |
drive | 1219 | drivers/block/ide-tape.c | void idetape_setup (ide_drive_t *drive) |
drive | 1222 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1230 | drivers/block/ide-tape.c | drive->ready_stat = 0; /* With an ATAPI device, we can issue packet commands */ |
drive | 1232 | drivers/block/ide-tape.c | HWIF(drive)->tape_drive=drive; |
drive | 1256 | drivers/block/ide-tape.c | idetape_get_mode_sense_results (drive); |
drive | 1343 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive) |
drive | 1347 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1356 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 1453 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler) |
drive | 1461 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 1483 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1494 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 1516 | drivers/block/ide-tape.c | drive->using_dma=0; |
drive | 1519 | drivers/block/ide-tape.c | if (pc->request_transfer && pc->dma_recommended && drive->using_dma) { |
drive | 1520 | drivers/block/ide-tape.c | dma_ok=!(HWIF(drive)->dmaproc(pc->writing ? ide_dma_write : ide_dma_read, drive)); |
drive | 1527 | drivers/block/ide-tape.c | OUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG); |
drive | 1529 | drivers/block/ide-tape.c | ide_set_handler (drive,handler,WAIT_CMD); /* Set the interrupt routine */ |
drive | 1531 | drivers/block/ide-tape.c | if (ide_wait_stat (drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) { /* Wait for DRQ to be ready - Assuming Accelerated DRQ */ |
drive | 1548 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1552 | drivers/block/ide-tape.c | ide_output_data (drive,pc->c,12/4); /* Send the actual packet */ |
drive | 1556 | drivers/block/ide-tape.c | (void) (HWIF(drive)->dmaproc(ide_dma_begin, drive)); |
drive | 1571 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive) |
drive | 1574 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1583 | drivers/block/ide-tape.c | if ((pc->dma_error=HWIF(drive)->dmaproc(ide_dma_status_bad, drive))) |
drive | 1588 | drivers/block/ide-tape.c | pc->actually_transferred=HWIF(drive)->dmaproc(ide_dma_transferred, drive); |
drive | 1591 | drivers/block/ide-tape.c | (void) (HWIF(drive)->dmaproc(ide_dma_abort, drive)); /* End DMA */ |
drive | 1619 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1623 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1627 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 1633 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to handle other requests */ |
drive | 1643 | drivers/block/ide-tape.c | (*pc->callback)(drive); /* Command finished - Call the callback function */ |
drive | 1651 | drivers/block/ide-tape.c | drive->using_dma=0; |
drive | 1652 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1662 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1668 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1678 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1679 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1692 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1693 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1701 | drivers/block/ide-tape.c | idetape_output_data (drive,pc->current_position,bcount.all); /* Write the current buffer */ |
drive | 1703 | drivers/block/ide-tape.c | idetape_input_data (drive,pc->current_position,bcount.all); /* Read the current buffer */ |
drive | 1710 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); /* And set the interrupt handler again */ |
drive | 1719 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive) |
drive | 1722 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1736 | drivers/block/ide-tape.c | tape->dsc_timer.data=(unsigned long) drive; |
drive | 1744 | drivers/block/ide-tape.c | tape->postponed_rq = rq = HWGROUP(drive)->rq; |
drive | 1747 | drivers/block/ide-tape.c | HWGROUP(drive)->rq = NULL; |
drive | 1770 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1771 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1775 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc_direct called\n",drive->name); |
drive | 1778 | drivers/block/ide-tape.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 1784 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); /* request in the request queue */ |
drive | 1792 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1825 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1826 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 1827 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1834 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc called\n",drive->name); |
drive | 1844 | drivers/block/ide-tape.c | if (HWGROUP (drive)->rq == NULL) { |
drive | 1859 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1923 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1935 | drivers/block/ide-tape.c | if (next_rq == HWGROUP (drive)->rq) |
drive | 1978 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1997 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 2018 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive) |
drive | 2021 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 2032 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next); |
drive | 2046 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive) |
drive | 2049 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2062 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 2063 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 2074 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 2079 | drivers/block/ide-tape.c | printk ("ide-tape: %s: DSC timeout.\n",drive->name); |
drive | 2088 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 2100 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive) |
drive | 2108 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 2109 | drivers/block/ide-tape.c | new_rq=idetape_next_rq_storage (drive); |
drive | 2114 | drivers/block/ide-tape.c | idetape_queue_pc_head (drive,pc,new_rq); |
drive | 2121 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive) |
drive | 2127 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2128 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2137 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2140 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2146 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive) |
drive | 2149 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2150 | drivers/block/ide-tape.c | struct request *rq=HWGROUP(drive)->rq; |
drive | 2161 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2169 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2174 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive) |
drive | 2177 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2178 | drivers/block/ide-tape.c | struct request *rq=HWGROUP(drive)->rq; |
drive | 2189 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2192 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2197 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive) |
drive | 2202 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2205 | drivers/block/ide-tape.c | idetape_pc_callback (drive); |
drive | 2216 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2225 | drivers/block/ide-tape.c | ide_input_data (drive,buffer,wcount); |
drive | 2237 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2246 | drivers/block/ide-tape.c | ide_output_data (drive,buffer,wcount); |
drive | 2259 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount) |
drive | 2387 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive) |
drive | 2390 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2399 | drivers/block/ide-tape.c | idetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer); |
drive | 2400 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2404 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2415 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result) |
drive | 2418 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2747 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive) |
drive | 2754 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2760 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2774 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2782 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2787 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2800 | drivers/block/ide-tape.c | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 2829 | drivers/block/ide-tape.c | ide_drive_t *drive = hwgroup->drive; |
drive | 2831 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 2832 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 2863 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 2868 | drivers/block/ide-tape.c | idetape_increase_max_pipeline_stages (drive); |
drive | 2869 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2873 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 2883 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end); |
drive | 2885 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next); |
drive | 2888 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2895 | drivers/block/ide-tape.c | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 2898 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2900 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 2923 | drivers/block/ide-tape.c | ide_end_request (0,HWGROUP (drive)); /* Let the common code handle it */ |
drive | 2953 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr); |
drive | 2963 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2972 | drivers/block/ide-tape.c | idetape_media_access_finished (drive); |
drive | 3005 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3009 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 3018 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3027 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3031 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 3040 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3057 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3062 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3067 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 3093 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc) |
drive | 3100 | drivers/block/ide-tape.c | return ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3123 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq) |
drive | 3126 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 3129 | drivers/block/ide-tape.c | bdev->current_request=HWGROUP (drive)->rq; /* Since we may have taken it out */ |
drive | 3134 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 3166 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer) |
drive | 3169 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3187 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3197 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3200 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3216 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3220 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3222 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3225 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3235 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer)); |
drive | 3248 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3270 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3273 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3283 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3297 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3306 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer)); |
drive | 3321 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3334 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3344 | drivers/block/ide-tape.c | void idetape_discard_read_pipeline (ide_drive_t *drive) |
drive | 3347 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3370 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3384 | drivers/block/ide-tape.c | void idetape_wait_for_pipeline (ide_drive_t *drive) |
drive | 3387 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3391 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3407 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive) |
drive | 3410 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3430 | drivers/block/ide-tape.c | (void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer); |
drive | 3434 | drivers/block/ide-tape.c | idetape_wait_for_pipeline (drive); |
drive | 3531 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive) |
drive | 3536 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3558 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive) |
drive | 3563 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3581 | drivers/block/ide-tape.c | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3584 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3604 | drivers/block/ide-tape.c | void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3607 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3648 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3649 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3659 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3660 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3669 | drivers/block/ide-tape.c | bytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer); |
drive | 3693 | drivers/block/ide-tape.c | bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3701 | drivers/block/ide-tape.c | bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3716 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3717 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3727 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3735 | drivers/block/ide-tape.c | retval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer); |
drive | 3759 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3768 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3816 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3817 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3829 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3830 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3834 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3845 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count)); |
drive | 3854 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3862 | drivers/block/ide-tape.c | return (idetape_blkdev_ioctl (drive,inode,file,cmd,arg)); |
drive | 3919 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 3922 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3945 | drivers/block/ide-tape.c | return (idetape_space_over_filemarks (drive,mt_op,mt_count)); |
drive | 3955 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3961 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3966 | drivers/block/ide-tape.c | return (idetape_rewind_tape (drive)); |
drive | 3969 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3971 | drivers/block/ide-tape.c | return (idetape_flush_tape_buffers (drive)); |
drive | 3974 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3977 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3979 | drivers/block/ide-tape.c | retval=idetape_rewind_tape (drive); |
drive | 3982 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3984 | drivers/block/ide-tape.c | return (idetape_position_tape (drive,mt_count)); |
drive | 4001 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 4004 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4036 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4041 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4043 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 4058 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4062 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTFSF,mt_count-count); |
drive | 4064 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTBSF,1)); |
drive | 4069 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4073 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTBSF,mt_count+count); |
drive | 4075 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTFSF,1)); |
drive | 4089 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 4090 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4134 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) { |
drive | 4151 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 4152 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4162 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 4164 | drivers/block/ide-tape.c | if (idetape_queue_pc_tail (drive,&pc)) |
drive | 4170 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 4172 | drivers/block/ide-tape.c | idetape_wait_for_pipeline (drive); |
drive | 4176 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) |
drive | 4205 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block) |
drive | 4212 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4219 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4228 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive) |
drive | 4238 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4245 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4248 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive) |
drive | 4254 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4275 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive) |
drive | 4278 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4447 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive) |
drive | 4450 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4475 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage) |
drive | 4478 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4502 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive) |
drive | 4505 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4541 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive) |
drive | 4544 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4550 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 4551 | drivers/block/ide-tape.c | (void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end)); |
drive | 4560 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive) |
drive | 4563 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 266 | drivers/block/ide.c | #define IS_PROMISE_DRIVE (HWIF(drive)->chipset == ide_promise) |
drive | 300 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive) |
drive | 304 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) |
drive | 342 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 344 | drivers/block/ide.c | drive->select.all = (unit<<4)|0xa0; |
drive | 345 | drivers/block/ide.c | drive->hwif = hwif; |
drive | 346 | drivers/block/ide.c | drive->ctl = 0x08; |
drive | 347 | drivers/block/ide.c | drive->ready_stat = READY_STAT; |
drive | 348 | drivers/block/ide.c | drive->bad_wstat = BAD_W_STAT; |
drive | 349 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 350 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 351 | drivers/block/ide.c | drive->name[0] = 'h'; |
drive | 352 | drivers/block/ide.c | drive->name[1] = 'd'; |
drive | 353 | drivers/block/ide.c | drive->name[2] = 'a' + (index * MAX_DRIVES) + unit; |
drive | 403 | drivers/block/ide.c | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 405 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 407 | drivers/block/ide.c | byte io_32bit = drive->io_32bit; |
drive | 415 | drivers/block/ide.c | if (drive->unmask) |
drive | 427 | drivers/block/ide.c | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 429 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 431 | drivers/block/ide.c | byte io_32bit = drive->io_32bit; |
drive | 439 | drivers/block/ide.c | if (drive->unmask) |
drive | 455 | drivers/block/ide.c | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout) |
drive | 457 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 461 | drivers/block/ide.c | drive->name, hwgroup->handler, handler); |
drive | 499 | drivers/block/ide.c | static unsigned long current_capacity (ide_drive_t *drive) |
drive | 501 | drivers/block/ide.c | struct hd_driveid *id = drive->id; |
drive | 502 | drivers/block/ide.c | unsigned long capacity = drive->cyl * drive->head * drive->sect; |
drive | 504 | drivers/block/ide.c | if (!drive->present) |
drive | 506 | drivers/block/ide.c | if (drive->media != ide_disk) |
drive | 509 | drivers/block/ide.c | drive->select.b.lba = 0; |
drive | 514 | drivers/block/ide.c | drive->select.b.lba = 1; |
drive | 518 | drivers/block/ide.c | return (capacity - drive->sect0); |
drive | 531 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 533 | drivers/block/ide.c | if (drive->present && drive->media == ide_cdrom) |
drive | 534 | drivers/block/ide.c | ide_cdrom_setup(drive); |
drive | 537 | drivers/block/ide.c | if (drive->present && drive->media == ide_tape) |
drive | 538 | drivers/block/ide.c | idetape_setup(drive); |
drive | 540 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 541 | drivers/block/ide.c | if (!drive->present || drive->media != ide_disk) { |
drive | 542 | drivers/block/ide.c | drive->part[0].start_sect = -1; /* skip partition check */ |
drive | 601 | drivers/block/ide.c | static void atapi_reset_pollfunc (ide_drive_t *drive) |
drive | 603 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 606 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 610 | drivers/block/ide.c | printk("%s: ATAPI reset complete\n", drive->name); |
drive | 613 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 617 | drivers/block/ide.c | printk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat); |
drive | 618 | drivers/block/ide.c | do_reset1 (drive, 1); /* do it the old fashioned way */ |
drive | 630 | drivers/block/ide.c | static void reset_pollfunc (ide_drive_t *drive) |
drive | 632 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 633 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 638 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 688 | drivers/block/ide.c | static void do_reset1 (ide_drive_t *drive, int do_not_try_atapi) |
drive | 692 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 693 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 700 | drivers/block/ide.c | if (drive->media != ide_disk) { |
drive | 702 | drivers/block/ide.c | if (!drive->keep_settings) |
drive | 703 | drivers/block/ide.c | drive->unmask = 0; |
drive | 704 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 708 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 747 | drivers/block/ide.c | OUT_BYTE(drive->ctl|6,IDE_CONTROL_REG); /* set SRST and nIEN */ |
drive | 749 | drivers/block/ide.c | OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG); /* clear SRST, leave nIEN */ |
drive | 751 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 760 | drivers/block/ide.c | void ide_do_reset (ide_drive_t *drive) |
drive | 762 | drivers/block/ide.c | do_reset1 (drive, 0); |
drive | 764 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 765 | drivers/block/ide.c | drive->tape.reset_issued=1; |
drive | 772 | drivers/block/ide.c | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err) |
drive | 775 | drivers/block/ide.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 789 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 799 | drivers/block/ide.c | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat) |
drive | 806 | drivers/block/ide.c | printk("%s: %s: status=0x%02x", drive->name, msg, stat); |
drive | 808 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 827 | drivers/block/ide.c | printk("%s: %s: error=0x%02x", drive->name, msg, err); |
drive | 829 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 853 | drivers/block/ide.c | if (HWGROUP(drive)->rq) |
drive | 854 | drivers/block/ide.c | printk(", sector=%ld", HWGROUP(drive)->rq->sector); |
drive | 871 | drivers/block/ide.c | static void try_to_flush_leftover_data (ide_drive_t *drive) |
drive | 873 | drivers/block/ide.c | int i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS; |
drive | 879 | drivers/block/ide.c | ide_input_data (drive, buffer, wcount); |
drive | 886 | drivers/block/ide.c | void ide_error (ide_drive_t *drive, const char *msg, byte stat) |
drive | 891 | drivers/block/ide.c | err = ide_dump_status(drive, msg, stat); |
drive | 892 | drivers/block/ide.c | if ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL) |
drive | 897 | drivers/block/ide.c | ide_end_drive_cmd(drive, stat, err); |
drive | 903 | drivers/block/ide.c | if (drive->media == ide_disk && (stat & ERR_STAT)) { |
drive | 911 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 918 | drivers/block/ide.c | if (drive->media == ide_tape) { |
drive | 920 | drivers/block/ide.c | idetape_end_request(0, HWGROUP(drive)); |
drive | 924 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 929 | drivers/block/ide.c | ide_do_reset(drive); |
drive | 932 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 940 | drivers/block/ide.c | static void read_intr (ide_drive_t *drive) |
drive | 948 | drivers/block/ide.c | ide_error(drive, "read_intr", stat); |
drive | 951 | drivers/block/ide.c | msect = drive->mult_count; |
drive | 953 | drivers/block/ide.c | rq = HWGROUP(drive)->rq; |
drive | 960 | drivers/block/ide.c | ide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS); |
drive | 963 | drivers/block/ide.c | drive->name, rq->sector, rq->sector+nsect-1, |
drive | 971 | drivers/block/ide.c | ide_end_request(1, HWGROUP(drive)); |
drive | 975 | drivers/block/ide.c | ide_set_handler (drive, &read_intr, WAIT_CMD); |
drive | 982 | drivers/block/ide.c | static void write_intr (ide_drive_t *drive) |
drive | 986 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 989 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 992 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 1004 | drivers/block/ide.c | ide_output_data (drive, rq->buffer, SECTOR_WORDS); |
drive | 1005 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 1010 | drivers/block/ide.c | ide_error(drive, "write_intr", stat); |
drive | 1017 | drivers/block/ide.c | void ide_multwrite (ide_drive_t *drive, unsigned int mcount) |
drive | 1019 | drivers/block/ide.c | struct request *rq = &HWGROUP(drive)->wrq; |
drive | 1027 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, nsect<<7); |
drive | 1030 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 1040 | drivers/block/ide.c | panic("%s: buffer list corrupted\n", drive->name); |
drive | 1052 | drivers/block/ide.c | static void multwrite_intr (ide_drive_t *drive) |
drive | 1056 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 1059 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 1062 | drivers/block/ide.c | ide_multwrite(drive, drive->mult_count); |
drive | 1063 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1077 | drivers/block/ide.c | ide_error(drive, "multwrite_intr", stat); |
drive | 1084 | drivers/block/ide.c | static void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler) |
drive | 1086 | drivers/block/ide.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 1087 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1095 | drivers/block/ide.c | static void set_multmode_intr (ide_drive_t *drive) |
drive | 1101 | drivers/block/ide.c | drive->mult_count = drive->mult_req; |
drive | 1103 | drivers/block/ide.c | drive->mult_req = drive->mult_count = 0; |
drive | 1104 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 1105 | drivers/block/ide.c | (void) ide_dump_status(drive, "set_multmode", stat); |
drive | 1112 | drivers/block/ide.c | static void set_geometry_intr (ide_drive_t *drive) |
drive | 1118 | drivers/block/ide.c | ide_error(drive, "set_geometry_intr", stat); |
drive | 1124 | drivers/block/ide.c | static void recal_intr (ide_drive_t *drive) |
drive | 1130 | drivers/block/ide.c | ide_error(drive, "recal_intr", stat); |
drive | 1136 | drivers/block/ide.c | static void drive_cmd_intr (ide_drive_t *drive) |
drive | 1138 | drivers/block/ide.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1144 | drivers/block/ide.c | ide_input_data(drive, &args[4], args[3] * SECTOR_WORDS); |
drive | 1148 | drivers/block/ide.c | ide_end_drive_cmd (drive, stat, GET_ERR()); |
drive | 1150 | drivers/block/ide.c | ide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */ |
drive | 1157 | drivers/block/ide.c | static inline void do_special (ide_drive_t *drive) |
drive | 1159 | drivers/block/ide.c | special_t *s = &drive->special; |
drive | 1162 | drivers/block/ide.c | printk("%s: do_special: 0x%02x\n", drive->name, s->all); |
drive | 1166 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1167 | drivers/block/ide.c | OUT_BYTE(drive->sect,IDE_SECTOR_REG); |
drive | 1168 | drivers/block/ide.c | OUT_BYTE(drive->cyl,IDE_LCYL_REG); |
drive | 1169 | drivers/block/ide.c | OUT_BYTE(drive->cyl>>8,IDE_HCYL_REG); |
drive | 1170 | drivers/block/ide.c | OUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG); |
drive | 1172 | drivers/block/ide.c | ide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr); |
drive | 1176 | drivers/block/ide.c | if (drive->media == ide_disk && !IS_PROMISE_DRIVE) |
drive | 1177 | drivers/block/ide.c | ide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr); |
drive | 1179 | drivers/block/ide.c | ide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc; |
drive | 1182 | drivers/block/ide.c | tuneproc(drive, drive->pio_req); |
drive | 1186 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1187 | drivers/block/ide.c | if (drive->id && drive->mult_req > drive->id->max_multsect) |
drive | 1188 | drivers/block/ide.c | drive->mult_req = drive->id->max_multsect; |
drive | 1190 | drivers/block/ide.c | ide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr); |
drive | 1192 | drivers/block/ide.c | drive->mult_req = 0; |
drive | 1196 | drivers/block/ide.c | printk("%s: bad special flag: 0x%02x\n", drive->name, special); |
drive | 1211 | drivers/block/ide.c | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout) |
drive | 1221 | drivers/block/ide.c | ide_error(drive, "status error", stat); |
drive | 1236 | drivers/block/ide.c | ide_error(drive, "status timeout", GET_STAT()); |
drive | 1245 | drivers/block/ide.c | static inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 1247 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 1250 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1252 | drivers/block/ide.c | if (drive->select.b.lba) { |
drive | 1255 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", |
drive | 1261 | drivers/block/ide.c | OUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1264 | drivers/block/ide.c | track = block / drive->sect; |
drive | 1265 | drivers/block/ide.c | sect = block % drive->sect + 1; |
drive | 1267 | drivers/block/ide.c | head = track % drive->head; |
drive | 1268 | drivers/block/ide.c | cyl = track / drive->head; |
drive | 1271 | drivers/block/ide.c | OUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1274 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", cyl, |
drive | 1281 | drivers/block/ide.c | do_promise_io (drive, rq); |
drive | 1288 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive))) |
drive | 1291 | drivers/block/ide.c | ide_set_handler(drive, &read_intr, WAIT_CMD); |
drive | 1292 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET); |
drive | 1297 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive))) |
drive | 1300 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET); |
drive | 1301 | drivers/block/ide.c | if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { |
drive | 1302 | drivers/block/ide.c | printk("%s: no DRQ after issuing %s\n", drive->name, |
drive | 1303 | drivers/block/ide.c | drive->mult_count ? "MULTWRITE" : "WRITE"); |
drive | 1306 | drivers/block/ide.c | if (!drive->unmask) |
drive | 1308 | drivers/block/ide.c | if (drive->mult_count) { |
drive | 1309 | drivers/block/ide.c | HWGROUP(drive)->wrq = *rq; /* scratchpad */ |
drive | 1310 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1311 | drivers/block/ide.c | ide_multwrite(drive, drive->mult_count); |
drive | 1313 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 1314 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, SECTOR_WORDS); |
drive | 1318 | drivers/block/ide.c | printk("%s: bad command: %d\n", drive->name, rq->cmd); |
drive | 1319 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 1326 | drivers/block/ide.c | static void execute_drive_cmd (ide_drive_t *drive, struct request *rq) |
drive | 1332 | drivers/block/ide.c | drive->name, args[0], args[1], args[2], args[3]); |
drive | 1335 | drivers/block/ide.c | ide_cmd(drive, args[0], args[1], &drive_cmd_intr); |
drive | 1343 | drivers/block/ide.c | printk("%s: DRIVE_CMD (null)\n", drive->name); |
drive | 1345 | drivers/block/ide.c | ide_end_drive_cmd(drive, GET_STAT(), GET_ERR()); |
drive | 1357 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1370 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 1373 | drivers/block/ide.c | printk("%s: block not locked\n", drive->name); |
drive | 1379 | drivers/block/ide.c | if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) { |
drive | 1380 | drivers/block/ide.c | printk("%s%c: bad access: block=%ld, count=%ld\n", drive->name, |
drive | 1384 | drivers/block/ide.c | block += drive->part[minor&PARTN_MASK].start_sect + drive->sect0; |
drive | 1386 | drivers/block/ide.c | if (block == 0 && drive->remap_0_to_1) |
drive | 1389 | drivers/block/ide.c | ((ide_hwgroup_t *)hwif->hwgroup)->drive = drive; |
drive | 1398 | drivers/block/ide.c | SELECT_DRIVE(hwif,drive); |
drive | 1399 | drivers/block/ide.c | if (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) { |
drive | 1400 | drivers/block/ide.c | printk("%s: drive not ready for command\n", drive->name); |
drive | 1404 | drivers/block/ide.c | if (!drive->special.all) { |
drive | 1406 | drivers/block/ide.c | execute_drive_cmd(drive, rq); |
drive | 1410 | drivers/block/ide.c | switch (drive->media) { |
drive | 1412 | drivers/block/ide.c | do_rw_disk (drive, rq, block); |
drive | 1416 | drivers/block/ide.c | ide_do_rw_cdrom (drive, block); |
drive | 1421 | drivers/block/ide.c | idetape_do_request (drive, rq, block); |
drive | 1427 | drivers/block/ide.c | drive->name, drive->media); |
drive | 1431 | drivers/block/ide.c | do_rw_disk (drive, rq, block); /* simpler and faster */ |
drive | 1435 | drivers/block/ide.c | do_special(drive); |
drive | 1541 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1550 | drivers/block/ide.c | handler(drive); |
drive | 1553 | drivers/block/ide.c | printk("%s: marginal timeout\n", drive->name); |
drive | 1557 | drivers/block/ide.c | (void) hwgroup->hwif->dmaproc (ide_dma_abort, drive); |
drive | 1558 | drivers/block/ide.c | ide_error(drive, "irq timeout", GET_STAT()); |
drive | 1600 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1601 | drivers/block/ide.c | if (!drive->present) |
drive | 1603 | drivers/block/ide.c | SELECT_DRIVE(hwif,drive); |
drive | 1604 | drivers/block/ide.c | if (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT)) |
drive | 1605 | drivers/block/ide.c | (void) ide_dump_status(drive, "unexpected_intr", stat); |
drive | 1607 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 1611 | drivers/block/ide.c | SELECT_DRIVE(hwif,hwgroup->drive); /* Ugh.. probably interrupts current I/O */ |
drive | 1623 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1626 | drivers/block/ide.c | if (drive->unmask) |
drive | 1628 | drivers/block/ide.c | handler(drive); |
drive | 1631 | drivers/block/ide.c | SET_RECOVERY_TIMER(HWIF(drive)); |
drive | 1654 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1655 | drivers/block/ide.c | if (drive->present) |
drive | 1656 | drivers/block/ide.c | return drive; |
drive | 1715 | drivers/block/ide.c | int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action) |
drive | 1718 | drivers/block/ide.c | unsigned int major = HWIF(drive)->major; |
drive | 1727 | drivers/block/ide.c | rq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS); |
drive | 1734 | drivers/block/ide.c | HWGROUP(drive)->next_hwif = HWIF(drive); |
drive | 1741 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 1743 | drivers/block/ide.c | if (HWGROUP(drive)->rq == NULL) { /* is this necessary (?) */ |
drive | 1763 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1766 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1770 | drivers/block/ide.c | while (drive->busy) |
drive | 1771 | drivers/block/ide.c | sleep_on(&drive->wqueue); |
drive | 1772 | drivers/block/ide.c | drive->usage++; |
drive | 1775 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 1776 | drivers/block/ide.c | return ide_cdrom_open (inode, filp, drive); |
drive | 1779 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 1780 | drivers/block/ide.c | return idetape_blkdev_open (inode, filp, drive); |
drive | 1782 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1793 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1804 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1806 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) != NULL) { |
drive | 1808 | drivers/block/ide.c | drive->usage--; |
drive | 1810 | drivers/block/ide.c | if (drive->media == ide_cdrom) { |
drive | 1811 | drivers/block/ide.c | ide_cdrom_release (inode, file, drive); |
drive | 1816 | drivers/block/ide.c | if (drive->media == ide_tape) { |
drive | 1817 | drivers/block/ide.c | idetape_blkdev_release (inode, file, drive); |
drive | 1821 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1827 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1842 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1846 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 1850 | drivers/block/ide.c | minor = drive->select.b.unit << PARTN_BITS; |
drive | 1853 | drivers/block/ide.c | if (drive->busy || (drive->usage > 1)) { |
drive | 1857 | drivers/block/ide.c | drive->busy = 1; |
drive | 1861 | drivers/block/ide.c | if (drive->part[p].nr_sects > 0) { |
drive | 1867 | drivers/block/ide.c | drive->part[p].start_sect = 0; |
drive | 1868 | drivers/block/ide.c | drive->part[p].nr_sects = 0; |
drive | 1871 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 1872 | drivers/block/ide.c | if (drive->media == ide_disk) |
drive | 1873 | drivers/block/ide.c | resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit); |
drive | 1875 | drivers/block/ide.c | drive->busy = 0; |
drive | 1876 | drivers/block/ide.c | wake_up(&drive->wqueue); |
drive | 1896 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1902 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1909 | drivers/block/ide.c | if (!loc || drive->media != ide_disk) return -EINVAL; |
drive | 1912 | drivers/block/ide.c | put_user(drive->bios_head, (byte *) &loc->heads); |
drive | 1913 | drivers/block/ide.c | put_user(drive->bios_sect, (byte *) &loc->sectors); |
drive | 1914 | drivers/block/ide.c | put_user(drive->bios_cyl, (unsigned short *) &loc->cylinders); |
drive | 1915 | drivers/block/ide.c | put_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect, |
drive | 1935 | drivers/block/ide.c | return write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects); |
drive | 1941 | drivers/block/ide.c | return write_fs_long(arg, drive->keep_settings); |
drive | 1944 | drivers/block/ide.c | return write_fs_long(arg, drive->unmask); |
drive | 1947 | drivers/block/ide.c | return write_fs_long(arg, drive->using_dma); |
drive | 1950 | drivers/block/ide.c | return write_fs_long(arg, drive->io_32bit); |
drive | 1953 | drivers/block/ide.c | return write_fs_long(arg, drive->mult_count); |
drive | 1958 | drivers/block/ide.c | if (drive->id == NULL) |
drive | 1960 | drivers/block/ide.c | err = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id)); |
drive | 1962 | drivers/block/ide.c | memcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id)); |
drive | 1966 | drivers/block/ide.c | return write_fs_long(arg, drive->bad_wstat == BAD_R_STAT); |
drive | 1971 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 1974 | drivers/block/ide.c | if (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc) |
drive | 1989 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc)) { |
drive | 1993 | drivers/block/ide.c | drive->using_dma = arg; |
drive | 1996 | drivers/block/ide.c | drive->keep_settings = arg; |
drive | 1999 | drivers/block/ide.c | if (arg && HWIF(drive)->no_unmask) { |
drive | 2003 | drivers/block/ide.c | drive->unmask = arg; |
drive | 2006 | drivers/block/ide.c | drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; |
drive | 2011 | drivers/block/ide.c | drive->io_32bit = arg; |
drive | 2013 | drivers/block/ide.c | if (HWIF(drive)->chipset == ide_dtc2278) |
drive | 2014 | drivers/block/ide.c | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; |
drive | 2025 | drivers/block/ide.c | if (drive->id && arg > drive->id->max_multsect) |
drive | 2029 | drivers/block/ide.c | if (drive->special.b.set_multmode) { |
drive | 2033 | drivers/block/ide.c | drive->mult_req = arg; |
drive | 2034 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 2036 | drivers/block/ide.c | (void) ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 2037 | drivers/block/ide.c | return (drive->mult_count == arg) ? 0 : -EIO; |
drive | 2045 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 2060 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 2072 | drivers/block/ide.c | if (!HWIF(drive)->tuneproc) |
drive | 2076 | drivers/block/ide.c | drive->pio_req = (int) arg; |
drive | 2077 | drivers/block/ide.c | drive->special.b.set_pio = 1; |
drive | 2085 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2086 | drivers/block/ide.c | return ide_cdrom_ioctl(drive, inode, file, cmd, arg); |
drive | 2089 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 2090 | drivers/block/ide.c | return idetape_blkdev_ioctl(drive, inode, file, cmd, arg); |
drive | 2098 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2100 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 2103 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2104 | drivers/block/ide.c | return ide_cdrom_check_media_change (drive); |
drive | 2106 | drivers/block/ide.c | if (drive->removeable) /* for disks */ |
drive | 2138 | drivers/block/ide.c | static inline void do_identify (ide_drive_t *drive, byte cmd) |
drive | 2144 | drivers/block/ide.c | id = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL); |
drive | 2145 | drivers/block/ide.c | ide_input_data(drive, id, SECTOR_WORDS); /* read 512 bytes of id info */ |
drive | 2153 | drivers/block/ide.c | printk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model); |
drive | 2154 | drivers/block/ide.c | drive->present = 0; |
drive | 2179 | drivers/block/ide.c | printk("%s: %s, ATAPI ", drive->name, id->model); |
drive | 2181 | drivers/block/ide.c | if (HWIF(drive)->is_promise2) { |
drive | 2183 | drivers/block/ide.c | drive->present = 0; |
drive | 2192 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2193 | drivers/block/ide.c | drive->present = 1; |
drive | 2194 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2203 | drivers/block/ide.c | if (idetape_identify_device (drive,id)) { |
drive | 2204 | drivers/block/ide.c | drive->media = ide_tape; |
drive | 2205 | drivers/block/ide.c | drive->present = 1; |
drive | 2206 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2207 | drivers/block/ide.c | if (HWIF(drive)->dmaproc != NULL && |
drive | 2208 | drivers/block/ide.c | !HWIF(drive)->dmaproc(ide_dma_check, drive)) |
drive | 2213 | drivers/block/ide.c | drive->present = 0; |
drive | 2222 | drivers/block/ide.c | drive->present = 0; |
drive | 2226 | drivers/block/ide.c | drive->present = 0; |
drive | 2235 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2240 | drivers/block/ide.c | drive->removeable = 0; |
drive | 2241 | drivers/block/ide.c | if (drive->select.all & (1<<4)) { |
drive | 2242 | drivers/block/ide.c | drive->present = 0; |
drive | 2247 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2249 | drivers/block/ide.c | if (!drive->present) { |
drive | 2250 | drivers/block/ide.c | drive->present = 1; |
drive | 2251 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = id->cyls; |
drive | 2252 | drivers/block/ide.c | drive->head = drive->bios_head = id->heads; |
drive | 2253 | drivers/block/ide.c | drive->sect = drive->bios_sect = id->sectors; |
drive | 2269 | drivers/block/ide.c | drive->cyl = id->cur_cyls; |
drive | 2270 | drivers/block/ide.c | drive->head = id->cur_heads; |
drive | 2271 | drivers/block/ide.c | drive->sect = id->cur_sectors; |
drive | 2274 | drivers/block/ide.c | capacity = drive->cyl * drive->head * drive->sect; |
drive | 2283 | drivers/block/ide.c | if ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) { |
drive | 2284 | drivers/block/ide.c | drive->cyl = id->cyls; |
drive | 2285 | drivers/block/ide.c | drive->head = id->heads; |
drive | 2286 | drivers/block/ide.c | drive->sect = id->sectors; |
drive | 2289 | drivers/block/ide.c | if (drive->sect == drive->bios_sect && drive->head == drive->bios_head) { |
drive | 2290 | drivers/block/ide.c | if (drive->cyl > drive->bios_cyl) |
drive | 2291 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2294 | drivers/block/ide.c | (void) current_capacity (drive); /* initialize LBA selection */ |
drive | 2297 | drivers/block/ide.c | drive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2, |
drive | 2298 | drivers/block/ide.c | drive->select.b.lba ? "LBA, " : "", |
drive | 2299 | drivers/block/ide.c | drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2301 | drivers/block/ide.c | drive->mult_count = 0; |
drive | 2303 | drivers/block/ide.c | drive->mult_req = INITIAL_MULT_COUNT; |
drive | 2304 | drivers/block/ide.c | if (drive->mult_req > id->max_multsect) |
drive | 2305 | drivers/block/ide.c | drive->mult_req = id->max_multsect; |
drive | 2306 | drivers/block/ide.c | if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect)) |
drive | 2307 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 2309 | drivers/block/ide.c | if (HWIF(drive)->dmaproc != NULL) { /* hwif supports DMA? */ |
drive | 2310 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc(ide_dma_check, drive))) |
drive | 2337 | drivers/block/ide.c | static int try_to_identify (ide_drive_t *drive, byte cmd) |
drive | 2343 | drivers/block/ide.c | if (!HWIF(drive)->irq) { /* already got an IRQ? */ |
drive | 2346 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); /* enable device irq */ |
drive | 2351 | drivers/block/ide.c | printk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name); |
drive | 2358 | drivers/block/ide.c | if(promise_cmd(drive,PROMISE_IDENTIFY)) |
drive | 2367 | drivers/block/ide.c | if (!HWIF(drive)->irq) |
drive | 2379 | drivers/block/ide.c | do_identify(drive, cmd); /* drive returned ID */ |
drive | 2380 | drivers/block/ide.c | if (drive->present && drive->media != ide_tape) { |
drive | 2381 | drivers/block/ide.c | ide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc; |
drive | 2382 | drivers/block/ide.c | if (tuneproc != NULL && drive->autotune == 1) |
drive | 2383 | drivers/block/ide.c | tuneproc(drive, 255); /* auto-tune PIO mode */ |
drive | 2390 | drivers/block/ide.c | if (!HWIF(drive)->irq) { |
drive | 2393 | drivers/block/ide.c | HWIF(drive)->irq = irqs; |
drive | 2395 | drivers/block/ide.c | printk("%s: IRQ probe failed (%d)\n", drive->name, irqs); |
drive | 2416 | drivers/block/ide.c | static int do_probe (ide_drive_t *drive, byte cmd) |
drive | 2421 | drivers/block/ide.c | if (drive->present) { /* avoid waiting for inappropriate probes */ |
drive | 2422 | drivers/block/ide.c | if ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY)) |
drive | 2428 | drivers/block/ide.c | drive->name, drive->present, drive->media, |
drive | 2431 | drivers/block/ide.c | hwif = HWIF(drive); |
drive | 2432 | drivers/block/ide.c | SELECT_DRIVE(hwif,drive); |
drive | 2433 | drivers/block/ide.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); /* select target drive */ |
drive | 2435 | drivers/block/ide.c | if (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) { |
drive | 2441 | drivers/block/ide.c | || drive->present || cmd == WIN_PIDENTIFY) |
drive | 2443 | drivers/block/ide.c | if ((rc = try_to_identify(drive,cmd))) /* send cmd and wait */ |
drive | 2444 | drivers/block/ide.c | rc = try_to_identify(drive,cmd); /* failed: try again */ |
drive | 2446 | drivers/block/ide.c | printk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT()); |
drive | 2451 | drivers/block/ide.c | if (drive->select.b.unit != 0) { |
drive | 2465 | drivers/block/ide.c | static inline byte probe_for_drive (ide_drive_t *drive) |
drive | 2467 | drivers/block/ide.c | if (drive->noprobe) /* skip probing? */ |
drive | 2468 | drivers/block/ide.c | return drive->present; |
drive | 2469 | drivers/block/ide.c | if (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */ |
drive | 2471 | drivers/block/ide.c | (void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */ |
drive | 2474 | drivers/block/ide.c | if (!drive->present) |
drive | 2476 | drivers/block/ide.c | if (drive->id == NULL) { /* identification failed? */ |
drive | 2477 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 2479 | drivers/block/ide.c | drive->name, drive->cyl, drive->head, drive->sect); |
drive | 2482 | drivers/block/ide.c | else if (drive->media == ide_cdrom) { |
drive | 2483 | drivers/block/ide.c | printk("%s: ATAPI cdrom (?)\n", drive->name); |
drive | 2487 | drivers/block/ide.c | drive->present = 0; /* nuke it */ |
drive | 2509 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2510 | drivers/block/ide.c | if (drive->present) { |
drive | 2511 | drivers/block/ide.c | drive->present = 0; |
drive | 2512 | drivers/block/ide.c | printk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name); |
drive | 2528 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2529 | drivers/block/ide.c | (void) probe_for_drive (drive); |
drive | 2530 | drivers/block/ide.c | if (drive->present && drive->media == ide_disk) { |
drive | 2532 | drivers/block/ide.c | drive->select.b.lba = 1; /* required by promise driver */ |
drive | 2533 | drivers/block/ide.c | if ((!drive->head || drive->head > 16) && !drive->select.b.lba) { |
drive | 2535 | drivers/block/ide.c | drive->name, drive->head); |
drive | 2536 | drivers/block/ide.c | drive->present = 0; |
drive | 2539 | drivers/block/ide.c | if (drive->present && !hwif->present) { |
drive | 2662 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2680 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 2683 | drivers/block/ide.c | drive->noprobe = 1; |
drive | 2686 | drivers/block/ide.c | drive->bad_wstat = BAD_R_STAT; |
drive | 2690 | drivers/block/ide.c | drive->present = 1; |
drive | 2691 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2698 | drivers/block/ide.c | drive->autotune = 1; |
drive | 2701 | drivers/block/ide.c | drive->autotune = 2; |
drive | 2704 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2705 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = vals[0]; |
drive | 2706 | drivers/block/ide.c | drive->head = drive->bios_head = vals[1]; |
drive | 2707 | drivers/block/ide.c | drive->sect = drive->bios_sect = vals[2]; |
drive | 2708 | drivers/block/ide.c | drive->present = 1; |
drive | 2709 | drivers/block/ide.c | drive->forced_geom = 1; |
drive | 2863 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2868 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL || drive->forced_geom) |
drive | 2871 | drivers/block/ide.c | if (xparm > 1 && xparm <= drive->bios_head && drive->bios_sect == 63) |
drive | 2876 | drivers/block/ide.c | if (drive->id) { |
drive | 2877 | drivers/block/ide.c | drive->cyl = drive->id->cyls; |
drive | 2878 | drivers/block/ide.c | drive->head = drive->id->heads; |
drive | 2879 | drivers/block/ide.c | drive->sect = drive->id->sectors; |
drive | 2881 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2882 | drivers/block/ide.c | drive->bios_head = drive->head; |
drive | 2883 | drivers/block/ide.c | drive->bios_sect = drive->sect; |
drive | 2884 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 2886 | drivers/block/ide.c | tracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63; |
drive | 2887 | drivers/block/ide.c | drive->bios_sect = 63; |
drive | 2889 | drivers/block/ide.c | drive->bios_head = xparm; |
drive | 2890 | drivers/block/ide.c | drive->bios_cyl = tracks / drive->bios_head; |
drive | 2892 | drivers/block/ide.c | while (drive->bios_cyl >= 1024) { |
drive | 2893 | drivers/block/ide.c | drive->bios_head = *heads; |
drive | 2894 | drivers/block/ide.c | drive->bios_cyl = tracks / drive->bios_head; |
drive | 2900 | drivers/block/ide.c | drive->remap_0_to_1 = 1; |
drive | 2905 | drivers/block/ide.c | drive->sect0 = 63; |
drive | 2906 | drivers/block/ide.c | drive->bios_cyl = (tracks - 1) / drive->bios_head; |
drive | 2911 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 2912 | drivers/block/ide.c | printk("[%d/%d/%d]", drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2954 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2955 | drivers/block/ide.c | if ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) { |
drive | 2956 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = *(unsigned short *)BIOS; |
drive | 2957 | drivers/block/ide.c | drive->head = drive->bios_head = *(BIOS+2); |
drive | 2958 | drivers/block/ide.c | drive->sect = drive->bios_sect = *(BIOS+14); |
drive | 2959 | drivers/block/ide.c | drive->ctl = *(BIOS+8); |
drive | 2960 | drivers/block/ide.c | drive->present = 1; |
drive | 3017 | drivers/block/ide.c | hwgroup->drive = &hwif->drives[0]; |
drive | 3019 | drivers/block/ide.c | hwgroup->drive = &hwif->drives[1]; |
drive | 77 | drivers/block/ide.h | #define HWIF(drive) ((ide_hwif_t *)((drive)->hwif)) |
drive | 78 | drivers/block/ide.h | #define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup)) |
drive | 91 | drivers/block/ide.h | #define IDE_DATA_REG (HWIF(drive)->io_base+IDE_DATA_OFFSET) |
drive | 92 | drivers/block/ide.h | #define IDE_ERROR_REG (HWIF(drive)->io_base+IDE_ERROR_OFFSET) |
drive | 93 | drivers/block/ide.h | #define IDE_NSECTOR_REG (HWIF(drive)->io_base+IDE_NSECTOR_OFFSET) |
drive | 94 | drivers/block/ide.h | #define IDE_SECTOR_REG (HWIF(drive)->io_base+IDE_SECTOR_OFFSET) |
drive | 95 | drivers/block/ide.h | #define IDE_LCYL_REG (HWIF(drive)->io_base+IDE_LCYL_OFFSET) |
drive | 96 | drivers/block/ide.h | #define IDE_HCYL_REG (HWIF(drive)->io_base+IDE_HCYL_OFFSET) |
drive | 97 | drivers/block/ide.h | #define IDE_SELECT_REG (HWIF(drive)->io_base+IDE_SELECT_OFFSET) |
drive | 98 | drivers/block/ide.h | #define IDE_STATUS_REG (HWIF(drive)->io_base+IDE_STATUS_OFFSET) |
drive | 99 | drivers/block/ide.h | #define IDE_CONTROL_REG (HWIF(drive)->ctl_port) |
drive | 144 | drivers/block/ide.h | #define SELECT_DRIVE(hwif,drive) \ |
drive | 147 | drivers/block/ide.h | hwif->selectproc(drive); \ |
drive | 149 | drivers/block/ide.h | OUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET); \ |
drive | 152 | drivers/block/ide.h | #define SELECT_DRIVE(hwif,drive) OUT_BYTE((drive)->select.all, hwif->io_base+IDE_SELECT_OFFSET); |
drive | 451 | drivers/block/ide.h | ide_drive_t *drive; /* current drive */ |
drive | 481 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive) |
drive | 483 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) |
drive | 489 | drivers/block/ide.h | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 494 | drivers/block/ide.h | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 500 | drivers/block/ide.h | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout); |
drive | 505 | drivers/block/ide.h | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat); |
drive | 511 | drivers/block/ide.h | void ide_error (ide_drive_t *drive, const char *msg, byte stat); |
drive | 528 | drivers/block/ide.h | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout); |
drive | 595 | drivers/block/ide.h | int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action); |
drive | 601 | drivers/block/ide.h | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err); |
drive | 607 | drivers/block/ide.h | void ide_multwrite (ide_drive_t *drive, unsigned int mcount); |
drive | 637 | drivers/block/ide.h | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id); |
drive | 645 | drivers/block/ide.h | void idetape_setup (ide_drive_t *drive); |
drive | 652 | drivers/block/ide.h | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block); |
drive | 665 | drivers/block/ide.h | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 667 | drivers/block/ide.h | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive); |
drive | 668 | drivers/block/ide.h | void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive); |
drive | 21 | drivers/block/ide_modes.h | unsigned int ide_get_best_pio_mode (ide_drive_t *drive); |
drive | 118 | drivers/block/ide_modes.h | unsigned int ide_get_best_pio_mode (ide_drive_t *drive) |
drive | 121 | drivers/block/ide_modes.h | struct hd_driveid *id = drive->id; |
drive | 124 | drivers/block/ide_modes.h | if (HWIF(drive)->chipset != ide_cmd640 && !strcmp("QUANTUM FIREBALL1080A", id->model)) |
drive | 75 | drivers/block/promise.c | static void promise_selectproc (ide_drive_t *drive) |
drive | 79 | drivers/block/promise.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 81 | drivers/block/promise.c | number = ((HWIF(drive)->is_promise2)<<1) + drive->select.b.unit; |
drive | 89 | drivers/block/promise.c | int promise_cmd(ide_drive_t *drive, byte cmd) |
drive | 94 | drivers/block/promise.c | promise_selectproc(drive); /* redundant? */ |
drive | 132 | drivers/block/promise.c | ide_drive_t *drive; |
drive | 139 | drivers/block/promise.c | drive = &hwif->drives[0]; |
drive | 149 | drivers/block/promise.c | if(promise_cmd(drive,PROMISE_GET_CONFIG)) { |
drive | 152 | drivers/block/promise.c | if(ide_wait_stat(drive,DATA_READY,BAD_W_STAT,WAIT_DRQ)) { |
drive | 156 | drivers/block/promise.c | ide_input_data(drive,&ident,SECTOR_WORDS); |
drive | 191 | drivers/block/promise.c | static void promise_read_intr (ide_drive_t *drive) |
drive | 199 | drivers/block/promise.c | ide_error(drive, "promise_read_intr", stat); |
drive | 208 | drivers/block/promise.c | rq = HWGROUP(drive)->rq; |
drive | 212 | drivers/block/promise.c | rq = HWGROUP(drive)->rq; |
drive | 216 | drivers/block/promise.c | ide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS); |
drive | 219 | drivers/block/promise.c | "remaining=%ld\n", drive->name, rq->sector, rq->sector+nsect-1, |
drive | 227 | drivers/block/promise.c | ide_end_request(1, HWGROUP(drive)); |
drive | 235 | drivers/block/promise.c | ide_set_handler (drive, &promise_read_intr, WAIT_CMD); |
drive | 239 | drivers/block/promise.c | ide_error(drive, "promise read intr", stat); |
drive | 246 | drivers/block/promise.c | static void promise_write_pollfunc (ide_drive_t *drive) |
drive | 249 | drivers/block/promise.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 254 | drivers/block/promise.c | ide_set_handler (drive, &promise_write_pollfunc, 1); |
drive | 257 | drivers/block/promise.c | printk("%s: write timed-out!\n",drive->name); |
drive | 258 | drivers/block/promise.c | ide_error (drive, "write timeout", GET_STAT()); |
drive | 262 | drivers/block/promise.c | ide_multwrite(drive, 4); |
drive | 279 | drivers/block/promise.c | static void promise_write (ide_drive_t *drive) |
drive | 281 | drivers/block/promise.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 286 | drivers/block/promise.c | ide_multwrite(drive, rq->nr_sectors - 4); |
drive | 288 | drivers/block/promise.c | ide_set_handler (drive, &promise_write_pollfunc, 1); |
drive | 291 | drivers/block/promise.c | ide_multwrite(drive, rq->nr_sectors); |
drive | 305 | drivers/block/promise.c | void do_promise_io (ide_drive_t *drive, struct request *rq) |
drive | 308 | drivers/block/promise.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 312 | drivers/block/promise.c | ide_set_handler(drive, &promise_read_intr, WAIT_CMD); |
drive | 327 | drivers/block/promise.c | disable_irq(HWIF(drive)->irq); |
drive | 328 | drivers/block/promise.c | ide_intr(HWIF(drive)->irq,HWGROUP(drive),NULL); |
drive | 329 | drivers/block/promise.c | enable_irq(HWIF(drive)->irq); |
drive | 337 | drivers/block/promise.c | drive->name); |
drive | 342 | drivers/block/promise.c | if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { |
drive | 343 | drivers/block/promise.c | printk("%s: no DRQ after issuing PROMISE_WRITE\n", drive->name); |
drive | 346 | drivers/block/promise.c | if (!drive->unmask) |
drive | 348 | drivers/block/promise.c | HWGROUP(drive)->wrq = *rq; /* scratchpad */ |
drive | 349 | drivers/block/promise.c | promise_write(drive); |
drive | 352 | drivers/block/promise.c | printk("%s: bad command: %d\n", drive->name, rq->cmd); |
drive | 353 | drivers/block/promise.c | ide_end_request(0, HWGROUP(drive)); |
drive | 43 | drivers/block/qd6580.c | static void tune_qd6580 (ide_drive_t *drive, byte pio) |
drive | 48 | drivers/block/qd6580.c | pio = ide_get_best_pio_mode (drive); |
drive | 150 | drivers/block/triton.c | static void dma_intr (ide_drive_t *drive) |
drive | 154 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 155 | drivers/block/triton.c | unsigned short dma_base = HWIF(drive)->dma_base; |
drive | 160 | drivers/block/triton.c | if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) { |
drive | 162 | drivers/block/triton.c | rq = HWGROUP(drive)->rq; |
drive | 165 | drivers/block/triton.c | ide_end_request(1, HWGROUP(drive)); |
drive | 169 | drivers/block/triton.c | printk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat); |
drive | 172 | drivers/block/triton.c | ide_error(drive, "dma_intr", stat); |
drive | 179 | drivers/block/triton.c | static int build_dmatable (ide_drive_t *drive) |
drive | 181 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 183 | drivers/block/triton.c | unsigned long size, addr, *table = HWIF(drive)->dmatable; |
drive | 197 | drivers/block/triton.c | if (drive->media == ide_tape) |
drive | 198 | drivers/block/triton.c | size = drive->tape.pc->request_transfer; |
drive | 219 | drivers/block/triton.c | printk("%s: DMA table too small\n", drive->name); |
drive | 236 | drivers/block/triton.c | printk("%s: empty DMA table?\n", drive->name); |
drive | 240 | drivers/block/triton.c | static int config_drive_for_dma (ide_drive_t *drive) |
drive | 244 | drivers/block/triton.c | struct hd_driveid *id = drive->id; |
drive | 248 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 255 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 278 | drivers/block/triton.c | static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive) |
drive | 280 | drivers/block/triton.c | unsigned long dma_base = HWIF(drive)->dma_base; |
drive | 288 | drivers/block/triton.c | return config_drive_for_dma (drive); |
drive | 308 | drivers/block/triton.c | if (build_dmatable (drive)) |
drive | 310 | drivers/block/triton.c | outl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */ |
drive | 314 | drivers/block/triton.c | if (drive->media != ide_disk) |
drive | 317 | drivers/block/triton.c | ide_set_handler(drive, &dma_intr, WAIT_CMD); /* issue cmd to drive */ |
drive | 110 | drivers/block/umc8672.c | static void tune_umc (ide_drive_t *drive, byte pio) |
drive | 113 | drivers/block/umc8672.c | pio = ide_get_best_pio_mode(drive); |
drive | 117 | drivers/block/umc8672.c | current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio]; |
drive | 334 | drivers/block/xd.c | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count) |
drive | 341 | drivers/block/xd.c | printk("xd_readwrite: operation = %s, drive = %d, buffer = 0x%X, block = %d, count = %d\n",operation == READ ? "read" : "write",drive,buffer,block,count); |
drive | 344 | drivers/block/xd.c | control = xd_info[drive].control; |
drive | 348 | drivers/block/xd.c | track = block / xd_info[drive].sectors; |
drive | 349 | drivers/block/xd.c | head = track % xd_info[drive].heads; |
drive | 350 | drivers/block/xd.c | cylinder = track / xd_info[drive].heads; |
drive | 351 | drivers/block/xd.c | sector = block % xd_info[drive].sectors; |
drive | 354 | drivers/block/xd.c | printk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp); |
drive | 358 | drivers/block/xd.c | xd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control); |
drive | 363 | drivers/block/xd.c | xd_recalibrate(drive); |
drive | 384 | drivers/block/xd.c | static void xd_recalibrate (u_char drive) |
drive | 388 | drivers/block/xd.c | xd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0); |
drive | 432 | drivers/block/xd.c | static 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) |
drive | 435 | drivers/block/xd.c | cmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F); |
drive | 519 | drivers/block/xd.c | static u_char xd_initdrives (void (*init_drive)(u_char drive)) |
drive | 548 | drivers/block/xd.c | static void xd_dtc_init_drive (u_char drive) |
drive | 552 | drivers/block/xd.c | xd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0); |
drive | 554 | drivers/block/xd.c | xd_info[drive].heads = buf[0x0A]; /* heads */ |
drive | 555 | drivers/block/xd.c | xd_info[drive].cylinders = ((u_short *) (buf))[0x04]; /* cylinders */ |
drive | 556 | drivers/block/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 558 | drivers/block/xd.c | xd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05]; /* reduced write */ |
drive | 559 | drivers/block/xd.c | xd_info[drive].precomp = ((u_short *) (buf + 1))[0x06]; /* write precomp */ |
drive | 560 | drivers/block/xd.c | xd_info[drive].ecc = buf[0x0F]; /* ecc length */ |
drive | 562 | drivers/block/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 564 | drivers/block/xd.c | xd_setparam(CMD_DTCSETPARAM,drive,xd_info[drive].heads,xd_info[drive].cylinders,((u_short *) (buf + 1))[0x05],((u_short *) (buf + 1))[0x06],buf[0x0F]); |
drive | 565 | drivers/block/xd.c | xd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7); |
drive | 567 | drivers/block/xd.c | printk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive); |
drive | 570 | drivers/block/xd.c | printk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive); |
drive | 592 | drivers/block/xd.c | static void xd_wd_init_drive (u_char drive) |
drive | 596 | drivers/block/xd.c | xd_build(cmdblk,CMD_READ,drive,0,0,0,1,0); |
drive | 598 | drivers/block/xd.c | xd_info[drive].heads = buf[0x1AF]; /* heads */ |
drive | 599 | drivers/block/xd.c | xd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6]; /* cylinders */ |
drive | 600 | drivers/block/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 602 | drivers/block/xd.c | xd_info[drive].rwrite = ((u_short *) (buf))[0xD8]; /* reduced write */ |
drive | 603 | drivers/block/xd.c | xd_info[drive].wprecomp = ((u_short *) (buf))[0xDA]; /* write precomp */ |
drive | 604 | drivers/block/xd.c | xd_info[drive].ecc = buf[0x1B4]; /* ecc length */ |
drive | 606 | drivers/block/xd.c | xd_info[drive].control = buf[0x1B5]; /* control byte */ |
drive | 608 | drivers/block/xd.c | xd_setparam(CMD_WDSETPARAM,drive,xd_info[drive].heads,xd_info[drive].cylinders,((u_short *) (buf))[0xD8],((u_short *) (buf))[0xDA],buf[0x1B4]); |
drive | 611 | drivers/block/xd.c | printk("xd_wd_init_drive: error reading geometry for drive %d\n",drive); |
drive | 631 | drivers/block/xd.c | static void xd_seagate_init_drive (u_char drive) |
drive | 635 | drivers/block/xd.c | xd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0); |
drive | 637 | drivers/block/xd.c | xd_info[drive].heads = buf[0x04]; /* heads */ |
drive | 638 | drivers/block/xd.c | xd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03]; /* cylinders */ |
drive | 639 | drivers/block/xd.c | xd_info[drive].sectors = buf[0x05]; /* sectors */ |
drive | 640 | drivers/block/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 643 | drivers/block/xd.c | printk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive); |
drive | 665 | drivers/block/xd.c | static void xd_omti_init_drive (u_char drive) |
drive | 668 | drivers/block/xd.c | xd_override_init_drive(drive); |
drive | 671 | drivers/block/xd.c | xd_info[drive].control = 2; |
drive | 676 | drivers/block/xd.c | static void xd_override_init_drive (u_char drive) |
drive | 684 | drivers/block/xd.c | xd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0); |
drive | 692 | drivers/block/xd.c | xd_info[drive].heads = (u_char) min[0] + 1; |
drive | 693 | drivers/block/xd.c | xd_info[drive].cylinders = (u_short) min[1] + 1; |
drive | 694 | drivers/block/xd.c | xd_info[drive].sectors = (u_char) min[2] + 1; |
drive | 695 | drivers/block/xd.c | xd_info[drive].control = 0; |
drive | 712 | drivers/block/xd.c | static void xd_setparam (u_char command,u_char drive,u_char heads,u_short cylinders,u_short rwrite,u_short wprecomp,u_char ecc) |
drive | 716 | drivers/block/xd.c | xd_build(cmdblk,command,drive,0,0,0,0,0); |
drive | 727 | drivers/block/xd.c | printk("xd_setparam: error setting characteristics for drive %d\n",drive); |
drive | 1102 | drivers/cdrom/mcdx.c | int drive; |
drive | 1113 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) |
drive | 1114 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = NULL; |
drive | 1117 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) { |
drive | 1122 | drivers/cdrom/mcdx.c | mcdx_blocksizes[drive] = 0; |
drive | 1126 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() try drive %d\n", drive)); |
drive | 1145 | drivers/cdrom/mcdx.c | stuffp->irq = irq(mcdx_drive_map[drive]); |
drive | 1146 | drivers/cdrom/mcdx.c | stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); |
drive | 1251 | drivers/cdrom/mcdx.c | stuffp->minor = drive; |
drive | 1257 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = stuffp; |
drive | 1258 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp)); |
drive | 1871 | drivers/scsi/fdomain.c | int drive; |
drive | 1927 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
drive | 1934 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 ); |
drive | 1937 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 ); |
drive | 1940 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 ); |
drive | 1943 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 ); |
drive | 1952 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 ); |
drive | 51 | include/linux/blkdev.h | extern void resetup_one_dev(struct gendisk *dev, int drive); |
drive | 103 | include/linux/xd.h | void (*init_drive)(u_char drive); |
drive | 109 | include/linux/xd.h | static u_char xd_initdrives (void (*init_drive)(u_char drive)); |
drive | 117 | include/linux/xd.h | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count); |
drive | 118 | include/linux/xd.h | static void xd_recalibrate (u_char drive); |
drive | 122 | include/linux/xd.h | static 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); |
drive | 128 | include/linux/xd.h | static void xd_dtc_init_drive (u_char drive); |
drive | 130 | include/linux/xd.h | static void xd_wd_init_drive (u_char drive); |
drive | 132 | include/linux/xd.h | static void xd_seagate_init_drive (u_char drive); |
drive | 134 | include/linux/xd.h | static void xd_omti_init_drive (u_char drive); |
drive | 135 | include/linux/xd.h | static void xd_setparam (u_char command,u_char drive,u_char heads,u_short cylinders,u_short rwrite,u_short wprecomp,u_char ecc); |
drive | 136 | include/linux/xd.h | static void xd_override_init_drive (u_char drive); |