From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [RFC PATCH] mmc: only print retune error when we don't check for card removal
Date: Fri, 30 Jul 2021 16:02:24 +0200 [thread overview]
Message-ID: <YQQGcP8OzROec+pa@ninjato> (raw)
In-Reply-To: <20210630041658.7574-1-wsa+renesas@sang-engineering.com>
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
On Wed, Jun 30, 2021 at 06:16:58AM +0200, Wolfram Sang wrote:
> Skip printing a retune error when we scan for a removed card because we
> then expect a failed command.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> In my tests, detect_change was only set when a card was removed.
> Inserting a card or resuming from RPM would print an error. Did I
> overlook somethign or is this good to go?
So, what about this to remove the bogus 'retune failure' command?
I also think the code is a tad more readable this way.
>
> drivers/mmc/core/core.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index b039dcff17f8..b7e6e5640640 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -937,11 +937,13 @@ int mmc_execute_tuning(struct mmc_card *card)
>
> err = host->ops->execute_tuning(host, opcode);
>
> - if (err)
> + if (!err)
> + mmc_retune_enable(host);
> +
> + /* Only print error when we don't check for card removal */
> + if (err && !host->detect_change)
> pr_err("%s: tuning execution failed: %d\n",
> mmc_hostname(host), err);
> - else
> - mmc_retune_enable(host);
>
> return err;
> }
> --
> 2.30.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-07-30 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 4:16 [RFC PATCH] mmc: only print retune error when we don't check for card removal Wolfram Sang
2021-07-30 14:02 ` Wolfram Sang [this message]
2021-08-04 7:11 ` Adrian Hunter
2021-08-06 13:07 ` 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=YQQGcP8OzROec+pa@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=adrian.hunter@intel.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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 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).