Commit 87683e22 authored by Oliver Neukum's avatar Oliver Neukum Committed by Bjorn Helgaas

PCI: pciehp: Always implement resume, regardless of pciehp_force param

Previously, the driver ignored resume unless the pciehp_force module_param
was specified.  On some laptops that means that interrupts are not
delivered after S3, so card removals and insertions are not handled.
This patch makes the driver handle resume regardless of pciehp_force.

[bhelgaas: changelog]
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 0d7614f0
...@@ -300,12 +300,13 @@ static int pciehp_suspend (struct pcie_device *dev) ...@@ -300,12 +300,13 @@ static int pciehp_suspend (struct pcie_device *dev)
static int pciehp_resume (struct pcie_device *dev) static int pciehp_resume (struct pcie_device *dev)
{ {
dev_info(&dev->device, "%s ENTRY\n", __func__); struct controller *ctrl;
if (pciehp_force) {
struct controller *ctrl = get_service_data(dev);
struct slot *slot; struct slot *slot;
u8 status; u8 status;
dev_info(&dev->device, "%s ENTRY\n", __func__);
ctrl = get_service_data(dev);
/* reinitialize the chipset's event detection logic */ /* reinitialize the chipset's event detection logic */
pcie_enable_notification(ctrl); pcie_enable_notification(ctrl);
...@@ -317,7 +318,6 @@ static int pciehp_resume (struct pcie_device *dev) ...@@ -317,7 +318,6 @@ static int pciehp_resume (struct pcie_device *dev)
pciehp_enable_slot(slot); pciehp_enable_slot(slot);
else else
pciehp_disable_slot(slot); pciehp_disable_slot(slot);
}
return 0; return 0;
} }
#endif /* PM */ #endif /* PM */
......
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