]> xenbits.xensource.com Git - seabios.git/commitdiff
seabios: Add a dummy PCI slot to irq mapping function rel-1.7.2.1
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 21 Feb 2013 16:12:23 +0000 (09:12 -0700)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 24 Feb 2013 17:02:04 +0000 (12:02 -0500)
This should never get called, but if we somehow get a new chipset
that fails to implement their own pci_slot_get_irq function, fail
gracefully and add a debug log message.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
src/pciinit.c

index c670a2bf5b0fc0b9fee5ed40a9d221e4b63a027f..b3f359f18c16af645a3e996fbf32d5508022c5b9 100644 (file)
@@ -91,7 +91,15 @@ const u8 pci_irqs[4] = {
     10, 10, 11, 11
 };
 
-static int (*pci_slot_get_irq)(struct pci_device *pci, int pin);
+static int dummy_pci_slot_get_irq(struct pci_device *pci, int pin)
+{
+    dprintf(1, "pci_slot_get_irq called with unknown routing\n");
+
+    return 0xff; /* PCI defined "unknown" or "no connection" for x86 */
+}
+
+static int (*pci_slot_get_irq)(struct pci_device *pci, int pin) =
+    dummy_pci_slot_get_irq;
 
 // Return the global irq number corresponding to a host bus device irq pin.
 static int piix_pci_slot_get_irq(struct pci_device *pci, int pin)