Re: [PATCH v20 2/2] PCI: Add a quirk for AMD PCIe root ports w/ USB4 controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 19, 2023 at 10:27:24PM -0500, Mario Limonciello wrote:
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
[...]
> + * When AMD PCIe root ports with AMD USB4 controllers attached to them are put
> + * into D3hot or D3cold downstream USB devices may fail to wakeup the system
> + * from suspend to idle.  This manifests as a missing wakeup interrupt.
> + *
> + * Prevent the associated root port from using PME to wake from D3hot or
> + * D3cold power states during suspend.
> + * This will effectively put the root port into D0 power state over suspend.

IIUC, the quirk matches for a Root Port, then searches for a
USB controller below the Root Port, and if found, searches for the
Root Port above again to clear or reinstate the PME bits.

That seems like a roundabout way of doing things.  Have you
considered matching for the USB controller's Device ID in the quirk,
then checking whether the Root Port above has the Device ID which
is known to be broken?

Also, since pci_d3cold_enable() / pci_d3cold_disable() are now fixed
(can no longer be interfered with from user space), you might want to
consider using them alternatively to clearing PME bits.  They don't
require access to config space.

Thanks,

Lukas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux