diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-18 13:53:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-18 13:53:58 +0000 |
commit | 634e46a77bcce80bc04ad44f5efeec0ca273993a (patch) | |
tree | a4d03fd77a883cf0fdf992748f8b6f8bb4893154 /nuttx/arch/arm/src | |
parent | 900c449552ab5b39937ec25b1bb5679ee19b28d4 (diff) | |
download | px4-nuttx-634e46a77bcce80bc04ad44f5efeec0ca273993a.tar.gz px4-nuttx-634e46a77bcce80bc04ad44f5efeec0ca273993a.tar.bz2 px4-nuttx-634e46a77bcce80bc04ad44f5efeec0ca273993a.zip |
Fix STM32 USB overrun problem (again, still)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4199 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_usbdev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c index c10ac104b..54148b230 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c @@ -1085,8 +1085,7 @@ static struct stm32_req_s *stm32_rqdequeue(struct stm32_ep_s *privep) * Name: stm32_rqenqueue ****************************************************************************/ -static void stm32_rqenqueue(struct stm32_ep_s *privep, - struct stm32_req_s *req) +static void stm32_rqenqueue(struct stm32_ep_s *privep, struct stm32_req_s *req) { req->flink = NULL; if (!privep->head) @@ -1446,7 +1445,10 @@ static void stm32_epdone(struct stm32_usbdev_s *priv, uint8_t epno) priv->rxstatus = USB_EPR_STATRX_VALID; } - else + + /* NAK further OUT packets if there there no more read requests */ + + if (stm32_rqempty(privep)) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUTPENDING), (uint16_t)epno); |