From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Cox Date: Sat, 5 Apr 2014 17:36:41 +0100 (BST) Subject: [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint In-Reply-To: <13471364.2645.1396715619854.JavaMail.adrian@Gurnard> Message-ID: <4526969.2646.1396715845133.JavaMail.adrian@Gurnard> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de USB keyboard polling failed for some keyboards on PowerPC 5020. This was caused by requesting only 4 bytes of data from keyboards that produce an 8 byte HID report. Signed-off-by: Adrian Cox --- common/usb_kbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 1ad67ca..0f6c579 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -341,8 +341,8 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev) struct usb_kbd_pdata *data = dev->privptr; iface = &dev->config.if_desc[0]; usb_get_report(dev, iface->desc.bInterfaceNumber, - 1, 0, data->new, sizeof(data->new)); - if (memcmp(data->old, data->new, sizeof(data->new))) + 1, 0, data->new, 8); + if (memcmp(data->old, data->new, 8)) usb_kbd_irq_worker(dev); #endif }