diff options
| author | mycroft <mycroft@NetBSD.org> | 2003-09-04 00:02:59 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 2003-09-04 00:02:59 +0000 |
| commit | 9bba9f60b689ad5e2e9e8d946bee096f4c33dbf4 (patch) | |
| tree | 2148b3e0f9d8aa2adbada39a51ff266290e26d4e /sys/dev/usb | |
| parent | d7506a71516ce9d8fd8e35662c8421591ee7de78 (diff) | |
Well, this is bloody obscure...
My Imation USB FlashGO! adapter responds to a Get Max Lun request with a
stall. With uhci, this does the expected thing. With ohci, it was returning
a "data underrun" error because we weren't setting "buffer rounding" (i.e.
USBD_SHORT_XFER_OK), and the underrun was taking priority. This happened with
both the ohci in a Mac cube and the builtin ohci on the S3C2410.
So, set USBD_SHORT_XFER_OK on the Get Max Lun. Now I get a stall reported and
umass attaches correctly.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/umass.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 1a59d07c929..c16dee82198 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass.c,v 1.96 2003/04/26 12:46:59 dsainty Exp $ */ +/* $NetBSD: umass.c,v 1.97 2003/09/04 00:02:59 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, * Nick Hibma <n_hibma@freebsd.org> @@ -94,7 +94,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.96 2003/04/26 12:46:59 dsainty Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.97 2003/09/04 00:02:59 mycroft Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -1673,7 +1673,8 @@ umass_bbb_get_max_lun(struct umass_softc *sc, u_int8_t *maxlun) USETW(req.wIndex, sc->sc_ifaceno); USETW(req.wLength, 1); - err = usbd_do_request(sc->sc_udev, &req, maxlun); + err = usbd_do_request_flags(sc->sc_udev, &req, maxlun, + USBD_SHORT_XFER_OK, 0, USBD_DEFAULT_TIMEOUT); switch (err) { case USBD_NORMAL_COMPLETION: DPRINTF(UDMASS_BBB, ("%s: Max Lun %d\n", |
