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

Marek Vasut marex at denx.de
Thu Apr 10 14:33:03 CEST 2014


On Thursday, April 10, 2014 at 12:15:30 PM, Wolfgang Denk wrote:
> 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?

Adrian, can you please take all the discussion here and roll out a new patch 
please ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list