Hello, * Basavaraj Natikar <Basavaraj.Natikar@xxxxxxx> [2023-03-06 08:24]: > One of the AMD USB controllers fails to maintain internal functional > context when transitioning from D3 to D0, desynchronizing MSI-X bits. > As a result, add a quirk to this controller to clear the MSI-X bits > on suspend. > Note: This quirk works in all scenarios, regardless of whether the > integrated GPU is disabled in the BIOS. I tested the patch on top of v6.2.2 and USB hotplug works. Dmesg is here: https://pbot.rmdir.de/H1BcUKbZUQQJ7NB6UylFEQ > Cc: Mario Limonciello <mario.limonciello@xxxxxxx> > Reported-by: Thomas Glanzmann <thomas@xxxxxxxxxxxx> Tested-by: Thomas Glanzmann <thomas@xxxxxxxxxxxx> > Link: https://lore.kernel.org/linux-usb/Y%2Fz9GdHjPyF2rNG3@xxxxxxxxxxxx/T/#u > Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@xxxxxxx> > --- > drivers/pci/quirks.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 44cab813bf95..ddf7100227d3 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -6023,3 +6023,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2d, dpc_log_size); > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2f, dpc_log_size); > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a31, dpc_log_size); > #endif > + > +static void quirk_clear_msix(struct pci_dev *dev) > +{ > + u16 ctrl; > + > + pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &ctrl); > + ctrl &= ~(PCI_MSIX_FLAGS_MASKALL | PCI_MSIX_FLAGS_ENABLE); > + pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, ctrl); > +} > +DECLARE_PCI_FIXUP_SUSPEND(PCI_VENDOR_ID_AMD, 0x15b8, quirk_clear_msix); Thank you for the patch. Cheers, Thomas