Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Fix INSYSTEM_USBCALBLE quirk entry:
details: https://anonhg.NetBSD.org/src/rev/81f7a7fab6d2
branches: trunk
changeset: 503542:81f7a7fab6d2
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Feb 08 13:24:05 2001 +0000
description:
Fix INSYSTEM_USBCALBLE quirk entry:
- Make sure to pass iface properly to usbd_set_interface().
- Call usbd_set_interface before calling usbd_get_interface_descriptor().
It seems no one have tested this device. Anyway, my In-System ISD110
USB-IDE adapter does not work in this way..
diffstat:
sys/dev/usb/umass.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (45 lines):
diff -r d698ecb612b1 -r 81f7a7fab6d2 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c Thu Feb 08 13:22:15 2001 +0000
+++ b/sys/dev/usb/umass.c Thu Feb 08 13:24:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umass.c,v 1.50 2001/01/23 14:04:13 augustss Exp $ */
+/* $NetBSD: umass.c,v 1.51 2001/02/08 13:24:05 tsutsui Exp $ */
/*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop%rr.iij4u.or.jp@localhost>,
* Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -867,6 +867,17 @@
USB_ATTACH_ERROR_RETURN;
}
+ if (sc->drive == INSYSTEM_USBCABLE) {
+ err = usbd_set_interface(sc->iface, 1);
+ if (err) {
+ DPRINTF(UDMASS_USB, ("%s: could not switch to "
+ "Alt Interface %d\n",
+ USBDEVNAME(sc->sc_dev), 1));
+ umass_disco(sc);
+ USB_ATTACH_ERROR_RETURN;
+ }
+ }
+
/*
* The timeout is based on the maximum expected transfer size
* divided by the expected transfer speed.
@@ -922,17 +933,6 @@
printf("%s: using %s over %s\n", USBDEVNAME(sc->sc_dev), sSubclass,
sProto);
- if (sc->drive == INSYSTEM_USBCABLE) {
- err = usbd_set_interface(0, 1);
- if (err) {
- DPRINTF(UDMASS_USB, ("%s: could not switch to "
- "Alt Interface %d\n",
- USBDEVNAME(sc->sc_dev), 1));
- umass_disco(sc);
- USB_ATTACH_ERROR_RETURN;
- }
- }
-
/*
* In addition to the Control endpoint the following endpoints
* are required:
Home |
Main Index |
Thread Index |
Old Index