Re: [PATCH] mmc: card: increase wait time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-11-15 18:13 GMT+09:00 Ulf Hansson <ulf.hansson@xxxxxxxxxx>:
>
> On 14 November 2017 at 03:48, Huijin Park <huijin.park@xxxxxxxxxxx> wrote:
> > Some eMMC products keep busy time a little longer intermittently.
> > (eg. prepare free blocks, garbage collection...)
> > In this case, we recommend to wait a little longer than fail.
>
> Is this an rpmb specific problem, because the code seems only to change that.
>
> Is it write and read or only write?
Yes. It's rpmb specific problem.
RPMB R/W use same flow. but only 'write' case makes the problem(long
busy state) sometimes.
When I test it, the 5~25ms is not enough although there is not max
busy time in the spec.

>
> >
> > Signed-off-by: Huijin Park <huijin.park@xxxxxxxxxxx>
> > ---
> >  drivers/mmc/core/block.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> > index ea80ff4..b5b0fe6 100644
> > --- a/drivers/mmc/core/block.c
> > +++ b/drivers/mmc/core/block.c
> > @@ -584,7 +584,7 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
> >                  * Ensure RPMB command has completed by polling CMD13
> >                  * "Send Status".
> >                  */
> > -               err = ioctl_rpmb_card_status_poll(card, &status, 5);
> > +               err = ioctl_rpmb_card_status_poll(card, &status, 50);
>
> First, you are changing "re-tries" not a timeout value, which would
> seem like a better approach.
I will modify it. Thanks.

>
> Second, it seems like we should remove the
> ioctl_rpmb_card_status_poll() function altogether and instead make use
> of the more generic card_busy_detect() function here.
>
> Then if card_busy_detect() needs to be adopted to suite rpmb, then we
> should do that instead.
I agree that. But the two function are different a little.
'ioctl_rpmb_card_status_poll()' has interval(1~5ms) that prevent to
poll too frequently.
So I suggest to improve 'card_busy_detect()' about interval time in
another patch.
Then the 'ioctl_rpmb_card_status_poll()' can replaced by 'card_busy_detect()'

>
> >                 if (err)
> >                         dev_err(mmc_dev(card->host),
> >                                         "%s: Card Status=0x%08X, error %d\n",
> > --
> > 1.9.1
> >
>
> Kind regards
> Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux