summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-01-14 21:24:21 +0100
committerChris Ball <chris@printf.net>2014-02-23 10:40:54 -0500
commitbcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925 (patch)
treeff7a18b517a530a4193229a0993b426b0e007bac /drivers/mmc/card
parentcb962e04b04fb67dbaf1455d3c60d64297ef4933 (diff)
downloadlinux-bcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925.tar.gz
linux-bcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925.tar.bz2
linux-bcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925.zip
mmc: block: Use R1 responses for stop cmds for read requests
While using open ended transmission and thus ending the transfer by sending a stop command, we shall use R1B only for writes and R1 shall be used for reads. Previously R1B were used in both cases. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r--drivers/mmc/card/block.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c2187d5e9070..156cabfa61c3 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1334,7 +1334,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
brq->data.blksz = 512;
brq->stop.opcode = MMC_STOP_TRANSMISSION;
brq->stop.arg = 0;
- brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
brq->data.blocks = blk_rq_sectors(req);
/*
@@ -1377,9 +1376,15 @@ 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;
} else {
brq->cmd.opcode = writecmd;
brq->data.flags |= MMC_DATA_WRITE;
+ if (brq->mrq.stop)
+ brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B |
+ MMC_CMD_AC;
}
if (do_rel_wr)