summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-07-16 17:40:23 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-07-16 17:40:23 +0000
commit1b36d234110a74de68e811d4f41f33fc0515eaf3 (patch)
tree03c548f0ae921241df3061986ba5f9efe2936986 /sys/dev
parent974e0b381e4776ca1c3aa1b2e532be414c6b5c68 (diff)
downloadFreeBSD-src-1b36d234110a74de68e811d4f41f33fc0515eaf3.zip
FreeBSD-src-1b36d234110a74de68e811d4f41f33fc0515eaf3.tar.gz
Add some detection code for the InSystem USB cable (ATAPI support not yet
there, so the cable does not work yet)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/umass.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index ce8f75d..96ae64e 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -272,8 +272,9 @@ struct umass_softc {
unsigned char drive;
# define DRIVE_GENERIC 0 /* use defaults for this one */
# define ZIP_100 1 /* to be used for quirks */
-# define ZIP_250 2 /* to be used for quirks */
+# define ZIP_250 2
# define SHUTTLE_EUSB 3
+# define INSYSTEM_USBCABLE 4
unsigned char quirks;
/* The drive does not support Test Unit Ready. Convert to
@@ -578,6 +579,7 @@ umass_match_proto(struct umass_softc *sc, usbd_interface_handle iface,
if (UGETW(dd->idVendor) == USB_VENDOR_INSYSTEM
&& UGETW(dd->idProduct) == USB_PRODUCT_INSYSTEM_USBCABLE) {
+ sc->drive = INSYSTEM_USBCABLE;
sc->proto = PROTO_ATAPI | PROTO_CBI;
sc->quirks |= NO_TEST_UNIT_READY | NO_START_STOP;
return(UMATCH_VENDOR_PRODUCT);
@@ -731,6 +733,17 @@ USB_ATTACH(umass)
#endif
printf("\n");
+ 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_detach(self);
+ USB_ATTACH_ERROR_RETURN;
+ }
+ }
+
/*
* In addition to the Control endpoint the following endpoints
* are required:
OpenPOWER on IntegriCloud