summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/umass.c
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-10-12 08:58:57 +0000
committerbms <bms@FreeBSD.org>2004-10-12 08:58:57 +0000
commit68381630e58cdd199058e1cb6f62cc1ae4ec875c (patch)
treebd892eec170aeceaeb2fba43ba3b98ccfaf8d96f /sys/dev/usb/umass.c
parent29ae8584ac3ebb3cc6c0171ad3e985c09ed6de22 (diff)
downloadFreeBSD-src-68381630e58cdd199058e1cb6f62cc1ae4ec875c.zip
FreeBSD-src-68381630e58cdd199058e1cb6f62cc1ae4ec875c.tar.gz
Pass through the commands necessary to format USB floppy devices,
from within umass_ufi_transform(). This includes the 12-byte commands FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES (sorted in numerical order). Reviewed by: ken, scottl MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb/umass.c')
-rw-r--r--sys/dev/usb/umass.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index eeb0973..5e8981c 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -2890,6 +2890,7 @@ umass_ufi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen,
case REZERO_UNIT:
case REQUEST_SENSE:
+ case FORMAT_UNIT:
case INQUIRY:
case START_STOP_UNIT:
case SEND_DIAGNOSTIC:
@@ -2898,18 +2899,16 @@ umass_ufi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen,
case READ_10:
case WRITE_10:
case POSITION_TO_ELEMENT: /* SEEK_10 */
+ case WRITE_AND_VERIFY:
+ case VERIFY:
case MODE_SELECT_10:
case MODE_SENSE_10:
case READ_12:
case WRITE_12:
+ case READ_FORMAT_CAPACITIES:
memcpy(*rcmd, cmd, cmdlen);
return 1;
- /* Other UFI commands: FORMAT_UNIT, READ_FORMAT_CAPACITY,
- * VERIFY, WRITE_AND_VERIFY.
- * These should be checked whether they somehow can be made to fit.
- */
-
default:
printf("%s: Unsupported UFI command 0x%02x\n",
USBDEVNAME(sc->sc_dev), cmd[0]);
OpenPOWER on IntegriCloud