add scsi start stop unit struct, improve device msc, correctly stall unsupported scsi command

This commit is contained in:
hathach
2018-07-25 16:56:57 +07:00
parent 1982886f87
commit d2ab4db25e
5 changed files with 52 additions and 17 deletions

View File

@@ -112,7 +112,7 @@ int32_t tud_msc_scsi_cb (uint8_t rhport, uint8_t lun, uint8_t const scsi_cmd[16]
}
// return len must not larger than bufsize
TU_ASSERT( bufsize >= len );
if ( len > bufsize ) len = bufsize;
if ( ptr && len )
{