mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-25 12:02:30 +00:00
Fix for MSC during stage STATUS
This commit is contained in:
parent
831a45f14b
commit
2e23f3dd72
@ -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
|
// 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 ( !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
|
// 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);
|
usbd_edpt_stall(rhport, p_msc->ep_in);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user