From: Shawn Lin <shawn.lin@rock-chips.com>
To: LIYONG <sdliyong@gmail.com>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: shawn.lin@rock-chips.com, Chris Ball <chris@printf.net>,
linux-mmc <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
Date: Wed, 26 Aug 2015 15:20:11 +0800 [thread overview]
Message-ID: <55DD68AB.30006@rock-chips.com> (raw)
In-Reply-To: <BLU168-W65065971596DEBF42F841D6600@phx.gbl>
On 2015/8/26 14:15, LIYONG wrote:
> Hi Uffe,
>
> The bool variable do_rel_wr is used on line 1408 and line 1436:
> if (brq->data.blocks> 1 || do_rel_wr) {
> /* SPI multiblock writes terminate using a special
> * token, not a STOP_TRANSMISSION request.
> */
>
> if (do_rel_wr)
> mmc_apply_rel_rw(brq, card, req);
>
> If a card does not support CMD23, I think we need to set the do_rel_wr to false at the beginning of this mmc_blk_rw_rq_prep function
Hi Yong,
You miss the point, Ulf means you should remove
"(do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23)" as well.
No need to check card->quirks & MMC_QUIRK_BLK_NO_CMD23 twice, you have
did it while checking do_rel_wr, right?
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);
>
> Thanks,
> Yong Li
> ----------------------------------------
>> Date: Tue, 25 Aug 2015 14:06:43 +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 14 August 2015 at 09:30, <sdliyong@gmail.com> wrote:
>>> From: Yong Li <sdliyong@gmail.com>
>>>
>>> Signed-off-by: Yong Li <sdliyong@gmail.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);
>>
>> 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
>>>
>>
>> Kind regards
>> Uffe
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
--
Best Regards
Shawn Lin
next prev parent reply other threads:[~2015-08-26 7:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 7:30 [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 sdliyong
2015-08-14 8:13 ` Shawn Lin
2015-08-15 12:14 ` LIYONG
2015-08-17 6:48 ` Shawn Lin
2015-08-25 12:06 ` Ulf Hansson
2015-08-26 6:15 ` LIYONG
2015-08-26 7:20 ` Shawn Lin [this message]
2015-08-26 12:38 ` LIYONG
2015-08-27 13:22 ` Ulf Hansson
2015-08-28 0:38 ` LIYONG
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55DD68AB.30006@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=chris@printf.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=sdliyong@gmail.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).