Skip to content

Commit cbc889a

Browse files
RajuRangojugregkh
authored andcommitted
usb: xhci: quirk for data loss in ISOC transfers
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 <[email protected]> Signed-off-by: Raju Rangoju <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 80e0839 commit cbc889a

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
@@ -1449,6 +1449,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
14491449
/* Periodic endpoint bInterval limit quirk */
14501450
if (usb_endpoint_xfer_int(&ep->desc) ||
14511451
usb_endpoint_xfer_isoc(&ep->desc)) {
1452+
if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_9) &&
1453+
interval >= 9) {
1454+
interval = 8;
1455+
}
14521456
if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_7) &&
14531457
udev->speed >= USB_SPEED_HIGH &&
14541458
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
@@ -280,6 +290,21 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
280290
if (pdev->vendor == PCI_VENDOR_ID_NEC)
281291
xhci->quirks |= XHCI_NEC_HOST;
282292

293+
if (pdev->vendor == PCI_VENDOR_ID_AMD &&
294+
(pdev->device == PCI_DEVICE_ID_AMD_ARIEL_TYPEC_XHCI ||
295+
pdev->device == PCI_DEVICE_ID_AMD_ARIEL_TYPEA_XHCI ||
296+
pdev->device == PCI_DEVICE_ID_AMD_STARSHIP_XHCI ||
297+
pdev->device == PCI_DEVICE_ID_AMD_FIREFLIGHT_15D4_XHCI ||
298+
pdev->device == PCI_DEVICE_ID_AMD_FIREFLIGHT_15D5_XHCI ||
299+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN_15E0_XHCI ||
300+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN_15E1_XHCI ||
301+
pdev->device == PCI_DEVICE_ID_AMD_RAVEN2_XHCI))
302+
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_9;
303+
304+
if (pdev->vendor == PCI_VENDOR_ID_ATI &&
305+
pdev->device == PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI)
306+
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_9;
307+
283308
if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
284309
xhci->quirks |= XHCI_AMD_0x96_HOST;
285310

drivers/usb/host/xhci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,7 @@ struct xhci_hcd {
16431643
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
16441644
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
16451645
#define XHCI_ETRON_HOST BIT_ULL(49)
1646+
#define XHCI_LIMIT_ENDPOINT_INTERVAL_9 BIT_ULL(50)
16461647

16471648
unsigned int num_active_eps;
16481649
unsigned int limit_active_eps;

0 commit comments

Comments
 (0)