Skip to content

Commit 7e6f3b6

Browse files
endriftbjorn-helgaas
authored andcommitted
PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
The AMD VanGogh SoC contains a DesignWare USB3 Dual-Role Device that can be operated as either a USB Host or a USB Device, similar to on the AMD Nolan platform. be6646b ("PCI: Prevent xHCI driver from claiming AMD Nolan USB3 DRD device") added a quirk to let the dwc3 driver claim the Nolan device since it provides more specific support. Extend that quirk to include the VanGogh SoC USB3 device. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vicki Pfau <[email protected]> [bhelgaas: include be6646b reference, add stable tag] Signed-off-by: Bjorn Helgaas <[email protected]> Cc: [email protected] # v3.19+
1 parent 0bb80ec commit 7e6f3b6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/pci/quirks.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,15 +690,15 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
690690
/*
691691
* In the AMD NL platform, this device ([1022:7912]) has a class code of
692692
* PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will
693-
* claim it.
693+
* claim it. The same applies on the VanGogh platform device ([1022:163a]).
694694
*
695695
* But the dwc3 driver is a more specific driver for this device, and we'd
696696
* prefer to use it instead of xhci. To prevent xhci from claiming the
697697
* device, change the class code to 0x0c03fe, which the PCI r3.0 spec
698698
* defines as "USB device (not host controller)". The dwc3 driver can then
699699
* claim it based on its Vendor and Device ID.
700700
*/
701-
static void quirk_amd_nl_class(struct pci_dev *pdev)
701+
static void quirk_amd_dwc_class(struct pci_dev *pdev)
702702
{
703703
u32 class = pdev->class;
704704

@@ -708,7 +708,9 @@ static void quirk_amd_nl_class(struct pci_dev *pdev)
708708
class, pdev->class);
709709
}
710710
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
711-
quirk_amd_nl_class);
711+
quirk_amd_dwc_class);
712+
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VANGOGH_USB,
713+
quirk_amd_dwc_class);
712714

713715
/*
714716
* Synopsys USB 3.x host HAPS platform has a class code of

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@
579579
#define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3
580580
#define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
581581
#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
582+
#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
582583
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
583584
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
584585
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001

0 commit comments

Comments
 (0)