From 6c6f9149193bdaf07556e82fee458df8974cd486 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 3 Nov 2009 00:52:16 +0000 Subject: If SETUP received, that also means the end of a previous TX git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2215 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/stm32/stm32_usbdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nuttx/arch/arm') 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); } -- cgit v1.2.3