public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Roy Luo <royluo@google.com>
Cc: Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] usb: dwc3: Force full reset on xhci removal
Date: Thu, 15 May 2025 09:32:24 +0200	[thread overview]
Message-ID: <2025051557-dismantle-exclude-c437@gregkh> (raw)
In-Reply-To: <20250515040259.1254356-1-royluo@google.com>

On Thu, May 15, 2025 at 04:02:59AM +0000, Roy Luo wrote:
> During an xhci host controller reset (via `USBCMD.HCRST`), reading DWC3
> registers can return zero instead of their actual values. This applies
> not only to registers within the xhci memory space but also those in
> the broader DWC3 IP block.
> 
> By default, the xhci driver doesn't wait for the reset handshake to
> complete during teardown. This can cause problems when the DWC3 controller
> is operating as a dual role device and is switching from host to device
> mode, the invalid register read caused by ongoing HCRST could lead to
> gadget mode startup failures and unintended register overwrites.
> 
> To mitigate this, enable xhci-full-reset-on-remove-quirk to ensure that
> xhci_reset() completes its full reset handshake during xhci removal.
> 
> Signed-off-by: Roy Luo <royluo@google.com>
> ---
>  drivers/usb/dwc3/host.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

What commit id does this fix?  Should it also go to stable kernels?  If
so, how far back?

thanks,

greg k-h

  reply	other threads:[~2025-05-15  7:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15  4:02 [PATCH v1 2/2] usb: dwc3: Force full reset on xhci removal Roy Luo
2025-05-15  7:32 ` Greg KH [this message]
2025-05-15 18:57   ` Roy Luo

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=2025051557-dismantle-exclude-c437@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=royluo@google.com \
    /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