Skip to contentSkip to conversation

EHCI: fix root hub device descriptor

PATCH New Sergei Shtylyov 2 participants 2 messages Feb 27, 2010 – Mar 1, 2010

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

PATCH 1/4 EHCI: fix root hub device descriptor

On little endian machines, EHCI root hub's USB revision is reported as 0.2 -- cpu_to_le16() was missed in the initializer for the 'bcdUSB' descriptor field. The same should be done for the 'bcdDevice' field.

---
 drivers/usb/host/ehci-hcd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -2
Index: u-boot/drivers/usb/host/ehci-hcd.c
===================================================================
@@ -55,14 +55,14 @@ static struct descriptor {
 	{
 		0x12,		/* bLength */
 		1,		/* bDescriptorType: UDESC_DEVICE */
-		0x0002,		/* bcdUSB: v2.0 */
+		cpu_to_le16(0x0200), /* bcdUSB: v2.0 */
 		9,		/* bDeviceClass: UDCLASS_HUB */
 		0,		/* bDeviceSubClass: UDSUBCLASS_HUB */
 		1,		/* bDeviceProtocol: UDPROTO_HSHUBSTT */
 		64,		/* bMaxPacketSize: 64 bytes */
 		0x0000,		/* idVendor */
 		0x0000,		/* idProduct */
-		0x0001,		/* bcdDevice */
+		cpu_to_le16(0x0100), /* bcdDevice */
 		1,		/* iManufacturer */
 		2,		/* iProduct */
 		0,		/* iSerialNumber */
#1 lore raw

PATCH 1/4 EHCI: fix root hub device descriptor

Hi,

2010/2/27 Sergei Shtylyov <[email protected]>:

Quoted 5 lines

On little endian machines, EHCI root hub's USB revision is reported as 0.2 -- cpu_to_le16() was missed in the initializer for the 'bcdUSB' descriptor field. The same should be done for the 'bcdDevice' field.

Applied to u-boot-usb
Thanks!

Remy

Quoted 30 lines

---
?drivers/usb/host/ehci-hcd.c | ? ?4 ++--
?1 file changed, 2 insertions(+), 2 deletions(-)

Index: u-boot/drivers/usb/host/ehci-hcd.c
===================================================================

drivers/usb/host/ehci-hcd.c +0 -0
@@ -55,14 +55,14 @@ static struct descriptor {
 ? ? ? ?{

? ? ? ? ? ? ? ?0x12, ? ? ? ? ? /* bLength */
? ? ? ? ? ? ? ?1, ? ? ? ? ? ? ?/* bDescriptorType: UDESC_DEVICE */
- ? ? ? ? ? ? ? 0x0002, ? ? ? ? /* bcdUSB: v2.0 */
+ ? ? ? ? ? ? ? cpu_to_le16(0x0200), /* bcdUSB: v2.0 */
? ? ? ? ? ? ? ?9, ? ? ? ? ? ? ?/* bDeviceClass: UDCLASS_HUB */ ? ? ? ? ? ? ? ?0, ? ? ? ? ? ? ?/* bDeviceSubClass: UDSUBCLASS_HUB */ ? ? ? ? ? ? ? ?1, ? ? ? ? ? ? ?/* bDeviceProtocol: UDPROTO_HSHUBSTT */ ? ? ? ? ? ? ? ?64, ? ? ? ? ? ? /* bMaxPacketSize: 64 bytes */ ? ? ? ? ? ? ? ?0x0000, ? ? ? ? /* idVendor */
? ? ? ? ? ? ? ?0x0000, ? ? ? ? /* idProduct */
- ? ? ? ? ? ? ? 0x0001, ? ? ? ? /* bcdDevice */
+ ? ? ? ? ? ? ? cpu_to_le16(0x0100), /* bcdDevice */
? ? ? ? ? ? ? ?1, ? ? ? ? ? ? ?/* iManufacturer */
? ? ? ? ? ? ? ?2, ? ? ? ? ? ? ?/* iProduct */
? ? ? ? ? ? ? ?0, ? ? ? ? ? ? ?/* iSerialNumber */
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot