Skip to contentSkip to conversation

input: usb: hid: Bump maximum global item tag report size to 128 bytes

PATCH In review Marek Vasut 4 participants 9 messages Aug 5, 2012 – Nov 22, 2012 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 input: usb: hid: Bump maximum global item tag report size to 128 bytes

The Freescale i.MX28 BootROM USB recovery mode implements the USB HID protocol, yet the global item tag report size is 128. Linux checks if this is 96 as of now, see [1]. This causes Linux to refuse to communicate with this device, making it impossible to use the recovery mode.

This is not a standard HID device per se, but rather a software emulation implemented within the BootROM code and realized through USB OTG-capable port switched to device mode present on the device.

Previous attempt to discuss this issue dates back to 2011, see [2]. There has been not much response. Also noteworthy is the [3], where there seems to be a pointing device that has issue similar to this one.

The tool making use of the USB recovery mode is available at [4].

[1] http://comments.gmane.org/gmane.linux.kernel.input/22328
[2] http://www.spinics.net/lists/linux-usb/msg43463.html
[3] https://bbs.archlinux.org/viewtopic.php?pid=1141340
[4] http://git.bfuser.eu/?p=marex/mxsldr.git;a=summary

Cc Chen Peter <[email protected]>
Cc Greg KH <[email protected]>
Cc Jiri Kosina <[email protected]>
---
 drivers/hid/hid-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-core.c +1 -1
index 60ea284..2b9dd76 100644
@@ -374,7 +374,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
 
 	case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
 		parser->global.report_size = item_udata(item);
-		if (parser->global.report_size > 96) {
+		if (parser->global.report_size > 128) {
 			hid_err(parser->device, "invalid report_size %d\n",
 					parser->global.report_size);
 			return -1;
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH 2/2 input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

The USB recovery mode present in i.MX28 ROM emulates USB HID. It needs this quirk to behave properly.

Cc Chen Peter <[email protected]>
Cc Greg KH <[email protected]>
Cc Jiri Kosina <[email protected]>
---
 drivers/hid/hid-ids.h           |    3 +++
 drivers/hid/usbhid/hid-quirks.c |    1 +
 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +3 -0
index 1dcb76f..ab8ce9f 100644
@@ -296,6 +296,9 @@
 #define USB_VENDOR_ID_EZKEY		0x0518
 #define USB_DEVICE_ID_BTC_8193		0x0002
 
+#define USB_VENDOR_ID_FREESCALE		0x15A2
+#define USB_DEVICE_ID_FREESCALE_MX28	0x004F
+
 #define USB_VENDOR_ID_FRUCTEL	0x25B6
 #define USB_DEVICE_ID_GAMETEL_MT_MODE	0x0002
 
drivers/hid/usbhid/hid-quirks.c +1 -0
index 903eef3..6a09570 100644
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT },
+	{ USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },
 	{ 0, 0 }
 };
 
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1344203835-8308-2-git-send-email-marex-ynQEQJNshbs@public.gmane.org

#3 lore raw

Re: [PATCH 2/2] input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

[...]

Quoted 11 lines
(quoted diff) +0 -0

b/drivers/hid/usbhid/hid-quirks.c index 903eef3..6a09570 100644

drivers/hid/usbhid/hid-quirks.c +0 -0
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD,
 HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE,
 USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, {

USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT
}, + { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28,
HID_QUIRK_NOGET }, { 0, 0 }

OT: btw. the comment mentioned the list should be sorted, yet it's not so for a while. Maybe a sorting patch would be favored?

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: [PATCH 2/2] input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

Quoted 6 lines · Marek Vasut
Quoted 6 lines
(quoted diff) +0 -0

b/drivers/hid/usbhid/hid-quirks.c index 903eef3..6a09570 100644

drivers/hid/usbhid/hid-quirks.c +0 -0
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD,
Quoted 8 lines
Quoted 5 lines
drivers/hid/usbhid/hid-quirks.c +0 -0
 HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE,
 USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, {

USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT
}, + { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28,
HID_QUIRK_NOGET }, { 0, 0 }

OT: btw. the comment mentioned the list should be sorted, yet it's not so for a while. Maybe a sorting patch would be favored?

I have fixed the ordering and applied. Thanks,

Signature · 6 lines
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): alpine.LNX.2.00.1208151036130.7026-ztGlSCb7Y1iN3ZZ/[email protected]

#7 lore raw

Re: [PATCH 2/2] input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

Dear Jiri Kosina,

Quoted 19 lines · Marek Vasut
Quoted 8 lines
Quoted 8 lines
(quoted diff) +0 -0

b/drivers/hid/usbhid/hid-quirks.c index 903eef3..6a09570 100644

drivers/hid/usbhid/hid-quirks.c +0 -0
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD,
 
Quoted 9 lines
Quoted 6 lines
drivers/hid/usbhid/hid-quirks.c +0 -0
 HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE,
 USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, {
 USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X,

HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_FREESCALE,
USB_DEVICE_ID_FREESCALE_MX28,
HID_QUIRK_NOGET }, { 0, 0 }

OT: btw. the comment mentioned the list should be sorted, yet it's not so for a while. Maybe a sorting patch would be favored?

Quoted 1 line

I have fixed the ordering and applied. Thanks,

Can we possibly include these changes into -stable releases too ? I'm not exactly sure how it works for linux-input, they might be applied already, if that's the case, sorry for the noise.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [PATCH 2/2] input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

Quoted 18 lines · Marek Vasut
Quoted 18 lines
Quoted 17 lines
Quoted 11 lines
(quoted diff) +0 -0

b/drivers/hid/usbhid/hid-quirks.c index 903eef3..6a09570 100644

drivers/hid/usbhid/hid-quirks.c +0 -0
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD,
 
 HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE,
 USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, {
 USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X,
Quoted 3 lines

HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_FREESCALE,
USB_DEVICE_ID_FREESCALE_MX28,
HID_QUIRK_NOGET }, { 0, 0 }

OT: btw. the comment mentioned the list should be sorted, yet it's not so for a while. Maybe a sorting patch would be favored?

Quoted 5 lines
Quoted 1 line

I have fixed the ordering and applied. Thanks,

Can we possibly include these changes into -stable releases too ? I'm not exactly sure how it works for linux-input, they might be applied already, if that's the case, sorry for the noise.

I have just submitted it for stable, thanks for the reminder.

Signature · 6 lines
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#10 lore raw

Re: [PATCH 2/2] input: usb: hid: Add quirk for Freescale i.MX28 ROM recovery

Dear Jiri Kosina,

Quoted 19 lines · Marek Vasut
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 11 lines
(quoted diff) +0 -0

b/drivers/hid/usbhid/hid-quirks.c index 903eef3..6a09570 100644

drivers/hid/usbhid/hid-quirks.c +0 -0
@@ -101,6 +101,7 @@ static const struct hid_blacklist {
 
 	{ USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD,
 
 HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE,
 USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, {
 USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X,
Quoted 3 lines

HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_FREESCALE,
USB_DEVICE_ID_FREESCALE_MX28,
HID_QUIRK_NOGET }, { 0, 0 }

OT: btw. the comment mentioned the list should be sorted, yet it's not so for a while. Maybe a sorting patch would be favored?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I have fixed the ordering and applied. Thanks,

Can we possibly include these changes into -stable releases too ? I'm not exactly sure how it works for linux-input, they might be applied already, if that's the case, sorry for the noise.

I have just submitted it for stable, thanks for the reminder.

Thanks!

Can we push this one too?
[PATCH 1/2] input: usb: hid: Bump maximum global item tag report size to 128 bytes

Best regards,
Marek Vasut

#11 lore raw
In reply to Marek Vasut
Quoted 20 lines · Marek Vasut

The Freescale i.MX28 BootROM USB recovery mode implements the USB HID protocol, yet the global item tag report size is 128. Linux checks if this is 96 as of now, see [1]. This causes Linux to refuse to communicate with this device, making it impossible to use the recovery mode.

This is not a standard HID device per se, but rather a software emulation implemented within the BootROM code and realized through USB OTG-capable port switched to device mode present on the device.

Previous attempt to discuss this issue dates back to 2011, see [2]. There has been not much response. Also noteworthy is the [3], where there seems to be a pointing device that has issue similar to this one.

The tool making use of the USB recovery mode is available at [4].

[1] http://comments.gmane.org/gmane.linux.kernel.input/22328
[2] http://www.spinics.net/lists/linux-usb/msg43463.html
[3] https://bbs.archlinux.org/viewtopic.php?pid=1141340
[4] http://git.bfuser.eu/?p=marex/mxsldr.git;a=summary

Quoted 4 lines
Cc Chen Peter <[email protected]>
Cc Greg KH <[email protected]>
Cc Jiri Kosina <[email protected]>

I have not admit I don't remember where the original limit came from -- the spec doesn't mandate it as far as I can tell.

I am queueing this patch now for next merge window. Thanks.

Quoted 20 lines
---
 drivers/hid/hid-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-core.c +1 -1
index 60ea284..2b9dd76 100644
@@ -374,7 +374,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
 
 	case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
 		parser->global.report_size = item_udata(item);
-		if (parser->global.report_size > 96) {
+		if (parser->global.report_size > 128) {
 			hid_err(parser->device, "invalid report_size %d\n",
 					parser->global.report_size);
 			return -1;
Signature · 1 line
1.7.10.4
Signature · 2 lines
Jiri Kosina
SUSE Labs
#12 lore raw

Dear Jiri Kosina,

Quoted 26 lines · Marek Vasut
Quoted 20 lines

The Freescale i.MX28 BootROM USB recovery mode implements the USB HID protocol, yet the global item tag report size is 128. Linux checks if this is 96 as of now, see [1]. This causes Linux to refuse to communicate with this device, making it impossible to use the recovery mode.

This is not a standard HID device per se, but rather a software emulation implemented within the BootROM code and realized through USB OTG-capable port switched to device mode present on the device.

Previous attempt to discuss this issue dates back to 2011, see [2]. There has been not much response. Also noteworthy is the [3], where there seems to be a pointing device that has issue similar to this one.

The tool making use of the USB recovery mode is available at [4].

[1] http://comments.gmane.org/gmane.linux.kernel.input/22328
[2] http://www.spinics.net/lists/linux-usb/msg43463.html
[3] https://bbs.archlinux.org/viewtopic.php?pid=1141340
[4] http://git.bfuser.eu/?p=marex/mxsldr.git;a=summary

Quoted 4 lines
Cc Chen Peter <[email protected]>
Cc Greg KH <[email protected]>
Cc Jiri Kosina <[email protected]>
Quoted 4 lines

I have not admit I don't remember where the original limit came from -- the spec doesn't mandate it as far as I can tell.

I am queueing this patch now for next merge window. Thanks.

[...]

Thanks!

Best regards,
Marek Vasut