Date:2014-01-14 21:24:21 (6 years 4 months ago)
Author:Ulf Hansson
Commit:bcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925
Message: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>
Files: drivers/mmc/card/block.c (2 diffs)

Change Details

drivers/mmc/card/block.c
13341334    brq->data.blksz = 512;
13351335    brq->stop.opcode = MMC_STOP_TRANSMISSION;
13361336    brq->stop.arg = 0;
1337    brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
13381337    brq->data.blocks = blk_rq_sectors(req);
13391338
13401339    /*
...... 
13771376    if (rq_data_dir(req) == READ) {
13781377        brq->cmd.opcode = readcmd;
13791378        brq->data.flags |= MMC_DATA_READ;
1379        if (brq->mrq.stop)
1380            brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 |
1381                    MMC_CMD_AC;
13801382    } else {
13811383        brq->cmd.opcode = writecmd;
13821384        brq->data.flags |= MMC_DATA_WRITE;
1385        if (brq->mrq.stop)
1386            brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B |
1387                    MMC_CMD_AC;
13831388    }
13841389
13851390    if (do_rel_wr)

Archive Download the corresponding diff file



interactive