mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
PCI / PM: Skip bridges in pci_enable_wake()
PCI bridges only have a reason to generate wakeup signals on behalf of devices below them, so avoid preparing bridges for wakeup directly in pci_enable_wake(). Also drop the pci_has_subordinate() check from pci_pm_default_resume() as this will be done by pci_enable_wake() itself now. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
16f73eb02d
commit
baecc470d5
2 changed files with 8 additions and 3 deletions
|
@ -1912,6 +1912,13 @@ int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable)
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
* Bridges can only signal wakeup on behalf of subordinate devices,
|
||||
* but that is set up elsewhere, so skip them.
|
||||
*/
|
||||
if (pci_has_subordinate(dev))
|
||||
return 0;
|
||||
|
||||
/* Don't do the same thing twice in a row for one device. */
|
||||
if (!!enable == !!dev->wakeup_prepared)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue