summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authortoshii <toshii@NetBSD.org>2003-12-29 08:17:10 +0000
committertoshii <toshii@NetBSD.org>2003-12-29 08:17:10 +0000
commit05069ebd4d5ec6fb63faf1fd7ff8daa108366581 (patch)
tree910a83c0ea1872e153a7bbfbecb1eea21ea849c3 /sys/dev
parentee42cb90147096aa5e7b3b00ab1063fe446cd007 (diff)
Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ehci.c6
-rw-r--r--sys/dev/usb/ohci.c6
-rw-r--r--sys/dev/usb/uhci.c6
-rw-r--r--sys/dev/usb/uhub.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 753a4af298f..58b72f13609 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.50 2003/10/18 04:50:35 simonb Exp $ */
+/* $NetBSD: ehci.c,v 1.51 2003/12/29 08:17:10 toshii Exp $ */
/*
* TODO
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.50 2003/10/18 04:50:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.51 2003/12/29 08:17:10 toshii Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -1712,7 +1712,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
#endif
break;
case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE):
- if (value != 0) {
+ if ((value & 0xff) != 0) {
err = USBD_IOERROR;
goto ret;
}
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index e6568d746eb..cf5de8dd76d 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.145 2003/11/23 19:20:25 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.146 2003/12/29 08:17:10 toshii Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.145 2003/11/23 19:20:25 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.146 2003/12/29 08:17:10 toshii Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2551,7 +2551,7 @@ ohci_root_ctrl_start(usbd_xfer_handle xfer)
}
break;
case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE):
- if (value != 0) {
+ if ((value & 0xff) != 0) {
err = USBD_IOERROR;
goto ret;
}
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 1b2c57af821..be58618ce57 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.176 2003/11/04 19:11:21 mycroft Exp $ */
+/* $NetBSD: uhci.c,v 1.177 2003/12/29 08:17:10 toshii Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.176 2003/11/04 19:11:21 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.177 2003/12/29 08:17:10 toshii Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3312,7 +3312,7 @@ uhci_root_ctrl_start(usbd_xfer_handle xfer)
}
break;
case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE):
- if (value != 0) {
+ if ((value & 0xff) != 0) {
err = USBD_IOERROR;
goto ret;
}
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 579ea9c793b..667687031bd 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
+/* $NetBSD: uhub.c,v 1.65 2003/12/29 08:17:11 toshii Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.65 2003/12/29 08:17:11 toshii Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -176,7 +176,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, UDESC_HUB, 0);
USETW(req.wIndex, 0);
USETW(req.wLength, USB_HUB_DESCRIPTOR_SIZE);
DPRINTFN(1,("usb_init_hub: getting hub descriptor\n"));