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 <[email protected]>
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;
}