From: Godfrey Mwangi Date: Fri, 4 Aug 2023 19:00:39 +0000 (-0700) Subject: usb: xhci: pet watchdog during transfers X-Git-Url: http://git.dujemihanovic.xyz/repo?a=commitdiff_plain;h=fe91450a596b558de31ae23f917e53201bc6b4c7;p=u-boot.git usb: xhci: pet watchdog during transfers On some platforms with low USB throughput, tranfers of huge files take a long time and watchdog timer can expire resulting in hardware reset. Avoid this by petting the watchdog as long as we have pending transfers. Signed-off-by: Godfrey Mwangi Reviewed-by: Marek Vasut --- diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 68cf08e0b6..34eb4536f0 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -796,6 +797,8 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, /* Calculate length for next transfer */ addr += trb_buff_len; trb_buff_len = min((length - running_total), TRB_MAX_BUFF_SIZE); + + schedule(); } while (running_total < length); giveback_first_trb(udev, ep_index, start_cycle, start_trb);