summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-03-26 21:22:30 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-03-26 21:22:30 +0000
commit502e9e97b6c91999e6d0d92802e59d13d8ffc9de (patch)
tree3078bd019859ccc8425a14395a1532191dd1e057
parent6512f0fb522144b121c38c53ea780c939b6e027c (diff)
downloadrockbox-502e9e97b6c91999e6d0d92802e59d13d8ffc9de.tar.gz
rockbox-502e9e97b6c91999e6d0d92802e59d13d8ffc9de.zip
AMSv2 SD: wait for response to command SD_STOP_TRANSMISSION instead of ignoring the response
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29651 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 93dc7444c5..45b7b69be5 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -823,6 +823,7 @@ int sd_init(void)
static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
int count, void* buf, bool write)
{
+ unsigned long response;
int ret = 0;
#ifndef HAVE_MULTIDRIVE
const int drive = 0;
@@ -938,8 +939,7 @@ sd_transfer_retry_with_reinit:
dma_enable_channel(0, MCI_FIFO, dma_buf, DMA_PERI_SD,
DMAC_FLOWCTRL_PERI_PERI_TO_MEM, false, true, 0, DMA_S8, NULL);
- unsigned long dummy; /* if we don't ask for a response, writing fails */
- if(!send_cmd(drive, cmd, arg, MCI_RESP, &dummy))
+ if(!send_cmd(drive, cmd, arg, MCI_RESP, &response))
{
ret = -21;
goto sd_transfer_error;
@@ -955,7 +955,7 @@ sd_transfer_retry_with_reinit:
while(MCI_STATUS & DATA_BUSY) ;
}
- if(!send_cmd(drive, SD_STOP_TRANSMISSION, 0, MCI_NO_RESP, NULL))
+ if(!send_cmd(drive, SD_STOP_TRANSMISSION, 0, MCI_RESP, &response))
{
ret = -22;
goto sd_transfer_error;