From f04bc06e98febf39134e8800e18ccb382093a7de Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 2 Nov 2009 22:32:22 +0000 Subject: Non-standard requests handled by class caused controller errors git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2214 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/stm32/stm32_usbdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c index 4ac47358a..dbc0ce5a6 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c @@ -1572,7 +1572,7 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv) /* Let the class implementation handle all non-standar requests */ stm32_dispatchrequest(priv); - handled = TRUE; + return; } /* Handle standard request. Pick off the things of interest to the @@ -1920,6 +1920,10 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv) * 3. An error was detected in either the above logic or by the class implementation * logic. In either case, priv->state will be set DEVSTATE_STALLED * to indicate this case. + * + * NOTE: Non-standard requests are a special case. They are handled by the + * class implementation and this function returned early above, skipping this + * logic altogether. */ if (priv->devstate != DEVSTATE_STALLED && !handled) -- cgit v1.2.3