diff options
-rw-r--r-- | drivers/pci/pci.c | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 358d01e52d8f..b5b80a5560ed 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2038,7 +2038,8 @@ bool pci_dev_keep_suspended(struct pci_dev *pci_dev) if (!pm_runtime_suspended(dev) || pci_target_state(pci_dev) != pci_dev->current_state - || platform_pci_need_resume(pci_dev)) + || platform_pci_need_resume(pci_dev) + || (pci_dev->dev_flags & PCI_DEV_FLAGS_NEEDS_RESUME)) return false; /* diff --git a/include/linux/pci.h b/include/linux/pci.h index 109ccee9e3e6..fee06c4c8e4d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -182,6 +182,11 @@ enum pci_dev_flags { PCI_DEV_FLAGS_NO_PM_RESET = (__force pci_dev_flags_t) (1 << 7), /* Get VPD from function 0 VPD */ PCI_DEV_FLAGS_VPD_REF_F0 = (__force pci_dev_flags_t) (1 << 8), + /* + * Resume before calling the driver's system suspend hooks, disabling + * the direct_complete optimization. + */ + PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11), }; enum pci_irq_reroute_variant { |