summaryrefslogtreecommitdiff
path: root/tinyusb/class/msc_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-09-27 23:23:45 +0700
committerhathach <[email protected]>2013-09-27 23:23:45 +0700
commitbfa96ae9dade22ce8773bece9a7d8e39c6a94232 (patch)
treecc5cfc679b1a658e60490f41594814de39167f1d /tinyusb/class/msc_host.c
parenteb1a101667f183db6781d5f7f73f360a508b13bc (diff)
fix an "extra" semaphore wait in msc host
Diffstat (limited to 'tinyusb/class/msc_host.c')
-rw-r--r--tinyusb/class/msc_host.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tinyusb/class/msc_host.c b/tinyusb/class/msc_host.c
index 26beeae13..af85606cf 100644
--- a/tinyusb/class/msc_host.c
+++ b/tinyusb/class/msc_host.c
@@ -380,7 +380,7 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
);
hcd_pipe_clear_stall(msch_data[dev_addr-1].bulk_in);
- osal_semaphore_wait(msch_sem_hdl, SCSI_XFER_TIMEOUT, &error);
+ osal_semaphore_wait(msch_sem_hdl, SCSI_XFER_TIMEOUT, &error); // wait for SCSI status
SUBTASK_ASSERT_STATUS(error);
//------------- SCSI Request Sense -------------//
@@ -397,8 +397,6 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
msch_data[dev_addr-1].last_lba = __be2le( ((scsi_read_capacity10_data_t*)msch_buffer)->last_lba );
msch_data[dev_addr-1].block_size = (uint16_t) __be2le( ((scsi_read_capacity10_data_t*)msch_buffer)->block_size );
- osal_semaphore_wait(msch_sem_hdl, SCSI_XFER_TIMEOUT, &error);
-
msch_data[dev_addr-1].is_initialized = true;
tusbh_msc_mounted_cb(dev_addr);