patch-2.3.46 linux/drivers/block/ide-disk.c
Next file: linux/drivers/block/ide-floppy.c
Previous file: linux/drivers/block/ide-cd.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Wed Feb 16 15:42:05 2000
- Orig file:
v2.3.45/linux/drivers/block/ide-disk.c
- Orig date:
Fri Jan 28 15:09:07 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/block/ide-disk.c linux/drivers/block/ide-disk.c
@@ -744,6 +744,8 @@
static void idedisk_setup (ide_drive_t *drive)
{
+ int i;
+
struct hd_driveid *id = drive->id;
unsigned long capacity;
@@ -763,6 +765,15 @@
if (id->model[0] != 'W' || id->model[1] != 'D') {
drive->doorlocking = 1;
}
+ }
+ for (i = 0; i < MAX_DRIVES; ++i) {
+ ide_hwif_t *hwif = HWIF(drive);
+
+ if (drive != &hwif->drives[i]) continue;
+ hwif->gd->de_arr[i] = drive->de;
+ if (drive->removable)
+ hwif->gd->flags[i] |= GENHD_FL_REMOVABLE;
+ break;
}
/* Extract geometry if we did not already have one for the drive */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)