Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Handle Zip quirks differently.
details: https://anonhg.NetBSD.org/src/rev/94b2d22f2453
branches: trunk
changeset: 517997:94b2d22f2453
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Nov 23 01:15:28 2001 +0000
description:
Handle Zip quirks differently.
Ugh! This driver need major overhaul.
diffstat:
sys/dev/usb/umass.c | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diffs (97 lines):
diff -r dc1273d4cec9 -r 94b2d22f2453 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c Fri Nov 23 01:14:45 2001 +0000
+++ b/sys/dev/usb/umass.c Fri Nov 23 01:15:28 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umass.c,v 1.65 2001/11/13 08:01:40 augustss Exp $ */
+/* $NetBSD: umass.c,v 1.66 2001/11/23 01:15:28 augustss Exp $ */
/*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop%rr.iij4u.or.jp@localhost>,
* Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.65 2001/11/13 08:01:40 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.66 2001/11/23 01:15:28 augustss Exp $");
#include "atapibus.h"
@@ -334,6 +334,14 @@
return (UMATCH_VENDOR_PRODUCT);
}
+ if (vendor == USB_VENDOR_IOMEGA &&
+ (product == USB_PRODUCT_IOMEGA_ZIP100 ||
+ product == USB_PRODUCT_IOMEGA_ZIP250)) {
+ sc->drive = ZIP_100;
+ sc->transfer_speed = UMASS_ZIP100_TRANSFER_SPEED;
+ sc->quirks |= NO_TEST_UNIT_READY;
+ }
+
id = usbd_get_interface_descriptor(iface);
if (id == NULL || id->bInterfaceClass != UICLASS_MASS)
return (UMATCH_NONE);
@@ -389,14 +397,9 @@
#endif
break;
case UIPROTO_MASS_BBB:
+ case UIPROTO_MASS_BBB_OLD:
sc->wire_proto = WPROTO_BBB;
break;
- case UIPROTO_MASS_BBB_P:
- sc->drive = ZIP_100;
- sc->wire_proto = WPROTO_BBB;
- sc->transfer_speed = UMASS_ZIP100_TRANSFER_SPEED;
- sc->quirks |= NO_TEST_UNIT_READY;
- break;
default:
DPRINTF(UDMASS_GEN, ("%s: Unsupported wire protocol %d\n",
USBDEVNAME(sc->sc_dev), id->bInterfaceProtocol));
@@ -469,6 +472,9 @@
*/
sc->timeout = 4 * UMASS_MAX_TRANSFER_SIZE / sc->transfer_speed;
sc->timeout += UMASS_SPINUP_TIME; /* allow for spinning up */
+#ifdef UMASS_DEBUG
+ printf("%s: timeout=%d ms\n", USBDEVNAME(sc->sc_dev), sc->timeout);
+#endif
id = usbd_get_interface_descriptor(sc->iface);
printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
@@ -504,11 +510,9 @@
sProto = "CBI-I";
break;
case UIPROTO_MASS_BBB:
+ case UIPROTO_MASS_BBB_OLD:
sProto = "BBB";
break;
- case UIPROTO_MASS_BBB_P:
- sProto = "BBB-P";
- break;
default:
sProto = "unknown";
break;
@@ -1165,9 +1169,8 @@
}
/* Read the Command Status Wrapper via bulk-in endpoint. */
- if (umass_setup_transfer(sc, sc->bulkin_pipe,
- &sc->csw, UMASS_BBB_CSW_SIZE, 0,
- next_xfer)) {
+ if (umass_setup_transfer(sc, sc->bulkin_pipe, &sc->csw,
+ UMASS_BBB_CSW_SIZE, 0, next_xfer)) {
umass_bbb_reset(sc, STATUS_WIRE_FAILED);
return;
}
@@ -1187,9 +1190,9 @@
*/
if (sc->transfer_state == TSTATE_BBB_STATUS1) {
umass_clear_endpoint_stall(sc,
- sc->bulkin, sc->bulkin_pipe,
- TSTATE_BBB_SCLEAR,
- sc->transfer_xfer[XFER_BBB_SCLEAR]);
+ sc->bulkin, sc->bulkin_pipe,
+ TSTATE_BBB_SCLEAR,
+ sc->transfer_xfer[XFER_BBB_SCLEAR]);
return;
} else {
umass_bbb_reset(sc, STATUS_WIRE_FAILED);
Home |
Main Index |
Thread Index |
Old Index