[U-Boot] [PATCH] Fix USB keyboard polling via control endpoint

Wolfgang Denk wd at denx.de
Thu Apr 10 12:15:30 CEST 2014


Dear Marek,

In message <201404101012.42527.marex at denx.de> you wrote:
> On Sunday, April 06, 2014 at 01:17:46 PM, Wolfgang Denk wrote:
> [...]
>
> > @@ -131,7 +133,9 @@ void usb_kbd_generic_poll(void)
> >  	/* Submit a interrupt transfer request */
> >  	maxp = usb_maxpacket(usb_kbd_dev, pipe);
> >  	usb_submit_int_msg(usb_kbd_dev, pipe, data->new,
> > -			maxp > 8 ? 8 : maxp, ep->bInterval);
> > +			maxp > USB_KBD_PDATA_SIZE ?
> > +				USB_KBD_PDATA_SIZE : maxp,
> > +			ep->bInterval);
>
> Can we use min(8, USB_KBD_PDATA_SIZE) here instead of this multi-line monster 
> call please ?

Agreed.

> Also, this USB_KBD_PDATA_SIZE should instead be called "USB_KBD_LS_REPORT_S> IZE" 
> according to USB HID spec v1.11 section 5.6 :

Fine with me.

> What worries me a bit is that 64-byte high-speed report, but I never saw a 
> device that would generate those. This section 5.6 is also the only place that 
> mentions the high-speed HID device report size limit.

I'm not an USB expert; I cannot comment on this.

> Other than that, I don't see a problem.

So how should we proceed?  Shall I prepare an updated patch - or
Adrian, will you do that?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Remember that the best relationship is one in  which  your  love  for
each other exceeds your need for each other.             - Dalai Lama


More information about the U-Boot mailing list