Lines 411-426
static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
Link Here
|
411 |
* using extended IRQ descriptors we take the IRQ configuration |
411 |
* using extended IRQ descriptors we take the IRQ configuration |
412 |
* from _CRS directly. |
412 |
* from _CRS directly. |
413 |
*/ |
413 |
*/ |
414 |
if (acpi_dev_irq_empty_or_noflags(legacy, triggering, polarity, shareable) |
414 |
if (acpi_dev_irq_empty_or_noflags(legacy, triggering, polarity, shareable)) { |
415 |
&& !acpi_get_override_irq(gsi, &t, &p)) { |
415 |
u8 trig; |
416 |
u8 trig = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; |
416 |
u8 pol; |
417 |
u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; |
417 |
u8 shar; |
418 |
|
418 |
|
419 |
if (triggering != trig || polarity != pol) { |
419 |
if (!acpi_get_override_irq(gsi, &t, &p)) { |
420 |
pr_warn("ACPI: IRQ %d override to %s, %s\n", gsi, |
420 |
trig = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; |
421 |
t ? "level" : "edge", p ? "low" : "high"); |
421 |
pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; |
422 |
triggering = trig; |
422 |
|
423 |
polarity = pol; |
423 |
if (triggering != trig || polarity != pol) { |
|
|
424 |
pr_warn("ACPI: IRQ %d override to %s, %s\n", gsi, |
425 |
t ? "level" : "edge", p ? "low" : "high"); |
426 |
triggering = trig; |
427 |
polarity = pol; |
428 |
} |
429 |
} |
430 |
if (!acpi_pci_link_get_irq_flags(gsi, &trig, &pol, &shar)) { |
431 |
/* |
432 |
* For legacy IRQs, consider the IRQ settings |
433 |
* from the PCI Interrupt Link devices. |
434 |
* The IRQ must also be reprogrammed in the APIC to make it work. |
435 |
*/ |
436 |
if (triggering != trig || polarity != pol) { |
437 |
irq_set_irq_type(gsi, acpi_dev_get_irq_type(trig, pol)); |
438 |
pr_info("ACPI: IRQ %d used from PCI Interrupt Link device: %s, %s\n", gsi, |
439 |
trig == ACPI_LEVEL_SENSITIVE ? "level" : "edge", |
440 |
pol == ACPI_ACTIVE_LOW ? "low" : "high"); |
441 |
triggering = trig; |
442 |
polarity = pol; |
443 |
shareable = shar; |
444 |
} |
424 |
} |
445 |
} |
425 |
} |
446 |
} |
426 |
|
447 |
|