public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adrian Cox <adrian@humboldt.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint
Date: Sat, 5 Apr 2014 17:36:41 +0100 (BST)	[thread overview]
Message-ID: <4526969.2646.1396715845133.JavaMail.adrian@Gurnard> (raw)
In-Reply-To: <13471364.2645.1396715619854.JavaMail.adrian@Gurnard>


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

       reply	other threads:[~2014-04-05 16:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13471364.2645.1396715619854.JavaMail.adrian@Gurnard>
2014-04-05 16:36 ` Adrian Cox [this message]
2014-04-06 11:17   ` [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint Wolfgang Denk
2014-04-07  9:56     ` Adrian Cox
2014-04-07 16:59       ` Wolfgang Denk
2014-04-10  8:12     ` Marek Vasut
2014-04-10  8:49       ` Adrian Cox
2014-04-10  9:04         ` Marek Vasut
2014-04-10 10:15       ` Wolfgang Denk
2014-04-10 12:33         ` Marek Vasut
2014-04-10 13:02           ` [U-Boot] [PATCH v3] " Adrian Cox
2014-04-10 14:14             ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4526969.2646.1396715845133.JavaMail.adrian@Gurnard \
    --to=adrian@humboldt.co.uk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox