Skip to contentSkip to conversation

USB: fix USB keyboard polling parameter

PATCH New Vincent Palatin 4 participants 6 messages Jan 9, 2012 – Feb 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: fix USB keyboard polling parameter

When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode.

---
 common/usb_kbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/usb_kbd.c +1 -1
index 75107c9..aaf7d6f 100644
@@ -320,7 +320,7 @@ 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, 1, data->new, sizeof(data->new));
+			1, 0, data->new, sizeof(data->new));
 	if (memcmp(data->old, data->new, sizeof(data->new)))
 		usb_kbd_irq_worker(dev);
 #endif
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 USB: fix USB keyboard polling parameter

Quoted 14 lines

When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode.

---
 common/usb_kbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/usb_kbd.c +0 -0
index 75107c9..aaf7d6f 100644

common/usb_kbd.c static inline void usb_kbd_poll_for_event(struct · line 326

Quoted 8 lines
common/usb_kbd.c +1 -1
@@ -320,7 +320,7 @@ 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, 1, data->new, sizeof(data->new));
+			1, 0, data->new, sizeof(data->new));
 	if (memcmp(data->old, data->new, sizeof(data->new)))
 		usb_kbd_irq_worker(dev);
 #endif

Good, did you test this?

M

#2 lore raw

PATCH 1/1 USB: fix USB keyboard polling parameter

Quoted 9 lines · Marek Vasut
Quoted 9 lines

When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode.

---
?common/usb_kbd.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

Quoted 15 lines
Quoted 12 lines
common/usb_kbd.c +1 -1
index 75107c9..aaf7d6f 100644
@@ -320,7 +320,7 @@ 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, 1, data->new, sizeof(data->new));
+ ? ? ? ? ? ? ? ? ? ? 1, 0, data->new, sizeof(data->new));
 ? ? ? if (memcmp(data->old, data->new, sizeof(data->new)))
 ? ? ? ? ? ? ? usb_kbd_irq_worker(dev);
Quoted 1 line

?#endif

Good, did you test this?

Yes, on about a dozen different keyboards :
most don't care, a couple used to be confused and are now working.

Signature · 1 line
Vincent
#3 lore raw

PATCH 1/1 USB: fix USB keyboard polling parameter

Quoted 26 lines · Marek Vasut
Quoted 9 lines
Quoted 9 lines

When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode.

---
 common/usb_kbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines

common/usb_kbd.c static inline void usb_kbd_poll_for_event(struct · line 326

Quoted 13 lines
common/usb_kbd.c +1 -1
index 75107c9..aaf7d6f 100644
@@ -320,7 +320,7 @@ 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, 1, data->new, sizeof(data->new));
+                     1, 0, data->new, sizeof(data->new));
      if (memcmp(data->old, data->new, sizeof(data->new)))
              usb_kbd_irq_worker(dev);
 #endif

Good, did you test this?

Quoted 2 lines

Yes, on about a dozen different keyboards :
most don't care, a couple used to be confused and are now working.

Awesome :-) I'll test this on mine and Ack it then.

btw. why do you even need this? Do you have some weird hardware ?

M

#5 lore raw

PATCH 1/1 USB: fix USB keyboard polling parameter

In reply to Vincent Palatin
Quoted 14 lines

When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode.

---
 common/usb_kbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/usb_kbd.c +0 -0
index 75107c9..aaf7d6f 100644

common/usb_kbd.c static inline void usb_kbd_poll_for_event(struct · line 326

Quoted 8 lines
common/usb_kbd.c +1 -1
@@ -320,7 +320,7 @@ 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, 1, data->new, sizeof(data->new));
+			1, 0, data->new, sizeof(data->new));
 	if (memcmp(data->old, data->new, sizeof(data->new)))
 		usb_kbd_irq_worker(dev);
 #endif

Hi,

what's the status of this patch/patchset?

Thanks
M