diff options
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index cd0a204d96d1..11adab13f2b7 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -75,6 +75,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
75 | { | 75 | { |
76 | int i = 0; | 76 | int i = 0; |
77 | int irq; | 77 | int irq; |
78 | int p, t; | ||
78 | 79 | ||
79 | if (!valid_IRQ(gsi)) | 80 | if (!valid_IRQ(gsi)) |
80 | return; | 81 | return; |
@@ -85,15 +86,22 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
85 | if (i >= PNP_MAX_IRQ) | 86 | if (i >= PNP_MAX_IRQ) |
86 | return; | 87 | return; |
87 | 88 | ||
88 | #ifdef CONFIG_X86 | 89 | /* |
89 | if (gsi < 16 && (triggering != ACPI_EDGE_SENSITIVE || | 90 | * in IO-APIC mode, use overrided attribute. Two reasons: |
90 | polarity != ACPI_ACTIVE_HIGH)) { | 91 | * 1. BIOS bug in DSDT |
91 | pnp_warn("BIOS BUG: legacy PNP IRQ %d should be edge trigger, " | 92 | * 2. BIOS uses IO-APIC mode Interrupt Source Override |
92 | "active high", gsi); | 93 | */ |
93 | triggering = ACPI_EDGE_SENSITIVE; | 94 | if (!acpi_get_override_irq(gsi, &t, &p)) { |
94 | polarity = ACPI_ACTIVE_HIGH; | 95 | t = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; |
96 | p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; | ||
97 | |||
98 | if (triggering != t || polarity != p) { | ||
99 | pnp_warn("IRQ %d override to %s, %s", | ||
100 | gsi, t ? "edge":"level", p ? "low":"high"); | ||
101 | triggering = t; | ||
102 | polarity = p; | ||
103 | } | ||
95 | } | 104 | } |
96 | #endif | ||
97 | 105 | ||
98 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag | 106 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag |
99 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); | 107 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); |