summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r--sys/dev/usb/usb.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index a2ced28..7e4e6ae 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.56 2001/11/13 07:55:30 augustss Exp $ */
+/* $NetBSD: usb.c,v 1.57 2001/11/20 13:48:04 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -203,6 +203,7 @@ USB_ATTACH(usb)
usbd_device_handle dev;
usbd_status err;
int usbrev;
+ int speed;
struct usb_event ue;
sc->sc_dev = self;
@@ -222,8 +223,17 @@ USB_ATTACH(usb)
#endif
usbrev = sc->sc_bus->usbrev;
printf(": USB revision %s", usbrev_str[usbrev]);
- if (usbrev != USBREV_1_0 && usbrev != USBREV_1_1) {
+ switch (usbrev) {
+ case USBREV_1_0:
+ case USBREV_1_1:
+ speed = USB_SPEED_FULL;
+ break;
+ case USBREV_2_0:
+ speed = USB_SPEED_HIGH;
+ break;
+ default:
printf(", not supported\n");
+ sc->sc_dying = 1;
USB_ATTACH_ERROR_RETURN;
}
printf("\n");
@@ -243,13 +253,14 @@ USB_ATTACH(usb)
if (sc->sc_bus->soft == NULL) {
printf("%s: can't register softintr\n", USBDEVNAME(sc->sc_dev));
sc->sc_dying = 1;
+ USB_ATTACH_ERROR_RETURN;
}
#else
callout_init(&sc->sc_bus->softi);
#endif
#endif
- err = usbd_new_device(USBDEV(sc->sc_dev), sc->sc_bus, 0, 0, 0,
+ err = usbd_new_device(USBDEV(sc->sc_dev), sc->sc_bus, 0, speed, 0,
&sc->sc_port);
if (!err) {
dev = sc->sc_port.device;
OpenPOWER on IntegriCloud