From 3c24e1beeb2628f0f9f583412ac130104871930b Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 2 Nov 2009 22:32:22 +0000 Subject: [PATCH] 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 --- arch/arm/src/stm32/stm32_usbdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index 4ac47358af..dbc0ce5a6b 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/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)