From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 10 Apr 2014 14:33:03 +0200 Subject: [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint In-Reply-To: <20140410101530.8FA16380CBC@gemini.denx.de> References: <4526969.2646.1396715845133.JavaMail.adrian@Gurnard> <201404101012.42527.marex@denx.de> <20140410101530.8FA16380CBC@gemini.denx.de> Message-ID: <201404101433.03184.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, April 10, 2014 at 12:15:30 PM, Wolfgang Denk wrote: > Dear Marek, > > In message <201404101012.42527.marex@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