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
This commit is contained in:
patacongo 2009-11-02 22:32:22 +00:00
parent 84deab6932
commit 3c24e1beeb
1 changed files with 5 additions and 1 deletions

View File

@ -1572,7 +1572,7 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv)
/* Let the class implementation handle all non-standar requests */ /* Let the class implementation handle all non-standar requests */
stm32_dispatchrequest(priv); stm32_dispatchrequest(priv);
handled = TRUE; return;
} }
/* Handle standard request. Pick off the things of interest to the /* 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 * 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 * logic. In either case, priv->state will be set DEVSTATE_STALLED
* to indicate this case. * 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) if (priv->devstate != DEVSTATE_STALLED && !handled)