[PATCH 1/1][SRU][OEM-B] UBUNTU: SAUCE: PCI/PM: Don't call pci_finish_runtime_suspend()
AceLan Kao
acelan.kao at canonical.com
Tue Sep 3 08:15:55 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1842388
Don't call pci_finish_runtime_suspend() if runtime PM callback functions
are not provided. It leads to backport-iwlwifi driver fails to wakes up
from runtime suspend.
This commit could be reverted after backport-iwlwifi-dkms 7906 driver is
released in Ubuntu archive.
Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
---
drivers/pci/pci-driver.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 34327a5ddf4c..e0809aff63bf 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1323,6 +1323,10 @@ static int pci_pm_runtime_suspend(struct device *dev)
if (!pci_dev->state_saved) {
pci_save_state(pci_dev);
+
+ if (!pm || !pm->runtime_suspend)
+ return -ENOSYS;
+
pci_finish_runtime_suspend(pci_dev);
}
--
2.17.1
More information about the kernel-team
mailing list