Conjectured sequence of events: the disk reports 16383,16,63;
these numbers would have been recognized by the kernel,
but unfortunately the user selected LBA, and the BIOS
turned this geometry into 1024,255,63 which the kernel
no longer recognizes. Now the fragment of ide.c:do_identify()
in 2.0.36 or ide-disk.c:idedisk_setup() in 2.1.130
/* Correct the number of cyls if the bios value is too small */
if (drive->sect == drive->bios_sect && drive->head == drive->bios_head) {
if (drive->cyl > drive->bios_cyl)
drive->bios_cyl = drive->cyl;
}
does not update drive->bios_cyl since drive->head != drive->bios_head.
So, I propose that the above fragment be changed into something like
/* Set the cylinder count - the BIOS reported value may be too small */
if (drive->bios_sect && drive->bios_head)
drive->bios_cyl = capacity / (drive->bios_sect * drive->bios_head);
where `capacity' is current_capacity(drive) in the 2.0.36 source,
and idedisk_capacity(drive) in the 2.1.130 source.
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/