Skip to contentSkip to conversation

Trivial, IDE geometry fix / defconfig changes

PATCH In review Robert Cardell 3 participants 3 messages Jun 4, 2002 – Jun 6, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial, IDE geometry fix / defconfig changes

Hi all,

Two patches included. The first fixes a bug with really large (48-bit lba) drives where the kernel miscomputes the geometry if the BIOS isn't 48-bit aware. (At least I think that's when it would happen.) This messes up the EVMS in particular, since it thinks the drives are 16 times their real size, and tries to read past the end of the device at discovery time. I'm sending it to the list as well as Marcelo just to be sure it's the right fix (although it's very trivial, I'm just paranoid :), and so it can be sent to Linus/Martin D. if it's still relevant to 2.5.

I've also taken the liberty of changing the default configuration to exclude the Symbios 8xx SCSI, EtherExpress Pro, and Ensoniq ES1371, on the basis that:
- In the first case, the driver is being superceded,
- In the first two cases, they are 'hidden' from view if you use make menuconfig and don't specifically check for them. I'm sick of accidentally building them into my kernels.
- None of them are particularly common pieces of hardware anyway.

There are lots of other things I'd change in the default config (why is SMP the default and parport not, for example?), but these are the things that /really/ bother me.

First patch against drivers/ide/ide-disk.c, second against arch/i386/defconfig. (2.4.19-pre9) I'm not on the list at the moment, cc me to reply.

Thanks,

Robert Cardell
<[email protected]>

ide-disk.c renamed from ide-disk.c.old +1 -1
@@ -929,9 +929,9 @@
 
 	if (id->cfs_enable_2 & 0x0400) {
 		capacity_2 = id->lba_capacity_2;
-		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->head		= drive->bios_head = 255;
 		drive->sect		= drive->bios_sect = 63;
+		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->select.b.lba	= 1;
 		set_max_ext = idedisk_read_native_max_address_ext(drive);
 		if (set_max_ext > capacity_2) {
defconfig renamed from defconfig.old +4 -7
@@ -325,10 +325,7 @@
 # CONFIG_SCSI_NCR53C7xx is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_NCR53C8XX is not set
-CONFIG_SCSI_SYM53C8XX=y
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=20
+# CONFIG_SCSI_SYM53C8XX is not set
 # CONFIG_SCSI_NCR53C8XX_PROFILE is not set
 # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
 # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
@@ -415,7 +412,7 @@
 # CONFIG_DE4X5 is not set
 # CONFIG_DGRS is not set
 # CONFIG_DM9102 is not set
-CONFIG_EEPRO100=y
+# CONFIG_EEPRO100 is not set
 # CONFIG_LNE390 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
@@ -694,7 +691,7 @@
 #
 # Sound
 #
-CONFIG_SOUND=y
+# CONFIG_SOUND is not set
 # CONFIG_SOUND_BT878 is not set
 # CONFIG_SOUND_CMPCI is not set
 # CONFIG_SOUND_EMU10K1 is not set
@@ -702,7 +699,7 @@
 # CONFIG_SOUND_FUSION is not set
 # CONFIG_SOUND_CS4281 is not set
 # CONFIG_SOUND_ES1370 is not set
-CONFIG_SOUND_ES1371=y
+# CONFIG_SOUND_ES1371 is not set
 # CONFIG_SOUND_ESSSOLO1 is not set
 # CONFIG_SOUND_MAESTRO is not set
 # CONFIG_SOUND_MAESTRO3 is not set
#1 lore raw
Quoted 4 lines · Robert Cardell

ide-disk.c line 937

Quoted 10 lines
ide-disk.c renamed from ide-disk.c.old +1 -1
@@ -929,9 +929,9 @@
 
 	if (id->cfs_enable_2 & 0x0400) {
 		capacity_2 = id->lba_capacity_2;
-		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->head		= drive->bios_head = 255;
 		drive->sect		= drive->bios_sect = 63;
+		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->select.b.lba	= 1;
 		set_max_ext = idedisk_read_native_max_address_ext(drive);
 		if (set_max_ext > capacity_2) {

Yes, let me confirm: this patch is required.
I sent it to the list on 10 Feb 2002 ("[PATCH] tiny IDE fixes"); apparently nobody picked it up, or at least it didnt reach 2.4.19-pre9 yet. That patch also removed some dead code.

Andries

#2 lore raw
Quoted 6 lines · On Wed, 5 Jun 2002 01:41:46 +0200 Guest section DW <[email protected]> wrote:
Quoted 4 lines · Robert Cardell
ide-disk.c renamed from ide-disk.c.old +0 -0
@@ -929,9 +929,9 @@
 
Quoted 15 lines

ide-disk.c line 937

Quoted 10 lines
ide-disk.c renamed from ide-disk.c.old +1 -1
 	if (id->cfs_enable_2 & 0x0400) {
 		capacity_2 = id->lba_capacity_2;
-		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->head		= drive->bios_head = 255;
 		drive->sect		= drive->bios_sect = 63;
+		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->select.b.lba	= 1;
 		set_max_ext = idedisk_read_native_max_address_ext(drive);
 		if (set_max_ext > capacity_2) {

Yes, let me confirm: this patch is required.
I sent it to the list on 10 Feb 2002 ("[PATCH] tiny IDE fixes"); apparently nobody picked it up, or at least it didnt reach 2.4.19-pre9 yet. That patch also removed some dead code.

If you'd sent it to the trivial patch maintainer... <plug plug>

Rusty.

Signature · 2 lines
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy