aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-12-08 23:30:46 -0500
committerLen Brown <len.brown@intel.com>2008-12-30 21:26:07 -0500
commitc458033c9b72a81b890d97ec6339694bab252383 (patch)
treeafd8934ce76eddc4e3a355058d878f9c31a29954 /drivers/acpi/pci_irq.c
parente64e9db53ab78d20dff4cc1aec8a6b0e4e70ce8c (diff)
ACPI: PCI: use 1-based encoding for _PRT quirks
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>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r--drivers/acpi/pci_irq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 2c52cf0004ba..c4a5c49809db 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -145,19 +145,21 @@ struct prt_quirk {
145 char *actual_source; 145 char *actual_source;
146}; 146};
147 147
148#define PCI_INTX_PIN(c) (c - 'A' + 1)
149
148/* 150/*
149 * These systems have incorrect _PRT entries. The BIOS claims the PCI 151 * These systems have incorrect _PRT entries. The BIOS claims the PCI
150 * interrupt at the listed segment/bus/device/pin is connected to the first 152 * interrupt at the listed segment/bus/device/pin is connected to the first
151 * link device, but it is actually connected to the second. 153 * link device, but it is actually connected to the second.
152 */ 154 */
153static struct prt_quirk prt_quirks[] = { 155static struct prt_quirk prt_quirks[] = {
154 { medion_md9580, 0, 0, 9, 'A', 156 { medion_md9580, 0, 0, 9, PCI_INTX_PIN('A'),
155 "\\_SB_.PCI0.ISA_.LNKA", 157 "\\_SB_.PCI0.ISA_.LNKA",
156 "\\_SB_.PCI0.ISA_.LNKB"}, 158 "\\_SB_.PCI0.ISA_.LNKB"},
157 { dell_optiplex, 0, 0, 0xd, 'A', 159 { dell_optiplex, 0, 0, 0xd, PCI_INTX_PIN('A'),
158 "\\_SB_.LNKB", 160 "\\_SB_.LNKB",
159 "\\_SB_.LNKA"}, 161 "\\_SB_.LNKA"},
160 { hp_t5710, 0, 0, 1, 'A', 162 { hp_t5710, 0, 0, 1, PCI_INTX_PIN('A'),
161 "\\_SB_.PCI0.LNK1", 163 "\\_SB_.PCI0.LNK1",
162 "\\_SB_.PCI0.LNK3"}, 164 "\\_SB_.PCI0.LNK3"},
163}; 165};
@@ -179,7 +181,7 @@ do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt)
179 entry->id.segment == quirk->segment && 181 entry->id.segment == quirk->segment &&
180 entry->id.bus == quirk->bus && 182 entry->id.bus == quirk->bus &&
181 entry->id.device == quirk->device && 183 entry->id.device == quirk->device &&
182 pin_name(entry->pin) == quirk->pin && 184 entry->pin == quirk->pin &&
183 !strcmp(prt->source, quirk->source) && 185 !strcmp(prt->source, quirk->source) &&
184 strlen(prt->source) >= strlen(quirk->actual_source)) { 186 strlen(prt->source) >= strlen(quirk->actual_source)) {
185 printk(KERN_WARNING PREFIX "firmware reports " 187 printk(KERN_WARNING PREFIX "firmware reports "