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

Adrian Cox adrian at humboldt.co.uk
Sat Apr 5 18:36:41 CEST 2014


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 <adrian at humboldt.co.uk>

---
 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
 }


More information about the U-Boot mailing list