able to response to scsi inquiry, but failed to response to test unit ready
This commit is contained in:
@@ -378,6 +378,9 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
|
||||
TU_ASSERT( event == XFER_RESULT_SUCCESS &&
|
||||
xferred_bytes == sizeof(msc_cbw_t) && p_cbw->signature == MSC_CBW_SIGNATURE );
|
||||
|
||||
TU_LOG2(" Command Block Wrapper\n");
|
||||
TU_LOG2_MEM(p_cbw, xferred_bytes, 2);
|
||||
|
||||
p_csw->signature = MSC_CSW_SIGNATURE;
|
||||
p_csw->tag = p_cbw->tag;
|
||||
p_csw->data_residue = 0;
|
||||
@@ -448,6 +451,9 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
|
||||
break;
|
||||
|
||||
case MSC_STAGE_DATA:
|
||||
//TU_LOG2(" SCSI Data\n");
|
||||
//TU_LOG2_MEM(_mscd_buf, xferred_bytes, 2);
|
||||
|
||||
// OUT transfer, invoke callback if needed
|
||||
if ( !tu_bit_test(p_cbw->dir, 7) )
|
||||
{
|
||||
@@ -538,6 +544,9 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
|
||||
// Wait for the command status wrapper complete event
|
||||
if( (ep_addr == p_msc->ep_in) && (xferred_bytes == sizeof(msc_csw_t)) )
|
||||
{
|
||||
TU_LOG2(" Command Status Wrapper\n");
|
||||
TU_LOG2_MEM(p_csw, xferred_bytes, 2);
|
||||
|
||||
// Move to default CMD stage
|
||||
p_msc->stage = MSC_STAGE_CMD;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user