public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Kuangyi Chiang <ki.chiang65@gmail.com>,
	gregkh@linuxfoundation.org, mathias.nyman@intel.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/3] xhci: Fix control transfer error on Etron xHCI host
Date: Wed, 11 Sep 2024 18:07:58 +0300	[thread overview]
Message-ID: <d222e5b9-7241-46a1-84fe-be2343fa4346@linux.intel.com> (raw)
In-Reply-To: <20240911051716.6572-2-ki.chiang65@gmail.com>

On 11.9.2024 8.17, Kuangyi Chiang wrote:
> Performing a stability stress test on a USB3.0 2.5G ethernet adapter
> results in errors like this:
> 
> [   91.441469] r8152 2-3:1.0 eth3: get_registers -71
> [   91.458659] r8152 2-3:1.0 eth3: get_registers -71
> [   91.475911] r8152 2-3:1.0 eth3: get_registers -71
> [   91.493203] r8152 2-3:1.0 eth3: get_registers -71
> [   91.510421] r8152 2-3:1.0 eth3: get_registers -71
> 
> The r8152 driver will periodically issue lots of control-IN requests
> to access the status of ethernet adapter hardware registers during
> the test.
> 
> This happens when the xHCI driver enqueue a control TD (which cross
> over the Link TRB between two ring segments, as shown) in the endpoint
> zero's transfer ring. Seems the Etron xHCI host can not perform this
> TD correctly, causing the USB transfer error occurred, maybe the upper
> driver retry that control-IN request can solve problem, but not all
> drivers do this.
> 
> |     |
> -------
> | TRB | Setup Stage
> -------
> | TRB | Link
> -------
> -------
> | TRB | Data Stage
> -------
> | TRB | Status Stage
> -------
> |     |
> 

What if the link TRB is between Data and Status stage, does that
case work normally?

> To work around this, the xHCI driver should enqueue a No Op TRB if
> next available TRB is the Link TRB in the ring segment, this can
> prevent the Setup and Data Stage TRB to be breaked by the Link TRB.

There are some hosts that need the 'Chain' bit set in the Link TRB,
does that work in this case?

Thanks
Mathias


  parent reply	other threads:[~2024-09-11 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11  5:17 [PATCH 3/3] xhci: Don't perform Soft Retry for Etron xHCI host Kuangyi Chiang
2024-09-11  5:17 ` [PATCH 2/3] xhci: Fix control transfer error on " Kuangyi Chiang
2024-09-11  7:52   ` Michał Pecio
2024-09-11 15:09     ` Mathias Nyman
2024-09-12  6:19     ` Kuangyi Chiang
2024-09-11 15:07   ` Mathias Nyman [this message]
2024-09-13  5:25     ` Kuangyi Chiang
2024-09-11  5:17 ` [PATCH 1/3] xhci: Don't issue Reset Device command to " Kuangyi Chiang
2024-09-11  5:17 ` [PATCH 0/3] xhci: Some improvement for " Kuangyi Chiang
2024-09-11  7:38   ` Michał Pecio
2024-09-12  5:52     ` Kuangyi Chiang
2024-09-12  7:12       ` Michał Pecio
2024-09-16  2:04         ` Kuangyi Chiang

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=d222e5b9-7241-46a1-84fe-be2343fa4346@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ki.chiang65@gmail.com \
    --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