xiaoxiang781216 commented on code in PR #14128:
URL: https://github.com/apache/nuttx/pull/14128#discussion_r1797058905


##########
arch/arm/src/sama5/sam_udphs.c:
##########
@@ -2495,8 +2495,13 @@ static void sam_dma_interrupt(struct sam_usbdev_s *priv, 
int epno)
        * BUFF_COUNT should not be zero.  BUFF_COUNT was set to the
        * 'inflight' count when the DMA started so the difference will
        * give us the actual size of the transfer.
+       *
+       * Get the request from the head of the endpoint request queue first.
        */
 
+      privreq            = sam_rqpeek(&privep->reqq);

Review Comment:
   ditto



##########
arch/arm/src/sama5/sam_udphs.c:
##########
@@ -2439,7 +2434,12 @@ static void sam_dma_interrupt(struct sam_usbdev_s *priv, 
int epno)
         }
       else if (privep->epstate == UDPHS_EPSTATE_RECEIVING)
         {
-          /* privreg->inflight holds the total transfer size */
+          /* privreg->inflight holds the total transfer size
+           * Get the request from the head of the endpoint request queue
+          */
+
+          privreq           = sam_rqpeek(&privep->reqq);

Review Comment:
   why add so many spaces before =



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to