summaryrefslogtreecommitdiff
path: root/common/usb_kbd.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-09-14 19:56:09 -0400
committerTom Rini <trini@konsulko.com>2019-09-14 19:56:09 -0400
commit6f4001315af2f818bfc656df81e138d1434d1fc2 (patch)
treed5ec9d0a2c49bfa7e6dc144faa59f45588480742 /common/usb_kbd.c
parent23b93e33adde0a8313388eda7c78d1d0786e3c92 (diff)
parente3e5825d0143c2b24583d256ef111ae9344382a2 (diff)
downloadu-boot-6f4001315af2f818bfc656df81e138d1434d1fc2.tar.gz
Merge branch 'master' of git://git.denx.de/u-boot-usbWIP/14Sep2019
- Assorted bugfixes
Diffstat (limited to 'common/usb_kbd.c')
-rw-r--r--common/usb_kbd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 3873737461..d178af248a 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -340,10 +340,9 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev)
struct usb_kbd_pdata *data = dev->privptr;
/* Submit a interrupt transfer request */
- usb_submit_int_msg(dev, data->intpipe, &data->new[0], data->intpktsize,
- data->intinterval);
-
- usb_kbd_irq_worker(dev);
+ if (usb_int_msg(dev, data->intpipe, &data->new[0],
+ data->intpktsize, data->intinterval, true) >= 0)
+ usb_kbd_irq_worker(dev);
#elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \
defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
#if defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP)
@@ -505,8 +504,8 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum)
if (usb_get_report(dev, iface->desc.bInterfaceNumber,
1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) {
#else
- if (usb_submit_int_msg(dev, data->intpipe, data->new, data->intpktsize,
- data->intinterval) < 0) {
+ if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize,
+ data->intinterval, false) < 0) {
#endif
printf("Failed to get keyboard state from device %04x:%04x\n",
dev->descriptor.idVendor, dev->descriptor.idProduct);