mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
usb: xhci: Avoid showing warnings for dying controller
[ Upstream commit 65fc0fc137b5da3ee1f4ca4f61050fcb203d7582 ] When a USB4 dock is unplugged from a system it won't respond to ring events. The PCI core handles the surprise removal event and notifies all PCI drivers. The XHCI PCI driver sets a flag that the device is being removed, and when the device stops responding a flag is also added to indicate it's dying. When that flag is set don't bother to show warnings about a missing controller. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250717073107.488599-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
86b225d594
commit
fcd65f3530
1 changed files with 4 additions and 2 deletions
|
|
@ -118,7 +118,8 @@ int xhci_halt(struct xhci_hcd *xhci)
|
|||
ret = xhci_handshake(&xhci->op_regs->status,
|
||||
STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
|
||||
if (ret) {
|
||||
xhci_warn(xhci, "Host halt failed, %d\n", ret);
|
||||
if (!(xhci->xhc_state & XHCI_STATE_DYING))
|
||||
xhci_warn(xhci, "Host halt failed, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
xhci->xhc_state |= XHCI_STATE_HALTED;
|
||||
|
|
@ -175,7 +176,8 @@ int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us)
|
|||
state = readl(&xhci->op_regs->status);
|
||||
|
||||
if (state == ~(u32)0) {
|
||||
xhci_warn(xhci, "Host not accessible, reset failed.\n");
|
||||
if (!(xhci->xhc_state & XHCI_STATE_DYING))
|
||||
xhci_warn(xhci, "Host not accessible, reset failed.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue