[PATCH] mmc: block: Correct response type of stop command for sdcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to Physical Layer Simplified Specification Version 4.10, SD
card needs a R1b response for stop command.

Signed-off-by: Yuan Juntao <juntao.yuan@xxxxxxxxx>
---
 drivers/mmc/card/block.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 3bdbe50..aa8fc98b 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1533,9 +1533,14 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
    if (rq_data_dir(req) == READ) {
        brq->cmd.opcode = readcmd;
        brq->data.flags = MMC_DATA_READ;
-       if (brq->mrq.stop)
-           brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 |
-                   MMC_CMD_AC;
+       if (brq->mrq.stop) {
+           if (mmc_card_mmc(card))
+               brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 |
+                       MMC_CMD_AC;
+           else
+               brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B |
+                       MMC_CMD_AC;
+       }
    } else {
        brq->cmd.opcode = writecmd;
        brq->data.flags = MMC_DATA_WRITE;
--
1.7.9.5



Thanks.
Juntao.

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux