On 9/13/2023 09:31, Lukas Wunner wrote:
On Tue, Sep 12, 2023 at 11:43:53PM -0500, Mario Limonciello wrote:
On 9/12/2023 23:25, Lukas Wunner wrote:
There's already PCI_DEV_FLAGS_NO_D3, would it be possible to just
reuse that instead of adding another codepath for D3 quirks?
The root port can handle D3 (including wakeup) at runtime fine.
Issue occurs only during s2idle w/ hardware sleep.
I see.
If this only affects system sleep, not runtime PM, what you can do is
define a DECLARE_PCI_FIXUP_SUSPEND_LATE() which calls pci_d3cold_disable()
and also define a DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY() which calls
pci_d3cold_enable().
And I think you can make those calls conditional on pm_suspend_no_platform()
to constrain to s2idle.
User space should still be able to influence runtime PM via the
d3cold_allowed flag (unless I'm missing something).
Thanks,
Lukas
The part you're missing is that D3hot is affected by this issue too,
otherwise it would be a good proposal.