summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_usbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_usbdev.c')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_usbdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c
index dbc0ce5a6..7c4035b6f 100644
--- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c
+++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c
@@ -1479,7 +1479,6 @@ static void stm32_epdone(struct stm32_usbdev_s *priv, ubyte epno)
/* Handle write requests */
- privep->txbusy = FALSE;
priv->rxstatus = USB_EPR_STATRX_NAK;
stm32_wrrequest(priv, privep);
@@ -1544,9 +1543,10 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv)
stm32_reqcomplete(ep0, result);
}
- /* Assume NOT stalled */
+ /* Assume NOT stalled; no TX in progress */
ep0->stalled = 0;
+ ep0->txbusy = 0;
/* Get a 32-bit PMA address and use that to get the 8-byte setup request */
@@ -2944,7 +2944,6 @@ static int stm32_epstall(struct usbdev_ep_s *ep, boolean resume)
if (!stm32_rqempty(privep))
{
- privep->txbusy = FALSE;
(void)stm32_wrrequest(priv, privep);
stm32_seteptxstatus(epno, USB_EPR_STATTX_VALID);
}