• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/acorn/block/

Lines Matching defs:drive

6  * MFM hard drive code [experimental]
54 * number of errors for my Miniscribe drive (8425).
56 * 30/6/96:DAG: Russell suggested that a check drive 0 might turn the LEDs off
58 * check drive 0 - and the LEDs go off!!!!
96 * Multi-thread the code so that it is possible that while one drive
98 * This would be a performance boost with dual drive systems.
298 #define CMD_CKV 0x28 /* Check drive */
659 static void mfm_setupspecify (int drive, unsigned char *cmdb)
665 cmdb[4] = 0xfc | ((mfm_info[drive].cylinders - 1) >> 8);/* RW time over/high part of number of cylinders */
666 cmdb[5] = mfm_info[drive].cylinders - 1; /* low part of number of cylinders */
667 cmdb[6] = mfm_info[drive].heads - 1; /* Number of heads */
668 cmdb[7] = mfm_info[drive].sectors - 1; /* Number of sectors */
673 cmdb[12] = (mfm_info[drive].precomp - 1) >> 8; /* pre comp cylinder */
674 cmdb[13] = mfm_info[drive].precomp - 1;
675 cmdb[14] = (mfm_info[drive].lowcurrent - 1) >> 8; /* Low current cylinder */
676 cmdb[15] = mfm_info[drive].lowcurrent - 1;
687 /* Ensure that we will do another specify if we move to the other drive */
1012 * Tell the user about the drive if we decided it exists.
1014 static void mfm_geometry (int drive)
1016 if (mfm_info[drive].cylinders)
1017 printk ("mfm%c: %dMB CHS=%d/%d/%d LCC=%d RECOMP=%d\n", 'a' + drive,
1018 mfm_info[drive].cylinders * mfm_info[drive].heads * mfm_info[drive].sectors / 4096,
1019 mfm_info[drive].cylinders, mfm_info[drive].heads, mfm_info[drive].sectors,
1020 mfm_info[drive].lowcurrent, mfm_info[drive].precomp);
1025 * Attempt to detect a drive and find its geometry. The drive has already been
1033 static int mfm_detectdrive (int drive)
1040 maxgeo[0] = mfm_info[drive].sectors;
1041 maxgeo[1] = mfm_info[drive].heads;
1042 maxgeo[2] = mfm_info[drive].cylinders;
1044 cmdb[0] = drive + 1;
1108 mfm_info[drive].cylinders = mingeo[2];
1109 mfm_info[drive].lowcurrent = mingeo[2];
1110 mfm_info[drive].precomp = mingeo[2] / 2;
1111 mfm_info[drive].heads = mingeo[1];
1112 mfm_info[drive].sectors = mingeo[0];
1119 * Initialise all drive information for this controller.
1123 int drive;
1130 for (drive = 0; drive < number_mfm_drives; drive++) {
1131 mfm_info[drive].lowcurrent = 1;
1132 mfm_info[drive].precomp = 1;
1133 mfm_info[drive].cylinder = -1;
1134 mfm_info[drive].errors.recal = 0;
1135 mfm_info[drive].errors.report = 0;
1136 mfm_info[drive].errors.abort = 4;
1139 mfm_info[drive].cylinders = 1024;
1140 mfm_info[drive].heads = 8;
1141 mfm_info[drive].sectors = 64;
1145 mfm_setupspecify (drive, cmdb);
1149 if (!mfm_detectdrive (drive)) {
1150 mfm_info[drive].cylinders = 0;
1151 mfm_info[drive].heads = 0;
1152 mfm_info[drive].sectors = 0;
1158 mfm_info[drive].cylinders = 1; /* its going to have to figure it out from the partition info */
1159 mfm_info[drive].heads = 4;
1160 mfm_info[drive].sectors = 32;
1275 int drive = MINOR(dev) >> 6;
1277 if (mfm_info[drive].cylinders == 1) {
1278 mfm_info[drive].sectors = secsptrack;
1279 mfm_info[drive].heads = heads;
1280 mfm_info[drive].cylinders = discsize / (secsptrack * heads * secsize);
1282 if ((heads < 1) || (mfm_info[drive].cylinders > 1024)) {
1289 mfm_info[drive].sectors = 32;
1290 mfm_info[drive].heads = 4;
1291 mfm_info[drive].cylinders = 512;
1293 if (raw_cmd.dev == drive)
1295 mfm_geometry (drive);
1296 mfm[drive << 6].start_sect = 0;
1297 mfm[drive << 6].nr_sects = mfm_info[drive].cylinders * mfm_info[drive].heads * mfm_info[drive].sectors / 2;
1333 printk("mfm: detected %d hard drive%s\n", mfm_drives,