[PATCH] i386: Fix PCI BIOS config space access
authorAndi Kleen <ak@suse.de>
Thu, 5 Oct 2006 16:47:22 +0000 (18:47 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 5 Oct 2006 16:47:22 +0000 (18:47 +0200)
Got broken by a earlier change.

Also add a printk when no pci config method could be found.

Cc: gregkh@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/pci/direct.c
arch/i386/pci/init.c

index 5acf0b4743cfc74ba1cc04e34e708449a3d03ecc..431c9a51b1578bbaf39de3bcefc95d2087a73a38 100644 (file)
@@ -256,6 +256,8 @@ static int __init pci_check_type2(void)
 
 void __init pci_direct_init(int type)
 {
+       if (type == 0)
+               return;
        printk(KERN_INFO "PCI: Using configuration type %d\n", type);
        if (type == 1)
                raw_pci_ops = &pci_direct_conf1;
index d028e1b05c3697e56e64631b0863cb3d90819fd3..b21b6da8ab1dc6915258a4ec211e43cb6c39c61c 100644 (file)
@@ -28,6 +28,10 @@ static __init int pci_access_init(void)
 #ifdef CONFIG_PCI_DIRECT
        pci_direct_init(type);
 #endif
+       if (!raw_pci_ops)
+               printk(KERN_ERR
+               "PCI: Fatal: No config space access function found\n");
+
        return 0;
 }
 arch_initcall(pci_access_init);