aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShai Fultheim <shai@ftcon.com>2004-05-14 19:42:40 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-14 19:42:40 -0700
commitfc4c3ad209fdbb5f1f76b7a396fefd1fac107564 (patch)
tree643b6faaeedcb54f6697e3b861105524d92fcace
parente92f75e77c3c20cefc65c62c225c14400910e806 (diff)
[PATCH] Multiple (ICH3) IDE-controllers in a system
This fixes a problem with multiple IDE controllers in a system. The problem is that pcibios_fixups table (in arch/i386/pci/fixup.c) uses the pci_fixup_ide_trash() quirk for Intel's ICH3 (my case specifically 8086:248b). This clears any bogus BAR information set up by the BIOS. In a system which has multiple ICH3's can't use any of the IDE controllers beside the one on the first ICH3. Anyhow, the fix is to make sure pci_fixup_ide_trash resets the BARs only for first time being called, so the subsequent IDE controllers will use the BIOS BARs. This is better than "loosing" all these IDE controllers in the case their BARs set right. The issue discussed and agreed with Bartlomiej Zolnierkiewicz (see below).
-rw-r--r--arch/i386/pci/fixup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
index d436e0011d05b..ac6acb3cef759 100644
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -92,6 +92,15 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
int i;
/*
+ * Runs the fixup only for the first IDE controller
+ * (Shai Fultheim - shai@ftcon.com)
+ */
+ static int called = 0;
+ if (called)
+ return;
+ called = 1;
+
+ /*
* There exist PCI IDE controllers which have utter garbage
* in first four base registers. Ignore that.
*/