You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/04 17:43:56 UTC

[incubator-nuttx] branch master updated: fix sd can't usage when mult-block receive errro

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new ee0dc87059 fix sd can't usage when mult-block receive errro
ee0dc87059 is described below

commit ee0dc870591318386b7a60e04815a7fcb4649ac7
Author: licheng <ch...@bestechnic.com>
AuthorDate: Mon Jul 4 23:29:11 2022 +0800

    fix sd can't usage when mult-block receive errro
---
 drivers/mmcsd/mmcsd_spi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmcsd/mmcsd_spi.c b/drivers/mmcsd/mmcsd_spi.c
index 666cd15a79..fa76911260 100644
--- a/drivers/mmcsd/mmcsd_spi.c
+++ b/drivers/mmcsd/mmcsd_spi.c
@@ -1280,6 +1280,10 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
           if (mmcsd_recvblock(slot, buffer, SECTORSIZE(slot)) != 0)
             {
               ferr("ERROR: Failed: to receive the block\n");
+
+              /* Send CMD12: Stops transmission */
+
+              response = mmcsd_sendcmd(slot, &g_cmd12, 0);
               goto errout_with_eio;
             }