提交 bcc3e172 编写于 作者: U Ulf Hansson 提交者: Chris Ball

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: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NChris Ball <chris@printf.net>
上级 cb962e04
...@@ -1334,7 +1334,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, ...@@ -1334,7 +1334,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
brq->data.blksz = 512; brq->data.blksz = 512;
brq->stop.opcode = MMC_STOP_TRANSMISSION; brq->stop.opcode = MMC_STOP_TRANSMISSION;
brq->stop.arg = 0; brq->stop.arg = 0;
brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
brq->data.blocks = blk_rq_sectors(req); brq->data.blocks = blk_rq_sectors(req);
/* /*
...@@ -1377,9 +1376,15 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, ...@@ -1377,9 +1376,15 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
if (rq_data_dir(req) == READ) { if (rq_data_dir(req) == READ) {
brq->cmd.opcode = readcmd; brq->cmd.opcode = readcmd;
brq->data.flags |= MMC_DATA_READ; brq->data.flags |= MMC_DATA_READ;
if (brq->mrq.stop)
brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 |
MMC_CMD_AC;
} else { } else {
brq->cmd.opcode = writecmd; brq->cmd.opcode = writecmd;
brq->data.flags |= MMC_DATA_WRITE; 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) if (do_rel_wr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册