diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-14 23:36:27 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-14 23:36:27 +0000 |
commit | 66ced9bada92fa1376dfd55073b763f781d4764f (patch) | |
tree | 9dfc9add08e6e90114c3d5bc822fbec4f015581d /sys/dev/usb/umass_scsi.c | |
parent | 5e017dfcaee3abb57aab4fdf622aa4c9ccf67bda (diff) |
Try to ensure that UFI/ATAPI USB umass devices always get the zero
padded 12 byte commands mandated by the standard. Adapt the Linux data
length twiddling on certain commands. We used to have some of this in
a different form, curtesy of csapuntz@, but it got lost in subsequent
merges.
Fixes the USB card reader of Quentin Barnes who provided much testing
and feedback for over a year!
Tested by drahn@, ok marco@, 'this is good stuff' deraadt@.
Diffstat (limited to 'sys/dev/usb/umass_scsi.c')
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 435ae278d59..537c17f5ed8 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.11 2005/04/27 23:54:44 krw Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.12 2005/05/14 23:36:26 krw Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -364,8 +364,6 @@ umass_scsi_cb(struct umass_softc *sc, void *priv, int residue, int status) scbus->sc_sense_cmd.length = sizeof(xs->sense); cmdlen = sizeof(scbus->sc_sense_cmd); - if (sc->sc_cmd == UMASS_CPROTO_UFI) /* XXX */ - cmdlen = UFI_COMMAND_LENGTH; sc->sc_methods->wire_xfer(sc, link->lun, &scbus->sc_sense_cmd, cmdlen, &xs->sense, sizeof(xs->sense), |