From: "Rangoju, Raju" <raju.rangoju@amd.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, mathias.nyman@intel.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: quirk for data loss in ISOC transfers
Date: Thu, 7 Nov 2024 16:56:42 +0530 [thread overview]
Message-ID: <3e11939b-d62a-caf3-e51c-f67651c8cb6a@amd.com> (raw)
In-Reply-To: <2024110557-trusting-dismount-1e27@gregkh>
On 11/5/2024 3:03 PM, Greg KH wrote:
> On Tue, Nov 05, 2024 at 02:48:50PM +0530, Raju Rangoju wrote:
>> 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 either when an IN
>> endpoint with a 64ms service interval is pre-scheduled prior to
>> the ISOC OUT endpoint or when 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 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@vger.kernel.org
>> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
>> ---
>> drivers/usb/host/xhci-mem.c | 5 +++++
>> drivers/usb/host/xhci-pci.c | 14 ++++++++++++++
>> drivers/usb/host/xhci.h | 1 +
>> 3 files changed, 20 insertions(+)
>>
>> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
>> index d2900197a49e..4892bb9afa6e 100644
>> --- a/drivers/usb/host/xhci-mem.c
>> +++ b/drivers/usb/host/xhci-mem.c
>> @@ -1426,6 +1426,11 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
>> /* Periodic endpoint bInterval limit quirk */
>> if (usb_endpoint_xfer_int(&ep->desc) ||
>> usb_endpoint_xfer_isoc(&ep->desc)) {
>> + if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_9) &&
>> + usb_endpoint_xfer_int(&ep->desc) &&
>> + interval >= 9) {
>> + interval = 8;
>> + }
>> if ((xhci->quirks & XHCI_LIMIT_ENDPOINT_INTERVAL_7) &&
>> udev->speed >= USB_SPEED_HIGH &&
>> interval >= 7) {
>> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
>> index cb07cee9ed0c..a078e2e5517d 100644
>> --- a/drivers/usb/host/xhci-pci.c
>> +++ b/drivers/usb/host/xhci-pci.c
>> @@ -284,6 +284,20 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>> if (pdev->vendor == PCI_VENDOR_ID_NEC)
>> xhci->quirks |= XHCI_NEC_HOST;
>>
>> + if (pdev->vendor == PCI_VENDOR_ID_AMD &&
>> + (pdev->device == 0x13ed ||
>> + pdev->device == 0x13ee ||
>> + pdev->device == 0x148c ||
>> + pdev->device == 0x15d4 ||
>> + pdev->device == 0x15d5 ||
>> + pdev->device == 0x15e0 ||
>> + pdev->device == 0x15e1 ||
>> + pdev->device == 0x15e5))
>
> Any need/want to name these pci devices with something we can refer to
> other than a hex value?
Certainly, I'll try to see if device names can be used instead.
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2024-11-07 11:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 9:18 [PATCH] usb: xhci: quirk for data loss in ISOC transfers Raju Rangoju
2024-11-05 9:31 ` Greg KH
2024-11-05 9:33 ` Greg KH
2024-11-07 11:26 ` Rangoju, Raju [this message]
2024-11-05 14:13 ` Alan Stern
2024-11-07 11:25 ` Rangoju, Raju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e11939b-d62a-caf3-e51c-f67651c8cb6a@amd.com \
--to=raju.rangoju@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox