Commit 32288ce2 authored by Roy Luo's avatar Roy Luo
Browse files

ANDROID: vendor_hooks: Add hooks for xhci reset

Commit 6ccb83d6 ("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 can cause issues 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.

An upstream fix [1] has been sent and is in review. Currently
maintainers are still debating the best way to fix the issue without
re-introducing the watchdog problem. Introduce this vendor hook for
the time being to meet the project timeline. The vendor hook allows
forcing a full xhci reset on removal, which can be set on DWC3
platforms to avoid the issue.

[1] https://lore.kernel.org/r/20250522190912.457583-1-royluo@google.com/



Bug: 399762532
Test: xhci removal succeeds
Change-Id: I3c7d82f20323fb298425c7f77d0031ed448334a1
Signed-off-by: default avatarRoy Luo <royluo@google.com>
parent dd8fcb53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment