All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Paul Fertser <fercerpav@gmail.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Chaotian Jing" <chaotian.jing@mediatek.com>,
	"Shawn Lin" <shawn.lin@rock-chips.com>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Subject: Re: [PATCH 3/3] mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
Date: Tue, 23 Feb 2021 10:23:28 +0100	[thread overview]
Message-ID: <CAPDyKFpXceh0qWZMxnOnLmrnwyt==qWWaxHCYzb6UxGRcvgksA@mail.gmail.com> (raw)
In-Reply-To: <20210222201245.GW2059@home.paul.comp>

On Mon, 22 Feb 2021 at 21:12, Paul Fertser <fercerpav@gmail.com> wrote:
>
> On Mon, Feb 22, 2021 at 07:24:06PM +0300, Paul Fertser wrote:
> > On Wed, Jan 22, 2020 at 03:27:47PM +0100, Ulf Hansson wrote:
> > > All callers of __mmc_switch() should now be specifying a valid timeout for
> > > the CMD6 command.
> >
> > I'm running a kernel based on linux-next on a Tegra2 system (Toshiba
> > ac100 aka paz00, on-board eMMC) and seeing plenty of these warnings on
> > boot. I added WARN_ON_ONCE to see the backtrace and here's what I get:
> ...
> > [    3.338454] [<c063d8a4>] (mmc_switch) from [<c0648f48>] (mmc_blk_mq_issue_rq+0x22c/0x900)
> > [    3.396728] [<c0648f48>] (mmc_blk_mq_issue_rq) from [<c064998c>] (mmc_mq_queue_rq+0x124/0x258)
> > [    3.409215] [<c064998c>] (mmc_mq_queue_rq) from [<c039a9e8>] (__blk_mq_try_issue_directly+0x140/0x1cc)
>
> FWIW, with
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index f5dedb7f9b27..9adf735391fa 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -426,8 +426,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
>                 /* EXT_CSD value is in units of 10ms, but we store in ms */
>                 card->ext_csd.part_time = 10 * ext_csd[EXT_CSD_PART_SWITCH_TIME];
>                 /* Some eMMC set the value too low so set a minimum */
> -               if (card->ext_csd.part_time &&
> -                   card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
> +               if (card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
>                         card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
>
>                 /* Sleep / awake timeout in 100ns units */
>
> I do not see any more warnings on my system.

That looks like the correct fix to the problem. Do you want to send a
proper patch that I can pick up or do you prefer if help to do it?

Seems like we should add the following fixes tag as well.
Fixes: 1c447116d017 ("mmc: mmc: Fix partition switch timeout for some eMMCs")

Kind regards
Uffe

  reply	other threads:[~2021-02-23  9:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 14:27 [PATCH 0/3] mmc: core: Update timeouts for __mmc_switch() Ulf Hansson
2020-01-22 14:27 ` [PATCH 1/3] mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC Ulf Hansson
2020-01-22 14:27 ` [PATCH 2/3] mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD Ulf Hansson
2020-01-22 14:27 ` [PATCH 3/3] mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch() Ulf Hansson
2021-02-22 16:24   ` Paul Fertser
2021-02-22 20:12     ` Paul Fertser
2021-02-23  9:23       ` Ulf Hansson [this message]
2021-02-23  9:32         ` Paul Fertser
2021-02-23 10:44           ` Ulf Hansson
2021-02-23 11:01           ` Adrian Hunter
2021-02-23 11:19             ` Paul Fertser
2021-02-23 11:54               ` Ulf Hansson
2021-02-23 13:42                 ` Adrian Hunter
2021-02-24 11:09                   ` Ulf Hansson
2021-03-03  9:26                     ` [PATCH] mmc: mmc: Fix partition switch time Adrian Hunter
2021-03-04 13:50                       ` Ulf Hansson
2020-01-24 11:25 ` [PATCH 0/3] mmc: core: Update timeouts for __mmc_switch() Ulf Hansson

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='CAPDyKFpXceh0qWZMxnOnLmrnwyt==qWWaxHCYzb6UxGRcvgksA@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=fercerpav@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=shawn.lin@rock-chips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.