summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-09-01 20:18:01 +0700
committerGitHub <[email protected]>2021-09-01 20:18:01 +0700
commit831a45f14bcc833d536cab39bef61cc67533fa73 (patch)
treea06c49a362535f17174ce3058c867f4f21bf0df0 /src/class
parente2175f6ed1e9a42c76dacf345d51ba61eecd8a6a (diff)
parentd4c56c70a80a6df81f403627e897c50b0a94601e (diff)
Merge pull request #1065 from hathach/rp2040-compliance
Rp2040 compliance test
Diffstat (limited to 'src/class')
-rw-r--r--src/class/msc/msc_device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c
index 7dcd4983e..6b3a392a8 100644
--- a/src/class/msc/msc_device.c
+++ b/src/class/msc/msc_device.c
@@ -323,7 +323,11 @@ bool mscd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t
if ( p_msc->stage == MSC_STAGE_CMD )
{
// part of reset recovery (probably due to invalid CBW) -> prepare for new command
- TU_ASSERT( prepare_cbw(rhport, p_msc) );
+ // Note: skip if already queued previously
+ if ( usbd_edpt_ready(rhport, p_msc->ep_out) )
+ {
+ TU_ASSERT( prepare_cbw(rhport, p_msc) );
+ }
}
}
}