From fc4c3ad209fdbb5f1f76b7a396fefd1fac107564 Mon Sep 17 00:00:00 2001 From: Shai Fultheim Date: Fri, 14 May 2004 19:42:40 -0700 Subject: [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). --- arch/i386/pci/fixup.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 @@ -91,6 +91,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. -- cgit 1.2.3-korg