Skip to content

Commit fbebc22

Browse files
RajuRangojugregkh
authored andcommitted
usb: xhci: quirk for data loss in ISOC transfers
commit cbc889a upstream. During the High-Speed Isochronous Audio transfers, xHCI controller on certain AMD platforms experiences momentary data loss. This results in Missed Service Errors (MSE) being generated by the xHCI. The root cause of the MSE is attributed to the ISOC OUT endpoint being omitted from scheduling. This can happen when an IN endpoint with a 64ms service interval either is pre-scheduled prior to the ISOC OUT endpoint or the interval of the ISOC OUT endpoint is shorter than that of the IN endpoint. Consequently, the OUT service is neglected when an IN endpoint with a service interval exceeding 32ms is scheduled concurrently (every 64ms in this scenario). This issue is particularly seen on certain older AMD platforms. To mitigate this problem, it is recommended to adjust the service interval of the IN endpoint to not exceed 32ms (interval 8). This adjustment ensures that the OUT endpoint will not be bypassed, even if a smaller interval value is utilized. Cc: stable <stable@kernel.org> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250627144127.3889714-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9f75893 commit fbebc22

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

drivers/usb/host/xhci-mem.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
14261426
/* Periodic endpoint bInterval limit quirk */
14271427
if (usb_endpoint_xfer_int(&ep->desc) ||
14281428
usb_endpoint_xfer_isoc(&ep->desc)) {
1429+
if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_9) &&
1430+
interval >= 9) {
1431+
interval = 8;
1432+
}
14291433
if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_7) &&
14301434
udev->speed >= USB_SPEED_HIGH &&
14311435
interval >= 7) {

drivers/usb/host/xhci-pci.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,22 @@
7171
#define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI 0x15ec
7272
#define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI 0x15f0
7373

74+
#define PCI_DEVICE_ID_AMD_ARIEL_TYPEC_XHCI 0x13ed
75+
#define PCI_DEVICE_ID_AMD_ARIEL_TYPEA_XHCI 0x13ee
76+
#define PCI_DEVICE_ID_AMD_STARSHIP_XHCI 0x148c
77+
#define PCI_DEVICE_ID_AMD_FIREFLIGHT_15D4_XHCI 0x15d4
78+
#define PCI_DEVICE_ID_AMD_FIREFLIGHT_15D5_XHCI 0x15d5
79+
#define PCI_DEVICE_ID_AMD_RAVEN_15E0_XHCI 0x15e0
80+
#define PCI_DEVICE_ID_AMD_RAVEN_15E1_XHCI 0x15e1
81+
#define PCI_DEVICE_ID_AMD_RAVEN2_XHCI 0x15e5
7482
#define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639
7583
#define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
7684
#define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
7785
#define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb
7886
#define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc
7987

88+
#define PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI 0x7316
89+
8090
#define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042
8191
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
8292
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
@@ -286,6 +296,21 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
286296
if (pdev->vendor == PCI_VENDOR_ID_NEC)
287297
xhci->quirks |= XHCI_NEC_HOST;
288298

299+
if (pdev->vendor == PCI_VENDOR_ID_AMD &&
300+
(pdev->device == PCI_DEVICE_ID_AMD_ARIEL_TYPEC_XHCI ||
301+
pdev->device == PCI_DEVICE_ID_AMD_ARIEL_TYPEA_XHCI ||
302+
pdev->device == PCI_DEVICE_ID_AMD_STARSHIP_XHCI ||
303+
pdev->device == PCI_DEVICE_ID_AMD_FIREFLIGHT_15D4_XHCI ||
304+
pdev->device == PCI_DEVICE_ID_AMD_FIREFLIGHT_15D5_XHCI ||
305+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN_15E0_XHCI ||
306+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN_15E1_XHCI ||
307+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN2_XHCI))
308+
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_9;
309+
310+
if (pdev->vendor == PCI_VENDOR_ID_ATI &&
311+
pdev->device == PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI)
312+
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_9;
313+
289314
if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
290315
xhci->quirks |= XHCI_AMD_0x96_HOST;
291316

drivers/usb/host/xhci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ struct xhci_hcd {
16261626
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
16271627
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
16281628
#define XHCI_ETRON_HOST BIT_ULL(49)
1629+
#define XHCI_LIMIT_ENDPOINT_INTERVAL_9 BIT_ULL(50)
16291630

16301631
unsigned int num_active_eps;
16311632
unsigned int limit_active_eps;

0 commit comments

Comments
 (0)