tag | line | file | source code |
drive | 104 | include/linux/xd.h | void (*init_drive)(u_char drive); |
drive | 108 | include/linux/xd.h | extern void resetup_one_dev (struct gendisk *dev,unsigned int drive); |
drive | 112 | include/linux/xd.h | static u_char xd_initdrives (void (*init_drive)(u_char drive)); |
drive | 120 | include/linux/xd.h | static int xd_readwrite (u_char operation,u_char drive,u_char *buffer,u_int block,u_int count); |
drive | 121 | include/linux/xd.h | static void xd_recalibrate (u_char drive); |
drive | 125 | 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 | 132 | include/linux/xd.h | static void xd_dtc5150x_init_drive (u_char drive); |
drive | 134 | include/linux/xd.h | static void xd_wd1004a27x_init_drive (u_char drive); |
drive | 136 | include/linux/xd.h | static void xd_seagate11_init_drive (u_char drive); |
drive | 137 | 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 | 141 | include/linux/xd.h | static void xd_override_init_drive (u_char drive); |
drive | 600 | kernel/blk_drv/floppy.c | int drive = MINOR(CURRENT->dev); |
drive | 602 | kernel/blk_drv/floppy.c | if (ftd_msg[drive]) |
drive | 604 | kernel/blk_drv/floppy.c | floppy->name,drive); |
drive | 605 | kernel/blk_drv/floppy.c | current_type[drive] = floppy; |
drive | 606 | kernel/blk_drv/floppy.c | floppy_sizes[drive] = floppy->size >> 1; |
drive | 1036 | kernel/blk_drv/floppy.c | int i,drive,cnt,okay; |
drive | 1042 | kernel/blk_drv/floppy.c | drive = MINOR(inode->i_rdev); |
drive | 1052 | kernel/blk_drv/floppy.c | fake_change |= 1 << (drive & 3); |
drive | 1054 | kernel/blk_drv/floppy.c | drive &= 3; |
drive | 1058 | kernel/blk_drv/floppy.c | if (drive > 3) this = &floppy_type[drive >> 2]; |
drive | 1059 | kernel/blk_drv/floppy.c | else if ((this = current_type[drive & 3]) == NULL) |
drive | 1077 | kernel/blk_drv/floppy.c | format_req.device = drive; |
drive | 1100 | kernel/blk_drv/floppy.c | fake_change |= 1 << (drive & 3); |
drive | 1107 | kernel/blk_drv/floppy.c | if (drive < 0 || drive > 3) |
drive | 1111 | kernel/blk_drv/floppy.c | current_type[drive] = NULL; |
drive | 1112 | kernel/blk_drv/floppy.c | floppy_sizes[drive] = MAX_DISK_SIZE; |
drive | 1113 | kernel/blk_drv/floppy.c | keep_data[drive] = 0; |
drive | 1118 | kernel/blk_drv/floppy.c | ((char *) &user_params[drive])[cnt] = |
drive | 1120 | kernel/blk_drv/floppy.c | current_type[drive] = &user_params[drive]; |
drive | 1121 | kernel/blk_drv/floppy.c | floppy_sizes[drive] = user_params[drive].size >> 1; |
drive | 1122 | kernel/blk_drv/floppy.c | if (cmd == FDDEFPRM) keep_data[drive] = -1; |
drive | 1128 | kernel/blk_drv/floppy.c | outb_p((current_DOR & 0xfc) | drive | |
drive | 1129 | kernel/blk_drv/floppy.c | (0x10 << drive),FD_DOR); |
drive | 1131 | kernel/blk_drv/floppy.c | keep_data[drive] = (inb(FD_DIR) & 0x80) ? 1 : 0; |
drive | 1138 | kernel/blk_drv/floppy.c | ftd_msg[drive] = 1; |
drive | 1141 | kernel/blk_drv/floppy.c | ftd_msg[drive] = 0; |
drive | 1144 | kernel/blk_drv/floppy.c | min_report_error_cnt[drive] = (unsigned short) (param & 0x0f); |
drive | 1157 | kernel/blk_drv/floppy.c | static struct floppy_struct *find_base(int drive,int code) |
drive | 1163 | kernel/blk_drv/floppy.c | printk("fd%d is %s",drive,base->name); |
drive | 1166 | kernel/blk_drv/floppy.c | printk("fd%d is unknown type %d",drive,code); |
drive | 1191 | kernel/blk_drv/floppy.c | int drive; |
drive | 1194 | kernel/blk_drv/floppy.c | drive = inode->i_rdev & 3; |
drive | 1195 | kernel/blk_drv/floppy.c | old_dev = fd_device[drive]; |
drive | 1196 | kernel/blk_drv/floppy.c | if (fd_ref[drive]) |
drive | 1199 | kernel/blk_drv/floppy.c | fd_ref[drive]++; |
drive | 1200 | kernel/blk_drv/floppy.c | fd_device[drive] = inode->i_rdev; |
drive | 160 | kernel/blk_drv/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
drive | 163 | kernel/blk_drv/genhd.c | int start = drive<<dev->minor_shift; |
drive | 167 | kernel/blk_drv/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
drive | 168 | kernel/blk_drv/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
drive | 179 | kernel/blk_drv/genhd.c | int drive; |
drive | 187 | kernel/blk_drv/genhd.c | for (drive=0 ; drive<dev->nr_real ; drive++) { |
drive | 188 | kernel/blk_drv/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
drive | 189 | kernel/blk_drv/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
drive | 131 | kernel/blk_drv/hd.c | static int controller_ready(unsigned int drive, unsigned int head) |
drive | 138 | kernel/blk_drv/hd.c | outb_p(0xA0 | (drive<<4) | head, HD_CURRENT); |
drive | 171 | kernel/blk_drv/hd.c | static void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect, |
drive | 177 | kernel/blk_drv/hd.c | if (drive>1 || head>15) |
drive | 185 | kernel/blk_drv/hd.c | if (!controller_ready(drive, head)) { |
drive | 190 | kernel/blk_drv/hd.c | outb_p(hd_info[drive].ctl,HD_CMD); |
drive | 192 | kernel/blk_drv/hd.c | outb_p(hd_info[drive].wpcom>>2,++port); |
drive | 197 | kernel/blk_drv/hd.c | outb_p(0xA0|(drive<<4)|head,++port); |
drive | 622 | kernel/blk_drv/hd.c | int drive, i; |
drive | 628 | kernel/blk_drv/hd.c | for (drive=0 ; drive<2 ; drive++) { |
drive | 629 | kernel/blk_drv/hd.c | hd_info[drive].cyl = *(unsigned short *) BIOS; |
drive | 630 | kernel/blk_drv/hd.c | hd_info[drive].head = *(unsigned char *) (2+BIOS); |
drive | 631 | kernel/blk_drv/hd.c | hd_info[drive].wpcom = *(unsigned short *) (5+BIOS); |
drive | 632 | kernel/blk_drv/hd.c | hd_info[drive].ctl = *(unsigned char *) (8+BIOS); |
drive | 633 | kernel/blk_drv/hd.c | hd_info[drive].lzone = *(unsigned short *) (12+BIOS); |
drive | 634 | kernel/blk_drv/hd.c | hd_info[drive].sect = *(unsigned char *) (14+BIOS); |
drive | 1291 | kernel/blk_drv/scsi/fdomain.c | int drive; |
drive | 1322 | kernel/blk_drv/scsi/fdomain.c | drive = MINOR(dev) / 16; |
drive | 1323 | kernel/blk_drv/scsi/fdomain.c | i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 ); |
drive | 265 | kernel/blk_drv/xd.c | static int xd_readwrite (u_char operation,u_char drive,u_char *buffer,u_int block,u_int count) |
drive | 272 | kernel/blk_drv/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 | 275 | kernel/blk_drv/xd.c | control = xd_info[drive].control; |
drive | 279 | kernel/blk_drv/xd.c | track = block / xd_info[drive].sectors; |
drive | 280 | kernel/blk_drv/xd.c | head = track % xd_info[drive].heads; |
drive | 281 | kernel/blk_drv/xd.c | cylinder = track / xd_info[drive].heads; |
drive | 282 | kernel/blk_drv/xd.c | sector = block % xd_info[drive].sectors; |
drive | 285 | kernel/blk_drv/xd.c | printk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp); |
drive | 293 | kernel/blk_drv/xd.c | xd_build(cmdblk,operation == READ ? CMD_READ : CMD_WRITE,drive,head,cylinder,sector,temp & 0xFF,control); |
drive | 296 | kernel/blk_drv/xd.c | case 1: printk("xd_readwrite: timeout, recalibrating drive\n"); xd_recalibrate(drive); xd_busy = 0; wake_up(&xd_wait_exclusive); return (0); |
drive | 318 | kernel/blk_drv/xd.c | static void xd_recalibrate (u_char drive) |
drive | 322 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_RECALIBRATE,drive,0,0,0,0,0); |
drive | 366 | kernel/blk_drv/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 | 369 | kernel/blk_drv/xd.c | cmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F); |
drive | 450 | kernel/blk_drv/xd.c | static u_char xd_initdrives (void (*init_drive)(u_char drive)) |
drive | 478 | kernel/blk_drv/xd.c | static void xd_dtc5150x_init_drive (u_char drive) |
drive | 482 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_DTCGETGEOM,drive,0,0,0,0,0); |
drive | 484 | kernel/blk_drv/xd.c | xd_info[drive].heads = buf[0x0A]; /* heads */ |
drive | 485 | kernel/blk_drv/xd.c | xd_info[drive].cylinders = ((u_short *) (buf))[0x04]; /* cylinders */ |
drive | 486 | kernel/blk_drv/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 488 | kernel/blk_drv/xd.c | xd_info[drive].rwrite = ((u_short *) (buf + 1))[0x05]; /* reduced write */ |
drive | 489 | kernel/blk_drv/xd.c | xd_info[drive].precomp = ((u_short *) (buf + 1))[0x06]; /* write precomp */ |
drive | 490 | kernel/blk_drv/xd.c | xd_info[drive].ecc = buf[0x0F]; /* ecc length */ |
drive | 492 | kernel/blk_drv/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 494 | kernel/blk_drv/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 | 495 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_DTCSETSTEP,drive,0,0,0,0,7); |
drive | 497 | kernel/blk_drv/xd.c | printk("xd_dtc5150x_init_drive: error setting step rate for drive %d\n",drive); |
drive | 500 | kernel/blk_drv/xd.c | printk("xd_dtc5150x_init_drive: error reading geometry for drive %d\n",drive); |
drive | 518 | kernel/blk_drv/xd.c | static void xd_wd1004a27x_init_drive (u_char drive) |
drive | 522 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_READ,drive,0,0,0,1,0); |
drive | 524 | kernel/blk_drv/xd.c | xd_info[drive].heads = buf[0x1AF]; /* heads */ |
drive | 525 | kernel/blk_drv/xd.c | xd_info[drive].cylinders = ((u_short *) (buf + 1))[0xD6]; /* cylinders */ |
drive | 526 | kernel/blk_drv/xd.c | xd_info[drive].sectors = 17; /* sectors */ |
drive | 528 | kernel/blk_drv/xd.c | xd_info[drive].rwrite = ((u_short *) (buf))[0xD8]; /* reduced write */ |
drive | 529 | kernel/blk_drv/xd.c | xd_info[drive].wprecomp = ((u_short *) (buf))[0xDA]; /* write precomp */ |
drive | 530 | kernel/blk_drv/xd.c | xd_info[drive].ecc = buf[0x1B4]; /* ecc length */ |
drive | 532 | kernel/blk_drv/xd.c | xd_info[drive].control = buf[0x1B5]; /* control byte */ |
drive | 534 | kernel/blk_drv/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 | 537 | kernel/blk_drv/xd.c | printk("xd_wd1004a27x_init_drive: error reading geometry for drive %d\n",drive); |
drive | 555 | kernel/blk_drv/xd.c | static void xd_seagate11_init_drive (u_char drive) |
drive | 559 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_ST11GETGEOM,drive,0,0,0,1,0); |
drive | 561 | kernel/blk_drv/xd.c | xd_info[drive].heads = buf[0x04]; /* heads */ |
drive | 562 | kernel/blk_drv/xd.c | xd_info[drive].cylinders = (buf[0x02] << 8) | buf[0x03]; /* cylinders */ |
drive | 563 | kernel/blk_drv/xd.c | xd_info[drive].sectors = buf[0x05]; /* sectors */ |
drive | 564 | kernel/blk_drv/xd.c | xd_info[drive].control = 0; /* control byte */ |
drive | 567 | kernel/blk_drv/xd.c | printk("xd_seagate11_init_drive: error reading geometry from drive %d\n",drive); |
drive | 584 | kernel/blk_drv/xd.c | static void xd_override_init_drive (u_char drive) |
drive | 592 | kernel/blk_drv/xd.c | xd_build(cmdblk,CMD_SEEK,drive,(u_char) test[0],(u_short) test[1],(u_char) test[2],0,0); |
drive | 600 | kernel/blk_drv/xd.c | xd_info[drive].heads = (u_char) min[0] + 1; |
drive | 601 | kernel/blk_drv/xd.c | xd_info[drive].cylinders = (u_short) min[1] + 1; |
drive | 602 | kernel/blk_drv/xd.c | xd_info[drive].sectors = (u_char) min[2] + 1; |
drive | 603 | kernel/blk_drv/xd.c | xd_info[drive].control = 0; |
drive | 608 | kernel/blk_drv/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 | 612 | kernel/blk_drv/xd.c | xd_build(cmdblk,command,drive,0,0,0,0,0); |
drive | 623 | kernel/blk_drv/xd.c | printk("xd_setparam: error setting characteristics for drive %d\n",drive); |