Index: firmware/target/arm/as3525/sd-as3525v2.c =================================================================== --- firmware/target/arm/as3525/sd-as3525v2.c (revision 29645) +++ firmware/target/arm/as3525/sd-as3525v2.c (working copy) @@ -822,6 +822,7 @@ 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; @@ -937,8 +938,7 @@ 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; @@ -954,7 +954,7 @@ 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;