tag | line | file | source code |
drive | 486 | drivers/block/cmd640.c | void cmd640_tune_drive(ide_drive_t* drive) { |
drive | 498 | drivers/block/cmd640.c | interface_number = HWIF(drive) - ide_hwifs; |
drive | 502 | drivers/block/cmd640.c | drive_number = drive - HWIF(drive)->drives; |
drive | 504 | drivers/block/cmd640.c | id = drive->id; |
drive | 223 | drivers/block/floppy.c | #define UDP (&drive_params[drive]) |
drive | 224 | drivers/block/floppy.c | #define UDRS (&drive_state[drive]) |
drive | 225 | drivers/block/floppy.c | #define UDRWE (&write_errors[drive]) |
drive | 226 | drivers/block/floppy.c | #define UFDCS (&fdc_state[FDC(drive)]) |
drive | 575 | drivers/block/floppy.c | static void reschedule_timeout(int drive, const char *message, int marg) |
drive | 577 | drivers/block/floppy.c | if (drive == CURRENTD) |
drive | 578 | drivers/block/floppy.c | drive = current_drive; |
drive | 580 | drivers/block/floppy.c | if (drive < 0 || drive > N_DRIVE) { |
drive | 582 | drivers/block/floppy.c | drive=0; |
drive | 646 | drivers/block/floppy.c | static int disk_change(int drive) |
drive | 648 | drivers/block/floppy.c | int fdc=FDC(drive); |
drive | 652 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive))) || |
drive | 653 | drivers/block/floppy.c | (FDCS->dor & 3) != UNIT(drive) || |
drive | 654 | drivers/block/floppy.c | fdc != FDC(drive)){ |
drive | 656 | drivers/block/floppy.c | DPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive), |
drive | 663 | drivers/block/floppy.c | DPRINT1("checking disk change line for drive %d\n",drive); |
drive | 680 | drivers/block/floppy.c | current_type[drive] != NULL) |
drive | 683 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 703 | drivers/block/floppy.c | register unsigned char drive, unit, newdor,olddor; |
drive | 713 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 719 | drivers/block/floppy.c | disk_change(drive); |
drive | 726 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 750 | drivers/block/floppy.c | int drive; |
drive | 756 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) |
drive | 757 | drivers/block/floppy.c | if (FDC(drive) == fdc && |
drive | 763 | drivers/block/floppy.c | static void set_fdc(int drive) |
drive | 765 | drivers/block/floppy.c | if (drive >= 0 && drive < N_DRIVE){ |
drive | 766 | drivers/block/floppy.c | fdc = FDC(drive); |
drive | 767 | drivers/block/floppy.c | current_drive = drive; |
drive | 782 | drivers/block/floppy.c | static int lock_fdc(int drive, int interruptible) |
drive | 799 | drivers/block/floppy.c | reschedule_timeout(drive, "lock fdc", 0); |
drive | 800 | drivers/block/floppy.c | set_fdc(drive); |
drive | 804 | drivers/block/floppy.c | #define LOCK_FDC(drive,interruptible) \ |
drive | 805 | drivers/block/floppy.c | if (lock_fdc(drive,interruptible)) return -EINTR; |
drive | 846 | drivers/block/floppy.c | static void floppy_off(unsigned int drive) |
drive | 849 | drivers/block/floppy.c | register int fdc=FDC(drive); |
drive | 851 | drivers/block/floppy.c | if (!(FDCS->dor & (0x10 << UNIT(drive)))) |
drive | 854 | drivers/block/floppy.c | del_timer(motor_off_timer+drive); |
drive | 862 | drivers/block/floppy.c | motor_off_timer[drive].expires = jiffies + UDP->spindown - delta; |
drive | 864 | drivers/block/floppy.c | add_timer(motor_off_timer+drive); |
drive | 874 | drivers/block/floppy.c | int i, drive, saved_drive; |
drive | 881 | drivers/block/floppy.c | drive = (saved_drive + i + 1) % N_DRIVE; |
drive | 884 | drivers/block/floppy.c | set_fdc(drive); |
drive | 885 | drivers/block/floppy.c | if (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) & |
drive | 886 | drivers/block/floppy.c | (0x10 << UNIT(drive)))) |
drive | 889 | drivers/block/floppy.c | set_dor(fdc, ~(0x10 << UNIT(drive)), 0); |
drive | 2047 | drivers/block/floppy.c | int drive=DRIVE(device); |
drive | 2049 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2728 | drivers/block/floppy.c | static int user_reset_fdc(int drive, int arg, int interruptible) |
drive | 2733 | drivers/block/floppy.c | LOCK_FDC(drive,interruptible); |
drive | 2772 | drivers/block/floppy.c | static inline const char *drive_name(int type, int drive) |
drive | 2959 | drivers/block/floppy.c | int drive, ret, ret2; |
drive | 2964 | drivers/block/floppy.c | for (drive= 0; drive < N_DRIVE; drive++){ |
drive | 2965 | drivers/block/floppy.c | if (FDC(drive) != fdc) |
drive | 2967 | drivers/block/floppy.c | if (drive == current_drive){ |
drive | 3018 | drivers/block/floppy.c | static inline void clear_write_error(int drive) |
drive | 3024 | drivers/block/floppy.c | int drive, int type, int device) |
drive | 3039 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3043 | drivers/block/floppy.c | set_bit(drive, &fake_change); |
drive | 3059 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3064 | drivers/block/floppy.c | user_params[drive] = *g; |
drive | 3065 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3066 | drivers/block/floppy.c | SUPBOUND(buffer_max, user_params[drive].sect); |
drive | 3067 | drivers/block/floppy.c | current_type[drive] = &user_params[drive]; |
drive | 3068 | drivers/block/floppy.c | floppy_sizes[drive] = user_params[drive].size >> 1; |
drive | 3078 | drivers/block/floppy.c | if (DRS->maxblock > user_params[drive].sect || DRS->maxtrack) |
drive | 3182 | drivers/block/floppy.c | int i,drive,type; |
drive | 3199 | drivers/block/floppy.c | drive = DRIVE(device); |
drive | 3225 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3226 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 3227 | drivers/block/floppy.c | floppy_sizes[drive] = MAX_DISK_SIZE; |
drive | 3233 | drivers/block/floppy.c | drive, type, device); |
drive | 3238 | drivers/block/floppy.c | outparam = (char *) current_type[drive]; |
drive | 3258 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3269 | drivers/block/floppy.c | outparam = drive_name(type,drive); |
drive | 3277 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3284 | drivers/block/floppy.c | return user_reset_fdc(drive, (int)param, 1); |
drive | 3297 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3304 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 3325 | drivers/block/floppy.c | int drive; |
drive | 3328 | drivers/block/floppy.c | drive=0; |
drive | 3331 | drivers/block/floppy.c | drive=1; |
drive | 3338 | drivers/block/floppy.c | for (drive=0; drive < N_DRIVE; drive++){ |
drive | 3350 | drivers/block/floppy.c | allowed_drive_mask |= 1 << drive; |
drive | 3351 | drivers/block/floppy.c | printk("fd%d is %s", drive, |
drive | 3354 | drivers/block/floppy.c | printk("fd%d is unknown type %d",drive, |
drive | 3365 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3378 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 3395 | drivers/block/floppy.c | int drive; |
drive | 3397 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3422 | drivers/block/floppy.c | int drive; |
drive | 3432 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 3433 | drivers/block/floppy.c | if (drive >= N_DRIVE || |
drive | 3434 | drivers/block/floppy.c | !(allowed_drive_mask & (1 << drive)) || |
drive | 3435 | drivers/block/floppy.c | fdc_state[FDC(drive)].version == FDC_NONE) |
drive | 3490 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3523 | drivers/block/floppy.c | int drive = DRIVE(dev); |
drive | 3534 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3541 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3542 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
drive | 3553 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
drive | 3555 | drivers/block/floppy.c | int drive=DRIVE(dev); |
drive | 3560 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3562 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3564 | drivers/block/floppy.c | if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){ |
drive | 3570 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3572 | drivers/block/floppy.c | clear_bit(drive, &fake_change); |
drive | 3824 | drivers/block/floppy.c | int i,unit,drive; |
drive | 3866 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE; drive++) { |
drive | 3961 | drivers/block/floppy.c | int drive; |
drive | 3994 | drivers/block/floppy.c | for (drive=0; drive < N_FDC * 4; drive++) |
drive | 3995 | drivers/block/floppy.c | if (motor_off_timer[drive].next) |
drive | 3996 | drivers/block/floppy.c | printk("motor off timer %d still active\n", drive); |
drive | 511 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
drive | 514 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
drive | 534 | drivers/block/genhd.c | int i, drive; |
drive | 543 | drivers/block/genhd.c | for (drive = 0 ; drive < dev->nr_real ; drive++) { |
drive | 544 | 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 | 195 | drivers/block/ide-cd.c | #define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect)) |
drive | 207 | drivers/block/ide-cd.c | #define CDROM_STATE_FLAGS(drive) ((struct ide_cd_state_flags *)&((drive)->bios_head)) |
drive | 225 | drivers/block/ide-cd.c | void cdrom_in_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 228 | drivers/block/ide-cd.c | ide_input_data (drive, buffer, bytecount / 4); |
drive | 237 | drivers/block/ide-cd.c | void cdrom_out_bytes (ide_drive_t *drive, void *buffer, uint bytecount) |
drive | 240 | drivers/block/ide-cd.c | ide_output_data (drive, buffer, bytecount / 4); |
drive | 397 | drivers/block/ide-cd.c | void cdrom_analyze_sense_data (ide_drive_t *drive, |
drive | 415 | drivers/block/ide-cd.c | printk ("ATAPI device %s:\n", drive->name); |
drive | 502 | drivers/block/ide-cd.c | drive->name, |
drive | 523 | drivers/block/ide-cd.c | static void cdrom_queue_request_sense (ide_drive_t *drive, |
drive | 535 | drivers/block/ide-cd.c | reqbuf = &drive->cdrom_info.sense_data; |
drive | 539 | drivers/block/ide-cd.c | pc = &HWIF(drive)->request_sense_pc; |
drive | 557 | drivers/block/ide-cd.c | rq = &HWIF(drive)->request_sense_request; |
drive | 562 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 566 | drivers/block/ide-cd.c | static void cdrom_end_request (int uptodate, ide_drive_t *drive) |
drive | 568 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 582 | drivers/block/ide-cd.c | cdrom_analyze_sense_data (drive, |
drive | 587 | drivers/block/ide-cd.c | ide_end_request (uptodate, HWGROUP(drive)); |
drive | 593 | drivers/block/ide-cd.c | static void cdrom_saw_media_change (ide_drive_t *drive) |
drive | 595 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 1; |
drive | 596 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 597 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 603 | drivers/block/ide-cd.c | static int cdrom_decode_status (ide_drive_t *drive, int good_stat, int *stat_ret) |
drive | 605 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 620 | drivers/block/ide-cd.c | printk ("%s : missing request in cdrom_decode_status\n", drive->name); |
drive | 633 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 634 | drivers/block/ide-cd.c | ide_error (drive, "request sense failure", stat); |
drive | 648 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 656 | drivers/block/ide-cd.c | printk ("%s : tray open or drive not ready\n", drive->name); |
drive | 662 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 663 | drivers/block/ide-cd.c | printk ("%s: media changed\n", drive->name); |
drive | 669 | drivers/block/ide-cd.c | ide_dump_status (drive, "packet command error", stat); |
drive | 687 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 690 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, sem, pc->sense_data, pc); |
drive | 700 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 703 | drivers/block/ide-cd.c | printk ("%s : tray open\n", drive->name); |
drive | 704 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 710 | drivers/block/ide-cd.c | cdrom_saw_media_change (drive); |
drive | 716 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 723 | drivers/block/ide-cd.c | ide_dump_status (drive, "command error", stat); |
drive | 724 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 730 | drivers/block/ide-cd.c | ide_error (drive, "cdrom_decode_status", stat); |
drive | 737 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 743 | drivers/block/ide-cd.c | cdrom_queue_request_sense (drive, NULL, NULL, NULL); |
drive | 759 | drivers/block/ide-cd.c | static int cdrom_start_packet_command (ide_drive_t *drive, int xferlen, |
drive | 763 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, 0, BUSY_STAT, WAIT_READY)) return 1; |
drive | 772 | drivers/block/ide-cd.c | OUT_BYTE (drive->ctl, IDE_CONTROL_REG); |
drive | 774 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 776 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 782 | drivers/block/ide-cd.c | (*handler) (drive); |
drive | 794 | drivers/block/ide-cd.c | static int cdrom_transfer_packet_command (ide_drive_t *drive, |
drive | 798 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) |
drive | 805 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, DRQ_STAT, &stat_dum)) return 1; |
drive | 810 | drivers/block/ide-cd.c | if (ide_wait_stat (drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1; |
drive | 814 | drivers/block/ide-cd.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 817 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, cmd_buf, cmd_len); |
drive | 835 | drivers/block/ide-cd.c | static void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector, |
drive | 838 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 867 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dest, SECTOR_SIZE); |
drive | 878 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 890 | drivers/block/ide-cd.c | int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason) |
drive | 900 | drivers/block/ide-cd.c | drive->name); |
drive | 907 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 916 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 919 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 927 | drivers/block/ide-cd.c | static void cdrom_read_intr (ide_drive_t *drive) |
drive | 932 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 935 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 949 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 950 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 953 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 959 | drivers/block/ide-cd.c | if (cdrom_read_check_ireason (drive, len, ireason)) return; |
drive | 966 | drivers/block/ide-cd.c | drive->name, len); |
drive | 968 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 983 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, dum, sizeof (dum)); |
drive | 999 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1005 | drivers/block/ide-cd.c | cdrom_buffer_sectors (drive, rq->sector, sectors_to_transfer); |
drive | 1019 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, rq->buffer, SECTOR_SIZE); |
drive | 1032 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_read_intr, WAIT_CMD); |
drive | 1040 | drivers/block/ide-cd.c | static int cdrom_read_from_buffer (ide_drive_t *drive) |
drive | 1042 | drivers/block/ide-cd.c | struct cdrom_info *info = &drive->cdrom_info; |
drive | 1043 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1055 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1070 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1076 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1086 | drivers/block/ide-cd.c | drive->name, rq->sector); |
drive | 1087 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1102 | drivers/block/ide-cd.c | static void cdrom_start_read_continuation (ide_drive_t *drive) |
drive | 1105 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1128 | drivers/block/ide-cd.c | drive->name, rq->current_nr_sectors); |
drive | 1129 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1154 | drivers/block/ide-cd.c | (void) cdrom_transfer_packet_command (drive, pc.c, sizeof (pc.c), |
drive | 1162 | drivers/block/ide-cd.c | static void cdrom_start_read (ide_drive_t *drive, unsigned int block) |
drive | 1164 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1180 | drivers/block/ide-cd.c | if (cdrom_read_from_buffer (drive)) |
drive | 1184 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 1187 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, 32768, cdrom_start_read_continuation); |
drive | 1199 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1205 | drivers/block/ide-cd.c | static void cdrom_pc_intr (ide_drive_t *drive) |
drive | 1208 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1212 | drivers/block/ide-cd.c | if (cdrom_decode_status (drive, 0, &stat)) return; |
drive | 1232 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1236 | drivers/block/ide-cd.c | drive->name, pc->buflen); |
drive | 1238 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1255 | drivers/block/ide-cd.c | drive->name); |
drive | 1261 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, pc->buffer, thislen); |
drive | 1268 | drivers/block/ide-cd.c | cdrom_out_bytes (drive, &dum, sizeof (dum)); |
drive | 1284 | drivers/block/ide-cd.c | drive->name); |
drive | 1290 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, pc->buffer, thislen); |
drive | 1297 | drivers/block/ide-cd.c | cdrom_in_bytes (drive, &dum, sizeof (dum)); |
drive | 1309 | drivers/block/ide-cd.c | drive->name, ireason); |
drive | 1314 | drivers/block/ide-cd.c | ide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD); |
drive | 1318 | drivers/block/ide-cd.c | static void cdrom_do_pc_continuation (ide_drive_t *drive) |
drive | 1320 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1324 | drivers/block/ide-cd.c | cdrom_transfer_packet_command (drive, pc->c, sizeof (pc->c), &cdrom_pc_intr); |
drive | 1328 | drivers/block/ide-cd.c | static void cdrom_do_packet_command (ide_drive_t *drive) |
drive | 1331 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1340 | drivers/block/ide-cd.c | cdrom_start_packet_command (drive, len, cdrom_do_pc_continuation); |
drive | 1355 | drivers/block/ide-cd.c | int cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc) |
drive | 1372 | drivers/block/ide-cd.c | (void) ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 1412 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->door_locked == 0 && |
drive | 1417 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, NULL); |
drive | 1429 | drivers/block/ide-cd.c | void ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block) |
drive | 1431 | drivers/block/ide-cd.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 1434 | drivers/block/ide-cd.c | cdrom_do_packet_command (drive); |
drive | 1438 | drivers/block/ide-cd.c | cdrom_end_request (1, drive); |
drive | 1439 | drivers/block/ide-cd.c | ide_do_reset (drive); |
drive | 1446 | drivers/block/ide-cd.c | cdrom_end_request (0, drive); |
drive | 1449 | drivers/block/ide-cd.c | cdrom_start_read (drive, block); |
drive | 1500 | drivers/block/ide-cd.c | cdrom_check_status (ide_drive_t *drive, |
drive | 1510 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1516 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_drive_t *drive, int lockflag, |
drive | 1527 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_doorlock) |
drive | 1536 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1540 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1547 | drivers/block/ide-cd.c | printk ("%s: door locking not supported\n", drive->name); |
drive | 1548 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1; |
drive | 1550 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = lockflag; |
drive | 1560 | drivers/block/ide-cd.c | cdrom_eject (ide_drive_t *drive, int ejectflag, |
drive | 1570 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1575 | drivers/block/ide-cd.c | cdrom_pause (ide_drive_t *drive, int pauseflag, |
drive | 1585 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1590 | drivers/block/ide-cd.c | cdrom_startstop (ide_drive_t *drive, int startflag, |
drive | 1601 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1606 | drivers/block/ide-cd.c | cdrom_read_capacity (ide_drive_t *drive, unsigned *capacity, |
drive | 1624 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 1635 | drivers/block/ide-cd.c | cdrom_read_tocentry (ide_drive_t *drive, int trackno, int msf_flag, |
drive | 1652 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1658 | drivers/block/ide-cd.c | cdrom_read_toc (ide_drive_t *drive, |
drive | 1663 | drivers/block/ide-cd.c | struct atapi_toc *toc = drive->cdrom_info.toc; |
drive | 1674 | drivers/block/ide-cd.c | drive->cdrom_info.toc = toc; |
drive | 1679 | drivers/block/ide-cd.c | printk ("%s: No cdrom TOC buffer!\n", drive->name); |
drive | 1685 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) |
drive | 1686 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 1688 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->toc_valid) return 0; |
drive | 1694 | drivers/block/ide-cd.c | msf_flag = (CDROM_CONFIG_FLAGS (drive)->no_lba_toc); |
drive | 1698 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1705 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1718 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 0, (char *)&toc->hdr, |
drive | 1726 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1739 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 1756 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (drive, 0, msf_flag, 1, |
drive | 1772 | drivers/block/ide-cd.c | stat = cdrom_read_capacity (drive, &toc->capacity, reqbuf); |
drive | 1775 | drivers/block/ide-cd.c | HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] |
drive | 1777 | drivers/block/ide-cd.c | drive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME; |
drive | 1780 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 1; |
drive | 1787 | drivers/block/ide-cd.c | cdrom_read_subchannel (ide_drive_t *drive, |
drive | 1803 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1809 | drivers/block/ide-cd.c | cdrom_mode_sense (ide_drive_t *drive, int pageno, int modeflag, |
drive | 1824 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1829 | drivers/block/ide-cd.c | cdrom_mode_select (ide_drive_t *drive, int pageno, char *buf, int buflen, |
drive | 1844 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1849 | drivers/block/ide-cd.c | cdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1861 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1867 | drivers/block/ide-cd.c | cdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1879 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd) |
drive | 1889 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (drive, &pc); |
drive | 1897 | drivers/block/ide-cd.c | cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end, |
drive | 1912 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->no_playaudio12) |
drive | 1913 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 1923 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_play12 (drive, lba_start, lba_end, reqbuf); |
drive | 1933 | drivers/block/ide-cd.c | "trying PLAYAUDIO_MSF\n", drive->name); |
drive | 1934 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 1935 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 1936 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (drive, lba_start, lba_end, reqbuf); |
drive | 1947 | drivers/block/ide-cd.c | int cdrom_get_toc_entry (ide_drive_t *drive, int track, |
drive | 1955 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, reqbuf); |
drive | 1958 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 1975 | drivers/block/ide-cd.c | cdrom_read_block (ide_drive_t *drive, int format, int lba, |
drive | 1993 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->old_readcd) |
drive | 2004 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2010 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd == 0) |
drive | 2013 | drivers/block/ide-cd.c | drive->name); |
drive | 2014 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 1; |
drive | 2015 | drivers/block/ide-cd.c | return cdrom_read_block (drive, format, lba, buf, buflen, reqbuf); |
drive | 2023 | drivers/block/ide-cd.c | int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode, |
drive | 2032 | drivers/block/ide-cd.c | if (drive->usage > 1) |
drive | 2035 | drivers/block/ide-cd.c | stat = cdrom_lockdoor (drive, 0, NULL); |
drive | 2038 | drivers/block/ide-cd.c | return cdrom_eject (drive, 0, NULL); |
drive | 2043 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close = arg; |
drive | 2048 | drivers/block/ide-cd.c | return cdrom_pause (drive, 1, NULL); |
drive | 2051 | drivers/block/ide-cd.c | return cdrom_pause (drive, 0, NULL); |
drive | 2054 | drivers/block/ide-cd.c | return cdrom_startstop (drive, 1, NULL); |
drive | 2060 | drivers/block/ide-cd.c | stat = cdrom_startstop (drive, 0, NULL); |
drive | 2063 | drivers/block/ide-cd.c | return cdrom_eject (drive, 1, NULL); |
drive | 2083 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2099 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk0, &first_toc, NULL); |
drive | 2101 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, ti.cdti_trk1, &last_toc, NULL); |
drive | 2110 | drivers/block/ide-cd.c | return cdrom_play_lba_range (drive, lba_start, lba_end, NULL); |
drive | 2123 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2126 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2148 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (drive, tocentry.cdte_track, &toce, NULL); |
drive | 2183 | drivers/block/ide-cd.c | stat = cdrom_read_subchannel (drive, (char *)&scbuf, sizeof (scbuf), |
drive | 2188 | drivers/block/ide-cd.c | if (CDROM_CONFIG_FLAGS (drive)->vertos_lossage) |
drive | 2242 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer),NULL); |
drive | 2244 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 1, mask , sizeof (buffer),NULL); |
drive | 2254 | drivers/block/ide-cd.c | return cdrom_mode_select (drive, 0x0e, buffer, sizeof (buffer), NULL); |
drive | 2266 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (drive, 0x0e, 0, buffer, sizeof (buffer), NULL); |
drive | 2293 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2296 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2326 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2329 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2360 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, 1, lba, buf, |
drive | 2401 | drivers/block/ide-cd.c | stat = cdrom_read_toc (drive, NULL); |
drive | 2404 | drivers/block/ide-cd.c | toc = drive->cdrom_info.toc; |
drive | 2409 | drivers/block/ide-cd.c | stat = cdrom_read_block (drive, format, lba, buf, blocksize, NULL); |
drive | 2422 | drivers/block/ide-cd.c | return ide_do_drive_cmd (drive, &req, ide_wait); |
drive | 2461 | drivers/block/ide-cd.c | stat = cdrom_queue_packet_command (drive, &pc); |
drive | 2483 | drivers/block/ide-cd.c | int ide_cdrom_check_media_change (ide_drive_t *drive) |
drive | 2487 | drivers/block/ide-cd.c | (void) cdrom_check_status (drive, NULL); |
drive | 2489 | drivers/block/ide-cd.c | retval = CDROM_STATE_FLAGS (drive)->media_changed; |
drive | 2490 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2496 | drivers/block/ide-cd.c | int ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive) |
drive | 2501 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2506 | drivers/block/ide-cd.c | if (drive->usage == 1) |
drive | 2513 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2518 | drivers/block/ide-cd.c | cdrom_eject (drive, 1, &my_reqbuf); |
drive | 2519 | drivers/block/ide-cd.c | stat = cdrom_check_status (drive, &my_reqbuf); |
drive | 2525 | drivers/block/ide-cd.c | --drive->usage; |
drive | 2530 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 1, &my_reqbuf); |
drive | 2533 | drivers/block/ide-cd.c | (void) cdrom_read_toc (drive, &my_reqbuf); |
drive | 2544 | drivers/block/ide-cd.c | void ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive) |
drive | 2546 | drivers/block/ide-cd.c | if (drive->usage == 0) |
drive | 2551 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (drive, 0, NULL); |
drive | 2554 | drivers/block/ide-cd.c | if (CDROM_STATE_FLAGS (drive)->eject_on_close) |
drive | 2555 | drivers/block/ide-cd.c | (void) cdrom_eject (drive, 0, NULL); |
drive | 2565 | drivers/block/ide-cd.c | void ide_cdrom_setup (ide_drive_t *drive) |
drive | 2567 | drivers/block/ide-cd.c | blksize_size[HWIF(drive)->major][drive->select.b.unit << PARTN_BITS] = CD_FRAMESIZE; |
drive | 2569 | drivers/block/ide-cd.c | drive->special.all = 0; |
drive | 2570 | drivers/block/ide-cd.c | drive->ready_stat = 0; |
drive | 2572 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->media_changed = 0; |
drive | 2573 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->toc_valid = 0; |
drive | 2574 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->door_locked = 0; |
drive | 2577 | drivers/block/ide-cd.c | CDROM_STATE_FLAGS (drive)->eject_on_close= 0; |
drive | 2579 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_doorlock = 0; |
drive | 2580 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->drq_interrupt = |
drive | 2581 | drivers/block/ide-cd.c | ((drive->id->config & 0x0060) == 0x20); |
drive | 2584 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 0; |
drive | 2585 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->old_readcd = 0; |
drive | 2586 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 0; |
drive | 2587 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 0; |
drive | 2588 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 0; |
drive | 2591 | drivers/block/ide-cd.c | if (strcmp (drive->id->model, "CD220E") == 0 || |
drive | 2592 | drivers/block/ide-cd.c | strcmp (drive->id->model, "CD") == 0) /* Creative Labs */ |
drive | 2593 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2595 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "TO-ICSLYAL") == 0 || /* Acer CD525E */ |
drive | 2596 | drivers/block/ide-cd.c | strcmp (drive->id->model, "OTI-SCYLLA") == 0) |
drive | 2597 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2601 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "DCI-2S10") == 0) |
drive | 2602 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2604 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "CDA26803I SE") == 0) /* Aztech */ |
drive | 2606 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2609 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_playaudio12 = 1; |
drive | 2612 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V003S0DS") == 0 || /* Vertos */ |
drive | 2613 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V300SSD") == 0) |
drive | 2615 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->vertos_lossage = 1; |
drive | 2616 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->playmsf_uses_bcd = 1; |
drive | 2617 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2620 | drivers/block/ide-cd.c | else if (strcmp (drive->id->model, "V004E0DT") == 0 || |
drive | 2621 | drivers/block/ide-cd.c | strcmp (drive->id->model, "0V400ETD") == 0) |
drive | 2622 | drivers/block/ide-cd.c | CDROM_CONFIG_FLAGS (drive)->no_lba_toc = 1; |
drive | 2625 | drivers/block/ide-cd.c | drive->cdrom_info.toc = NULL; |
drive | 2626 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffer = NULL; |
drive | 2627 | drivers/block/ide-cd.c | drive->cdrom_info.sector_buffered = 0; |
drive | 2628 | drivers/block/ide-cd.c | drive->cdrom_info.nsectors_buffered = 0; |
drive | 443 | drivers/block/ide-tape.c | #define IDETAPE_DATA_REG (HWIF(drive)->io_base+IDETAPE_DATA_OFFSET) |
drive | 444 | drivers/block/ide-tape.c | #define IDETAPE_ERROR_REG (HWIF(drive)->io_base+IDETAPE_ERROR_OFFSET) |
drive | 445 | drivers/block/ide-tape.c | #define IDETAPE_IREASON_REG (HWIF(drive)->io_base+IDETAPE_IREASON_OFFSET) |
drive | 446 | drivers/block/ide-tape.c | #define IDETAPE_RESERVED3_REG (HWIF(drive)->io_base+IDETAPE_RESERVED3_OFFSET) |
drive | 447 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTL_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTL_OFFSET) |
drive | 448 | drivers/block/ide-tape.c | #define IDETAPE_BCOUNTH_REG (HWIF(drive)->io_base+IDETAPE_BCOUNTH_OFFSET) |
drive | 449 | drivers/block/ide-tape.c | #define IDETAPE_DRIVESEL_REG (HWIF(drive)->io_base+IDETAPE_DRIVESEL_OFFSET) |
drive | 450 | drivers/block/ide-tape.c | #define IDETAPE_STATUS_REG (HWIF(drive)->io_base+IDETAPE_STATUS_OFFSET) |
drive | 457 | drivers/block/ide-tape.c | #define IDETAPE_FEATURES_REG (HWIF(drive)->io_base+IDETAPE_FEATURES_OFFSET) |
drive | 458 | drivers/block/ide-tape.c | #define IDETAPE_ATACOMMAND_REG (HWIF(drive)->io_base+IDETAPE_ATACOMMAND_OFFSET) |
drive | 459 | drivers/block/ide-tape.c | #define IDETAPE_CONTROL_REG (HWIF(drive)->ctl_port) |
drive | 580 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 787 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 788 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount); |
drive | 789 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount); |
drive | 795 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler); |
drive | 796 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive); |
drive | 802 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive); |
drive | 805 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive); |
drive | 806 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive); |
drive | 812 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive); |
drive | 813 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive); |
drive | 815 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq); |
drive | 816 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result); |
drive | 818 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive); |
drive | 819 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive); |
drive | 833 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive); |
drive | 842 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive); |
drive | 844 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive); |
drive | 846 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive); |
drive | 849 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive); |
drive | 876 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 883 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count); |
drive | 891 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 898 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer); |
drive | 906 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer); |
drive | 913 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc); |
drive | 915 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block); |
drive | 916 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive); |
drive | 917 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive); |
drive | 923 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive); |
drive | 936 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive); |
drive | 940 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive); |
drive | 941 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage); |
drive | 942 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive); |
drive | 943 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive); |
drive | 944 | drivers/block/ide-tape.c | void idetape_empty_read_pipeline (ide_drive_t *drive); |
drive | 945 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive); |
drive | 946 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive); |
drive | 1001 | drivers/block/ide-tape.c | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id) |
drive | 1144 | drivers/block/ide-tape.c | idetape_chrdev.drive=drive; |
drive | 1168 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 1173 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 1183 | drivers/block/ide-tape.c | drive->name,idetape_chrdev.name,major); |
drive | 1201 | drivers/block/ide-tape.c | void idetape_setup (ide_drive_t *drive) |
drive | 1204 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1212 | drivers/block/ide-tape.c | drive->ready_stat = 0; /* With an ATAPI device, we can issue packet commands */ |
drive | 1214 | drivers/block/ide-tape.c | HWIF(drive)->tape_drive=drive; |
drive | 1237 | drivers/block/ide-tape.c | idetape_get_mode_sense_results (drive); |
drive | 1318 | drivers/block/ide-tape.c | void idetape_get_mode_sense_results (ide_drive_t *drive) |
drive | 1322 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1331 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 1428 | drivers/block/ide-tape.c | void idetape_issue_packet_command (ide_drive_t *drive,idetape_packet_command_t *pc,ide_handler_t *handler) |
drive | 1435 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 1456 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1467 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 1489 | drivers/block/ide-tape.c | OUT_BYTE (drive->select.all,IDETAPE_DRIVESEL_REG); |
drive | 1491 | drivers/block/ide-tape.c | ide_set_handler (drive,handler,WAIT_CMD); /* Set the interrupt routine */ |
drive | 1493 | 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 | 1513 | drivers/block/ide-tape.c | ide_output_data (drive,pc->c,12/4); /* Send the actual packet */ |
drive | 1526 | drivers/block/ide-tape.c | void idetape_pc_intr (ide_drive_t *drive) |
drive | 1529 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1556 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1558 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 1564 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to handle other requests */ |
drive | 1574 | drivers/block/ide-tape.c | (*pc->callback)(drive); /* Command finished - Call the callback function */ |
drive | 1598 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1599 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1612 | drivers/block/ide-tape.c | idetape_discard_data (drive,bcount.all); |
drive | 1613 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); |
drive | 1621 | drivers/block/ide-tape.c | idetape_output_data (drive,pc->current_position,bcount.all); /* Write the current buffer */ |
drive | 1623 | drivers/block/ide-tape.c | idetape_input_data (drive,pc->current_position,bcount.all); /* Read the current buffer */ |
drive | 1630 | drivers/block/ide-tape.c | ide_set_handler (drive,&idetape_pc_intr,WAIT_CMD); /* And set the interrupt handler again */ |
drive | 1639 | drivers/block/ide-tape.c | void idetape_postpone_request (ide_drive_t *drive) |
drive | 1642 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1656 | drivers/block/ide-tape.c | tape->dsc_timer.data=(unsigned long) drive; |
drive | 1664 | drivers/block/ide-tape.c | tape->postponed_rq = rq = HWGROUP(drive)->rq; |
drive | 1667 | drivers/block/ide-tape.c | HWGROUP(drive)->rq = NULL; |
drive | 1690 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1691 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1695 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc_direct called\n",drive->name); |
drive | 1698 | drivers/block/ide-tape.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 1704 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); /* request in the request queue */ |
drive | 1712 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1745 | drivers/block/ide-tape.c | ide_drive_t *drive=(ide_drive_t *) data; |
drive | 1746 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 1747 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1753 | drivers/block/ide-tape.c | printk ("%s: idetape_poll_for_dsc called\n",drive->name); |
drive | 1778 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1842 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1892 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1911 | drivers/block/ide-tape.c | idetape_put_back_postponed_request (drive); |
drive | 1932 | drivers/block/ide-tape.c | void idetape_put_back_postponed_request (ide_drive_t *drive) |
drive | 1935 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 1946 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next); |
drive | 1960 | drivers/block/ide-tape.c | void idetape_media_access_finished (ide_drive_t *drive) |
drive | 1963 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 1976 | drivers/block/ide-tape.c | printk ("ide-tape: %s: I/O error, ",drive->name); |
drive | 1977 | drivers/block/ide-tape.c | idetape_retry_pc (drive); /* Retry operation */ |
drive | 1988 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 1993 | drivers/block/ide-tape.c | printk ("ide-tape: %s: DSC timeout.\n",drive->name); |
drive | 2002 | drivers/block/ide-tape.c | (*pc->callback)(drive); |
drive | 2014 | drivers/block/ide-tape.c | void idetape_retry_pc (ide_drive_t *drive) |
drive | 2022 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 2023 | drivers/block/ide-tape.c | new_rq=idetape_next_rq_storage (drive); |
drive | 2028 | drivers/block/ide-tape.c | idetape_queue_pc_head (drive,pc,new_rq); |
drive | 2035 | drivers/block/ide-tape.c | void idetape_pc_callback (ide_drive_t *drive) |
drive | 2041 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2042 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2051 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2054 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2060 | drivers/block/ide-tape.c | void idetape_read_callback (ide_drive_t *drive) |
drive | 2066 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2067 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2079 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2088 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2093 | drivers/block/ide-tape.c | void idetape_write_callback (ide_drive_t *drive) |
drive | 2099 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2100 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2112 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2115 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2120 | drivers/block/ide-tape.c | void idetape_inquiry_callback (ide_drive_t *drive) |
drive | 2125 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2128 | drivers/block/ide-tape.c | idetape_pc_callback (drive); |
drive | 2139 | drivers/block/ide-tape.c | void idetape_input_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2148 | drivers/block/ide-tape.c | ide_input_data (drive,buffer,wcount); |
drive | 2160 | drivers/block/ide-tape.c | void idetape_output_data (ide_drive_t *drive,void *buffer, unsigned long bcount) |
drive | 2169 | drivers/block/ide-tape.c | ide_output_data (drive,buffer,wcount); |
drive | 2182 | drivers/block/ide-tape.c | void idetape_discard_data (ide_drive_t *drive, unsigned long bcount) |
drive | 2310 | drivers/block/ide-tape.c | void idetape_request_sense_callback (ide_drive_t *drive) |
drive | 2313 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2322 | drivers/block/ide-tape.c | idetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer); |
drive | 2323 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2327 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2338 | drivers/block/ide-tape.c | void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *result) |
drive | 2341 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 2647 | drivers/block/ide-tape.c | void idetape_read_position_callback (ide_drive_t *drive) |
drive | 2654 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 2660 | drivers/block/ide-tape.c | rq=HWGROUP(drive)->rq; |
drive | 2674 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2682 | drivers/block/ide-tape.c | idetape_end_request (1,HWGROUP (drive)); |
drive | 2687 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2700 | drivers/block/ide-tape.c | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 2722 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 2728 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 2735 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 2757 | drivers/block/ide-tape.c | ide_drive_t *drive = hwgroup->drive; |
drive | 2759 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 2760 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 2789 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 2793 | drivers/block/ide-tape.c | idetape_increase_max_pipeline_stages (drive); |
drive | 2794 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2798 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 2808 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end); |
drive | 2810 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next); |
drive | 2813 | drivers/block/ide-tape.c | ide_end_drive_cmd (drive, 0, 0); |
drive | 2820 | drivers/block/ide-tape.c | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 2823 | 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 | 2848 | drivers/block/ide-tape.c | ide_end_request (0,HWGROUP (drive)); /* Let the common code handle it */ |
drive | 2878 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr); |
drive | 2888 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 2897 | drivers/block/ide-tape.c | idetape_media_access_finished (drive); |
drive | 2918 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 2922 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 2931 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 2941 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 2945 | drivers/block/ide-tape.c | pc=idetape_next_pc_storage (drive); |
drive | 2954 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 2972 | drivers/block/ide-tape.c | idetape_postpone_request (drive); /* Allow ide.c to process requests from */ |
drive | 2977 | drivers/block/ide-tape.c | idetape_issue_packet_command (drive,pc,&idetape_pc_intr); |
drive | 2982 | drivers/block/ide-tape.c | idetape_end_request (0,HWGROUP (drive)); |
drive | 3008 | drivers/block/ide-tape.c | int idetape_queue_pc_tail (ide_drive_t *drive,idetape_packet_command_t *pc) |
drive | 3015 | drivers/block/ide-tape.c | return ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3038 | drivers/block/ide-tape.c | void idetape_queue_pc_head (ide_drive_t *drive,idetape_packet_command_t *pc,struct request *rq) |
drive | 3041 | drivers/block/ide-tape.c | unsigned int major = HWIF(drive)->major; |
drive | 3044 | drivers/block/ide-tape.c | bdev->current_request=HWGROUP (drive)->rq; /* Since we may have taken it out */ |
drive | 3049 | drivers/block/ide-tape.c | (void) ide_do_drive_cmd (drive, rq, ide_preempt); |
drive | 3086 | drivers/block/ide-tape.c | int idetape_queue_rw_tail (ide_drive_t *drive,int cmd,int blocks,char *buffer) |
drive | 3089 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3104 | drivers/block/ide-tape.c | return ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 3112 | drivers/block/ide-tape.c | int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3115 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3132 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3136 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3138 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3141 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3151 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,blocks,buffer)); |
drive | 3163 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3179 | drivers/block/ide-tape.c | int idetape_add_chrdev_write_request (ide_drive_t *drive,int blocks,char *buffer) |
drive | 3182 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3194 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3208 | drivers/block/ide-tape.c | new_stage=idetape_kmalloc_stage (drive); |
drive | 3217 | drivers/block/ide-tape.c | return (idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,blocks,buffer)); |
drive | 3232 | drivers/block/ide-tape.c | idetape_add_stage_tail (drive,new_stage); |
drive | 3245 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3250 | drivers/block/ide-tape.c | void idetape_empty_read_pipeline (ide_drive_t *drive) |
drive | 3253 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3273 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 3283 | drivers/block/ide-tape.c | void idetape_empty_write_pipeline (ide_drive_t *drive) |
drive | 3286 | drivers/block/ide-tape.c | idetape_tape_t *tape = &(drive->tape); |
drive | 3297 | drivers/block/ide-tape.c | idetape_insert_pipeline_into_queue (drive); |
drive | 3401 | drivers/block/ide-tape.c | idetape_packet_command_t *idetape_next_pc_storage (ide_drive_t *drive) |
drive | 3406 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3428 | drivers/block/ide-tape.c | struct request *idetape_next_rq_storage (ide_drive_t *drive) |
drive | 3433 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3451 | drivers/block/ide-tape.c | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3454 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3474 | drivers/block/ide-tape.c | void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive) |
drive | 3477 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3525 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3526 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3537 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3538 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3547 | drivers/block/ide-tape.c | retval=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->temp_data_buffer); |
drive | 3564 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->temp_data_buffer); |
drive | 3589 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3590 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3610 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_read_request (drive,blocks,tape->temp_data_buffer); |
drive | 3632 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 3642 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 3643 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3647 | drivers/block/ide-tape.c | idetape_empty_read_pipeline (drive); |
drive | 3655 | drivers/block/ide-tape.c | retval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->temp_data_buffer); |
drive | 3674 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->temp_data_buffer); |
drive | 3697 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 3707 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 3708 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 3731 | drivers/block/ide-tape.c | retval=idetape_add_chrdev_write_request (drive,blocks,tape->temp_data_buffer); |
drive | 3778 | drivers/block/ide-tape.c | ide_drive_t *drive=idetape_chrdev.drive; |
drive | 3779 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3791 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 3792 | drivers/block/ide-tape.c | idetape_flush_tape_buffers (drive); |
drive | 3798 | drivers/block/ide-tape.c | idetape_empty_read_pipeline (drive); |
drive | 3811 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count)); |
drive | 3820 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3828 | drivers/block/ide-tape.c | return (idetape_blkdev_ioctl (drive,inode,file,cmd,arg)); |
drive | 3885 | drivers/block/ide-tape.c | int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 3888 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 3909 | drivers/block/ide-tape.c | return (idetape_space_over_filemarks (drive,mt_op,mt_count)); |
drive | 3919 | drivers/block/ide-tape.c | idetape_empty_read_pipeline (drive); |
drive | 3927 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 3932 | drivers/block/ide-tape.c | return (idetape_rewind_tape (drive)); |
drive | 3935 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3937 | drivers/block/ide-tape.c | return (idetape_flush_tape_buffers (drive)); |
drive | 3940 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3943 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3945 | drivers/block/ide-tape.c | retval=idetape_rewind_tape (drive); |
drive | 3948 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 3950 | drivers/block/ide-tape.c | return (idetape_position_tape (drive,mt_count)); |
drive | 3967 | drivers/block/ide-tape.c | int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count) |
drive | 3970 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4001 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4006 | drivers/block/ide-tape.c | idetape_remove_stage_head (drive); |
drive | 4023 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4027 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTFSF,mt_count-count); |
drive | 4029 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTBSF,1)); |
drive | 4034 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4038 | drivers/block/ide-tape.c | retval=idetape_mtioctop (drive,MTBSF,mt_count+count); |
drive | 4040 | drivers/block/ide-tape.c | return (idetape_mtioctop (drive,MTFSF,1)); |
drive | 4054 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 4066 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 4067 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 4084 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) { |
drive | 4101 | drivers/block/ide-tape.c | ide_drive_t *drive; |
drive | 4112 | drivers/block/ide-tape.c | drive=idetape_chrdev.drive; |
drive | 4113 | drivers/block/ide-tape.c | tape=&(drive->tape); |
drive | 4117 | drivers/block/ide-tape.c | idetape_empty_write_pipeline (drive); |
drive | 4120 | drivers/block/ide-tape.c | if (idetape_queue_pc_tail (drive,&pc)) { |
drive | 4128 | drivers/block/ide-tape.c | idetape_empty_read_pipeline (drive); |
drive | 4129 | drivers/block/ide-tape.c | if (idetape_rewind_tape (drive)) { |
drive | 4152 | drivers/block/ide-tape.c | int idetape_position_tape (ide_drive_t *drive,unsigned long block) |
drive | 4159 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4166 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4175 | drivers/block/ide-tape.c | int idetape_rewind_tape (ide_drive_t *drive) |
drive | 4185 | drivers/block/ide-tape.c | retval=idetape_queue_pc_tail (drive,&pc); |
drive | 4192 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4195 | drivers/block/ide-tape.c | int idetape_flush_tape_buffers (ide_drive_t *drive) |
drive | 4201 | drivers/block/ide-tape.c | return (idetape_queue_pc_tail (drive,&pc)); |
drive | 4222 | drivers/block/ide-tape.c | idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive) |
drive | 4225 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4394 | drivers/block/ide-tape.c | void idetape_increase_max_pipeline_stages (ide_drive_t *drive) |
drive | 4397 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4422 | drivers/block/ide-tape.c | void idetape_add_stage_tail (ide_drive_t *drive,idetape_pipeline_stage_t *stage) |
drive | 4425 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4449 | drivers/block/ide-tape.c | void idetape_remove_stage_head (ide_drive_t *drive) |
drive | 4452 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4488 | drivers/block/ide-tape.c | void idetape_insert_pipeline_into_queue (ide_drive_t *drive) |
drive | 4491 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 4497 | drivers/block/ide-tape.c | idetape_active_next_stage (drive); |
drive | 4498 | drivers/block/ide-tape.c | (void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end)); |
drive | 4507 | drivers/block/ide-tape.c | void idetape_active_next_stage (ide_drive_t *drive) |
drive | 4510 | drivers/block/ide-tape.c | idetape_tape_t *tape=&(drive->tape); |
drive | 263 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) set_recovery_timer (drive) |
drive | 267 | drivers/block/ide.c | #define SET_RECOVERY_TIMER(drive) |
drive | 325 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 328 | drivers/block/ide.c | drive->select.all = (unit<<4)|0xa0; |
drive | 329 | drivers/block/ide.c | drive->hwif = hwif; |
drive | 330 | drivers/block/ide.c | drive->ctl = 0x08; |
drive | 331 | drivers/block/ide.c | drive->ready_stat = READY_STAT; |
drive | 332 | drivers/block/ide.c | drive->bad_wstat = BAD_W_STAT; |
drive | 333 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 334 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 335 | drivers/block/ide.c | drive->name[0] = 'h'; |
drive | 336 | drivers/block/ide.c | drive->name[1] = 'd'; |
drive | 337 | drivers/block/ide.c | drive->name[2] = 'a' + (h * MAX_DRIVES) + unit; |
drive | 359 | drivers/block/ide.c | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 361 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 364 | drivers/block/ide.c | if (drive->vlb_32bit) { |
drive | 366 | drivers/block/ide.c | if (drive->vlb_sync) { |
drive | 370 | drivers/block/ide.c | if (drive->unmask) |
drive | 382 | drivers/block/ide.c | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount) |
drive | 384 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 387 | drivers/block/ide.c | if (drive->vlb_32bit) { |
drive | 389 | drivers/block/ide.c | if (drive->vlb_sync) { |
drive | 393 | drivers/block/ide.c | if (drive->unmask) |
drive | 453 | drivers/block/ide.c | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout) |
drive | 455 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 459 | drivers/block/ide.c | drive->name, hwgroup->handler, handler); |
drive | 497 | drivers/block/ide.c | static unsigned long current_capacity (ide_drive_t *drive) |
drive | 499 | drivers/block/ide.c | struct hd_driveid *id = drive->id; |
drive | 502 | drivers/block/ide.c | if (!drive->present) |
drive | 504 | drivers/block/ide.c | if (drive->media != ide_disk) |
drive | 508 | drivers/block/ide.c | drive->select.b.lba = 1; |
drive | 511 | drivers/block/ide.c | drive->select.b.lba = 0; |
drive | 512 | drivers/block/ide.c | capacity = drive->cyl * drive->head * drive->sect; |
drive | 514 | drivers/block/ide.c | return (capacity - drive->sect0); |
drive | 527 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 529 | drivers/block/ide.c | if (drive->present && drive->media == ide_cdrom) |
drive | 530 | drivers/block/ide.c | ide_cdrom_setup(drive); |
drive | 533 | drivers/block/ide.c | if (drive->present && drive->media == ide_tape) |
drive | 534 | drivers/block/ide.c | idetape_setup(drive); |
drive | 536 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 537 | drivers/block/ide.c | if (!drive->present || drive->media != ide_disk) { |
drive | 538 | drivers/block/ide.c | drive->part[0].start_sect = -1; /* skip partition check */ |
drive | 603 | drivers/block/ide.c | static void atapi_reset_pollfunc (ide_drive_t *drive) |
drive | 605 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 608 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 612 | drivers/block/ide.c | printk("%s: ATAPI reset complete\n", drive->name); |
drive | 615 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 619 | drivers/block/ide.c | printk("%s: ATAPI reset timed-out, status=0x%02x\n", drive->name, stat); |
drive | 620 | drivers/block/ide.c | do_reset1 (drive, 1); /* do it the old fashioned way */ |
drive | 632 | drivers/block/ide.c | static void reset_pollfunc (ide_drive_t *drive) |
drive | 634 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 635 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 640 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 686 | drivers/block/ide.c | static void do_reset1 (ide_drive_t *drive, int do_not_try_atapi) |
drive | 690 | drivers/block/ide.c | ide_hwif_t *hwif = HWIF(drive); |
drive | 691 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 698 | drivers/block/ide.c | if (drive->media != ide_disk) { |
drive | 700 | drivers/block/ide.c | if (!drive->keep_settings) |
drive | 701 | drivers/block/ide.c | drive->unmask = 0; |
drive | 702 | drivers/block/ide.c | OUT_BYTE (drive->select.all, IDE_SELECT_REG); |
drive | 706 | drivers/block/ide.c | ide_set_handler (drive, &atapi_reset_pollfunc, HZ/20); |
drive | 741 | drivers/block/ide.c | OUT_BYTE(drive->ctl|6,IDE_CONTROL_REG); /* set SRST and nIEN */ |
drive | 743 | drivers/block/ide.c | OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG); /* clear SRST, leave nIEN */ |
drive | 745 | drivers/block/ide.c | ide_set_handler (drive, &reset_pollfunc, HZ/20); |
drive | 754 | drivers/block/ide.c | void ide_do_reset (ide_drive_t *drive) |
drive | 756 | drivers/block/ide.c | do_reset1 (drive, 0); |
drive | 762 | drivers/block/ide.c | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err) |
drive | 765 | drivers/block/ide.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 779 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 789 | drivers/block/ide.c | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat) |
drive | 796 | drivers/block/ide.c | printk("%s: %s: status=0x%02x", drive->name, msg, stat); |
drive | 798 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 817 | drivers/block/ide.c | printk("%s: %s: error=0x%02x", drive->name, msg, err); |
drive | 819 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 843 | drivers/block/ide.c | if (HWGROUP(drive)->rq) |
drive | 844 | drivers/block/ide.c | printk(", sector=%ld", HWGROUP(drive)->rq->sector); |
drive | 861 | drivers/block/ide.c | static void try_to_flush_leftover_data (ide_drive_t *drive) |
drive | 863 | drivers/block/ide.c | int i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS; |
drive | 869 | drivers/block/ide.c | ide_input_data (drive, buffer, wcount); |
drive | 876 | drivers/block/ide.c | void ide_error (ide_drive_t *drive, const char *msg, byte stat) |
drive | 881 | drivers/block/ide.c | err = ide_dump_status(drive, msg, stat); |
drive | 882 | drivers/block/ide.c | if ((rq = HWGROUP(drive)->rq) == NULL || drive == NULL) |
drive | 886 | drivers/block/ide.c | ide_end_drive_cmd(drive, stat, err); |
drive | 892 | drivers/block/ide.c | if (drive->media == ide_disk && (stat & ERR_STAT)) { |
drive | 900 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 906 | drivers/block/ide.c | if (rq->errors > 3 && drive->using_dma) { /* DMA troubles? */ |
drive | 907 | drivers/block/ide.c | drive->using_dma = 0; |
drive | 908 | drivers/block/ide.c | printk("%s: DMA disabled\n", drive->name); |
drive | 914 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 918 | drivers/block/ide.c | ide_do_reset(drive); |
drive | 921 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 929 | drivers/block/ide.c | static void read_intr (ide_drive_t *drive) |
drive | 937 | drivers/block/ide.c | ide_error(drive, "read_intr", stat); |
drive | 940 | drivers/block/ide.c | msect = drive->mult_count; |
drive | 942 | drivers/block/ide.c | rq = HWGROUP(drive)->rq; |
drive | 949 | drivers/block/ide.c | ide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS); |
drive | 952 | drivers/block/ide.c | drive->name, rq->sector, rq->sector+nsect-1, |
drive | 960 | drivers/block/ide.c | ide_end_request(1, HWGROUP(drive)); |
drive | 964 | drivers/block/ide.c | ide_set_handler (drive, &read_intr, WAIT_CMD); |
drive | 971 | drivers/block/ide.c | static void write_intr (ide_drive_t *drive) |
drive | 975 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 978 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 981 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 993 | drivers/block/ide.c | ide_output_data (drive, rq->buffer, SECTOR_WORDS); |
drive | 994 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 999 | drivers/block/ide.c | ide_error(drive, "write_intr", stat); |
drive | 1006 | drivers/block/ide.c | static void multwrite (ide_drive_t *drive) |
drive | 1008 | drivers/block/ide.c | struct request *rq = &HWGROUP(drive)->wrq; |
drive | 1009 | drivers/block/ide.c | unsigned int mcount = drive->mult_count; |
drive | 1017 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, nsect<<7); |
drive | 1020 | drivers/block/ide.c | drive->name, rq->sector, (unsigned long) rq->buffer, |
drive | 1030 | drivers/block/ide.c | panic("%s: buffer list corrupted\n", drive->name); |
drive | 1042 | drivers/block/ide.c | static void multwrite_intr (ide_drive_t *drive) |
drive | 1046 | drivers/block/ide.c | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
drive | 1049 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) { |
drive | 1052 | drivers/block/ide.c | multwrite(drive); |
drive | 1053 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1067 | drivers/block/ide.c | ide_error(drive, "multwrite_intr", stat); |
drive | 1074 | drivers/block/ide.c | static void ide_cmd(ide_drive_t *drive, byte cmd, byte nsect, ide_handler_t *handler) |
drive | 1076 | drivers/block/ide.c | ide_set_handler (drive, handler, WAIT_CMD); |
drive | 1077 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1085 | drivers/block/ide.c | static void set_multmode_intr (ide_drive_t *drive) |
drive | 1091 | drivers/block/ide.c | drive->mult_count = drive->mult_req; |
drive | 1093 | drivers/block/ide.c | drive->mult_req = drive->mult_count = 0; |
drive | 1094 | drivers/block/ide.c | drive->special.b.recalibrate = 1; |
drive | 1095 | drivers/block/ide.c | (void) ide_dump_status(drive, "set_multmode", stat); |
drive | 1102 | drivers/block/ide.c | static void set_geometry_intr (ide_drive_t *drive) |
drive | 1108 | drivers/block/ide.c | ide_error(drive, "set_geometry_intr", stat); |
drive | 1114 | drivers/block/ide.c | static void recal_intr (ide_drive_t *drive) |
drive | 1120 | drivers/block/ide.c | ide_error(drive, "recal_intr", stat); |
drive | 1126 | drivers/block/ide.c | static void drive_cmd_intr (ide_drive_t *drive) |
drive | 1132 | drivers/block/ide.c | ide_end_drive_cmd (drive, stat, GET_ERR()); |
drive | 1134 | drivers/block/ide.c | ide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */ |
drive | 1142 | drivers/block/ide.c | static inline void do_special (ide_drive_t *drive) |
drive | 1144 | drivers/block/ide.c | special_t *s = &drive->special; |
drive | 1146 | drivers/block/ide.c | printk("%s: do_special: 0x%02x\n", drive->name, s->all); |
drive | 1150 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1151 | drivers/block/ide.c | OUT_BYTE(drive->sect,IDE_SECTOR_REG); |
drive | 1152 | drivers/block/ide.c | OUT_BYTE(drive->cyl,IDE_LCYL_REG); |
drive | 1153 | drivers/block/ide.c | OUT_BYTE(drive->cyl>>8,IDE_HCYL_REG); |
drive | 1154 | drivers/block/ide.c | OUT_BYTE(((drive->head-1)|drive->select.all)&0xBF,IDE_SELECT_REG); |
drive | 1155 | drivers/block/ide.c | ide_cmd(drive, WIN_SPECIFY, drive->sect, &set_geometry_intr); |
drive | 1159 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1160 | drivers/block/ide.c | ide_cmd(drive, WIN_RESTORE, drive->sect, &recal_intr); |
drive | 1164 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 1165 | drivers/block/ide.c | if (drive->id && drive->mult_req > drive->id->max_multsect) |
drive | 1166 | drivers/block/ide.c | drive->mult_req = drive->id->max_multsect; |
drive | 1167 | drivers/block/ide.c | ide_cmd(drive, WIN_SETMULT, drive->mult_req, &set_multmode_intr); |
drive | 1169 | drivers/block/ide.c | drive->mult_req = 0; |
drive | 1172 | drivers/block/ide.c | printk("%s: bad special flag: 0x%02x\n", drive->name, s->all); |
drive | 1187 | drivers/block/ide.c | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout) |
drive | 1197 | drivers/block/ide.c | ide_error(drive, "status error", stat); |
drive | 1212 | drivers/block/ide.c | ide_error(drive, "status timeout", GET_STAT()); |
drive | 1221 | drivers/block/ide.c | static inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned long block) |
drive | 1223 | drivers/block/ide.c | unsigned short io_base = HWIF(drive)->io_base; |
drive | 1225 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); |
drive | 1227 | drivers/block/ide.c | if (drive->select.b.lba) { |
drive | 1230 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", |
drive | 1236 | drivers/block/ide.c | OUT_BYTE(((block>>8)&0x0f)|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1239 | drivers/block/ide.c | track = block / drive->sect; |
drive | 1240 | drivers/block/ide.c | sect = block % drive->sect + 1; |
drive | 1242 | drivers/block/ide.c | head = track % drive->head; |
drive | 1243 | drivers/block/ide.c | cyl = track / drive->head; |
drive | 1246 | drivers/block/ide.c | OUT_BYTE(head|drive->select.all,io_base+IDE_SELECT_OFFSET); |
drive | 1249 | drivers/block/ide.c | drive->name, (rq->cmd==READ)?"read":"writ", cyl, |
drive | 1255 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive))) |
drive | 1258 | drivers/block/ide.c | ide_set_handler(drive, &read_intr, WAIT_CMD); |
drive | 1259 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, io_base+IDE_COMMAND_OFFSET); |
drive | 1264 | drivers/block/ide.c | if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive))) |
drive | 1267 | drivers/block/ide.c | OUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET); |
drive | 1268 | drivers/block/ide.c | if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { |
drive | 1269 | drivers/block/ide.c | printk("%s: no DRQ after issuing %s\n", drive->name, |
drive | 1270 | drivers/block/ide.c | drive->mult_count ? "MULTWRITE" : "WRITE"); |
drive | 1273 | drivers/block/ide.c | if (!drive->unmask) |
drive | 1275 | drivers/block/ide.c | if (drive->mult_count) { |
drive | 1276 | drivers/block/ide.c | HWGROUP(drive)->wrq = *rq; /* scratchpad */ |
drive | 1277 | drivers/block/ide.c | ide_set_handler (drive, &multwrite_intr, WAIT_CMD); |
drive | 1278 | drivers/block/ide.c | multwrite(drive); |
drive | 1280 | drivers/block/ide.c | ide_set_handler (drive, &write_intr, WAIT_CMD); |
drive | 1281 | drivers/block/ide.c | ide_output_data(drive, rq->buffer, SECTOR_WORDS); |
drive | 1290 | drivers/block/ide.c | drive->name, args[0], args[1], args[2]); |
drive | 1293 | drivers/block/ide.c | ide_cmd(drive, args[0], args[1], &drive_cmd_intr); |
drive | 1301 | drivers/block/ide.c | printk("%s: DRIVE_CMD (null)\n", drive->name); |
drive | 1303 | drivers/block/ide.c | ide_end_drive_cmd(drive, GET_STAT(), GET_ERR()); |
drive | 1307 | drivers/block/ide.c | printk("%s: bad command: %d\n", drive->name, rq->cmd); |
drive | 1308 | drivers/block/ide.c | ide_end_request(0, HWGROUP(drive)); |
drive | 1318 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1331 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 1334 | drivers/block/ide.c | printk("%s: block not locked\n", drive->name); |
drive | 1340 | drivers/block/ide.c | if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) { |
drive | 1341 | drivers/block/ide.c | printk("%s%c: bad access: block=%ld, count=%ld\n", drive->name, |
drive | 1345 | drivers/block/ide.c | block += drive->part[minor&PARTN_MASK].start_sect + drive->sect0; |
drive | 1347 | drivers/block/ide.c | if (block == 0 && drive->ezdrive) { |
drive | 1349 | drivers/block/ide.c | printk("%s: [EZD] accessing sector 1 instead of sector 0\n", drive->name); |
drive | 1352 | drivers/block/ide.c | ((ide_hwgroup_t *)hwif->hwgroup)->drive = drive; |
drive | 1365 | drivers/block/ide.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); |
drive | 1366 | drivers/block/ide.c | if (ide_wait_stat(drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) { |
drive | 1367 | drivers/block/ide.c | printk("%s: drive not ready for command\n", drive->name); |
drive | 1371 | drivers/block/ide.c | if (!drive->special.all) { |
drive | 1373 | drivers/block/ide.c | switch (drive->media) { |
drive | 1375 | drivers/block/ide.c | do_rw_disk (drive, rq, block); |
drive | 1379 | drivers/block/ide.c | ide_do_rw_cdrom (drive, block); |
drive | 1385 | drivers/block/ide.c | idetape_do_request (drive, rq, block); |
drive | 1391 | drivers/block/ide.c | drive->name, drive->media); |
drive | 1395 | drivers/block/ide.c | do_rw_disk (drive, rq, block); /* simpler and faster */ |
drive | 1399 | drivers/block/ide.c | do_special(drive); |
drive | 1493 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1502 | drivers/block/ide.c | handler(drive); |
drive | 1505 | drivers/block/ide.c | printk("%s: marginal timeout\n", drive->name); |
drive | 1509 | drivers/block/ide.c | (void) hwgroup->hwif->dmaproc (ide_dma_abort, drive); |
drive | 1510 | drivers/block/ide.c | ide_error(drive, "irq timeout", GET_STAT()); |
drive | 1556 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1557 | drivers/block/ide.c | if (!drive->present) |
drive | 1559 | drivers/block/ide.c | if (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT)) |
drive | 1560 | drivers/block/ide.c | (void) ide_dump_status(drive, "unexpected_intr", stat); |
drive | 1562 | drivers/block/ide.c | try_to_flush_leftover_data(drive); |
drive | 1577 | drivers/block/ide.c | ide_drive_t *drive = hwgroup->drive; |
drive | 1580 | drivers/block/ide.c | if (drive->unmask) |
drive | 1582 | drivers/block/ide.c | handler(drive); |
drive | 1585 | drivers/block/ide.c | SET_RECOVERY_TIMER(HWIF(drive)); |
drive | 1608 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 1609 | drivers/block/ide.c | if (drive->present) |
drive | 1610 | 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 | 1691 | drivers/block/ide.c | HWGROUP(drive)->rq = NULL; |
drive | 1710 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1713 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1717 | drivers/block/ide.c | while (drive->busy) |
drive | 1718 | drivers/block/ide.c | sleep_on(&drive->wqueue); |
drive | 1719 | drivers/block/ide.c | drive->usage++; |
drive | 1722 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 1723 | drivers/block/ide.c | return ide_cdrom_open (inode, filp, drive); |
drive | 1726 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 1727 | drivers/block/ide.c | return idetape_blkdev_open (inode, filp, drive); |
drive | 1729 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1740 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1751 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1753 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) != NULL) { |
drive | 1755 | drivers/block/ide.c | drive->usage--; |
drive | 1757 | drivers/block/ide.c | if (drive->media == ide_cdrom) { |
drive | 1758 | drivers/block/ide.c | ide_cdrom_release (inode, file, drive); |
drive | 1763 | drivers/block/ide.c | if (drive->media == ide_tape) { |
drive | 1764 | drivers/block/ide.c | idetape_blkdev_release (inode, file, drive); |
drive | 1768 | drivers/block/ide.c | if (drive->removeable) { |
drive | 1774 | drivers/block/ide.c | (void) ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1789 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1793 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 1797 | drivers/block/ide.c | minor = drive->select.b.unit << PARTN_BITS; |
drive | 1800 | drivers/block/ide.c | if (drive->busy || (drive->usage > 1)) { |
drive | 1804 | drivers/block/ide.c | drive->busy = 1; |
drive | 1808 | drivers/block/ide.c | if (drive->part[p].nr_sects > 0) { |
drive | 1814 | drivers/block/ide.c | drive->part[p].start_sect = 0; |
drive | 1815 | drivers/block/ide.c | drive->part[p].nr_sects = 0; |
drive | 1818 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 1819 | drivers/block/ide.c | if (drive->media == ide_disk) |
drive | 1820 | drivers/block/ide.c | resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit); |
drive | 1822 | drivers/block/ide.c | drive->busy = 0; |
drive | 1823 | drivers/block/ide.c | wake_up(&drive->wqueue); |
drive | 1844 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 1851 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
drive | 1855 | drivers/block/ide.c | if (!loc || drive->media != ide_disk) return -EINVAL; |
drive | 1858 | drivers/block/ide.c | put_user(drive->bios_head, (byte *) &loc->heads); |
drive | 1859 | drivers/block/ide.c | put_user(drive->bios_sect, (byte *) &loc->sectors); |
drive | 1860 | drivers/block/ide.c | put_user(drive->bios_cyl, (unsigned short *) &loc->cylinders); |
drive | 1861 | drivers/block/ide.c | put_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect, |
drive | 1881 | drivers/block/ide.c | return write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects); |
drive | 1886 | drivers/block/ide.c | return write_fs_long(arg, drive->keep_settings); |
drive | 1889 | drivers/block/ide.c | return write_fs_long(arg, drive->unmask); |
drive | 1892 | drivers/block/ide.c | return write_fs_long(arg, drive->using_dma); |
drive | 1895 | drivers/block/ide.c | return write_fs_long(arg, drive->chipset); |
drive | 1898 | drivers/block/ide.c | return write_fs_long(arg, drive->mult_count); |
drive | 1903 | drivers/block/ide.c | if (drive->id == NULL) |
drive | 1905 | drivers/block/ide.c | err = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*drive->id)); |
drive | 1907 | drivers/block/ide.c | memcpy_tofs((char *)arg, (char *)drive->id, sizeof(*drive->id)); |
drive | 1911 | drivers/block/ide.c | return write_fs_long(arg, drive->bad_wstat == BAD_R_STAT); |
drive | 1914 | drivers/block/ide.c | if (drive->media != ide_disk) |
drive | 1916 | drivers/block/ide.c | if (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc) |
drive | 1932 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc)) { |
drive | 1936 | drivers/block/ide.c | drive->using_dma = arg; |
drive | 1939 | drivers/block/ide.c | drive->keep_settings = arg; |
drive | 1946 | drivers/block/ide.c | drive->unmask = arg; |
drive | 1949 | drivers/block/ide.c | drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; |
drive | 1952 | drivers/block/ide.c | drive->chipset = arg; |
drive | 1953 | drivers/block/ide.c | drive->vlb_32bit = (arg & 1); |
drive | 1954 | drivers/block/ide.c | drive->vlb_sync = (arg & 2) >> 1; |
drive | 1956 | drivers/block/ide.c | if (drive->vlb_sync) |
drive | 1957 | drivers/block/ide.c | printk("%s: VLB_SYNC not supported by this kernel\n", drive->name); |
drive | 1969 | drivers/block/ide.c | if ((drive->id != NULL) && (arg > drive->id->max_multsect)) |
drive | 1973 | drivers/block/ide.c | if (drive->special.b.set_multmode) { |
drive | 1977 | drivers/block/ide.c | drive->mult_req = arg; |
drive | 1978 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 1980 | drivers/block/ide.c | (void) ide_do_drive_cmd (drive, &rq, ide_wait); |
drive | 1981 | drivers/block/ide.c | return (drive->mult_count == arg) ? 0 : -EIO; |
drive | 1988 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 1995 | drivers/block/ide.c | err = ide_do_drive_cmd(drive, &rq, ide_wait); |
drive | 2007 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2008 | drivers/block/ide.c | return ide_cdrom_ioctl(drive, inode, file, cmd, arg); |
drive | 2011 | drivers/block/ide.c | if (drive->media == ide_tape) |
drive | 2012 | drivers/block/ide.c | return idetape_blkdev_ioctl(drive, inode, file, cmd, arg); |
drive | 2020 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2022 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 2025 | drivers/block/ide.c | if (drive->media == ide_cdrom) |
drive | 2026 | drivers/block/ide.c | return ide_cdrom_check_media_change (drive); |
drive | 2028 | drivers/block/ide.c | if (drive->removeable) /* for disks */ |
drive | 2060 | drivers/block/ide.c | static inline void do_identify (ide_drive_t *drive, byte cmd) |
drive | 2066 | drivers/block/ide.c | id = drive->id = kmalloc (SECTOR_WORDS*4, GFP_KERNEL); |
drive | 2067 | drivers/block/ide.c | ide_input_data(drive, id, SECTOR_WORDS); /* read 512 bytes of id info */ |
drive | 2075 | drivers/block/ide.c | printk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model); |
drive | 2076 | drivers/block/ide.c | drive->present = 0; |
drive | 2101 | drivers/block/ide.c | printk("%s: %s, ATAPI ", drive->name, id->model); |
drive | 2107 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2108 | drivers/block/ide.c | drive->present = 1; |
drive | 2109 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2118 | drivers/block/ide.c | if (idetape_identify_device (drive,id)) { |
drive | 2119 | drivers/block/ide.c | drive->media = ide_tape; |
drive | 2120 | drivers/block/ide.c | drive->present = 1; |
drive | 2121 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2124 | drivers/block/ide.c | drive->present = 0; |
drive | 2143 | drivers/block/ide.c | drive->removeable = 1; |
drive | 2146 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2148 | drivers/block/ide.c | if (!drive->present) { |
drive | 2149 | drivers/block/ide.c | drive->present = 1; |
drive | 2150 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = id->cyls; |
drive | 2151 | drivers/block/ide.c | drive->head = drive->bios_head = id->heads; |
drive | 2152 | drivers/block/ide.c | drive->sect = drive->bios_sect = id->sectors; |
drive | 2168 | drivers/block/ide.c | drive->cyl = id->cur_cyls; |
drive | 2169 | drivers/block/ide.c | drive->head = id->cur_heads; |
drive | 2170 | drivers/block/ide.c | drive->sect = id->cur_sectors; |
drive | 2173 | drivers/block/ide.c | capacity = drive->cyl * drive->head * drive->sect; |
drive | 2182 | drivers/block/ide.c | if ((!drive->head || drive->head > 16) && id->heads && id->heads <= 16) { |
drive | 2183 | drivers/block/ide.c | drive->cyl = id->cyls; |
drive | 2184 | drivers/block/ide.c | drive->head = id->heads; |
drive | 2185 | drivers/block/ide.c | drive->sect = id->sectors; |
drive | 2188 | drivers/block/ide.c | if (drive->sect == drive->bios_sect && drive->head == drive->bios_head) { |
drive | 2189 | drivers/block/ide.c | if (drive->cyl > drive->bios_cyl) |
drive | 2190 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2193 | drivers/block/ide.c | (void) current_capacity (drive); /* initialize LBA selection */ |
drive | 2196 | drivers/block/ide.c | drive->name, id->model, current_capacity(drive)/2048L, id->buf_size/2, |
drive | 2197 | drivers/block/ide.c | drive->select.b.lba ? "LBA, " : "", |
drive | 2198 | drivers/block/ide.c | drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2200 | drivers/block/ide.c | drive->mult_count = 0; |
drive | 2202 | drivers/block/ide.c | drive->mult_req = INITIAL_MULT_COUNT; |
drive | 2203 | drivers/block/ide.c | if (drive->mult_req > id->max_multsect) |
drive | 2204 | drivers/block/ide.c | drive->mult_req = id->max_multsect; |
drive | 2205 | drivers/block/ide.c | if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect)) |
drive | 2206 | drivers/block/ide.c | drive->special.b.set_multmode = 1; |
drive | 2208 | drivers/block/ide.c | if (HWIF(drive)->dmaproc != NULL) { /* hwif supports DMA? */ |
drive | 2209 | drivers/block/ide.c | if (!(HWIF(drive)->dmaproc(ide_dma_check, drive))) |
drive | 2214 | drivers/block/ide.c | cmd640_tune_drive(drive); /* but can we tune a fish? */ |
drive | 2238 | drivers/block/ide.c | static int try_to_identify (ide_drive_t *drive, byte cmd) |
drive | 2244 | drivers/block/ide.c | if (!HWIF(drive)->irq) { /* already got an IRQ? */ |
drive | 2247 | drivers/block/ide.c | OUT_BYTE(drive->ctl,IDE_CONTROL_REG); /* enable device irq */ |
drive | 2252 | drivers/block/ide.c | printk("%s: probing with STATUS instead of ALTSTATUS\n", drive->name); |
drive | 2262 | drivers/block/ide.c | if (!HWIF(drive)->irq) |
drive | 2272 | drivers/block/ide.c | do_identify(drive, cmd); /* drive returned ID */ |
drive | 2276 | drivers/block/ide.c | if (!HWIF(drive)->irq) { |
drive | 2279 | drivers/block/ide.c | HWIF(drive)->irq = irqs; |
drive | 2281 | drivers/block/ide.c | printk("%s: IRQ probe failed (%d)\n", drive->name, irqs); |
drive | 2302 | drivers/block/ide.c | static int do_probe (ide_drive_t *drive, byte cmd) |
drive | 2306 | drivers/block/ide.c | if (drive->present) { /* avoid waiting for inappropriate probes */ |
drive | 2307 | drivers/block/ide.c | if ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY)) |
drive | 2313 | drivers/block/ide.c | drive->name, drive->present, drive->media, |
drive | 2317 | drivers/block/ide.c | if (HWIF(drive)->select) |
drive | 2318 | drivers/block/ide.c | ide_hwif_select (HWIF(drive)); |
drive | 2320 | drivers/block/ide.c | OUT_BYTE(drive->select.all,IDE_SELECT_REG); /* select target drive */ |
drive | 2322 | drivers/block/ide.c | if (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) { |
drive | 2328 | drivers/block/ide.c | || drive->present || cmd == WIN_PIDENTIFY) |
drive | 2330 | drivers/block/ide.c | if ((rc = try_to_identify(drive,cmd))) /* send cmd and wait */ |
drive | 2331 | drivers/block/ide.c | rc = try_to_identify(drive,cmd); /* failed: try again */ |
drive | 2333 | drivers/block/ide.c | printk("%s: no response (status = 0x%02x)\n", drive->name, GET_STAT()); |
drive | 2338 | drivers/block/ide.c | if (drive->select.b.unit != 0) { |
drive | 2352 | drivers/block/ide.c | static inline byte probe_for_drive (ide_drive_t *drive) |
drive | 2354 | drivers/block/ide.c | if (drive->noprobe) /* skip probing? */ |
drive | 2355 | drivers/block/ide.c | return drive->present; |
drive | 2356 | drivers/block/ide.c | if (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */ |
drive | 2358 | drivers/block/ide.c | (void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */ |
drive | 2361 | drivers/block/ide.c | if (!drive->present) |
drive | 2363 | drivers/block/ide.c | if (drive->id == NULL) { /* identification failed? */ |
drive | 2364 | drivers/block/ide.c | if (drive->media == ide_disk) { |
drive | 2366 | drivers/block/ide.c | drive->name, drive->cyl, drive->head, drive->sect); |
drive | 2369 | drivers/block/ide.c | else if (drive->media == ide_cdrom) { |
drive | 2370 | drivers/block/ide.c | printk("%s: ATAPI cdrom (?)\n", drive->name); |
drive | 2374 | drivers/block/ide.c | drive->present = 0; /* nuke it */ |
drive | 2378 | drivers/block/ide.c | if (drive->media == ide_disk && !drive->select.b.lba) { |
drive | 2379 | drivers/block/ide.c | if (!drive->head || drive->head > 16) { |
drive | 2381 | drivers/block/ide.c | drive->name, drive->head); |
drive | 2382 | drivers/block/ide.c | drive->present = 0; |
drive | 2399 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2400 | drivers/block/ide.c | if (drive->present) { |
drive | 2401 | drivers/block/ide.c | drive->present = 0; |
drive | 2402 | drivers/block/ide.c | printk("%s: ERROR, PORTS ALREADY IN USE\n", drive->name); |
drive | 2421 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2422 | drivers/block/ide.c | (void) probe_for_drive (drive); |
drive | 2425 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2426 | drivers/block/ide.c | if (drive->present) { |
drive | 2634 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2651 | drivers/block/ide.c | drive = &hwif->drives[unit]; |
drive | 2654 | drivers/block/ide.c | drive->noprobe = 1; |
drive | 2657 | drivers/block/ide.c | drive->bad_wstat = BAD_R_STAT; |
drive | 2661 | drivers/block/ide.c | drive->present = 1; |
drive | 2662 | drivers/block/ide.c | drive->media = ide_cdrom; |
drive | 2669 | drivers/block/ide.c | drive->media = ide_disk; |
drive | 2670 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = vals[0]; |
drive | 2671 | drivers/block/ide.c | drive->head = drive->bios_head = vals[1]; |
drive | 2672 | drivers/block/ide.c | drive->sect = drive->bios_sect = vals[2]; |
drive | 2673 | drivers/block/ide.c | drive->present = 1; |
drive | 2772 | drivers/block/ide.c | ide_drive_t *drive; |
drive | 2777 | drivers/block/ide.c | if ((drive = get_info_ptr(i_rdev)) == NULL) |
drive | 2780 | drivers/block/ide.c | if (drive->id) { |
drive | 2781 | drivers/block/ide.c | drive->cyl = drive->id->cyls; |
drive | 2782 | drivers/block/ide.c | drive->head = drive->id->heads; |
drive | 2783 | drivers/block/ide.c | drive->sect = drive->id->sectors; |
drive | 2785 | drivers/block/ide.c | drive->bios_cyl = drive->cyl; |
drive | 2786 | drivers/block/ide.c | drive->bios_head = drive->head; |
drive | 2787 | drivers/block/ide.c | drive->bios_sect = drive->sect; |
drive | 2788 | drivers/block/ide.c | drive->special.b.set_geometry = 1; |
drive | 2790 | drivers/block/ide.c | tracks = drive->bios_cyl * drive->bios_head * drive->bios_sect / 63; |
drive | 2791 | drivers/block/ide.c | drive->bios_sect = 63; |
drive | 2792 | drivers/block/ide.c | while (drive->bios_cyl >= 1024) { |
drive | 2793 | drivers/block/ide.c | drive->bios_head = *heads; |
drive | 2794 | drivers/block/ide.c | drive->bios_cyl = tracks / drive->bios_head; |
drive | 2801 | drivers/block/ide.c | drive->ezdrive = 1; |
drive | 2805 | drivers/block/ide.c | drive->sect0 = 63; |
drive | 2806 | drivers/block/ide.c | drive->bios_cyl = (tracks - 1) / drive->bios_head; |
drive | 2809 | drivers/block/ide.c | drive->part[0].nr_sects = current_capacity(drive); |
drive | 2810 | drivers/block/ide.c | printk("%s [%d/%d/%d]", msg, drive->bios_cyl, drive->bios_head, drive->bios_sect); |
drive | 2848 | drivers/block/ide.c | ide_drive_t *drive = &hwif->drives[unit]; |
drive | 2849 | drivers/block/ide.c | if ((cmos_disks & (0xf0 >> (unit*4))) && !drive->present) { |
drive | 2850 | drivers/block/ide.c | drive->cyl = drive->bios_cyl = *(unsigned short *)BIOS; |
drive | 2851 | drivers/block/ide.c | drive->head = drive->bios_head = *(BIOS+2); |
drive | 2852 | drivers/block/ide.c | drive->sect = drive->bios_sect = *(BIOS+14); |
drive | 2853 | drivers/block/ide.c | drive->ctl = *(BIOS+8); |
drive | 2854 | drivers/block/ide.c | drive->present = 1; |
drive | 2904 | drivers/block/ide.c | hwgroup->drive = &hwif->drives[0]; |
drive | 91 | drivers/block/ide.h | #define HWIF(drive) ((ide_hwif_t *)drive->hwif) |
drive | 92 | drivers/block/ide.h | #define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup)) |
drive | 105 | drivers/block/ide.h | #define IDE_DATA_REG (HWIF(drive)->io_base+IDE_DATA_OFFSET) |
drive | 106 | drivers/block/ide.h | #define IDE_ERROR_REG (HWIF(drive)->io_base+IDE_ERROR_OFFSET) |
drive | 107 | drivers/block/ide.h | #define IDE_NSECTOR_REG (HWIF(drive)->io_base+IDE_NSECTOR_OFFSET) |
drive | 108 | drivers/block/ide.h | #define IDE_SECTOR_REG (HWIF(drive)->io_base+IDE_SECTOR_OFFSET) |
drive | 109 | drivers/block/ide.h | #define IDE_LCYL_REG (HWIF(drive)->io_base+IDE_LCYL_OFFSET) |
drive | 110 | drivers/block/ide.h | #define IDE_HCYL_REG (HWIF(drive)->io_base+IDE_HCYL_OFFSET) |
drive | 111 | drivers/block/ide.h | #define IDE_SELECT_REG (HWIF(drive)->io_base+IDE_SELECT_OFFSET) |
drive | 112 | drivers/block/ide.h | #define IDE_STATUS_REG (HWIF(drive)->io_base+IDE_STATUS_OFFSET) |
drive | 113 | drivers/block/ide.h | #define IDE_CONTROL_REG (HWIF(drive)->ctl_port) |
drive | 415 | drivers/block/ide.h | ide_drive_t *drive; /* current drive */ |
drive | 431 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) ide_set_recovery_timer (drive) |
drive | 433 | drivers/block/ide.h | #define SET_RECOVERY_TIMER(drive) |
drive | 439 | drivers/block/ide.h | void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 444 | drivers/block/ide.h | void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount); |
drive | 450 | drivers/block/ide.h | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout); |
drive | 455 | drivers/block/ide.h | byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat); |
drive | 461 | drivers/block/ide.h | void ide_error (ide_drive_t *drive, const char *msg, byte stat); |
drive | 478 | drivers/block/ide.h | int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeout); |
drive | 532 | drivers/block/ide.h | int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action); |
drive | 538 | drivers/block/ide.h | void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err); |
drive | 568 | drivers/block/ide.h | int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id); |
drive | 576 | drivers/block/ide.h | void idetape_setup (ide_drive_t *drive); |
drive | 583 | drivers/block/ide.h | void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long block); |
drive | 589 | drivers/block/ide.h | int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, |
drive | 591 | drivers/block/ide.h | int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive); |
drive | 592 | drivers/block/ide.h | void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive); |
drive | 148 | drivers/block/triton.c | static void dma_intr (ide_drive_t *drive) |
drive | 152 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 153 | drivers/block/triton.c | unsigned short dma_base = HWIF(drive)->dma_base; |
drive | 158 | drivers/block/triton.c | if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) { |
drive | 160 | drivers/block/triton.c | rq = HWGROUP(drive)->rq; |
drive | 163 | drivers/block/triton.c | ide_end_request(1, HWGROUP(drive)); |
drive | 167 | drivers/block/triton.c | printk("%s: bad DMA status: 0x%02x\n", drive->name, dma_stat); |
drive | 170 | drivers/block/triton.c | ide_error(drive, "dma_intr", stat); |
drive | 177 | drivers/block/triton.c | static int build_dmatable (ide_drive_t *drive) |
drive | 179 | drivers/block/triton.c | struct request *rq = HWGROUP(drive)->rq; |
drive | 181 | drivers/block/triton.c | unsigned long size, addr, *table = HWIF(drive)->dmatable; |
drive | 212 | drivers/block/triton.c | printk("%s: DMA table too small\n", drive->name); |
drive | 229 | drivers/block/triton.c | printk("%s: empty DMA table?\n", drive->name); |
drive | 233 | drivers/block/triton.c | static int config_drive_for_dma (ide_drive_t *drive) |
drive | 237 | drivers/block/triton.c | struct hd_driveid *id = drive->id; |
drive | 241 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 248 | drivers/block/triton.c | drive->using_dma = 1; |
drive | 267 | drivers/block/triton.c | static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive) |
drive | 269 | drivers/block/triton.c | unsigned long dma_base = HWIF(drive)->dma_base; |
drive | 277 | drivers/block/triton.c | return config_drive_for_dma (drive); |
drive | 286 | drivers/block/triton.c | if (build_dmatable (drive)) |
drive | 288 | drivers/block/triton.c | outl(virt_to_bus (HWIF(drive)->dmatable), dma_base + 4); /* PRD table */ |
drive | 291 | drivers/block/triton.c | ide_set_handler (drive, &dma_intr, WAIT_CMD); /* issue cmd to drive */ |
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 | 1052 | drivers/cdrom/mcdx.c | int drive; |
drive | 1060 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) |
drive | 1061 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = NULL; |
drive | 1064 | drivers/cdrom/mcdx.c | for (drive = 0; drive < MCDX_NDRIVES; drive++) { |
drive | 1071 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() try drive %d\n", drive)); |
drive | 1091 | drivers/cdrom/mcdx.c | stuffp->irq = irq(mcdx_drive_map[drive]); |
drive | 1092 | drivers/cdrom/mcdx.c | stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); |
drive | 1200 | drivers/cdrom/mcdx.c | stuffp->minor = drive; |
drive | 1206 | drivers/cdrom/mcdx.c | mcdx_stuffp[drive] = stuffp; |
drive | 1207 | drivers/cdrom/mcdx.c | TRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp)); |
drive | 1858 | drivers/scsi/fdomain.c | int drive; |
drive | 1914 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
drive | 1921 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 ); |
drive | 1924 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 ); |
drive | 1927 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 ); |
drive | 1930 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 ); |
drive | 1939 | 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); |