diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2009-01-12 21:22:26 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2009-01-12 21:22:26 +0000 |
commit | bbd33a0a7db188e874b11e30e509f32c13200aea (patch) | |
tree | cea84913319094f2557424fe68bf1b4b07c08f41 /firmware/usbstack | |
parent | 09ba2bbf391d47db689b3667012d86ce3d9549aa (diff) |
improve handling of unimplemented commands
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19755 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 83b3aeec43..8a4915123c 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -97,6 +97,8 @@ #define ASC_WRITE_ERROR 0x0C #define ASC_READ_ERROR 0x11 #define ASC_NOT_READY 0x04 +#define ASC_INVALID_COMMAND 0x20 + #define ASCQ_BECOMING_READY 0x01 #define SCSI_FORMAT_CAPACITY_FORMATTED_MEDIA 0x02000000 @@ -1024,8 +1026,10 @@ 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; + cur_sense_data.ascq=0; break; } } |