Windrow14 commented on code in PR #13164:
URL: https://github.com/apache/nuttx/pull/13164#discussion_r2076933373


##########
drivers/mmcsd/mmcsd_sdio.c:
##########
@@ -493,6 +493,25 @@ static int mmcsd_recv_r6(FAR struct mmcsd_state_s *priv, 
uint32_t cmd)
 static int mmcsd_get_scr(FAR struct mmcsd_state_s *priv, uint32_t scr[2])
 {
   int ret;
+#ifdef CONFIG_SDIO_DMA
+  bool drop = FALSE;

Review Comment:
   Corrected.



##########
drivers/mmcsd/mmcsd_sdio.c:
##########
@@ -506,7 +525,22 @@ static int mmcsd_get_scr(FAR struct mmcsd_state_s *priv, 
uint32_t scr[2])
   /* Setup up to receive data with interrupt mode */
 
   SDIO_BLOCKSETUP(priv->dev, 8, 1);
-  SDIO_RECVSETUP(priv->dev, (FAR uint8_t *)scr, 8);
+#ifdef CONFIG_SDIO_DMA
+  if (!drop && (priv->caps & SDIO_CAPS_DMASUPPORTED) != 0)
+    {
+      ret = SDIO_DMARECVSETUP(priv->dev, (FAR uint8_t *)scr, 8);
+      if (ret != OK)
+        {
+          finfo("SDIO_DMARECVSETUP: error %d, drop to RECVSETUP\n", ret);
+          drop = TRUE;

Review Comment:
   Corrected.



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