On 7/10/19 5:47 PM, Michal Suchánek wrote: > On Fri, 5 Jul 2019 14:12:36 +0200 > Marek Vasut <ma...@denx.de> wrote: > >> On 7/5/19 12:44 PM, Michal Suchanek wrote: >>> Causes unbound key repeat on error otherwise. >>> >>> Signed-off-by: Michal Suchanek <msucha...@suse.de> >>> --- >>> v2: fix indentation >> >> What changed in V3 ? >> >>> --- >>> 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 cc99c6be0720..fc9419e0238a 100644 >>> --- a/common/usb_kbd.c >>> +++ b/common/usb_kbd.c >>> @@ -339,10 +339,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)) >> >> This still doesn't propagate errors. > > Yes, it does not. I don't have a grand design that would make use of > these propagated errors so I don't know what errors to propagate.
Each and every called of usb_kbd_poll_for_event() returns some return value, so these functions should at least be aware of the new errors which might come from usb_kbd_poll_for_event(). > You could, say, want to propagate errors from kbd_irq_worker as well. > > Until there is a way to make use of the errors you really don't know. > > Might be good idea to document that getting EAGAIN from > usb_int_msg_nonblock is expected. [...] _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot