aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-27 15:33:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-27 15:33:42 -0500
commita9f8094aaedc7bc21e9232ea5120eaf2e0c824fd (patch)
tree327a48bb1acf009d521f0b025a203701d83451b6 /drivers/acpi
parentb9ea44bf2c70b08b9ab3f3d71c2d16d6a134d35e (diff)
parent61d9e854dfb91b46b99ffd3d31fc7d45d2b95f31 (diff)
Merge tag 'pci-v4.5-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: "Enumeration: Revert x86 pcibios_alloc_irq() to fix regression (Bjorn Helgaas) Marvell MVEBU host bridge driver: Restrict build to 32-bit ARM (Thierry Reding)" * tag 'pci-v4.5-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: mvebu: Restrict build to 32-bit ARM Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()" Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed" Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled"
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_irq.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index d30184c7f3bc..c8e169e46673 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -406,7 +406,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
406 return 0; 406 return 0;
407 } 407 }
408 408
409 if (pci_has_managed_irq(dev)) 409 if (dev->irq_managed && dev->irq > 0)
410 return 0; 410 return 0;
411 411
412 entry = acpi_pci_irq_lookup(dev, pin); 412 entry = acpi_pci_irq_lookup(dev, pin);
@@ -451,7 +451,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
451 kfree(entry); 451 kfree(entry);
452 return rc; 452 return rc;
453 } 453 }
454 pci_set_managed_irq(dev, rc); 454 dev->irq = rc;
455 dev->irq_managed = 1;
455 456
456 if (link) 457 if (link)
457 snprintf(link_desc, sizeof(link_desc), " -> Link[%s]", link); 458 snprintf(link_desc, sizeof(link_desc), " -> Link[%s]", link);
@@ -474,9 +475,17 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
474 u8 pin; 475 u8 pin;
475 476
476 pin = dev->pin; 477 pin = dev->pin;
477 if (!pin || !pci_has_managed_irq(dev)) 478 if (!pin || !dev->irq_managed || dev->irq <= 0)
478 return; 479 return;
479 480
481 /* Keep IOAPIC pin configuration when suspending */
482 if (dev->dev.power.is_prepared)
483 return;
484#ifdef CONFIG_PM
485 if (dev->dev.power.runtime_status == RPM_SUSPENDING)
486 return;
487#endif
488
480 entry = acpi_pci_irq_lookup(dev, pin); 489 entry = acpi_pci_irq_lookup(dev, pin);
481 if (!entry) 490 if (!entry)
482 return; 491 return;
@@ -496,6 +505,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
496 dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin)); 505 dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
497 if (gsi >= 0) { 506 if (gsi >= 0) {
498 acpi_unregister_gsi(gsi); 507 acpi_unregister_gsi(gsi);
499 pci_reset_managed_irq(dev); 508 dev->irq_managed = 0;
500 } 509 }
501} 510}