All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v5 1/5] usb_kdb: only process events successfully received
@ 2019-08-18  8:55 Michal Suchanek
  2019-08-18  8:55 ` [U-Boot] [PATCH v5 2/5] usb: usb_submit_int_msg -> usb_int_msg Michal Suchanek
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michal Suchanek @ 2019-08-18  8:55 UTC (permalink / raw)
  To: u-boot

Causes unbound key repeat on error otherwise.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
v2: fix indentation
v4: fix ! condition to >= 0
v5: fix commit message typo
---
 common/usb_kbd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 387373746147..e0c1e6d2b796 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_submit_int_msg(dev, data->intpipe, &data->new[0],
+			       data->intpktsize, data->intinterval) >= 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)
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-23 22:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18  8:55 [U-Boot] [PATCH v5 1/5] usb_kdb: only process events successfully received Michal Suchanek
2019-08-18  8:55 ` [U-Boot] [PATCH v5 2/5] usb: usb_submit_int_msg -> usb_int_msg Michal Suchanek
2019-08-18  8:55 ` [U-Boot] [PATCH v5 3/5] usb: storage: submit_int_msg " Michal Suchanek
2019-08-18  8:55 ` [U-Boot] [PATCH v5 4/5] usb: Add nonblock argument to submit_int_msg Michal Suchanek
2019-08-18  8:55 ` [U-Boot] [PATCH v5 5/5] dwc2: use the nonblock argument in submit_int_msg Michal Suchanek
2019-08-18 10:53 ` [U-Boot] [PATCH v5 1/5] usb_kdb: only process events successfully received Marek Vasut
2019-08-23 18:27 ` Marek Vasut
2019-08-23 20:41 ` [U-Boot] [PATCH] Add the submit_int_msg nonblock argument in musb_hcd.c Michal Suchanek
2019-08-23 21:11   ` Marek Vasut
2019-08-23 22:30     ` Michal Suchánek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.