Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1213004 > unrolled thread
| Started by | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| First post | 2015-08-25 14:10 +0200 |
| Last post | 2015-08-28 02:40 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 Ulf Hansson <ulf.hansson@linaro.org> - 2015-08-25 14:10 +0200
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 LIYONG <sdliyong@gmail.com> - 2015-08-26 08:20 +0200
Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-26 09:30 +0200
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 LIYONG <sdliyong@gmail.com> - 2015-08-26 14:40 +0200
Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 Ulf Hansson <ulf.hansson@linaro.org> - 2015-08-27 15:30 +0200
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 LIYONG <sdliyong@gmail.com> - 2015-08-28 02:40 +0200
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-08-25 14:10 +0200 |
| Subject | Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23 |
| Message-ID | <q1ld8-60p-13@gated-at.bofh.it> |
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-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/
[toc] | [next] | [standalone]
| From | LIYONG <sdliyong@gmail.com> |
|---|---|
| Date | 2015-08-26 08:20 +0200 |
| Message-ID | <q1CdY-5RD-23@gated-at.bofh.it> |
| In reply to | #1213004 |
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
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-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/
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-26 09:30 +0200 |
| Message-ID | <q1DjI-7nv-21@gated-at.bofh.it> |
| In reply to | #1213576 |
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
--
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/
[toc] | [prev] | [next] | [standalone]
| From | LIYONG <sdliyong@gmail.com> |
|---|---|
| Date | 2015-08-26 14:40 +0200 |
| Message-ID | <q1I9J-5OH-49@gated-at.bofh.it> |
| In reply to | #1213609 |
Thanks Shawn. I got your point. You mean we can remove the || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) at line 1468.
But considering this case: The do_rel_wr = false and the card does support CMD23.
do_rel_wr = false;
!(card->quirks & MMC_QUIRK_BLK_NO_CMD23) = true;
At line 1468, do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) should be true;
If re remove the || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23), it will be false
It seems that we cannot modify the line 1468?
Thanks,
Yong Li
----------------------------------------
> Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
> To: sdliyong@gmail.com; ulf.hansson@linaro.org
> CC: shawn.lin@rock-chips.com; chris@printf.net; linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org
> From: shawn.lin@rock-chips.com
> Date: Wed, 26 Aug 2015 15:20:11 +0800
>
> 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
>
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-08-27 15:30 +0200 |
| Message-ID | <q25pD-5Hl-9@gated-at.bofh.it> |
| In reply to | #1213004 |
On 25 August 2015 at 14:06, Ulf Hansson <ulf.hansson@linaro.org> wrote: > 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 >> > 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/
[toc] | [prev] | [next] | [standalone]
| From | LIYONG <sdliyong@gmail.com> |
|---|---|
| Date | 2015-08-28 02:40 +0200 |
| Message-ID | <q2fS2-3R7-13@gated-at.bofh.it> |
| In reply to | #1214572 |
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 <ulf.hansson@linaro.org> wrote: >> 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 >>> >> > > 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web