summaryrefslogtreecommitdiff
path: root/drivers/mmc/card
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-06-10 16:22:16 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-07-25 11:34:13 +0300
commitd806b46e5f496a6335ebd7f8432d2533507ce9a2 (patch)
tree7a6ac670634ccf35b3f602064167f14d29d8c94c /drivers/mmc/card
parent5320226a051248b50cc2d80f2cb9599dfb56d422 (diff)
downloadlinux-d806b46e5f496a6335ebd7f8432d2533507ce9a2.tar.xz
mmc: block: Fix tag condition with packed writes
Apparently a cut-and-paste error, 'do_data_tag' is using 'brq' for data size even though 'brq' has not been set up. Instead use blk_rq_sectors(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r--drivers/mmc/card/block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index abfe3942a42d..d180588dee88 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1800,8 +1800,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq,
do_data_tag = (card->ext_csd.data_tag_unit_size) &&
(prq->cmd_flags & REQ_META) &&
(rq_data_dir(prq) == WRITE) &&
- ((brq->data.blocks * brq->data.blksz) >=
- card->ext_csd.data_tag_unit_size);
+ blk_rq_bytes(prq) >= card->ext_csd.data_tag_unit_size;
/* Argument of CMD23 */
packed_cmd_hdr[(i * 2)] = cpu_to_le32(
(do_rel_wr ? MMC_CMD23_ARG_REL_WR : 0) |