]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: PCI: use 1-based encoding for _PRT quirks
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 9 Dec 2008 04:30:46 +0000 (21:30 -0700)
committerLen Brown <len.brown@intel.com>
Wed, 31 Dec 2008 02:26:07 +0000 (21:26 -0500)
Use the PCI INTx pin encoding (1=INTA, 2=INTB, etc) for _PRT quirks.
Then we can simply compare "entry->pin == quirk->pin".

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/pci_irq.c

index 2c52cf0004ba1eb6a34b298aa7f66c6bfdf16171..c4a5c49809db81f4458cf79722ae837a65f31ff8 100644 (file)
@@ -145,19 +145,21 @@ struct prt_quirk {
        char                    *actual_source;
 };
 
+#define PCI_INTX_PIN(c)                (c - 'A' + 1)
+
 /*
  * These systems have incorrect _PRT entries.  The BIOS claims the PCI
  * interrupt at the listed segment/bus/device/pin is connected to the first
  * link device, but it is actually connected to the second.
  */
 static struct prt_quirk prt_quirks[] = {
-       { medion_md9580, 0, 0, 9, 'A',
+       { medion_md9580, 0, 0, 9, PCI_INTX_PIN('A'),
                "\\_SB_.PCI0.ISA_.LNKA",
                "\\_SB_.PCI0.ISA_.LNKB"},
-       { dell_optiplex, 0, 0, 0xd, 'A',
+       { dell_optiplex, 0, 0, 0xd, PCI_INTX_PIN('A'),
                "\\_SB_.LNKB",
                "\\_SB_.LNKA"},
-       { hp_t5710, 0, 0, 1, 'A',
+       { hp_t5710, 0, 0, 1, PCI_INTX_PIN('A'),
                "\\_SB_.PCI0.LNK1",
                "\\_SB_.PCI0.LNK3"},
 };
@@ -179,7 +181,7 @@ do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt)
                    entry->id.segment == quirk->segment &&
                    entry->id.bus == quirk->bus &&
                    entry->id.device == quirk->device &&
-                   pin_name(entry->pin) == quirk->pin &&
+                   entry->pin == quirk->pin &&
                    !strcmp(prt->source, quirk->source) &&
                    strlen(prt->source) >= strlen(quirk->actual_source)) {
                        printk(KERN_WARNING PREFIX "firmware reports "