All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roy Luo <royluo@google.com>
To: royluo@google.com, mathias.nyman@intel.com,
	quic_ugoswami@quicinc.com,  Thinh.Nguyen@synopsys.com,
	gregkh@linuxfoundation.org, michal.pecio@gmail.com,
	 linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 0/2] Revert commit 6ccb83d6c497 to fix DWC3 dual-role regression
Date: Thu, 22 May 2025 19:09:10 +0000	[thread overview]
Message-ID: <20250522190912.457583-1-royluo@google.com> (raw)

Commit 6ccb83d6c497 ("usb: xhci: Implement xhci_handshake_check_state()
helper") was introduced to workaround watchdog timeout issues on some
platforms, allowing xhci_reset() to bail out early without waiting
for the reset to complete.

This behavior causes a regression on SNPS DWC3 USB controller with
dual-role capability. When the DWC3 controller exits host mode and
removes xhci while a reset is still in progress, and then tries to
configure its hardware for device mode, the ongoing reset leads to
register access issues; specifically, all register reads returns 0.
These issues extend beyond the xhci register space (which is expected
during a reset) and affect the entire DWC3 IP block, causing the DWC3
device mode to malfunction.

To fix this regression without reintroducing the watchdog timeout issue,
the first patchset "usb: xhci: Skip xhci_reset in xhci_resume if
xhci is being removed" skips xhci_reset() in xhci_resume() reinit
path when xhci is being removed, which should address the watchdog
timeout issue. Then we can safely revert commit 6ccb83d6c497 ("usb:
xhci: Implement xhci_handshake_check_state() helper").

---
Changes in v1:
- Link to previous discussion: https://lore.kernel.org/r/20250517043942.372315-1-royluo@google.com/
---

Roy Luo (2):
  usb: xhci: Skip xhci_reset in xhci_resume if xhci is being removed
  Revert "usb: xhci: Implement xhci_handshake_check_state() helper"

 drivers/usb/host/xhci-ring.c |  5 ++---
 drivers/usb/host/xhci.c      | 31 +++++--------------------------
 drivers/usb/host/xhci.h      |  2 --
 3 files changed, 7 insertions(+), 31 deletions(-)


base-commit: 4a95bc121ccdaee04c4d72f84dbfa6b880a514b6
-- 
2.49.0.1204.g71687c7c1d-goog


             reply	other threads:[~2025-05-22 19:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 19:09 Roy Luo [this message]
2025-05-22 19:09 ` [PATCH v1 1/2] usb: xhci: Skip xhci_reset in xhci_resume if xhci is being removed Roy Luo
2025-05-23 23:06   ` Thinh Nguyen
2025-05-26  7:39     ` Mathias Nyman
2025-05-29  1:17       ` Thinh Nguyen
2025-06-04 14:17         ` Mathias Nyman
2025-06-05  0:18           ` Thinh Nguyen
2025-06-18 17:04             ` Roy Luo
2025-06-19 12:44               ` Mathias Nyman
2025-06-19 13:07                 ` gregkh
2025-05-22 19:09 ` [PATCH v1 2/2] Revert "usb: xhci: Implement xhci_handshake_check_state() helper" 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=20250522190912.457583-1-royluo@google.com \
    --to=royluo@google.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=michal.pecio@gmail.com \
    --cc=quic_ugoswami@quicinc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.