summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-07-24 22:33:00 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2013-07-24 23:16:56 +0200
commit074e911859a0d3464fde9b701b3cff712c5826e0 (patch)
tree4490d68a53e3274dbe957855b6b498945fbe15b1 /firmware/usbstack
parent21c5ffe09a6ea1e9b1a4bd13a047b0ad2845ee1b (diff)
usb_storage: make it a bit more correct
Add stall when unknown SCSI command is hit Change-Id: Icbeea905cd262ab296fb34470e54c665b8bab488
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_storage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 5a1970fd1d..85a0e2b843 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -1151,6 +1151,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
default:
logf("scsi unknown cmd %x",cbw->command_block[0x0]);
+ usb_drv_stall(ep_in, true,true);
send_csw(UMS_STATUS_FAIL);
cur_sense_data.sense_key=SENSE_ILLEGAL_REQUEST;
cur_sense_data.asc=ASC_INVALID_COMMAND;