diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/pci_irq.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 28338227dd5e..e42481f64495 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -384,16 +384,15 @@ acpi_pci_irq_lookup(struct pci_dev *dev, int pin) | |||
384 | struct acpi_prt_entry *entry; | 384 | struct acpi_prt_entry *entry; |
385 | 385 | ||
386 | entry = acpi_pci_irq_find_prt_entry(dev, pin); | 386 | entry = acpi_pci_irq_find_prt_entry(dev, pin); |
387 | if (!entry) { | 387 | if (entry) { |
388 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No %s[%c] _PRT entry\n", | 388 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n", |
389 | pci_name(dev), pin_name(pin))); | 389 | pci_name(dev), pin_name(pin))); |
390 | return NULL; | 390 | return entry; |
391 | } | 391 | } |
392 | 392 | ||
393 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n", | 393 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No %s[%c] _PRT entry\n", |
394 | pci_name(dev), pin_name(pin))); | 394 | pci_name(dev), pin_name(pin))); |
395 | 395 | return NULL; | |
396 | return entry; | ||
397 | } | 396 | } |
398 | 397 | ||
399 | static struct acpi_prt_entry * | 398 | static struct acpi_prt_entry * |
@@ -408,7 +407,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin) | |||
408 | * Attempt to derive an IRQ for this device from a parent bridge's | 407 | * Attempt to derive an IRQ for this device from a parent bridge's |
409 | * PCI interrupt routing entry (eg. yenta bridge and add-in card bridge). | 408 | * PCI interrupt routing entry (eg. yenta bridge and add-in card bridge). |
410 | */ | 409 | */ |
411 | while (!entry && bridge->bus->self) { | 410 | while (bridge->bus->self) { |
412 | pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1; | 411 | pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1; |
413 | bridge = bridge->bus->self; | 412 | bridge = bridge->bus->self; |
414 | 413 | ||
@@ -425,18 +424,18 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin) | |||
425 | } | 424 | } |
426 | 425 | ||
427 | entry = acpi_pci_irq_lookup(bridge, pin); | 426 | entry = acpi_pci_irq_lookup(bridge, pin); |
427 | if (entry) { | ||
428 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
429 | "Derived GSI for %s INT %c from %s\n", | ||
430 | pci_name(dev), pin_name(orig_pin), | ||
431 | pci_name(bridge))); | ||
432 | return entry; | ||
433 | } | ||
428 | } | 434 | } |
429 | 435 | ||
430 | if (!entry) { | 436 | dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n", |
431 | dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n", | 437 | pin_name(orig_pin)); |
432 | pin_name(orig_pin)); | 438 | return NULL; |
433 | return NULL; | ||
434 | } | ||
435 | |||
436 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derived GSI for %s INT %c from %s\n", | ||
437 | pci_name(dev), pin_name(orig_pin), pci_name(bridge))); | ||
438 | |||
439 | return entry; | ||
440 | } | 439 | } |
441 | 440 | ||
442 | /* | 441 | /* |