[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55CDA30E.7030208@rock-chips.com>
Date: Fri, 14 Aug 2015 16:13:02 +0800
From: Shawn Lin <shawn.lin@...k-chips.com>
To: sdliyong@...il.com, chris@...ntf.net, ulf.hansson@...aro.org,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: shawn.lin@...k-chips.com
Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does
not support CMD23
在 2015/8/14 15:30, sdliyong@...il.com 写道:
> From: Yong Li <sdliyong@...il.com>
>
> Signed-off-by: Yong Li <sdliyong@...il.com>
> ---
> drivers/mmc/card/block.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 452782b..d9e3c45 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1366,7 +1366,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
> bool do_rel_wr = ((req->cmd_flags & REQ_FUA) ||
> (req->cmd_flags & REQ_META)) &&
> (rq_data_dir(req) == WRITE) &&
> - (md->flags & MMC_BLK_REL_WR);
> + (md->flags & MMC_BLK_REL_WR) &&
> + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23);
Hi Yong,
pls check that code below.
MMC_BLK_REL_WR will not be enabled if we know this card CANNOT support
CMD23 form SCR. AND, "card->quirks & MMC_QUIRK_BLK_NO_CMD23" would be
checked here as well. So I think your code is unnecessary.
if ((md->flags & MMC_BLK_CMD23) && mmc_op_multi(brq->cmd.opcode) &&
(do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) ||
do_data_tag)) {
brq->sbc.opcode = MMC_SET_BLOCK_COUNT;
brq->sbc.arg = brq->data.blocks |
(do_rel_wr ? (1 << 31) : 0) |
(do_data_tag ? (1 << 29) : 0);
brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC;
brq->mrq.sbc = &brq->sbc;
}
Thanks.
Shawn
>
> memset(brq, 0, sizeof(struct mmc_blk_request));
> brq->mrq.cmd = &brq->cmd;
>
--
Shawn Lin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists