aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2012-09-07 23:28:30 +0200
committerBjorn Helgaas <bhelgaas@google.com>2012-09-07 17:06:54 -0600
commit87683e22c646e563061a91f4a0106e6913acebf8 (patch)
tree55f3e69bce234664cc6da01a56e8c7699bacc2c0 /drivers
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
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: Oliver Neukum <oneukum@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/hotplug/pciehp_core.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 365c6b96c642..916bf4f53aba 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -300,24 +300,24 @@ static int pciehp_suspend (struct pcie_device *dev)
static int pciehp_resume (struct pcie_device *dev)
{
+ struct controller *ctrl;
+ struct slot *slot;
+ u8 status;
+
dev_info(&dev->device, "%s ENTRY\n", __func__);
- if (pciehp_force) {
- struct controller *ctrl = get_service_data(dev);
- struct slot *slot;
- u8 status;
+ ctrl = get_service_data(dev);
- /* reinitialize the chipset's event detection logic */
- pcie_enable_notification(ctrl);
+ /* reinitialize the chipset's event detection logic */
+ pcie_enable_notification(ctrl);
- slot = ctrl->slot;
+ slot = ctrl->slot;
- /* Check if slot is occupied */
- pciehp_get_adapter_status(slot, &status);
- if (status)
- pciehp_enable_slot(slot);
- else
- pciehp_disable_slot(slot);
- }
+ /* Check if slot is occupied */
+ pciehp_get_adapter_status(slot, &status);
+ if (status)
+ pciehp_enable_slot(slot);
+ else
+ pciehp_disable_slot(slot);
return 0;
}
#endif /* PM */