]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: xhci: Do not panic on event timeouts
authorHector Martin <marcan@marcan.st>
Sun, 29 Oct 2023 06:37:43 +0000 (15:37 +0900)
committerMarek Vasut <marex@denx.de>
Fri, 1 Dec 2023 13:06:04 +0000 (14:06 +0100)
Now that we always check the return value, just return NULL on timeouts.
We can still log the error since this is a problem, but it's not reason
to panic.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/usb/host/xhci-ring.c

index a969eafdc8ee0ed86296d57c19e93c26fb99dcad..ae0ab5744df0d793fb1a1fb429fbf5c3c6562421 100644 (file)
@@ -494,8 +494,9 @@ union xhci_trb *xhci_wait_for_event(struct xhci_ctrl *ctrl, trb_type expected)
        if (expected == TRB_TRANSFER)
                return NULL;
 
-       printf("XHCI timeout on event type %d... cannot recover.\n", expected);
-       BUG();
+       printf("XHCI timeout on event type %d...\n", expected);
+
+       return NULL;
 }
 
 /*