Commit aa6fba55 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Add back pcie_pme_remove() so we free the IRQ when removing PCIe port
  devices; previously the leaked IRQ caused an MSI BUG_ON"

* tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/PME: Restore pcie_pme_driver.remove
parents 3c7a9f32 afe3e4d1
...@@ -433,6 +433,17 @@ static int pcie_pme_resume(struct pcie_device *srv) ...@@ -433,6 +433,17 @@ static int pcie_pme_resume(struct pcie_device *srv)
return 0; return 0;
} }
/**
* pcie_pme_remove - Prepare PCIe PME service device for removal.
* @srv - PCIe service device to remove.
*/
static void pcie_pme_remove(struct pcie_device *srv)
{
pcie_pme_suspend(srv);
free_irq(srv->irq, srv);
kfree(get_service_data(srv));
}
static struct pcie_port_service_driver pcie_pme_driver = { static struct pcie_port_service_driver pcie_pme_driver = {
.name = "pcie_pme", .name = "pcie_pme",
.port_type = PCI_EXP_TYPE_ROOT_PORT, .port_type = PCI_EXP_TYPE_ROOT_PORT,
...@@ -441,6 +452,7 @@ static struct pcie_port_service_driver pcie_pme_driver = { ...@@ -441,6 +452,7 @@ static struct pcie_port_service_driver pcie_pme_driver = {
.probe = pcie_pme_probe, .probe = pcie_pme_probe,
.suspend = pcie_pme_suspend, .suspend = pcie_pme_suspend,
.resume = pcie_pme_resume, .resume = pcie_pme_resume,
.remove = pcie_pme_remove,
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment