[PATCH] Fix for I-Opener IDE problems

From: Alex Stewart (alex@foogod.com)
Date: Sat Sep 30 2000 - 17:40:21 EST


Attached is a patch which fixes the boot problems on I-Opener hardware.

The problem is not the IDE chipset, as some had assumed, but rather the
SanDisk flash disk. Since flashdisks typically don't have slaves, there
is code in the kernel to avoid checking for a slave disk if a flashdisk
is detected on an IDE interface. The problem is that the code as
originally written has the side effect that if a flashdisk is detected
as the slave disk on an interface (as it is on an I-Opener if another
disk is attached as master), it will mark the master as being not
present even though it is.

The attached patch (against 2.4.0-test8) adjusts the code to only mark
the slave not present if a flashdisk is master, not vice-versa.

-alex

--- drivers/ide/ide-probe.c.orig Sat Sep 30 13:38:36 2000
+++ drivers/ide/ide-probe.c Sat Sep 30 13:40:37 2000
@@ -161,8 +161,8 @@
          * Prevent long system lockup probing later for non-existant
          * slave drive if the hwif is actually a flash memory card of some variety:
          */
- if (drive_is_flashcard(drive)) {
- ide_drive_t *mate = &HWIF(drive)->drives[1^drive->select.b.unit];
+ if (!drive->select.b.unit && drive_is_flashcard(drive)) {
+ ide_drive_t *mate = &HWIF(drive)->drives[1];
                 if (!mate->ata_flash) {
                         mate->present = 0;
                         mate->noprobe = 1;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:27 EST