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 | 648 | drivers/block/cmd640.c | static void cmd640_set_mode(ide_drive_t* drive, int pio_mode) { |
drive | 654 | drivers/block/cmd640.c | interface_number = HWIF(drive)->index; |
drive | 655 | drivers/block/cmd640.c | drive_number = drive->select.b.unit; |
drive | 673 | drivers/block/cmd640.c | static void cmd640_tune_drive(ide_drive_t *drive, byte pio_mode) { |
drive | 683 | drivers/block/cmd640.c | cmd640_set_mode(drive, pio_mode); |
drive | 687 | drivers/block/cmd640.c | interface_number = HWIF(drive)->index; |
drive | 688 | drivers/block/cmd640.c | drive_number = drive->select.b.unit; |
drive | 690 | 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 | 224 | drivers/block/floppy.c | #define UDP (&drive_params[drive]) |
drive | 225 | drivers/block/floppy.c | #define UDRS (&drive_state[drive]) |
drive | 226 | drivers/block/floppy.c | #define UDRWE (&write_errors[drive]) |
drive | 227 | drivers/block/floppy.c | #define UFDCS (&fdc_state[FDC(drive)]) |
drive | 576 | drivers/block/floppy.c | static void reschedule_timeout(int drive, const char *message, int marg) |
drive | 578 | drivers/block/floppy.c | if (drive == CURRENTD) |
drive | 579 | drivers/block/floppy.c | drive = current_drive; |
drive | 581 | drivers/block/floppy.c | if (drive < 0 || drive > N_DRIVE) { |
drive | 583 | drivers/block/floppy.c | drive=0; |
drive | 647 | drivers/block/floppy.c | static int disk_change(int drive) |
drive | 649 | drivers/block/floppy.c | int fdc=FDC(drive); |
drive | 653 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive))) || |
drive | 654 | drivers/block/floppy.c | (FDCS->dor & 3) != UNIT(drive) || |
drive | 655 | drivers/block/floppy.c | fdc != FDC(drive)){ |
drive | 657 | drivers/block/floppy.c | DPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive), |
drive | 664 | drivers/block/floppy.c | DPRINT1("checking disk change line for drive %d\n",drive); |
drive | 681 | drivers/block/floppy.c | current_type[drive] != NULL) |
drive | 684 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 704 | drivers/block/floppy.c | register unsigned char drive, unit, newdor,olddor; |
drive | 714 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 720 | drivers/block/floppy.c | disk_change(drive); |
drive | 727 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 751 | drivers/block/floppy.c | int drive; |
drive | 757 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) |
drive | 758 | drivers/block/floppy.c | if (FDC(drive) == fdc && |
drive | 764 | drivers/block/floppy.c | static void set_fdc(int drive) |
drive | 766 | drivers/block/floppy.c | if (drive >= 0 && drive < N_DRIVE){ |
drive | 767 | drivers/block/floppy.c | fdc = FDC(drive); |
drive | 768 | drivers/block/floppy.c | current_drive = drive; |
drive | 783 | drivers/block/floppy.c | static int lock_fdc(int drive, int interruptible) |
drive | 800 | drivers/block/floppy.c | reschedule_timeout(drive, "lock fdc", 0); |
drive | 801 | drivers/block/floppy.c | set_fdc(drive); |
drive | 805 | drivers/block/floppy.c | #define LOCK_FDC(drive,interruptible) \ |
drive | 806 | drivers/block/floppy.c | if (lock_fdc(drive,interruptible)) return -EINTR; |
drive | 847 | drivers/block/floppy.c | static void floppy_off(unsigned int drive) |
drive | 850 | drivers/block/floppy.c | register int fdc=FDC(drive); |
drive | 852 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive)))) |
drive | 855 | drivers/block/floppy.c | del_timer(motor_off_timer+drive); |
drive | 863 | drivers/block/floppy.c | motor_off_timer[drive].expires = jiffies + UDP->spindown - delta; |
drive | 865 | drivers/block/floppy.c | add_timer(motor_off_timer+drive); |
drive | 875 | drivers/block/floppy.c | int i, drive, saved_drive; |
drive | 882 | drivers/block/floppy.c | drive = (saved_drive + i + 1) % N_DRIVE; |
drive | 885 | drivers/block/floppy.c | set_fdc(drive); |
drive | 886 | drivers/block/floppy.c | if (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) & |
drive | 887 | drivers/block/floppy.c | (0x10 << UNIT(drive)))) |
drive | 890 | drivers/block/floppy.c | set_dor(fdc, ~(0x10 << UNIT(drive)), 0); |
drive | 2048 | drivers/block/floppy.c | int drive=DRIVE(device); |
drive | 2050 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2730 | drivers/block/floppy.c | static int user_reset_fdc(int drive, int arg, int interruptible) |
drive | 2735 | drivers/block/floppy.c | LOCK_FDC(drive,interruptible); |
drive | 2774 | drivers/block/floppy.c | static inline const char *drive_name(int type, int drive) |
drive | 2961 | drivers/block/floppy.c | int drive, ret, ret2; |
drive | 2966 | drivers/block/floppy.c | for (drive= 0; drive < N_DRIVE; drive++){ |
drive | 2967 | drivers/block/floppy.c | if (FDC(drive) != fdc) |
drive | 2969 | drivers/block/floppy.c | if (drive == current_drive){ |
drive | 3020 | drivers/block/floppy.c | static inline void clear_write_error(int drive) |
drive | 3026 | drivers/block/floppy.c | int drive, int type, kdev_t device) |
drive | 3041 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3045 | drivers/block/floppy.c | set_bit(drive, &fake_change); |
drive | 3061 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3066 | drivers/block/floppy.c | user_params[drive] = *g; |
drive | 3067 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3068 | drivers/block/floppy.c | SUPBOUND(buffer_max, user_params[drive].sect); |
drive | 3069 | drivers/block/floppy.c | current_type[drive] = &user_params[drive]; |
drive | 3070 | drivers/block/floppy.c | floppy_sizes[drive] = user_params[drive].size >> 1; |
drive | 3080 | drivers/block/floppy.c | if (DRS->maxblock > user_params[drive].sect || DRS->maxtrack) |
drive | 3173 | drivers/block/floppy.c | int i,drive,type; |
drive | 3190 | drivers/block/floppy.c | drive = DRIVE(device); |
drive | 3216 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3217 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 3218 | drivers/block/floppy.c | floppy_sizes[drive] = MAX_DISK_SIZE; |
drive | 3224 | drivers/block/floppy.c | drive, type, device); |
drive | 3229 | drivers/block/floppy.c | outparam = (char *) current_type[drive]; |
drive | 3242 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3257 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3268 | drivers/block/floppy.c | outparam = drive_name(type,drive); |
drive | 3276 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3283 | drivers/block/floppy.c | return user_reset_fdc(drive, (int)param, 1); |
drive | 3296 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3303 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3324 | drivers/block/floppy.c | int drive; |
drive | 3327 | drivers/block/floppy.c | drive=0; |
drive | 3330 | drivers/block/floppy.c | drive=1; |
drive | 3337 | drivers/block/floppy.c | for (drive=0; drive < N_DRIVE; drive++){ |
drive | 3349 | drivers/block/floppy.c | allowed_drive_mask |= 1 << drive; |
drive | 3350 | drivers/block/floppy.c | printk("fd%d is %s", drive, |
drive | 3353 | drivers/block/floppy.c | printk("fd%d is unknown type %d",drive, |
drive | 3364 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3377 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3394 | drivers/block/floppy.c | int drive; |
drive | 3396 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3421 | drivers/block/floppy.c | int drive; |
drive | 3431 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3432 | drivers/block/floppy.c | if (drive >= N_DRIVE || |
drive | 3433 | drivers/block/floppy.c | !(allowed_drive_mask & (1 << drive)) || |
drive | 3434 | drivers/block/floppy.c | fdc_state[FDC(drive)].version == FDC_NONE) |
drive | 3489 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3522 | drivers/block/floppy.c | int drive = DRIVE(dev); |
drive | 3533 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3540 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3541 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
drive | 3552 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
drive | 3554 | drivers/block/floppy.c | int drive=DRIVE(dev); |
drive | 3559 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3561 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3563 | drivers/block/floppy.c | if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){ |
drive | 3569 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3571 | drivers/block/floppy.c | clear_bit(drive, &fake_change); |
drive | 3834 | drivers/block/floppy.c | int i,unit,drive; |
drive | 3876 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) { |
drive | 3971 | drivers/block/floppy.c | int drive; |
drive | 4004 | drivers/block/floppy.c | for (drive=0; drive < N_FDC * 4; drive++) |
drive | 4005 | drivers/block/floppy.c | if (motor_off_timer[drive].next) |
drive | 4006 | drivers/block/floppy.c | printk("motor off timer %d still active\n", drive); |
drive | 538 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
drive | 541 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
drive | 561 | drivers/block/genhd.c | int i, drive; |
drive | 570 | drivers/block/genhd.c | for (drive = 0 ; drive < dev->nr_real ; drive++) { |
drive | 571 | 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 | 126 | drivers/block/ht6560b.c | static void ht6560b_selectproc (ide_drive_t *drive) |
drive | 132 | drivers/block/ht6560b.c | byte select = ht6560b_selects[HWIF(drive)->index][drive->select.b.unit]; |
drive | 133 | drivers/block/ht6560b.c | byte timing = ht6560b_timings[HWIF(drive)->index][drive->select.b.unit]; |
drive | 194 | drivers/block/ht6560b.c | static void tune_ht6560b (ide_drive_t *drive, byte pio) |
drive | 199 | drivers/block/ht6560b.c | if (drive->media != ide_disk) |
drive | 202 | drivers/block/ht6560b.c | pio = ide_get_best_pio_mode (drive); |
drive | 206 | drivers/block/ht6560b.c | unit = drive->select.b.unit; |
drive | 207 | drivers/block/ht6560b.c | hwif = HWIF(drive)->index; |
drive | 213 | drivers/block/ide-cd.c | #define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect)) |
drive | 225 | drivers/block/ide-cd.c | #define CDROM_STATE_FLAGS(drive) ((struct ide_cd_state_flags *)&((drive)->bios_head)) |
drive | 243 | drivers/block/ide-cd.c | void cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 246 | drivers/block/ide-cd.c | ide_input_data (drive, buffer, bytecount / 4); |
drive | 255 | drivers/block/ide-cd.c | void cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 258 | drivers/block/ide-cd.c | ide_output_data (drive, buffer, bytecount / 4); |
drive | 415 | drivers/block/ide-cd.c | void cdrom_analyze_sense_data (ide_drive_t *drive, |
drive | 433 | drivers/block/ide-cd.c | printk ("ATAPI device %s:\n", drive->name); |
drive | 520 | drivers/block/ide-cd.c | drive->name, |
drive | 541 | drivers/block/ide-cd.c | static void cdrom_queue_request_sense (ide_drive_t *drive, |
drive | 553 | drivers/block/ide-cd.c | reqbuf = &drive->cdrom_info.sense_data; |
drive | 557 | drivers/block/ide-cd.c | pc = &HWIF(drive)->request_sense_pc; |
drive | 575 | drivers/block/ide-cd.c | rq = &HWIF(drive)->request_sense_request; |
drive | 580 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 584 | drivers/block/ide-cd.c | static void cdrom_end_request (int uptodate, ide_drive_t *drive) |
drive | 586 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 600 | drivers/block/ide-cd.c | cdrom_analyze_sense_data (drive, |
drive | 605 | drivers/block/ide-cd.c | ide_end_request (uptodate, HWGROUP(drive)); |
drive | 611 | drivers/block/ide-cd.c | static void cdrom_saw_media_change (ide_drive_t *drive) |
drive | 613 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 1; |
drive | 614 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 615 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 621 | drivers/block/ide-cd.c | static int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret) |
drive | 623 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 638 | drivers/block/ide-cd.c | printk ("%s : missing request in cdrom_decode_status\n", drive->name); |
drive | 651 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 652 | drivers/block/ide-cd.c | ide_error (drive, "request sense failure", stat); |
drive | 666 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 674 | drivers/block/ide-cd.c | printk ("%s : tray open or drive not ready\n", drive->name); |
drive | 680 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 681 | drivers/block/ide-cd.c | printk ("%s: media changed\n", drive->name); |
drive | 687 | drivers/block/ide-cd.c | ide_dump_status (drive, "packet command error", stat); |
drive | 705 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 708 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, sem, pc->sense_data, pc); |
drive | 718 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 721 | drivers/block/ide-cd.c | printk ("%s : tray open\n", drive->name); |
drive | 722 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 728 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 734 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 741 | drivers/block/ide-cd.c | ide_dump_status (drive, "command error", stat); |
drive | 742 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 748 | drivers/block/ide-cd.c | ide_error (drive, "cdrom_decode_status", stat); |
drive | 755 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 761 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, NULL, NULL, NULL); |
drive | 777 | drivers/block/ide-cd.c | static int cdrom_start_packet_command (ide_drive_t *drive, int xferlen, |
drive | 781 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1; |
drive | 790 | drivers/block/ide-cd.c | OUT_BYTE (drive->ctl, IDE_CONTROL_REG); |
drive | 792 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 794 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 800 | drivers/block/ide-cd.c | (*handler) (drive); |
drive | 812 | drivers/block/ide-cd.c | static int cdrom_transfer_packet_command (ide_drive_t *drive, |
drive | 816 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 823 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1; |
drive | 828 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1; |
drive | 832 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 835 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, cmd_buf, cmd_len); |
drive | 853 | drivers/block/ide-cd.c | static void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector, |
drive | 856 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 885 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dest, SECTOR_SIZE); |
drive | 896 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 908 | drivers/block/ide-cd.c | int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) |
drive | 918 | drivers/block/ide-cd.c | drive->name); |
drive | 925 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 934 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 937 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 945 | drivers/block/ide-cd.c | static void cdrom_read_intr (ide_drive_t *drive) |
drive | 950 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 953 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 967 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 968 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 971 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 977 | drivers/block/ide-cd.c | if (cdrom_read_check_ireason (drive, len, ireason)) return; |
drive | 984 | drivers/block/ide-cd.c | drive->name, len); |
drive | 986 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1001 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 1017 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1023 | drivers/block/ide-cd.c | cdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer); |
drive | 1037 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE); |
drive | 1050 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_read_intr, WAIT_CMD); |
drive | 1058 | drivers/block/ide-cd.c | static int cdrom_read_from_buffer (ide_drive_t *drive) |
drive | 1060 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 1061 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1073 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1088 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1094 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1104 | drivers/block/ide-cd.c | drive->name, rq->sector); |
drive | 1105 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1120 | drivers/block/ide-cd.c | static void cdrom_start_read_continuation (ide_drive_t *drive) |
drive | 1123 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1146 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 1147 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1176 | drivers/block/ide-cd.c | (void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c), |
drive | 1184 | drivers/block/ide-cd.c | static void cdrom_start_read (ide_drive_t *drive, unsigned int block) |
drive | 1186 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1202 | drivers/block/ide-cd.c | if (cdrom_read_from_buffer (drive)) |
drive | 1206 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 1209 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation); |
drive | 1221 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1227 | drivers/block/ide-cd.c | static void cdrom_pc_intr (ide_drive_t *drive) |
drive | 1230 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1234 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 1254 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1258 | drivers/block/ide-cd.c | drive->name, pc->buflen); |
drive | 1260 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1277 | drivers/block/ide-cd.c | drive->name); |
drive | 1283 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, pc->buffer, thislen); |
drive | 1290 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 1306 | drivers/block/ide-cd.c | drive->name); |
drive | 1312 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, pc->buffer, thislen); |
drive | 1319 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, &dum, sizeof (dum)); |
drive | 1331 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 1336 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD); |
drive | 1340 | drivers/block/ide-cd.c | static void cdrom_do_pc_continuation (ide_drive_t *drive) |
drive | 1342 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1346 | drivers/block/ide-cd.c | cdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr); |
drive | 1350 | drivers/block/ide-cd.c | static void cdrom_do_packet_command (ide_drive_t *drive) |
drive | 1353 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1362 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, len, cdrom_do_pc_continuation); |
drive | 1377 | drivers/block/ide-cd.c | int cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc) |
drive | 1394 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 1434 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->door_locked == 0 && |
drive | 1439 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, NULL); |
drive | 1455 | drivers/block/ide-cd.c | void cdrom_do_drive_cmd (ide_drive_t *drive) |
drive | 1457 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1474 | drivers/block/ide-cd.c | drive->name, args[0], args[1], args[2]); |
drive | 1479 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1488 | drivers/block/ide-cd.c | void ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block) |
drive | 1490 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1493 | drivers/block/ide-cd.c | cdrom_do_packet_command (drive); |
drive | 1497 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1498 | drivers/block/ide-cd.c | ide_do_reset (drive); |
drive | 1503 | drivers/block/ide-cd.c | cdrom_do_drive_cmd (drive); |
drive | 1508 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1511 | drivers/block/ide-cd.c | cdrom_start_read (drive, block); |
drive | 1562 | drivers/block/ide-cd.c | cdrom_check_status (ide_drive_t *drive, |
drive | 1572 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1578 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1589 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_doorlock) |
drive | 1598 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1602 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1609 | drivers/block/ide-cd.c | printk ("%s: door locking not supported\n", drive->name); |
drive | 1610 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1; |
drive | 1612 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1622 | drivers/block/ide-cd.c | cdrom_eject (ide_drive_t *drive, int ejectflag, |
drive | 1632 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1637 | drivers/block/ide-cd.c | cdrom_pause (ide_drive_t *drive, int pauseflag, |
drive | 1647 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1652 | drivers/block/ide-cd.c | cdrom_startstop (ide_drive_t *drive, int startflag, |
drive | 1663 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1668 | drivers/block/ide-cd.c | cdrom_read_capacity (ide_drive_t *drive, unsigned *capacity, |
drive | 1686 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1697 | drivers/block/ide-cd.c | cdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag, |
drive | 1714 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1720 | drivers/block/ide-cd.c | cdrom_read_toc (ide_drive_t *drive, |
drive | 1725 | drivers/block/ide-cd.c | struct atapi_toc *toc = drive->cdrom_info.toc; |
drive | 1736 | drivers/block/ide-cd.c | drive->cdrom_info.toc = toc; |
drive | 1741 | drivers/block/ide-cd.c | printk ("%s: No cdrom TOC buffer!\n", drive->name); |
drive | 1747 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) |
drive | 1748 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 1750 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) return 0; |
drive | 1756 | drivers/block/ide-cd.c | msf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc); |
drive | 1760 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1767 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1780 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1788 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1801 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1818 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 1, |
drive | 1834 | drivers/block/ide-cd.c | stat = cdrom_read_capacity (drive, &toc->capacity, reqbuf); |
drive | 1837 | drivers/block/ide-cd.c | HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] |
drive | 1839 | drivers/block/ide-cd.c | drive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME; |
drive | 1842 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 1; |
drive | 1849 | drivers/block/ide-cd.c | cdrom_read_subchannel (ide_drive_t *drive, |
drive | 1865 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1871 | drivers/block/ide-cd.c | cdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag, |
drive | 1886 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1891 | drivers/block/ide-cd.c | cdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen, |
drive | 1906 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1911 | drivers/block/ide-cd.c | cdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1928 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1934 | drivers/block/ide-cd.c | cdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1946 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd) |
drive | 1956 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1962 | drivers/block/ide-cd.c | cdrom_play_lba_range_1 (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1977 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_playaudio12) |
drive | 1978 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 1988 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf); |
drive | 1998 | drivers/block/ide-cd.c | "trying PLAYAUDIO_MSF\n", drive->name); |
drive | 1999 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2000 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 2001 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 2014 | drivers/block/ide-cd.c | cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 2029 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_1 (drive, lba_start, lba_end, reqbuf); |
drive | 2044 | drivers/block/ide-cd.c | int cdrom_get_toc_entry (ide_drive_t *drive, int track, |
drive | 2052 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, reqbuf); |
drive | 2055 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2072 | drivers/block/ide-cd.c | cdrom_read_block (ide_drive_t *drive, int format, int lba, |
drive | 2090 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->old_readcd) |
drive | 2105 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2111 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd == 0) |
drive | 2114 | drivers/block/ide-cd.c | drive->name); |
drive | 2115 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 1; |
drive | 2116 | drivers/block/ide-cd.c | return cdrom_read_block (drive, format, lba, buf, buflen, reqbuf); |
drive | 2124 | drivers/block/ide-cd.c | int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode, |
drive | 2133 | drivers/block/ide-cd.c | if (drive->usage > 1) |
drive | 2136 | drivers/block/ide-cd.c | stat = cdrom_lockdoor (drive, 0, NULL); |
drive | 2139 | drivers/block/ide-cd.c | return cdrom_eject (drive, 0, NULL); |
drive | 2144 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close = arg; |
drive | 2149 | drivers/block/ide-cd.c | return cdrom_pause (drive, 1, NULL); |
drive | 2152 | drivers/block/ide-cd.c | return cdrom_pause (drive, 0, NULL); |
drive | 2155 | drivers/block/ide-cd.c | return cdrom_startstop (drive, 1, NULL); |
drive | 2161 | drivers/block/ide-cd.c | stat = cdrom_startstop (drive, 0, NULL); |
drive | 2164 | drivers/block/ide-cd.c | return cdrom_eject (drive, 1, NULL); |
drive | 2184 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2200 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL); |
drive | 2202 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL); |
drive | 2211 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2224 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2227 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2249 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL); |
drive | 2284 | drivers/block/ide-cd.c | stat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf), |
drive | 2289 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 2343 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL); |
drive | 2345 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 1, mask , sizeof (buffer),NULL); |
drive | 2355 | drivers/block/ide-cd.c | return cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL); |
drive | 2367 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL); |
drive | 2394 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2397 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2427 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2430 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2461 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, 1, lba, buf, |
drive | 2502 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2505 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2510 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL); |
drive | 2523 | drivers/block/ide-cd.c | return ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 2562 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2584 | drivers/block/ide-cd.c | int ide_cdrom_check_media_change (ide_drive_t *drive) |
drive | 2588 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 2590 | drivers/block/ide-cd.c | retval = CDROM_STATE_FLAGS (drive)->media_changed; |
drive | 2591 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2597 | drivers/block/ide-cd.c | int ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive) |
drive | 2602 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2607 | drivers/block/ide-cd.c | if (drive->usage == 1) |
drive | 2614 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2619 | drivers/block/ide-cd.c | cdrom_eject (drive, 1, &my_reqbuf); |
drive | 2620 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2626 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2631 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, &my_reqbuf); |
drive | 2634 | drivers/block/ide-cd.c | (void) cdrom_read_toc (drive, &my_reqbuf); |
drive | 2645 | drivers/block/ide-cd.c | void ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive) |
drive | 2647 | drivers/block/ide-cd.c | if (drive->usage == 0) |
drive | 2652 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 0, NULL); |
drive | 2655 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->eject_on_close) |
drive | 2656 | drivers/block/ide-cd.c | (void) cdrom_eject (drive, 0, NULL); |
drive | 2666 | drivers/block/ide-cd.c | void ide_cdrom_setup (ide_drive_t *drive) |
drive | 2668 | drivers/block/ide-cd.c | blksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE; |
drive | 2670 | drivers/block/ide-cd.c | drive->special.all = 0; |
drive | 2671 | drivers/block/ide-cd.c | drive->ready_stat = 0; |
drive | 2673 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2674 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 2675 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = 0; |
drive | 2678 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close= 0; |
drive | 2681 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1; |
drive | 2683 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 0; |
drive | 2686 | drivers/block/ide-cd.c | if (drive->id != NULL) { |
drive | 2687 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->drq_interrupt = |
drive | 2688 | drivers/block/ide-cd.c | ((drive->id->config & 0x0060) == 0x20); |
drive | 2690 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->drq_interrupt = 0; |
drive | 2694 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0; |
drive | 2695 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 0; |
drive | 2696 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0; |
drive | 2697 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0; |
drive | 2698 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0; |
drive | 2700 | drivers/block/ide-cd.c | if (drive->id != NULL) { |
drive | 2702 | drivers/block/ide-cd.c | if (strcmp (drive->id->model, "CD220E") == 0 || |
drive | 2703 | drivers/block/ide-cd.c | strcmp (drive->id->model, "CD") == 0) /* Creative Labs */ |
drive | 2704 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2706 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 || /* Acer CD525E */ |
drive | 2707 | drivers/block/ide-cd.c | strcmp (drive->id->model, "OTI-SCYLLA") == 0) |
drive | 2708 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2712 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "DCI-2S10") == 0) |
drive | 2713 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2715 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */ |
drive | 2717 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2720 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2727 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V003S0DS") == 0) |
drive | 2729 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1; |
drive | 2730 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 2731 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2733 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "0V300SSD") == 0 || |
drive | 2734 | drivers/block/ide-cd.c | strcmp (drive->id->model, "V003M0DP") == 0) |
drive | 2735 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2738 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V004E0DT") == 0 || |
drive | 2739 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V400ETD") == 0) |
drive | 2740 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2742 | drivers/block/ide-cd.c | else if ( strcmp (drive->id->model, "CD-ROM CDU55D") == 0) /*sony cdu55d */ |
drive | 2743 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2745 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "CD-ROM CDU55E") == 0) |
drive | 2746 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2750 | drivers/block/ide-cd.c | drive->cdrom_info.toc = NULL; |
drive | 2751 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffer = NULL; |
drive | 2752 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffered = 0; |
drive | 2753 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 456 | drivers/block/ide-tape.c | #define IDETAPE_DATA_REG (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET) |
drive | 457 | drivers/block/ide-tape.c | #define IDETAPE_ERROR_REG (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET) |
drive | 458 | drivers/block/ide-tape.c | #define IDETAPE_IREASON_REG (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET) |
drive | 459 | drivers/block/ide-tape.c | #define IDETAPE_RESERVED3_REG (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET) |
drive | 460 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTL_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET) |
drive | 461 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTH_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET) |
drive | 462 | drivers/block/ide-tape.c | #define IDETAPE_DRIVESEL_REG (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET) |
drive | 463 | drivers/block/ide-tape.c | #define IDETAPE_STATUS_REG (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET) |
drive | 470 | drivers/block/ide-tape.c | #define IDETAPE_FEATURES_REG (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET) |
drive | 471 | drivers/block/ide-tape.c | #define IDETAPE_ATACOMMAND_REG (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET) |
drive | 472 | drivers/block/ide-tape.c | #define IDETAPE_CONTROL_REG (HWIF(drive)->ctl_port) |
drive | 593 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 810 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 811 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 812 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount); |
drive | 818 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler); |
drive | 819 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive); |
drive | 825 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive); |
drive | 828 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive); |
drive | 829 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive); |
drive | 835 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive); |
drive | 836 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive); |
drive | 838 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq); |
drive | 839 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result); |
drive | 841 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive); |
drive | 842 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive); |
drive | 849 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive); |
drive | 858 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive); |
drive | 860 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive); |
drive | 862 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive); |
drive | 865 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive); |
drive | 890 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 897 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 905 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 912 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 920 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer); |
drive | 927 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc); |
drive | 929 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block); |
drive | 930 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive); |
drive | 931 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive); |
drive | 937 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive); |
drive | 952 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive); |
drive | 956 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive); |
drive | 957 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage); |
drive | 958 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive); |
drive | 959 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive); |
drive | 960 | drivers/block/ide-tape.c | void idetape_wait_for_pipeline (ide_drive_t *drive); |
drive | 961 | drivers/block/ide-tape.c | void idetape_discard_read_pipeline (ide_drive_t *drive); |
drive | 962 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive); |
drive | 963 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive); |
drive | 1018 | drivers/block/ide-tape.c | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id) |
drive | 1161 | drivers/block/ide-tape.c | idetape_chrdev.drive=drive; |
drive | 1185 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 1190 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 1200 | drivers/block/ide-tape.c | drive->name,idetape_chrdev.name,major); |
drive | 1218 | drivers/block/ide-tape.c | void idetape_setup (ide_drive_t *drive) |
drive | 1221 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1229 | drivers/block/ide-tape.c | drive->ready_stat = 0; /* With an ATAPI device, we can issue packet commands */ |
drive | 1231 | drivers/block/ide-tape.c | HWIF(drive)->tape_drive=drive; |
drive | 1255 | drivers/block/ide-tape.c | idetape_get_mode_sense_results (drive); |
drive | 1342 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive) |
drive | 1346 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1355 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 1452 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler) |
drive | 1460 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 1482 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1493 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 1515 | drivers/block/ide-tape.c | drive->using_dma=0; |
drive | 1518 | drivers/block/ide-tape.c | if (pc->request_transfer && pc->dma_recommended && drive->using_dma) { |
drive | 1519 | drivers/block/ide-tape.c | dma_ok=!(HWIF(drive)->dmaproc(pc->writing ? ide_dma_write : ide_dma_read, drive)); |
drive | 1526 | drivers/block/ide-tape.c | OUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG); |
drive | 1528 | drivers/block/ide-tape.c | ide_set_handler (drive,handler,WAIT_CMD); /* Set the interrupt routine */ |
drive | 1530 | 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 | 1547 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1551 | drivers/block/ide-tape.c | ide_output_data (drive,pc->c,12/4); /* Send the actual packet */ |
drive | 1555 | drivers/block/ide-tape.c | (void) (HWIF(drive)->dmaproc(ide_dma_begin, drive)); |
drive | 1570 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive) |
drive | 1573 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1582 | drivers/block/ide-tape.c | if ((pc->dma_error=HWIF(drive)->dmaproc(ide_dma_status_bad, drive))) |
drive | 1587 | drivers/block/ide-tape.c | pc->actually_transferred=HWIF(drive)->dmaproc(ide_dma_transferred, drive); |
drive | 1590 | drivers/block/ide-tape.c | (void) (HWIF(drive)->dmaproc(ide_dma_abort, drive)); /* End DMA */ |
drive | 1618 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1622 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1626 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 1632 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to handle other requests */ |
drive | 1642 | drivers/block/ide-tape.c | (*pc->callback)(drive); /* Command finished - Call the callback function */ |
drive | 1650 | drivers/block/ide-tape.c | drive->using_dma=0; |
drive | 1651 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1661 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1667 | drivers/block/ide-tape.c | ide_do_reset (drive); |
drive | 1677 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1678 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1691 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1692 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1700 | drivers/block/ide-tape.c | idetape_output_data (drive,pc->current_position,bcount.all); /* Write the current buffer */ |
drive | 1702 | drivers/block/ide-tape.c | idetape_input_data (drive,pc->current_position,bcount.all); /* Read the current buffer */ |
drive | 1709 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); /* And set the interrupt handler again */ |
drive | 1718 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive) |
drive | 1721 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1735 | drivers/block/ide-tape.c | tape->dsc_timer.data=(unsigned long) drive; |
drive | 1743 | drivers/block/ide-tape.c | tape->postponed_rq = rq = HWGROUP(drive)->rq; |
drive | 1746 | drivers/block/ide-tape.c | HWGROUP(drive)->rq = NULL; |
drive | 1769 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1770 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1774 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc_direct called\n",drive->name); |
drive | 1777 | drivers/block/ide-tape.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 1783 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); /* request in the request queue */ |
drive | 1791 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1824 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1825 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 1826 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1832 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc called\n",drive->name); |
drive | 1857 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1921 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1971 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1990 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 2011 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive) |
drive | 2014 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 2025 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next); |
drive | 2039 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive) |
drive | 2042 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2055 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 2056 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 2067 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 2072 | drivers/block/ide-tape.c | printk ("ide-tape: %s: DSC timeout.\n",drive->name); |
drive | 2081 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 2093 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive) |
drive | 2101 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 2102 | drivers/block/ide-tape.c | new_rq=idetape_next_rq_storage (drive); |
drive | 2107 | drivers/block/ide-tape.c | idetape_queue_pc_head (drive,pc,new_rq); |
drive | 2114 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive) |
drive | 2120 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2121 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2130 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2133 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2139 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive) |
drive | 2142 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2143 | drivers/block/ide-tape.c | struct request *rq=HWGROUP(drive)->rq; |
drive | 2154 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2162 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2167 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive) |
drive | 2170 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2171 | drivers/block/ide-tape.c | struct request *rq=HWGROUP(drive)->rq; |
drive | 2182 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2185 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2190 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive) |
drive | 2195 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2198 | drivers/block/ide-tape.c | idetape_pc_callback (drive); |
drive | 2209 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2218 | drivers/block/ide-tape.c | ide_input_data (drive,buffer,wcount); |
drive | 2230 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2239 | drivers/block/ide-tape.c | ide_output_data (drive,buffer,wcount); |
drive | 2252 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount) |
drive | 2380 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive) |
drive | 2383 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2392 | drivers/block/ide-tape.c | idetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer); |
drive | 2393 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2397 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2408 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result) |
drive | 2411 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2740 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive) |
drive | 2747 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2753 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2767 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2775 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2780 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2793 | drivers/block/ide-tape.c | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 2822 | drivers/block/ide-tape.c | ide_drive_t *drive = hwgroup->drive; |
drive | 2824 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 2825 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 2856 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 2861 | drivers/block/ide-tape.c | idetape_increase_max_pipeline_stages (drive); |
drive | 2862 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2866 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 2876 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end); |
drive | 2878 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next); |
drive | 2881 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2888 | drivers/block/ide-tape.c | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 2891 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2893 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 2916 | drivers/block/ide-tape.c | ide_end_request (0,HWGROUP (drive)); /* Let the common code handle it */ |
drive | 2946 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr); |
drive | 2956 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2965 | drivers/block/ide-tape.c | idetape_media_access_finished (drive); |
drive | 2998 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3002 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 3011 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3020 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3024 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 3033 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3050 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 3055 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 3060 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 3086 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc) |
drive | 3093 | drivers/block/ide-tape.c | return ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3116 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq) |
drive | 3119 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 3122 | drivers/block/ide-tape.c | bdev->current_request=HWGROUP (drive)->rq; /* Since we may have taken it out */ |
drive | 3127 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 3159 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer) |
drive | 3162 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3180 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3190 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3193 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3209 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3213 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3215 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3218 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3228 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer)); |
drive | 3241 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3263 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3266 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3276 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3290 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3299 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer)); |
drive | 3314 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3327 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3337 | drivers/block/ide-tape.c | void idetape_discard_read_pipeline (ide_drive_t *drive) |
drive | 3340 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3363 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3377 | drivers/block/ide-tape.c | void idetape_wait_for_pipeline (ide_drive_t *drive) |
drive | 3380 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3384 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3398 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive) |
drive | 3401 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3421 | drivers/block/ide-tape.c | (void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer); |
drive | 3425 | drivers/block/ide-tape.c | idetape_wait_for_pipeline (drive); |
drive | 3522 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive) |
drive | 3527 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3549 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive) |
drive | 3554 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3572 | drivers/block/ide-tape.c | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3575 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3595 | drivers/block/ide-tape.c | void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3598 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3639 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3640 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3650 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3651 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3660 | drivers/block/ide-tape.c | bytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer); |
drive | 3684 | drivers/block/ide-tape.c | bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3692 | drivers/block/ide-tape.c | bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3707 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3708 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3718 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3726 | drivers/block/ide-tape.c | retval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer); |
drive | 3750 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3759 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer); |
drive | 3807 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3808 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3820 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3821 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3825 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3836 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count)); |
drive | 3845 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3853 | drivers/block/ide-tape.c | return (idetape_blkdev_ioctl (drive,inode,file,cmd,arg)); |
drive | 3910 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 3913 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3936 | drivers/block/ide-tape.c | return (idetape_space_over_filemarks (drive,mt_op,mt_count)); |
drive | 3946 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 3952 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3957 | drivers/block/ide-tape.c | return (idetape_rewind_tape (drive)); |
drive | 3960 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3962 | drivers/block/ide-tape.c | return (idetape_flush_tape_buffers (drive)); |
drive | 3965 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3968 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3970 | drivers/block/ide-tape.c | retval=idetape_rewind_tape (drive); |
drive | 3973 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3975 | drivers/block/ide-tape.c | return (idetape_position_tape (drive,mt_count)); |
drive | 3992 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 3995 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4027 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4032 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4034 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 4049 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4053 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTFSF,mt_count-count); |
drive | 4055 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTBSF,1)); |
drive | 4060 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4064 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTBSF,mt_count+count); |
drive | 4066 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTFSF,1)); |
drive | 4080 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 4081 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4125 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) { |
drive | 4142 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 4143 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4153 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 4155 | drivers/block/ide-tape.c | if (idetape_queue_pc_tail (drive,&pc)) |
drive | 4161 | drivers/block/ide-tape.c | idetape_discard_read_pipeline (drive); |
drive | 4163 | drivers/block/ide-tape.c | idetape_wait_for_pipeline (drive); |
drive | 4167 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) |
drive | 4196 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block) |
drive | 4203 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4210 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4219 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive) |
drive | 4229 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4236 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4239 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive) |
drive | 4245 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4266 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive) |
drive | 4269 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4438 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive) |
drive | 4441 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4466 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage) |
drive | 4469 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4493 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive) |
drive | 4496 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4532 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive) |
drive | 4535 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4541 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 4542 | drivers/block/ide-tape.c | (void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end)); |
drive | 4551 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive) |
drive | 4554 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 280 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive) |
drive | 284 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) |
drive | 343 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 345 | drivers/block/ide.c | drive->select.all = (unit<<4)|0xa0; |
drive | 346 | drivers/block/ide.c | drive->hwif = hwif; |
drive | 347 | drivers/block/ide.c | drive->ctl = 0x08; |
drive | 348 | drivers/block/ide.c | drive->ready_stat = READY_STAT; |
drive | 349 | drivers/block/ide.c | drive->bad_wstat = BAD_W_STAT; |
drive | 350 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 351 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 352 | drivers/block/ide.c | drive->name[0] = 'h'; |
drive | 353 | drivers/block/ide.c | drive->name[1] = 'd'; |
drive | 354 | drivers/block/ide.c | drive->name[2] = 'a' + (h * MAX_DRIVES) + unit; |
drive | 377 | drivers/block/ide.c | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 379 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 381 | drivers/block/ide.c | byte io_32bit = drive->io_32bit; |
drive | 389 | drivers/block/ide.c | if (drive->unmask) |
drive | 401 | drivers/block/ide.c | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 403 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 405 | drivers/block/ide.c | byte io_32bit = drive->io_32bit; |
drive | 413 | drivers/block/ide.c | if (drive->unmask) |
drive | 429 | drivers/block/ide.c | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout) |
drive | 431 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 435 | drivers/block/ide.c | drive->name, hwgroup->handler, handler); |
drive | 473 | drivers/block/ide.c | static unsigned long current_capacity (ide_drive_t *drive) |
drive | 475 | drivers/block/ide.c | struct hd_driveid *id = drive->id; |
drive | 476 | drivers/block/ide.c | unsigned long capacity = drive->cyl * drive->head * drive->sect; |
drive | 478 | drivers/block/ide.c | if (!drive->present) |
drive | 480 | drivers/block/ide.c | if (drive->media != ide_disk) |
drive | 482 | drivers/block/ide.c | drive->select.b.lba = 0; |
drive | 487 | drivers/block/ide.c | drive->select.b.lba = 1; |
drive | 490 | drivers/block/ide.c | return (capacity - drive->sect0); |
drive | 503 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 505 | drivers/block/ide.c | if (drive->present && drive->media == ide_cdrom) |
drive | 506 | drivers/block/ide.c | ide_cdrom_setup(drive); |
drive | 509 | drivers/block/ide.c | if (drive->present && drive->media == ide_tape) |
drive | 510 | drivers/block/ide.c | idetape_setup(drive); |
drive | 512 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 513 | drivers/block/ide.c | if (!drive->present || drive->media != ide_disk) { |
drive | 514 | drivers/block/ide.c | drive->part[0].start_sect = -1; /* skip partition check */ |
drive | 573 | drivers/block/ide.c | static void atapi_reset_pollfunc (ide_drive_t *drive) |
drive | 575 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 578 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 582 | drivers/block/ide.c | printk("%s: ATAPI reset complete\n", drive->name); |
drive | 585 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 589 | drivers/block/ide.c | printk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat); |
drive | 590 | drivers/block/ide.c | do_reset1 (drive, 1); /* do it the old fashioned way */ |
drive | 602 | drivers/block/ide.c | static void reset_pollfunc (ide_drive_t *drive) |
drive | 604 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 605 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 610 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 660 | drivers/block/ide.c | static void do_reset1 (ide_drive_t *drive, int do_not_try_atapi) |
drive | 664 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 665 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 672 | drivers/block/ide.c | if (drive->media != ide_disk) { |
drive | 674 | drivers/block/ide.c | if (!drive->keep_settings) |
drive | 675 | drivers/block/ide.c | drive->unmask = 0; |
drive | 676 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 680 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 716 | drivers/block/ide.c | OUT_BYTE(drive->ctl|6,IDE_CONTROL_REG); /* set SRST and nIEN */ |
drive | 718 | drivers/block/ide.c | OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG); /* clear SRST, leave nIEN */ |
drive | 720 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 729 | drivers/block/ide.c | void ide_do_reset (ide_drive_t *drive) |
drive | 731 | drivers/block/ide.c | do_reset1 (drive, 0); |
drive | 733 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 734 | drivers/block/ide.c | drive->tape.reset_issued=1; |
drive | 741 | drivers/block/ide.c | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err) |
drive | 744 | drivers/block/ide.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 758 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 768 | drivers/block/ide.c | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat) |
drive | 775 | drivers/block/ide.c | printk("%s: %s: status=0x%02x", drive->name, msg, stat); |
drive | 777 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 796 | drivers/block/ide.c | printk("%s: %s: error=0x%02x", drive->name, msg, err); |
drive | 798 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 822 | drivers/block/ide.c | if (HWGROUP(drive)->rq) |
drive | 823 | drivers/block/ide.c | printk(", sector=%ld", HWGROUP(drive)->rq->sector); |
drive | 840 | drivers/block/ide.c | static void try_to_flush_leftover_data (ide_drive_t *drive) |
drive | 842 | drivers/block/ide.c | int i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS; |
drive | 848 | drivers/block/ide.c | ide_input_data (drive, buffer, wcount); |
drive | 855 | drivers/block/ide.c | void ide_error (ide_drive_t *drive, const char *msg, byte stat) |
drive | 860 | drivers/block/ide.c | err = ide_dump_status(drive, msg, stat); |
drive | 861 | drivers/block/ide.c | if ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL) |
drive | 864 | drivers/block/ide.c | if (rq->cmd == IDE_DRIVE_CMD || (rq->cmd != READ && rq->cmd != WRITE && drive->media == ide_disk)) |
drive | 867 | drivers/block/ide.c | ide_end_drive_cmd(drive, stat, err); |
drive | 873 | drivers/block/ide.c | if (drive->media == ide_disk && (stat & ERR_STAT)) { |
drive | 881 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 888 | drivers/block/ide.c | if (drive->media == ide_tape) { |
drive | 890 | drivers/block/ide.c | idetape_end_request(0, HWGROUP(drive)); |
drive | 894 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 899 | drivers/block/ide.c | ide_do_reset(drive); |
drive | 902 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 910 | drivers/block/ide.c | static void read_intr (ide_drive_t *drive) |
drive | 918 | drivers/block/ide.c | ide_error(drive, "read_intr", stat); |
drive | 921 | drivers/block/ide.c | msect = drive->mult_count; |
drive | 923 | drivers/block/ide.c | rq = HWGROUP(drive)->rq; |
drive | 930 | drivers/block/ide.c | ide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS); |
drive | 933 | drivers/block/ide.c | drive->name, rq->sector, rq->sector+nsect-1, |
drive | 941 | drivers/block/ide.c | ide_end_request(1, HWGROUP(drive)); |
drive | 945 | drivers/block/ide.c | ide_set_handler (drive, &read_intr, WAIT_CMD); |
drive | 952 | drivers/block/ide.c | static void write_intr (ide_drive_t *drive) |
drive | 956 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 959 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 962 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 974 | drivers/block/ide.c | ide_output_data (drive, rq->buffer, SECTOR_WORDS); |
drive | 975 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 980 | drivers/block/ide.c | ide_error(drive, "write_intr", stat); |
drive | 987 | drivers/block/ide.c | static void multwrite (ide_drive_t *drive) |
drive | 989 | drivers/block/ide.c | struct request *rq = &HWGROUP(drive)->wrq; |
drive | 990 | drivers/block/ide.c | unsigned int mcount = drive->mult_count; |
drive | 998 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, nsect<<7); |
drive | 1001 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 1011 | drivers/block/ide.c | panic("%s: buffer list corrupted\n", drive->name); |
drive | 1023 | drivers/block/ide.c | static void multwrite_intr (ide_drive_t *drive) |
drive | 1027 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 1030 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 1033 | drivers/block/ide.c | multwrite(drive); |
drive | 1034 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1048 | drivers/block/ide.c | ide_error(drive, "multwrite_intr", stat); |
drive | 1055 | drivers/block/ide.c | static void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler) |
drive | 1057 | drivers/block/ide.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 1058 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1066 | drivers/block/ide.c | static void set_multmode_intr (ide_drive_t *drive) |
drive | 1072 | drivers/block/ide.c | drive->mult_count = drive->mult_req; |
drive | 1074 | drivers/block/ide.c | drive->mult_req = drive->mult_count = 0; |
drive | 1075 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 1076 | drivers/block/ide.c | (void) ide_dump_status(drive, "set_multmode", stat); |
drive | 1083 | drivers/block/ide.c | static void set_geometry_intr (ide_drive_t *drive) |
drive | 1089 | drivers/block/ide.c | ide_error(drive, "set_geometry_intr", stat); |
drive | 1095 | drivers/block/ide.c | static void recal_intr (ide_drive_t *drive) |
drive | 1101 | drivers/block/ide.c | ide_error(drive, "recal_intr", stat); |
drive | 1107 | drivers/block/ide.c | static void drive_cmd_intr (ide_drive_t *drive) |
drive | 1113 | drivers/block/ide.c | ide_end_drive_cmd (drive, stat, GET_ERR()); |
drive | 1115 | drivers/block/ide.c | ide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */ |
drive | 1122 | drivers/block/ide.c | static inline void do_special (ide_drive_t *drive) |
drive | 1124 | drivers/block/ide.c | special_t *s = &drive->special; |
drive | 1127 | drivers/block/ide.c | printk("%s: do_special: 0x%02x\n", drive->name, s->all); |
drive | 1131 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1132 | drivers/block/ide.c | OUT_BYTE(drive->sect,IDE_SECTOR_REG); |
drive | 1133 | drivers/block/ide.c | OUT_BYTE(drive->cyl,IDE_LCYL_REG); |
drive | 1134 | drivers/block/ide.c | OUT_BYTE(drive->cyl>>8,IDE_HCYL_REG); |
drive | 1135 | drivers/block/ide.c | OUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG); |
drive | 1136 | drivers/block/ide.c | ide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr); |
drive | 1140 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1141 | drivers/block/ide.c | ide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr); |
drive | 1144 | drivers/block/ide.c | ide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc; |
drive | 1147 | drivers/block/ide.c | tuneproc(drive, drive->pio_req); |
drive | 1151 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1152 | drivers/block/ide.c | if (drive->id && drive->mult_req > drive->id->max_multsect) |
drive | 1153 | drivers/block/ide.c | drive->mult_req = drive->id->max_multsect; |
drive | 1154 | drivers/block/ide.c | ide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr); |
drive | 1156 | drivers/block/ide.c | drive->mult_req = 0; |
drive | 1160 | drivers/block/ide.c | printk("%s: bad special flag: 0x%02x\n", drive->name, special); |
drive | 1175 | drivers/block/ide.c | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout) |
drive | 1185 | drivers/block/ide.c | ide_error(drive, "status error", stat); |
drive | 1200 | drivers/block/ide.c | ide_error(drive, "status timeout", GET_STAT()); |
drive | 1209 | drivers/block/ide.c | static inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 1211 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 1213 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1215 | drivers/block/ide.c | if (drive->select.b.lba) { |
drive | 1218 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", |
drive | 1224 | drivers/block/ide.c | OUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1227 | drivers/block/ide.c | track = block / drive->sect; |
drive | 1228 | drivers/block/ide.c | sect = block % drive->sect + 1; |
drive | 1230 | drivers/block/ide.c | head = track % drive->head; |
drive | 1231 | drivers/block/ide.c | cyl = track / drive->head; |
drive | 1234 | drivers/block/ide.c | OUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1237 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", cyl, |
drive | 1243 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive))) |
drive | 1246 | drivers/block/ide.c | ide_set_handler(drive, &read_intr, WAIT_CMD); |
drive | 1247 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET); |
drive | 1252 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive))) |
drive | 1255 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET); |
drive | 1256 | drivers/block/ide.c | if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { |
drive | 1257 | drivers/block/ide.c | printk("%s: no DRQ after issuing %s\n", drive->name, |
drive | 1258 | drivers/block/ide.c | drive->mult_count ? "MULTWRITE" : "WRITE"); |
drive | 1261 | drivers/block/ide.c | if (!drive->unmask) |
drive | 1263 | drivers/block/ide.c | if (drive->mult_count) { |
drive | 1264 | drivers/block/ide.c | HWGROUP(drive)->wrq = *rq; /* scratchpad */ |
drive | 1265 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1266 | drivers/block/ide.c | multwrite(drive); |
drive | 1268 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 1269 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, SECTOR_WORDS); |
drive | 1278 | drivers/block/ide.c | drive->name, args[0], args[1], args[2]); |
drive | 1281 | drivers/block/ide.c | ide_cmd(drive, args[0], args[1], &drive_cmd_intr); |
drive | 1289 | drivers/block/ide.c | printk("%s: DRIVE_CMD (null)\n", drive->name); |
drive | 1291 | drivers/block/ide.c | ide_end_drive_cmd(drive, GET_STAT(), GET_ERR()); |
drive | 1295 | drivers/block/ide.c | printk("%s: bad command: %d\n", drive->name, rq->cmd); |
drive | 1296 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 1306 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1319 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 1322 | drivers/block/ide.c | printk("%s: block not locked\n", drive->name); |
drive | 1328 | drivers/block/ide.c | if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) { |
drive | 1329 | drivers/block/ide.c | printk("%s%c: bad access: block=%ld, count=%ld\n", drive->name, |
drive | 1333 | drivers/block/ide.c | block += drive->part[minor&PARTN_MASK].start_sect + drive->sect0; |
drive | 1335 | drivers/block/ide.c | if (block == 0 && drive->remap_0_to_1) |
drive | 1338 | drivers/block/ide.c | ((ide_hwgroup_t *)hwif->hwgroup)->drive = drive; |
drive | 1341 | drivers/block/ide.c | hwif->selectproc (drive); |
drive | 1351 | drivers/block/ide.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 1352 | drivers/block/ide.c | if (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) { |
drive | 1353 | drivers/block/ide.c | printk("%s: drive not ready for command\n", drive->name); |
drive | 1357 | drivers/block/ide.c | if (!drive->special.all) { |
drive | 1359 | drivers/block/ide.c | switch (drive->media) { |
drive | 1361 | drivers/block/ide.c | do_rw_disk (drive, rq, block); |
drive | 1365 | drivers/block/ide.c | ide_do_rw_cdrom (drive, block); |
drive | 1373 | drivers/block/ide.c | ide_cmd(drive, args[0], args[1], &drive_cmd_intr); |
drive | 1376 | drivers/block/ide.c | idetape_do_request (drive, rq, block); |
drive | 1382 | drivers/block/ide.c | drive->name, drive->media); |
drive | 1386 | drivers/block/ide.c | do_rw_disk (drive, rq, block); /* simpler and faster */ |
drive | 1390 | drivers/block/ide.c | do_special(drive); |
drive | 1490 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1499 | drivers/block/ide.c | handler(drive); |
drive | 1502 | drivers/block/ide.c | printk("%s: marginal timeout\n", drive->name); |
drive | 1506 | drivers/block/ide.c | (void) hwgroup->hwif->dmaproc (ide_dma_abort, drive); |
drive | 1507 | drivers/block/ide.c | ide_error(drive, "irq timeout", GET_STAT()); |
drive | 1549 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1550 | drivers/block/ide.c | if (!drive->present) |
drive | 1554 | drivers/block/ide.c | hwif->selectproc (drive); |
drive | 1556 | drivers/block/ide.c | if (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT)) |
drive | 1557 | drivers/block/ide.c | (void) ide_dump_status(drive, "unexpected_intr", stat); |
drive | 1559 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 1565 | drivers/block/ide.c | hwif->selectproc (hwgroup->drive); |
drive | 1578 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1581 | drivers/block/ide.c | if (drive->unmask) |
drive | 1583 | drivers/block/ide.c | handler(drive); |
drive | 1586 | drivers/block/ide.c | SET_RECOVERY_TIMER(HWIF(drive)); |
drive | 1609 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1610 | drivers/block/ide.c | if (drive->present) |
drive | 1611 | drivers/block/ide.c | return drive; |
drive | 1670 | drivers/block/ide.c | int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action) |
drive | 1673 | drivers/block/ide.c | unsigned int major = HWIF(drive)->major; |
drive | 1680 | drivers/block/ide.c | rq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS); |
drive | 1692 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 1694 | drivers/block/ide.c | if (HWGROUP(drive)->rq == NULL) { /* is this necessary (?) */ |
drive | 1714 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1717 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1721 | drivers/block/ide.c | while (drive->busy) |
drive | 1722 | drivers/block/ide.c | sleep_on(&drive->wqueue); |
drive | 1723 | drivers/block/ide.c | drive->usage++; |
drive | 1726 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 1727 | drivers/block/ide.c | return ide_cdrom_open (inode, filp, drive); |
drive | 1730 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 1731 | drivers/block/ide.c | return idetape_blkdev_open (inode, filp, drive); |
drive | 1733 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1744 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1755 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1757 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) != NULL) { |
drive | 1759 | drivers/block/ide.c | drive->usage--; |
drive | 1761 | drivers/block/ide.c | if (drive->media == ide_cdrom) { |
drive | 1762 | drivers/block/ide.c | ide_cdrom_release (inode, file, drive); |
drive | 1767 | drivers/block/ide.c | if (drive->media == ide_tape) { |
drive | 1768 | drivers/block/ide.c | idetape_blkdev_release (inode, file, drive); |
drive | 1772 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1778 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1793 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1797 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 1801 | drivers/block/ide.c | minor = drive->select.b.unit << PARTN_BITS; |
drive | 1804 | drivers/block/ide.c | if (drive->busy || (drive->usage > 1)) { |
drive | 1808 | drivers/block/ide.c | drive->busy = 1; |
drive | 1812 | drivers/block/ide.c | if (drive->part[p].nr_sects > 0) { |
drive | 1818 | drivers/block/ide.c | drive->part[p].start_sect = 0; |
drive | 1819 | drivers/block/ide.c | drive->part[p].nr_sects = 0; |
drive | 1822 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 1823 | drivers/block/ide.c | if (drive->media == ide_disk) |
drive | 1824 | drivers/block/ide.c | resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit); |
drive | 1826 | drivers/block/ide.c | drive->busy = 0; |
drive | 1827 | drivers/block/ide.c | wake_up(&drive->wqueue); |
drive | 1848 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1855 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1859 | drivers/block/ide.c | if (!loc || drive->media != ide_disk) return -EINVAL; |
drive | 1862 | drivers/block/ide.c | put_user(drive->bios_head, (byte *) &loc->heads); |
drive | 1863 | drivers/block/ide.c | put_user(drive->bios_sect, (byte *) &loc->sectors); |
drive | 1864 | drivers/block/ide.c | put_user(drive->bios_cyl, (unsigned short *) &loc->cylinders); |
drive | 1865 | drivers/block/ide.c | put_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect, |
drive | 1885 | drivers/block/ide.c | return write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects); |
drive | 1890 | drivers/block/ide.c | return write_fs_long(arg, drive->keep_settings); |
drive | 1893 | drivers/block/ide.c | return write_fs_long(arg, drive->unmask); |
drive | 1896 | drivers/block/ide.c | return write_fs_long(arg, drive->using_dma); |
drive | 1899 | drivers/block/ide.c | return write_fs_long(arg, drive->io_32bit); |
drive | 1902 | drivers/block/ide.c | return write_fs_long(arg, drive->mult_count); |
drive | 1907 | drivers/block/ide.c | if (drive->id == NULL) |
drive | 1909 | drivers/block/ide.c | err = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id)); |
drive | 1911 | drivers/block/ide.c | memcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id)); |
drive | 1915 | drivers/block/ide.c | return write_fs_long(arg, drive->bad_wstat == BAD_R_STAT); |
drive | 1919 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 1922 | drivers/block/ide.c | if (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc) |
drive | 1938 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc)) { |
drive | 1942 | drivers/block/ide.c | drive->using_dma = arg; |
drive | 1945 | drivers/block/ide.c | drive->keep_settings = arg; |
drive | 1948 | drivers/block/ide.c | if (arg && HWIF(drive)->no_unmask) { |
drive | 1952 | drivers/block/ide.c | drive->unmask = arg; |
drive | 1955 | drivers/block/ide.c | drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; |
drive | 1960 | drivers/block/ide.c | drive->io_32bit = arg; |
drive | 1962 | drivers/block/ide.c | if (HWIF(drive)->chipset == ide_dtc2278) |
drive | 1963 | drivers/block/ide.c | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; |
drive | 1975 | drivers/block/ide.c | if (drive->id && arg > drive->id->max_multsect) |
drive | 1979 | drivers/block/ide.c | if (drive->special.b.set_multmode) { |
drive | 1983 | drivers/block/ide.c | drive->mult_req = arg; |
drive | 1984 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 1986 | drivers/block/ide.c | (void) ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 1987 | drivers/block/ide.c | return (drive->mult_count == arg) ? 0 : -EIO; |
drive | 1994 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 2001 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 2013 | drivers/block/ide.c | if (!HWIF(drive)->tuneproc) |
drive | 2017 | drivers/block/ide.c | drive->pio_req = (int) arg; |
drive | 2018 | drivers/block/ide.c | drive->special.b.set_pio = 1; |
drive | 2026 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2027 | drivers/block/ide.c | return ide_cdrom_ioctl(drive, inode, file, cmd, arg); |
drive | 2030 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 2031 | drivers/block/ide.c | return idetape_blkdev_ioctl(drive, inode, file, cmd, arg); |
drive | 2039 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2041 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 2044 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2045 | drivers/block/ide.c | return ide_cdrom_check_media_change (drive); |
drive | 2047 | drivers/block/ide.c | if (drive->removeable) /* for disks */ |
drive | 2079 | drivers/block/ide.c | static inline void do_identify (ide_drive_t *drive, byte cmd) |
drive | 2085 | drivers/block/ide.c | id = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL); |
drive | 2086 | drivers/block/ide.c | ide_input_data(drive, id, SECTOR_WORDS); /* read 512 bytes of id info */ |
drive | 2094 | drivers/block/ide.c | printk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model); |
drive | 2095 | drivers/block/ide.c | drive->present = 0; |
drive | 2120 | drivers/block/ide.c | printk("%s: %s, ATAPI ", drive->name, id->model); |
drive | 2126 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2127 | drivers/block/ide.c | drive->present = 1; |
drive | 2128 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2137 | drivers/block/ide.c | if (idetape_identify_device (drive,id)) { |
drive | 2138 | drivers/block/ide.c | drive->media = ide_tape; |
drive | 2139 | drivers/block/ide.c | drive->present = 1; |
drive | 2140 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2141 | drivers/block/ide.c | if (HWIF(drive)->dmaproc != NULL && |
drive | 2142 | drivers/block/ide.c | !HWIF(drive)->dmaproc(ide_dma_check, drive)) |
drive | 2147 | drivers/block/ide.c | drive->present = 0; |
drive | 2156 | drivers/block/ide.c | drive->present = 0; |
drive | 2160 | drivers/block/ide.c | drive->present = 0; |
drive | 2169 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2174 | drivers/block/ide.c | drive->removeable = 0; |
drive | 2175 | drivers/block/ide.c | if (drive->select.all & (1<<4)) { |
drive | 2176 | drivers/block/ide.c | drive->present = 0; |
drive | 2181 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2183 | drivers/block/ide.c | if (!drive->present) { |
drive | 2184 | drivers/block/ide.c | drive->present = 1; |
drive | 2185 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = id->cyls; |
drive | 2186 | drivers/block/ide.c | drive->head = drive->bios_head = id->heads; |
drive | 2187 | drivers/block/ide.c | drive->sect = drive->bios_sect = id->sectors; |
drive | 2203 | drivers/block/ide.c | drive->cyl = id->cur_cyls; |
drive | 2204 | drivers/block/ide.c | drive->head = id->cur_heads; |
drive | 2205 | drivers/block/ide.c | drive->sect = id->cur_sectors; |
drive | 2208 | drivers/block/ide.c | capacity = drive->cyl * drive->head * drive->sect; |
drive | 2217 | drivers/block/ide.c | if ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) { |
drive | 2218 | drivers/block/ide.c | drive->cyl = id->cyls; |
drive | 2219 | drivers/block/ide.c | drive->head = id->heads; |
drive | 2220 | drivers/block/ide.c | drive->sect = id->sectors; |
drive | 2223 | drivers/block/ide.c | if (drive->sect == drive->bios_sect && drive->head == drive->bios_head) { |
drive | 2224 | drivers/block/ide.c | if (drive->cyl > drive->bios_cyl) |
drive | 2225 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2228 | drivers/block/ide.c | (void) current_capacity (drive); /* initialize LBA selection */ |
drive | 2231 | drivers/block/ide.c | drive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2, |
drive | 2232 | drivers/block/ide.c | drive->select.b.lba ? "LBA, " : "", |
drive | 2233 | drivers/block/ide.c | drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2235 | drivers/block/ide.c | drive->mult_count = 0; |
drive | 2237 | drivers/block/ide.c | drive->mult_req = INITIAL_MULT_COUNT; |
drive | 2238 | drivers/block/ide.c | if (drive->mult_req > id->max_multsect) |
drive | 2239 | drivers/block/ide.c | drive->mult_req = id->max_multsect; |
drive | 2240 | drivers/block/ide.c | if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect)) |
drive | 2241 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 2243 | drivers/block/ide.c | if (HWIF(drive)->dmaproc != NULL) { /* hwif supports DMA? */ |
drive | 2244 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc(ide_dma_check, drive))) |
drive | 2271 | drivers/block/ide.c | static int try_to_identify (ide_drive_t *drive, byte cmd) |
drive | 2277 | drivers/block/ide.c | if (!HWIF(drive)->irq) { /* already got an IRQ? */ |
drive | 2280 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); /* enable device irq */ |
drive | 2285 | drivers/block/ide.c | printk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name); |
drive | 2295 | drivers/block/ide.c | if (!HWIF(drive)->irq) |
drive | 2305 | drivers/block/ide.c | do_identify(drive, cmd); /* drive returned ID */ |
drive | 2306 | drivers/block/ide.c | if (drive->present && drive->media != ide_tape) { |
drive | 2307 | drivers/block/ide.c | ide_tuneproc_t *tuneproc = HWIF(drive)->tuneproc; |
drive | 2308 | drivers/block/ide.c | if (tuneproc != NULL && drive->autotune == 1) |
drive | 2309 | drivers/block/ide.c | tuneproc(drive, 255); /* auto-tune PIO mode */ |
drive | 2314 | drivers/block/ide.c | if (!HWIF(drive)->irq) { |
drive | 2317 | drivers/block/ide.c | HWIF(drive)->irq = irqs; |
drive | 2319 | drivers/block/ide.c | printk("%s: IRQ probe failed (%d)\n", drive->name, irqs); |
drive | 2340 | drivers/block/ide.c | static int do_probe (ide_drive_t *drive, byte cmd) |
drive | 2344 | drivers/block/ide.c | if (drive->present) { /* avoid waiting for inappropriate probes */ |
drive | 2345 | drivers/block/ide.c | if ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY)) |
drive | 2351 | drivers/block/ide.c | drive->name, drive->present, drive->media, |
drive | 2355 | drivers/block/ide.c | if (HWIF(drive)->selectproc) |
drive | 2356 | drivers/block/ide.c | HWIF(drive)->selectproc (drive); |
drive | 2358 | drivers/block/ide.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); /* select target drive */ |
drive | 2360 | drivers/block/ide.c | if (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) { |
drive | 2366 | drivers/block/ide.c | || drive->present || cmd == WIN_PIDENTIFY) |
drive | 2368 | drivers/block/ide.c | if ((rc = try_to_identify(drive,cmd))) /* send cmd and wait */ |
drive | 2369 | drivers/block/ide.c | rc = try_to_identify(drive,cmd); /* failed: try again */ |
drive | 2371 | drivers/block/ide.c | printk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT()); |
drive | 2376 | drivers/block/ide.c | if (drive->select.b.unit != 0) { |
drive | 2390 | drivers/block/ide.c | static inline byte probe_for_drive (ide_drive_t *drive) |
drive | 2392 | drivers/block/ide.c | if (drive->noprobe) /* skip probing? */ |
drive | 2393 | drivers/block/ide.c | return drive->present; |
drive | 2394 | drivers/block/ide.c | if (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */ |
drive | 2396 | drivers/block/ide.c | (void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */ |
drive | 2399 | drivers/block/ide.c | if (!drive->present) |
drive | 2401 | drivers/block/ide.c | if (drive->id == NULL) { /* identification failed? */ |
drive | 2402 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 2404 | drivers/block/ide.c | drive->name, drive->cyl, drive->head, drive->sect); |
drive | 2407 | drivers/block/ide.c | else if (drive->media == ide_cdrom) { |
drive | 2408 | drivers/block/ide.c | printk("%s: ATAPI cdrom (?)\n", drive->name); |
drive | 2412 | drivers/block/ide.c | drive->present = 0; /* nuke it */ |
drive | 2429 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2430 | drivers/block/ide.c | if (drive->present) { |
drive | 2431 | drivers/block/ide.c | drive->present = 0; |
drive | 2432 | drivers/block/ide.c | printk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name); |
drive | 2448 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2449 | drivers/block/ide.c | (void) probe_for_drive (drive); |
drive | 2450 | drivers/block/ide.c | if (drive->present && drive->media == ide_disk) { |
drive | 2451 | drivers/block/ide.c | if ((!drive->head || drive->head > 16) && !drive->select.b.lba) { |
drive | 2453 | drivers/block/ide.c | drive->name, drive->head); |
drive | 2454 | drivers/block/ide.c | drive->present = 0; |
drive | 2457 | drivers/block/ide.c | if (drive->present && !hwif->present) { |
drive | 2580 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2598 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 2601 | drivers/block/ide.c | drive->noprobe = 1; |
drive | 2604 | drivers/block/ide.c | drive->bad_wstat = BAD_R_STAT; |
drive | 2608 | drivers/block/ide.c | drive->present = 1; |
drive | 2609 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2616 | drivers/block/ide.c | drive->autotune = 1; |
drive | 2619 | drivers/block/ide.c | drive->autotune = 2; |
drive | 2622 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2623 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = vals[0]; |
drive | 2624 | drivers/block/ide.c | drive->head = drive->bios_head = vals[1]; |
drive | 2625 | drivers/block/ide.c | drive->sect = drive->bios_sect = vals[2]; |
drive | 2626 | drivers/block/ide.c | drive->present = 1; |
drive | 2627 | drivers/block/ide.c | drive->forced_geom = 1; |
drive | 2774 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2779 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL || drive->forced_geom) |
drive | 2782 | drivers/block/ide.c | if (xparm > 1 && xparm <= drive->bios_head && drive->bios_sect == 63) |
drive | 2787 | drivers/block/ide.c | if (drive->id) { |
drive | 2788 | drivers/block/ide.c | drive->cyl = drive->id->cyls; |
drive | 2789 | drivers/block/ide.c | drive->head = drive->id->heads; |
drive | 2790 | drivers/block/ide.c | drive->sect = drive->id->sectors; |
drive | 2792 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2793 | drivers/block/ide.c | drive->bios_head = drive->head; |
drive | 2794 | drivers/block/ide.c | drive->bios_sect = drive->sect; |
drive | 2795 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 2797 | drivers/block/ide.c | tracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63; |
drive | 2798 | drivers/block/ide.c | drive->bios_sect = 63; |
drive | 2800 | drivers/block/ide.c | drive->bios_head = xparm; |
drive | 2801 | drivers/block/ide.c | drive->bios_cyl = tracks / drive->bios_head; |
drive | 2803 | drivers/block/ide.c | while (drive->bios_cyl >= 1024) { |
drive | 2804 | drivers/block/ide.c | drive->bios_head = *heads; |
drive | 2805 | drivers/block/ide.c | drive->bios_cyl = tracks / drive->bios_head; |
drive | 2811 | drivers/block/ide.c | drive->remap_0_to_1 = 1; |
drive | 2816 | drivers/block/ide.c | drive->sect0 = 63; |
drive | 2817 | drivers/block/ide.c | drive->bios_cyl = (tracks - 1) / drive->bios_head; |
drive | 2822 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 2823 | drivers/block/ide.c | printk("[%d/%d/%d]", drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2861 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2862 | drivers/block/ide.c | if ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) { |
drive | 2863 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = *(unsigned short *)BIOS; |
drive | 2864 | drivers/block/ide.c | drive->head = drive->bios_head = *(BIOS+2); |
drive | 2865 | drivers/block/ide.c | drive->sect = drive->bios_sect = *(BIOS+14); |
drive | 2866 | drivers/block/ide.c | drive->ctl = *(BIOS+8); |
drive | 2867 | drivers/block/ide.c | drive->present = 1; |
drive | 2917 | drivers/block/ide.c | hwgroup->drive = &hwif->drives[0]; |
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 | 434 | drivers/block/ide.h | ide_drive_t *drive; /* current drive */ |
drive | 463 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive) |
drive | 465 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) |
drive | 471 | drivers/block/ide.h | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 476 | drivers/block/ide.h | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 482 | drivers/block/ide.h | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout); |
drive | 487 | drivers/block/ide.h | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat); |
drive | 493 | drivers/block/ide.h | void ide_error (ide_drive_t *drive, const char *msg, byte stat); |
drive | 510 | drivers/block/ide.h | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout); |
drive | 577 | drivers/block/ide.h | int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action); |
drive | 583 | drivers/block/ide.h | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err); |
drive | 613 | drivers/block/ide.h | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id); |
drive | 621 | drivers/block/ide.h | void idetape_setup (ide_drive_t *drive); |
drive | 628 | drivers/block/ide.h | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block); |
drive | 641 | drivers/block/ide.h | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 643 | drivers/block/ide.h | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive); |
drive | 644 | 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 | 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 | 149 | drivers/block/triton.c | static void dma_intr (ide_drive_t *drive) |
drive | 153 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 154 | drivers/block/triton.c | unsigned short dma_base = HWIF(drive)->dma_base; |
drive | 159 | drivers/block/triton.c | if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) { |
drive | 161 | drivers/block/triton.c | rq = HWGROUP(drive)->rq; |
drive | 164 | drivers/block/triton.c | ide_end_request(1, HWGROUP(drive)); |
drive | 168 | drivers/block/triton.c | printk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat); |
drive | 171 | drivers/block/triton.c | ide_error(drive, "dma_intr", stat); |
drive | 178 | drivers/block/triton.c | static int build_dmatable (ide_drive_t *drive) |
drive | 180 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 182 | drivers/block/triton.c | unsigned long size, addr, *table = HWIF(drive)->dmatable; |
drive | 196 | drivers/block/triton.c | if (drive->media == ide_tape) |
drive | 197 | drivers/block/triton.c | size = drive->tape.pc->request_transfer; |
drive | 218 | drivers/block/triton.c | printk("%s: DMA table too small\n", drive->name); |
drive | 235 | drivers/block/triton.c | printk("%s: empty DMA table?\n", drive->name); |
drive | 239 | drivers/block/triton.c | static int config_drive_for_dma (ide_drive_t *drive) |
drive | 243 | drivers/block/triton.c | struct hd_driveid *id = drive->id; |
drive | 247 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 254 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 277 | drivers/block/triton.c | static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive) |
drive | 279 | drivers/block/triton.c | unsigned long dma_base = HWIF(drive)->dma_base; |
drive | 287 | drivers/block/triton.c | return config_drive_for_dma (drive); |
drive | 307 | drivers/block/triton.c | if (build_dmatable (drive)) |
drive | 309 | drivers/block/triton.c | outl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */ |
drive | 313 | drivers/block/triton.c | if (drive->media != ide_disk) |
drive | 316 | 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 | 1096 | drivers/cdrom/mcdx.c | int drive; |
drive | 1102 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) |
drive | 1103 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = NULL; |
drive | 1106 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) { |
drive | 1111 | drivers/cdrom/mcdx.c | mcdx_blocksizes[drive] = 0; |
drive | 1115 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() try drive %d\n", drive)); |
drive | 1134 | drivers/cdrom/mcdx.c | stuffp->irq = irq(mcdx_drive_map[drive]); |
drive | 1135 | drivers/cdrom/mcdx.c | stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); |
drive | 1240 | drivers/cdrom/mcdx.c | stuffp->minor = drive; |
drive | 1246 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = stuffp; |
drive | 1247 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp)); |
drive | 1868 | drivers/scsi/fdomain.c | int drive; |
drive | 1924 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
drive | 1931 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 ); |
drive | 1934 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 ); |
drive | 1937 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 ); |
drive | 1940 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 ); |
drive | 1949 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 ); |
drive | 48 | 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); |