Commit 87683e22c646e563061a91f4a0106e6913acebf8
Committed by
Bjorn Helgaas
1 parent
0d7614f09c
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 14 additions and 14 deletions Side-by-side Diff
drivers/pci/hotplug/pciehp_core.c
... | ... | @@ -300,24 +300,24 @@ |
300 | 300 | |
301 | 301 | static int pciehp_resume (struct pcie_device *dev) |
302 | 302 | { |
303 | + struct controller *ctrl; | |
304 | + struct slot *slot; | |
305 | + u8 status; | |
306 | + | |
303 | 307 | dev_info(&dev->device, "%s ENTRY\n", __func__); |
304 | - if (pciehp_force) { | |
305 | - struct controller *ctrl = get_service_data(dev); | |
306 | - struct slot *slot; | |
307 | - u8 status; | |
308 | + ctrl = get_service_data(dev); | |
308 | 309 | |
309 | - /* reinitialize the chipset's event detection logic */ | |
310 | - pcie_enable_notification(ctrl); | |
310 | + /* reinitialize the chipset's event detection logic */ | |
311 | + pcie_enable_notification(ctrl); | |
311 | 312 | |
312 | - slot = ctrl->slot; | |
313 | + slot = ctrl->slot; | |
313 | 314 | |
314 | - /* Check if slot is occupied */ | |
315 | - pciehp_get_adapter_status(slot, &status); | |
316 | - if (status) | |
317 | - pciehp_enable_slot(slot); | |
318 | - else | |
319 | - pciehp_disable_slot(slot); | |
320 | - } | |
315 | + /* Check if slot is occupied */ | |
316 | + pciehp_get_adapter_status(slot, &status); | |
317 | + if (status) | |
318 | + pciehp_enable_slot(slot); | |
319 | + else | |
320 | + pciehp_disable_slot(slot); | |
321 | 321 | return 0; |
322 | 322 | } |
323 | 323 | #endif /* PM */ |