diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-12-08 23:30:26 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-30 21:19:31 -0500 |
commit | c13f889a24e6ced50abb582dab3ee4b7c79b038e (patch) | |
tree | d0d7715cdbaf50c36523b4b3b65d236d6be9315a /drivers | |
parent | b52b3f4af83571e86f910b07a61b177e2b7d8409 (diff) |
ACPI: PCI: fix GSI/IRQ naming confusion
The interrupt numbers from _PRT entries are GSIs, not Linux IRQs.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/pci_irq.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index c6a0364715ce..9302f4bb89e2 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -333,7 +333,7 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry, | |||
333 | *polarity = ACPI_ACTIVE_LOW; | 333 | *polarity = ACPI_ACTIVE_LOW; |
334 | } | 334 | } |
335 | 335 | ||
336 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq)); | 336 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found GSI %d\n", irq)); |
337 | return irq; | 337 | return irq; |
338 | } | 338 | } |
339 | 339 | ||
@@ -432,7 +432,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, | |||
432 | return -1; | 432 | return -1; |
433 | } | 433 | } |
434 | 434 | ||
435 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n", | 435 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive GSI %d for device %s from %s\n", |
436 | irq, pci_name(dev), pci_name(bridge))); | 436 | irq, pci_name(dev), pci_name(bridge))); |
437 | 437 | ||
438 | return irq; | 438 | return irq; |
@@ -446,7 +446,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, | |||
446 | 446 | ||
447 | int acpi_pci_irq_enable(struct pci_dev *dev) | 447 | int acpi_pci_irq_enable(struct pci_dev *dev) |
448 | { | 448 | { |
449 | int irq = 0; | 449 | int gsi = 0; |
450 | u8 pin = 0; | 450 | u8 pin = 0; |
451 | int triggering = ACPI_LEVEL_SENSITIVE; | 451 | int triggering = ACPI_LEVEL_SENSITIVE; |
452 | int polarity = ACPI_ACTIVE_LOW; | 452 | int polarity = ACPI_ACTIVE_LOW; |
@@ -468,7 +468,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
468 | * First we check the PCI IRQ routing table (PRT) for an IRQ. PRT | 468 | * First we check the PCI IRQ routing table (PRT) for an IRQ. PRT |
469 | * values override any BIOS-assigned IRQs set during boot. | 469 | * values override any BIOS-assigned IRQs set during boot. |
470 | */ | 470 | */ |
471 | irq = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin, | 471 | gsi = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin, |
472 | &triggering, &polarity, &link, | 472 | &triggering, &polarity, &link, |
473 | acpi_pci_allocate_irq); | 473 | acpi_pci_allocate_irq); |
474 | 474 | ||
@@ -476,12 +476,12 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
476 | * If no PRT entry was found, we'll try to derive an IRQ from the | 476 | * If no PRT entry was found, we'll try to derive an IRQ from the |
477 | * device's parent bridge. | 477 | * device's parent bridge. |
478 | */ | 478 | */ |
479 | if (irq < 0) | 479 | if (gsi < 0) |
480 | irq = acpi_pci_irq_derive(dev, pin, &triggering, | 480 | gsi = acpi_pci_irq_derive(dev, pin, &triggering, |
481 | &polarity, &link, | 481 | &polarity, &link, |
482 | acpi_pci_allocate_irq); | 482 | acpi_pci_allocate_irq); |
483 | 483 | ||
484 | if (irq < 0) { | 484 | if (gsi < 0) { |
485 | /* | 485 | /* |
486 | * IDE legacy mode controller IRQs are magic. Why do compat | 486 | * IDE legacy mode controller IRQs are magic. Why do compat |
487 | * extensions always make such a nasty mess. | 487 | * extensions always make such a nasty mess. |
@@ -494,7 +494,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
494 | * No IRQ known to the ACPI subsystem - maybe the BIOS / | 494 | * No IRQ known to the ACPI subsystem - maybe the BIOS / |
495 | * driver reported one, then use it. Exit in any case. | 495 | * driver reported one, then use it. Exit in any case. |
496 | */ | 496 | */ |
497 | if (irq < 0) { | 497 | if (gsi < 0) { |
498 | dev_warn(&dev->dev, "PCI INT %c: no GSI", 'A' + pin); | 498 | dev_warn(&dev->dev, "PCI INT %c: no GSI", 'A' + pin); |
499 | /* Interrupt Line values above 0xF are forbidden */ | 499 | /* Interrupt Line values above 0xF are forbidden */ |
500 | if (dev->irq > 0 && (dev->irq <= 0xF)) { | 500 | if (dev->irq > 0 && (dev->irq <= 0xF)) { |
@@ -508,7 +508,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
508 | } | 508 | } |
509 | } | 509 | } |
510 | 510 | ||
511 | rc = acpi_register_gsi(irq, triggering, polarity); | 511 | rc = acpi_register_gsi(gsi, triggering, polarity); |
512 | if (rc < 0) { | 512 | if (rc < 0) { |
513 | dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n", | 513 | dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n", |
514 | 'A' + pin); | 514 | 'A' + pin); |
@@ -522,7 +522,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
522 | link_desc[0] = '\0'; | 522 | link_desc[0] = '\0'; |
523 | 523 | ||
524 | dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n", | 524 | dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n", |
525 | 'A' + pin, link_desc, irq, | 525 | 'A' + pin, link_desc, gsi, |
526 | (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", | 526 | (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", |
527 | (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); | 527 | (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); |
528 | 528 | ||