aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-08-18 10:55:28 +0200
committermarex <marex@chi.lan>2019-09-11 10:11:29 +0200
commit9dcab2c4d2cb50ab1864c818b82a72393c160236 (patch)
tree661f61114a194299966e0e1f1376afba54883afb /drivers/usb/host
parent3437121c037f502a3b0faaec97059777034a1ead (diff)
downloadu-boot-9dcab2c4d2cb50ab1864c818b82a72393c160236.zip
u-boot-9dcab2c4d2cb50ab1864c818b82a72393c160236.tar.gz
u-boot-9dcab2c4d2cb50ab1864c818b82a72393c160236.tar.bz2
dwc2: use the nonblock argument in submit_int_msg
An USB 1.1 keyboard connected to dwc2 through a high-speed hub does not report status until it changes. With this patch you can enable keyboard by pressing a key while USB devices are probed. Without a keypress no state is reported and the probe times out. We don't want to wait for a keypress or timeout while polling for keypresses so implement an int_msg nonblock variant that exits early on error. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/dwc2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index bc61662..350d820 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -1123,7 +1123,7 @@ int _submit_int_msg(struct dwc2_priv *priv, struct usb_device *dev,
return -ETIMEDOUT;
}
ret = _submit_bulk_msg(priv, dev, pipe, buffer, len);
- if (ret != -EAGAIN)
+ if ((ret != -EAGAIN) || nonblock)
return ret;
}
}