瀏覽代碼

[PATCH] i386: Fix PCI BIOS config space access

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>
Andi Kleen 18 年之前
父節點
當前提交
f015c6c4d7
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 2 0
      arch/i386/pci/direct.c
  2. 4 0
      arch/i386/pci/init.c

+ 2 - 0
arch/i386/pci/direct.c

@@ -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;

+ 4 - 0
arch/i386/pci/init.c

@@ -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);