Skip to content

Commit

Permalink
force xhci usb mode on steam deck to workaround firmware bug
Browse files Browse the repository at this point in the history
this allows booting on steam deck with external usb devices,
particularly important for the installer
  • Loading branch information
alkazar committed Feb 13, 2024
1 parent 199dd50 commit 21ad840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,15 +697,15 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
/*
* In the AMD NL platform, this device ([1022:7912]) has a class code of
* PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will
* claim it. The same applies on the VanGogh platform device ([1022:163a]).
* claim it.
*
* But the dwc3 driver is a more specific driver for this device, and we'd
* prefer to use it instead of xhci. To prevent xhci from claiming the
* device, change the class code to 0x0c03fe, which the PCI r3.0 spec
* defines as "USB device (not host controller)". The dwc3 driver can then
* claim it based on its Vendor and Device ID.
*/
static void quirk_amd_dwc_class(struct pci_dev *pdev)
static void quirk_amd_nl_class(struct pci_dev *pdev)
{
u32 class = pdev->class;

Expand All @@ -718,9 +718,7 @@ static void quirk_amd_dwc_class(struct pci_dev *pdev)
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
quirk_amd_dwc_class);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VANGOGH_USB,
quirk_amd_dwc_class);
quirk_amd_nl_class);

/*
* Synopsys USB 3.x host HAPS platform has a class code of
Expand Down
1 change: 0 additions & 1 deletion include/linux/pci_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@
#define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
#define PCI_DEVICE_ID_AMD_MI300_DF_F3 0x152b
#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
Expand Down

0 comments on commit 21ad840

Please sign in to comment.