Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.
This commit is contained in:
parent
ee42cb9014
commit
05069ebd4d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue