summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-09-06 13:08:29 +0700
committerGitHub <[email protected]>2021-09-06 13:08:29 +0700
commitcbb6dfd6a5fac9e88c4ba976bc9e2db9d79ae474 (patch)
tree72982154ce12e09740331b6783710e31b8aeb5c5 /src
parent831a45f14bcc833d536cab39bef61cc67533fa73 (diff)
parent2e23f3dd7287186445aeab39108f81c51644ed77 (diff)
Merge pull request #1070 from kamtom480/msc_stage_status_fix
Fix for MSC during stage STATUS
Diffstat (limited to 'src')
-rw-r--r--src/class/msc/msc_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c
index 6b3a392a8..71875b014 100644
--- a/src/class/msc/msc_device.c
+++ b/src/class/msc/msc_device.c
@@ -601,10 +601,10 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
// skip status if epin is currently stalled, will do it when received Clear Stall request
if ( !usbd_edpt_stalled(rhport, p_msc->ep_in) )
{
- if ( (p_cbw->total_bytes > p_msc->xferred_len) && is_data_in(p_cbw->dir) )
+ if ( (p_msc->total_len > p_msc->xferred_len) && is_data_in(p_cbw->dir) )
{
// 6.7 The 13 Cases: case 5 (Hi > Di): STALL before status
- TU_LOG(MSC_DEBUG, " SCSI case 5 (Hi > Di): %lu > %lu\r\n", p_cbw->total_bytes, p_msc->xferred_len);
+ TU_LOG(MSC_DEBUG, " SCSI case 5 (Hi > Di): %lu > %lu\r\n", p_msc->total_len, p_msc->xferred_len);
usbd_edpt_stall(rhport, p_msc->ep_in);
}else
{