diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 6d4a5319148..e5b75eb6b94 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1689,6 +1689,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev) if (target_state == PCI_POWER_ERROR) return -EIO; + /* Some devices mustn't be in D3 during system sleep */ + if (target_state == PCI_D3hot && + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) + return 0; + pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); error = pci_set_power_state(dev, target_state); |