On Friday, November 13, 2020 7:37:45 AM CET Mika Westerberg wrote: > Hi, > > On Thu, Oct 29, 2020 at 12:24:53PM +0300, Mika Westerberg wrote: > > When a PCI bridge is runtime resumed from D3cold the underlying bus is > > walked and the attached devices are runtime resumed as well. However, in > > addition to that we also generate a wakeup event for these devices even > > though this actually is not a real wakeup event coming from the > > hardware. > > > > Normally this does not cause problems but when combined with > > /sys/power/wakeup_count like using the steps below: > > > > # count=$(cat /sys/power/wakeup_count) > > # echo $count > /sys/power/wakeup_count > > # echo mem > /sys/power/state > > > > The system suspend cycle might get aborted at this point if a PCI bridge > > that was runtime suspended (D3cold) was runtime resumed for any reason. > > The runtime resume calls pci_wakeup_bus() and that generates wakeup > > event increasing wakeup_count. > > > > Since this is not a real wakeup event we can prevent the above from > > happening by removing the call to pci_wakeup_event() in > > pci_wakeup_bus(). While there rename pci_wakeup_bus() to > > pci_resume_bus() to better reflect what it does. > > Any comments on this? I've missed it, sorry. Now replied with a R-by, thanks!