tag | line | file | source code |
drive | 166 | drivers/block/floppy.c | #define UDP (&drive_params[drive]) |
drive | 167 | drivers/block/floppy.c | #define UDRS (&drive_state[drive]) |
drive | 168 | drivers/block/floppy.c | #define UDRWE (&write_errors[drive]) |
drive | 169 | drivers/block/floppy.c | #define UFDCS (&fdc_state[FDC(drive)]) |
drive | 515 | drivers/block/floppy.c | static int disk_change(int drive) |
drive | 517 | drivers/block/floppy.c | int fdc=FDC(drive); |
drive | 521 | drivers/block/floppy.c | if(! (FDCS->dor & (0x10 << UNIT(drive))) || |
drive | 522 | drivers/block/floppy.c | (FDCS->dor & 3) != UNIT(drive) || |
drive | 523 | drivers/block/floppy.c | fdc != FDC(drive)){ |
drive | 525 | drivers/block/floppy.c | DPRINT3("drive=%d fdc=%d dor=%x\n",drive, FDC(drive), |
drive | 532 | drivers/block/floppy.c | DPRINT1("checking disk change line for drive %d\n",drive); |
drive | 549 | drivers/block/floppy.c | current_type[drive] != NULL) |
drive | 552 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 572 | drivers/block/floppy.c | register unsigned char drive, unit, newdor,olddor; |
drive | 582 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 588 | drivers/block/floppy.c | disk_change(drive); |
drive | 595 | drivers/block/floppy.c | drive = REVDRIVE(fdc,unit); |
drive | 619 | drivers/block/floppy.c | int drive; |
drive | 625 | drivers/block/floppy.c | for ( drive = 0; drive < N_DRIVE; drive++) |
drive | 626 | drivers/block/floppy.c | if (FDC(drive) == fdc && |
drive | 632 | drivers/block/floppy.c | static void set_fdc(int drive) |
drive | 634 | drivers/block/floppy.c | if (drive >= 0 && drive < N_DRIVE){ |
drive | 635 | drivers/block/floppy.c | fdc = FDC(drive); |
drive | 636 | drivers/block/floppy.c | current_drive = drive; |
drive | 649 | drivers/block/floppy.c | static int lock_fdc(int drive, int interruptible) |
drive | 668 | drivers/block/floppy.c | set_fdc(drive); |
drive | 672 | drivers/block/floppy.c | #define LOCK_FDC(drive,interruptible) \ |
drive | 673 | drivers/block/floppy.c | if(lock_fdc(drive,interruptible)) return -EINTR; |
drive | 718 | drivers/block/floppy.c | static void floppy_off(unsigned int drive) |
drive | 721 | drivers/block/floppy.c | register int fdc=FDC(drive); |
drive | 723 | drivers/block/floppy.c | if( !(FDCS->dor & ( 0x10 << UNIT(drive)))) |
drive | 726 | drivers/block/floppy.c | del_timer(motor_off_timer+drive); |
drive | 734 | drivers/block/floppy.c | motor_off_timer[drive].expires = UDP->spindown - delta; |
drive | 736 | drivers/block/floppy.c | add_timer(motor_off_timer+drive); |
drive | 746 | drivers/block/floppy.c | int i, drive, saved_drive; |
drive | 753 | drivers/block/floppy.c | drive = (saved_drive + i + 1 ) % N_DRIVE; |
drive | 756 | drivers/block/floppy.c | set_fdc(drive); |
drive | 757 | drivers/block/floppy.c | if(! (set_dor( fdc, ~3, UNIT(drive) | ( 0x10 << UNIT(drive))) & |
drive | 758 | drivers/block/floppy.c | (0x10 << UNIT(drive)))) |
drive | 761 | drivers/block/floppy.c | set_dor( fdc, ~( 0x10 << UNIT(drive) ), 0 ); |
drive | 1852 | drivers/block/floppy.c | int drive=DRIVE(device); |
drive | 1854 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2522 | drivers/block/floppy.c | static int user_reset_fdc(int drive, int arg, int interruptible) |
drive | 2529 | drivers/block/floppy.c | LOCK_FDC(drive,interruptible); |
drive | 2561 | drivers/block/floppy.c | static char *drive_name(int type, int drive ) |
drive | 2588 | drivers/block/floppy.c | int i, drive, count, ret; |
drive | 2592 | drivers/block/floppy.c | for ( drive= 0; drive < N_DRIVE; drive++){ |
drive | 2593 | drivers/block/floppy.c | if ( FDC(drive) != fdc) |
drive | 2595 | drivers/block/floppy.c | if ( drive == current_drive ){ |
drive | 2678 | drivers/block/floppy.c | int i,device,drive,type,cnt; |
drive | 2687 | drivers/block/floppy.c | drive = DRIVE(device); |
drive | 2693 | drivers/block/floppy.c | name = drive_name(type,drive); |
drive | 2706 | drivers/block/floppy.c | else if ((this_floppy = current_type[drive]) == |
drive | 2711 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2738 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2753 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2754 | drivers/block/floppy.c | current_type[drive] = NULL; |
drive | 2755 | drivers/block/floppy.c | floppy_sizes[drive] = MAX_DISK_SIZE; |
drive | 2760 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2775 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2779 | drivers/block/floppy.c | set_bit(drive, &fake_change); |
drive | 2801 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2806 | drivers/block/floppy.c | user_params[drive] = newparams; |
drive | 2807 | drivers/block/floppy.c | if (buffer_drive == drive && |
drive | 2808 | drivers/block/floppy.c | buffer_max > user_params[drive].sect) |
drive | 2809 | drivers/block/floppy.c | buffer_max=user_params[drive].sect; |
drive | 2810 | drivers/block/floppy.c | current_type[drive] = &user_params[drive]; |
drive | 2811 | drivers/block/floppy.c | floppy_sizes[drive] = user_params[drive].size >> 1; |
drive | 2822 | drivers/block/floppy.c | user_params[drive].sect || |
drive | 2829 | drivers/block/floppy.c | return user_reset_fdc( drive, (int)param, 1); |
drive | 2841 | drivers/block/floppy.c | LOCK_FDC(drive,1); |
drive | 2862 | drivers/block/floppy.c | static void set_base_type(int drive,int code) |
drive | 2868 | drivers/block/floppy.c | printk("fd%d is %s", drive, default_drive_params[code].name); |
drive | 2871 | drivers/block/floppy.c | printk("fd%d is not installed", drive); |
drive | 2873 | drivers/block/floppy.c | printk("fd%d is unknown type %d",drive,code); |
drive | 2878 | drivers/block/floppy.c | int drive; |
drive | 2880 | drivers/block/floppy.c | for (drive=0; drive<N_DRIVE ; drive++){ |
drive | 2897 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 2910 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
drive | 2928 | drivers/block/floppy.c | int drive; |
drive | 2930 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 2957 | drivers/block/floppy.c | int drive; |
drive | 2965 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
drive | 2966 | drivers/block/floppy.c | if (drive >= N_DRIVE || |
drive | 2967 | drivers/block/floppy.c | !( ALLOWED_DRIVE_MASK & ( 1 << drive)) || |
drive | 2968 | drivers/block/floppy.c | fdc_state[FDC(drive)].version == FDC_NONE) |
drive | 2997 | drivers/block/floppy.c | if (buffer_drive == drive) |
drive | 3030 | drivers/block/floppy.c | int drive = DRIVE( dev ); |
drive | 3041 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3047 | drivers/block/floppy.c | test_bit(drive, &fake_change) || |
drive | 3048 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
drive | 3059 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
drive | 3061 | drivers/block/floppy.c | int drive=DRIVE(dev); |
drive | 3064 | drivers/block/floppy.c | if(UTESTF(FD_DISK_CHANGED) || test_bit(drive, &fake_change) || NO_GEOM){ |
drive | 3065 | drivers/block/floppy.c | lock_fdc(drive,0); |
drive | 3067 | drivers/block/floppy.c | if(! (cf || test_bit(drive, &fake_change) || NO_GEOM)){ |
drive | 3073 | drivers/block/floppy.c | if ( buffer_drive == drive) |
drive | 3075 | drivers/block/floppy.c | clear_bit(drive, &fake_change); |
drive | 3171 | drivers/block/floppy.c | int i,drive; |
drive | 3214 | drivers/block/floppy.c | for (drive = 0; drive < N_DRIVE ; drive++) { |
drive | 3304 | drivers/block/floppy.c | int drive; |
drive | 3326 | drivers/block/floppy.c | for(drive=0; drive < N_FDC * 4; drive++) |
drive | 3327 | drivers/block/floppy.c | if( motor_off_timer[drive].next ) |
drive | 3328 | drivers/block/floppy.c | printk("motor off timer %d still active\n", drive); |
drive | 161 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
drive | 164 | drivers/block/genhd.c | int start = drive<<dev->minor_shift; |
drive | 168 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
drive | 169 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
drive | 180 | drivers/block/genhd.c | int drive; |
drive | 188 | drivers/block/genhd.c | for (drive=0 ; drive<dev->nr_real ; drive++) { |
drive | 189 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
drive | 190 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
drive | 213 | drivers/block/hd.c | static int controller_ready(unsigned int drive, unsigned int head) |
drive | 220 | drivers/block/hd.c | outb_p(0xA0 | (drive<<4) | head, HD_CURRENT); |
drive | 227 | drivers/block/hd.c | static void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect, |
drive | 239 | drivers/block/hd.c | if (!controller_ready(drive, head)) { |
drive | 244 | drivers/block/hd.c | outb_p(hd_info[drive].ctl,HD_CMD); |
drive | 246 | drivers/block/hd.c | outb_p(hd_info[drive].wpcom>>2,++port); |
drive | 251 | drivers/block/hd.c | outb_p(0xA0|(drive<<4)|head,++port); |
drive | 976 | drivers/block/hd.c | int drive, i; |
drive | 982 | drivers/block/hd.c | for (drive=0 ; drive<2 ; drive++) { |
drive | 983 | drivers/block/hd.c | bios_info[drive].cyl = hd_info[drive].cyl = *(unsigned short *) BIOS; |
drive | 984 | drivers/block/hd.c | bios_info[drive].head = hd_info[drive].head = *(2+BIOS); |
drive | 985 | drivers/block/hd.c | bios_info[drive].wpcom = hd_info[drive].wpcom = *(unsigned short *) (5+BIOS); |
drive | 986 | drivers/block/hd.c | bios_info[drive].ctl = hd_info[drive].ctl = *(8+BIOS); |
drive | 987 | drivers/block/hd.c | bios_info[drive].lzone = hd_info[drive].lzone = *(unsigned short *) (12+BIOS); |
drive | 988 | drivers/block/hd.c | bios_info[drive].sect = hd_info[drive].sect = *(14+BIOS); |
drive | 990 | drivers/block/hd.c | if (hd_info[drive].cyl && NR_HD == drive) |
drive | 323 | drivers/block/xd.c | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count) |
drive | 330 | 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 | 333 | drivers/block/xd.c | control = xd_info[drive].control; |
drive | 337 | drivers/block/xd.c | track = block / xd_info[drive].sectors; |
drive | 338 | drivers/block/xd.c | head = track % xd_info[drive].heads; |
drive | 339 | drivers/block/xd.c | cylinder = track / xd_info[drive].heads; |
drive | 340 | drivers/block/xd.c | sector = block % xd_info[drive].sectors; |
drive | 343 | drivers/block/xd.c | printk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp); |
drive | 347 | drivers/block/xd.c | xd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control); |
drive | 352 | drivers/block/xd.c | xd_recalibrate(drive); |
drive | 373 | drivers/block/xd.c | static void xd_recalibrate (u_char drive) |
drive | 377 | drivers/block/xd.c | xd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0); |
drive | 421 | 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 | 424 | drivers/block/xd.c | cmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F); |
drive | 508 | drivers/block/xd.c | static u_char xd_initdrives (void (*init_drive)(u_char drive)) |
drive | 537 | drivers/block/xd.c | static void xd_dtc_init_drive (u_char drive) |
drive | 541 | drivers/block/xd.c | xd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0); |
drive | 543 | drivers/block/xd.c | xd_info[drive].heads = buf[0x0A]; /* heads */ |
drive | 544 | drivers/block/xd.c | xd_info[drive].cylinders = ((u_short *) (buf))[0x04]; /* cylinders */ |
drive | 545 | drivers/block/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 547 | drivers/block/xd.c | xd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05]; /* reduced write */ |
drive | 548 | drivers/block/xd.c | xd_info[drive].precomp = ((u_short *) (buf + 1))[0x06]; /* write precomp */ |
drive | 549 | drivers/block/xd.c | xd_info[drive].ecc = buf[0x0F]; /* ecc length */ |
drive | 551 | drivers/block/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 553 | 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 | 554 | drivers/block/xd.c | xd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7); |
drive | 556 | drivers/block/xd.c | printk("xd_dtc_init_drive: error setting step rate for drive %d\n",drive); |
drive | 559 | drivers/block/xd.c | printk("xd_dtc_init_drive: error reading geometry for drive %d\n",drive); |
drive | 581 | drivers/block/xd.c | static void xd_wd_init_drive (u_char drive) |
drive | 585 | drivers/block/xd.c | xd_build(cmdblk,CMD_READ,drive,0,0,0,1,0); |
drive | 587 | drivers/block/xd.c | xd_info[drive].heads = buf[0x1AF]; /* heads */ |
drive | 588 | drivers/block/xd.c | xd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6]; /* cylinders */ |
drive | 589 | drivers/block/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 591 | drivers/block/xd.c | xd_info[drive].rwrite = ((u_short *) (buf))[0xD8]; /* reduced write */ |
drive | 592 | drivers/block/xd.c | xd_info[drive].wprecomp = ((u_short *) (buf))[0xDA]; /* write precomp */ |
drive | 593 | drivers/block/xd.c | xd_info[drive].ecc = buf[0x1B4]; /* ecc length */ |
drive | 595 | drivers/block/xd.c | xd_info[drive].control = buf[0x1B5]; /* control byte */ |
drive | 597 | 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 | 600 | drivers/block/xd.c | printk("xd_wd_init_drive: error reading geometry for drive %d\n",drive); |
drive | 620 | drivers/block/xd.c | static void xd_seagate_init_drive (u_char drive) |
drive | 624 | drivers/block/xd.c | xd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0); |
drive | 626 | drivers/block/xd.c | xd_info[drive].heads = buf[0x04]; /* heads */ |
drive | 627 | drivers/block/xd.c | xd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03]; /* cylinders */ |
drive | 628 | drivers/block/xd.c | xd_info[drive].sectors = buf[0x05]; /* sectors */ |
drive | 629 | drivers/block/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 632 | drivers/block/xd.c | printk("xd_seagate_init_drive: error reading geometry from drive %d\n",drive); |
drive | 654 | drivers/block/xd.c | static void xd_omti_init_drive (u_char drive) |
drive | 657 | drivers/block/xd.c | xd_override_init_drive(drive); |
drive | 660 | drivers/block/xd.c | xd_info[drive].control = 2; |
drive | 665 | drivers/block/xd.c | static void xd_override_init_drive (u_char drive) |
drive | 673 | 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 | 681 | drivers/block/xd.c | xd_info[drive].heads = (u_char) min[0] + 1; |
drive | 682 | drivers/block/xd.c | xd_info[drive].cylinders = (u_short) min[1] + 1; |
drive | 683 | drivers/block/xd.c | xd_info[drive].sectors = (u_char) min[2] + 1; |
drive | 684 | drivers/block/xd.c | xd_info[drive].control = 0; |
drive | 701 | 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 | 705 | drivers/block/xd.c | xd_build(cmdblk,command,drive,0,0,0,0,0); |
drive | 716 | drivers/block/xd.c | printk("xd_setparam: error setting characteristics for drive %d\n",drive); |
drive | 1504 | drivers/scsi/fdomain.c | int drive; |
drive | 1549 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
drive | 1552 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 ); |
drive | 1557 | drivers/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f71 + drive * 10 ); |
drive | 41 | 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 | 110 | include/linux/xd.h | static u_char xd_initdrives (void (*init_drive)(u_char drive)); |
drive | 118 | include/linux/xd.h | static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count); |
drive | 119 | include/linux/xd.h | static void xd_recalibrate (u_char drive); |
drive | 123 | 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 | 129 | include/linux/xd.h | static void xd_dtc_init_drive (u_char drive); |
drive | 131 | include/linux/xd.h | static void xd_wd_init_drive (u_char drive); |
drive | 133 | include/linux/xd.h | static void xd_seagate_init_drive (u_char drive); |
drive | 135 | include/linux/xd.h | static void xd_omti_init_drive (u_char drive); |
drive | 136 | 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 | 137 | include/linux/xd.h | static void xd_override_init_drive (u_char drive); |