Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
From: Ulf Hansson <hidden>
Date: 2015-08-27 13:22:47
Also in:
lkml
On 25 August 2015 at 14:06, Ulf Hansson [off-list ref] wrote:
On 14 August 2015 at 09:30, [off-list ref] wrote:quoted
From: Yong Li <redacted> Signed-off-by: Yong Li <redacted> --- 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);Further down in mmc_blk_rw_rq_prep() we check for MMC_QUIRK_BLK_NO_CMD23. That check becomes redundant after this change, please remove that check as a part of this patch as well.quoted
memset(brq, 0, sizeof(struct mmc_blk_request)); brq->mrq.cmd = &brq->cmd; -- 2.1.0
Please ignore my previous answer. MMC_QUIRK_BLK_NO_CMD23 is intended to indicate to the mmc block layer whether using CMD23 for regular block IO request could have a performance impact for some cards. If that's the case we don't use it - except when using reliable write! So this patch is just plain wrong. Kind regards Uffe