summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-09 00:04:29 -0400
committerIan Moffett <ian@osmora.org>2025-08-09 00:04:29 -0400
commitf8f027f5b53476498f11f7ca8622fbf3c53dbcd8 (patch)
treeb312c4ca64c67c1928b3ed3e141e241eb4e33eab
parent807bfd213ad37c3fabb90f9d9388e74934a1a85c (diff)
kernel: xhci: Wait until xHC is ready in resetexpt
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/dev/usb/xhci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 5a8da86..e14cb44 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -340,6 +340,13 @@ xhci_reset(struct xhci_hc *hc)
return error;
}
+ /* Wait longer if the xHC is not ready */
+ error = xhci_poll32(&opregs->usbsts, USBSTS_CNR, false);
+ if (error < 0) {
+ pr_error("xhci_reset: xHC ready wait timeout\n");
+ return error;
+ }
+
return 0;
}