Commit de7d5f72 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Bjorn Helgaas

PCI/PM: Disable runtime PM of PCIe ports

The runtime PM of PCIe ports turns out to be quite fragile, as in
some cases things work while in some other cases they don't and we
don't seem to have a good way to determine whether or not they are
going to work in advance.

For this reason, avoid enabling runtime PM for PCIe ports by
keeping their runtime PM reference counters always above 0 for the
time being.

When a PCIe port is suspended, it can no longer report events like
hotplug, so hotplug below the port may not work, as in the bug
report below.

[bhelgaas: changelog, stable]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=53811Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org	# v3.6+
parent 24ad0ef9
...@@ -184,14 +184,6 @@ static const struct dev_pm_ops pcie_portdrv_pm_ops = { ...@@ -184,14 +184,6 @@ static const struct dev_pm_ops pcie_portdrv_pm_ops = {
#define PCIE_PORTDRV_PM_OPS NULL #define PCIE_PORTDRV_PM_OPS NULL
#endif /* !PM */ #endif /* !PM */
/*
* PCIe port runtime suspend is broken for some chipsets, so use a
* black list to disable runtime PM for these chipsets.
*/
static const struct pci_device_id port_runtime_pm_black_list[] = {
{ /* end: all zeroes */ }
};
/* /*
* pcie_portdrv_probe - Probe PCI-Express port devices * pcie_portdrv_probe - Probe PCI-Express port devices
* @dev: PCI-Express port device being probed * @dev: PCI-Express port device being probed
...@@ -225,16 +217,11 @@ static int pcie_portdrv_probe(struct pci_dev *dev, ...@@ -225,16 +217,11 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
* it by default. * it by default.
*/ */
dev->d3cold_allowed = false; dev->d3cold_allowed = false;
if (!pci_match_id(port_runtime_pm_black_list, dev))
pm_runtime_put_noidle(&dev->dev);
return 0; return 0;
} }
static void pcie_portdrv_remove(struct pci_dev *dev) static void pcie_portdrv_remove(struct pci_dev *dev)
{ {
if (!pci_match_id(port_runtime_pm_black_list, dev))
pm_runtime_get_noresume(&dev->dev);
pcie_port_device_remove(dev); pcie_port_device_remove(dev);
pci_disable_device(dev); pci_disable_device(dev);
} }
......
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