diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-07-21 07:46:56 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-07-21 07:46:56 +0000 |
commit | c6a09768ac0ec3676bb5ab6b937e0b076ceb4635 (patch) | |
tree | 7ec81f6ba35d8dca6c59b0a0ed5cf9c1b385e53b | |
parent | 26ca10c7a8b3b2ac443c357146c515fce258640f (diff) |
from netbsd, umass.c 1.101
On a Bulk-In data stall, make sure we copy back the data received, per the
spec. This is the real problem behind FORCE_SHORT_INQUIRY.
ok krw@
-rw-r--r-- | sys/dev/usb/umass.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index a0fe1177e9a..94d982d1c2e 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.29 2004/07/21 07:43:41 dlg Exp $ */ +/* $OpenBSD: umass.c,v 1.30 2004/07/21 07:46:55 dlg Exp $ */ /* $NetBSD: umass.c,v 1.98 2003/09/08 19:30:59 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, @@ -1049,6 +1049,8 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, } } + /* FALLTHROUGH, err == 0 (no data phase or successful) */ + case TSTATE_BBB_DCLEAR: /* stall clear after data phase */ if (sc->transfer_dir == DIR_IN) memcpy(sc->transfer_data, sc->data_buffer, sc->transfer_actlen); @@ -1058,7 +1060,6 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, sc->transfer_datalen, 48)); /* FALLTHROUGH, err == 0 (no data phase or successful) */ - case TSTATE_BBB_DCLEAR: /* stall clear after data phase */ case TSTATE_BBB_SCLEAR: /* stall clear after status phase */ /* Reading of CSW after bulk stall condition in data phase * (TSTATE_BBB_DATA2) or bulk-in stall condition after |