diff options
author | joe <joe@FreeBSD.org> | 2003-07-14 17:46:27 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2003-07-14 17:46:27 +0000 |
commit | 917f89df7f2cb23b9fb4793891c049c44271a7e9 (patch) | |
tree | 3f1f41e782583e7c3a093929391fbe08f954ee52 /sys | |
parent | a8deb8fb4136ae4de956420d11a6fcb076c6d4ae (diff) | |
download | FreeBSD-src-917f89df7f2cb23b9fb4793891c049c44271a7e9.zip FreeBSD-src-917f89df7f2cb23b9fb4793891c049c44271a7e9.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uhub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 0d97de8..f1eb05a 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -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")); |