Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbbH1Aib (ORCPT ); Thu, 27 Aug 2015 20:38:31 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34680 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbbH1Ai1 convert rfc822-to-8bit (ORCPT ); Thu, 27 Aug 2015 20:38:27 -0400 X-TMN: [Kt1TF7spuLyYfi2DihmIx+ousevughy8] Message-ID: From: LIYONG To: Ulf Hansson CC: Chris Ball , linux-mmc , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 Date: Fri, 28 Aug 2015 08:38:22 +0800 Importance: Normal In-Reply-To: References: <1439537446-7713-1-git-send-email-sdliyong@gmail.com>,, Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginalArrivalTime: 28 Aug 2015 00:38:23.0004 (UTC) FILETIME=[D82645C0:01D0E129] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2346 Lines: 62 Hi Uffe, Since?Reliable Write depends on the CMD23. I think we need to disable?Reliable Write if the card does not support CMD23(due to performance impact issue), so I add this patch. Do you think we still need to enable?Reliable Write even if the card does not support CMD23? Thanks, Yong Li ---------------------------------------- > Date: Thu, 27 Aug 2015 15:22:44 +0200 > Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 > From: ulf.hansson@linaro.org > To: sdliyong@gmail.com > CC: chris@printf.net; linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org > > On 25 August 2015 at 14:06, Ulf Hansson wrote: >> On 14 August 2015 at 09:30, wrote: >>> From: Yong Li >>> >>> Signed-off-by: Yong Li >>> --- >>> 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. >> >>> >>> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/