You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/05 16:59:04 UTC

[GitHub] [incubator-nuttx] v01d opened a new issue #3386: USB STORAGE DRIVER DELAYS

v01d opened a new issue #3386:
URL: https://github.com/apache/incubator-nuttx/issues/3386


   ```
     Description: There is a workaround for a bug in drivers/usbdev/usbdev_storage.c.
                  that involves delays.  This needs to be redesigned to eliminate these
                  delays.  See logic conditioned on CONFIG_USBMSC_RACEWAR.
   
                  If queuing of stall requests is supported by the DCD then this workaround
                  is not required.  In this case, (1) the stall is not sent until all
                  write requests preceding the stall request are sent, (2) the stall is
                  sent, and then after the stall is cleared, (3) all write requests
                  queued after the stall are sent.
   
                  See, for example, the queuing of pending stall requests in the SAM3/4
                  UDP driver at arch/arm/src/sam34/sam_udp.c.  There the logic is do this
                  is implemented with a normal request queue, a pending request queue, a
                  stall flag and a stall pending flag:
   
                  1) If the normal request queue is not empty when the STALL request is
                     received, the stall pending flag is set.
                  2) If addition write requests are received while the stall pending flag
                     is set (or while waiting for the stall to be sent), those write requests
                     go into the pending queue.
                  3) When the normal request queue empties successful and all of the write
                     transfers complete, the STALL is sent.  The stall pending flag is
                     cleared and the stall flag is set.  Now the endpoint is really stalled.
                  4) After the STALL is cleared (via the Clear Feature SETUP), the pending
                     request queue is copied to the normal request queue, the stall flag is
                     cleared, and normal write request processing resumes.
   
     Status:      Open
     Priority:    Medium
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org