As defined by USB Specification Rev 2.0 (in section 11.24.2.5), to
get a Hub descriptor, we have to set req.wValue to "Descriptor Type and Descriptor Index". In this case, Descriptor Type is 0x29 (UDESC_HUB), Descriptor Index should be 0. If I don't do a check (dev->address > 1 ... ), root hub fails. A new Cytronix 4-port USB 2.0 Hub (Cypress CY7C65640 chip) now works after this patch. Submitted by: Alexander Pohoyda <alexander.pohoyda@gmx.net> MFC after: 7 days
This commit is contained in:
parent
a8deb8fb41
commit
917f89df7f
@ -194,7 +194,7 @@ USB_ATTACH(uhub)
|
||||
/* Get hub descriptor. */
|
||||
req.bmRequestType = UT_READ_CLASS_DEVICE;
|
||||
req.bRequest = UR_GET_DESCRIPTOR;
|
||||
USETW(req.wValue, 0);
|
||||
USETW2(req.wValue, (dev->address > 1 ? UDESC_HUB : 0), 0);
|
||||
USETW(req.wIndex, 0);
|
||||
USETW(req.wLength, USB_HUB_DESCRIPTOR_SIZE);
|
||||
DPRINTFN(1,("usb_init_hub: getting hub descriptor\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user