diff options
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 0e3b8d0ff06b..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,6 +86,23 @@ 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 | ||
89 | /* | ||
90 | * in IO-APIC mode, use overrided attribute. Two reasons: | ||
91 | * 1. BIOS bug in DSDT | ||
92 | * 2. BIOS uses IO-APIC mode Interrupt Source Override | ||
93 | */ | ||
94 | if (!acpi_get_override_irq(gsi, &t, &p)) { | ||
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 | } | ||
104 | } | ||
105 | |||
88 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag | 106 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag |
89 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); | 107 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); |
90 | irq = acpi_register_gsi(gsi, triggering, polarity); | 108 | irq = acpi_register_gsi(gsi, triggering, polarity); |