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>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [RFC PATCH] mmc: only print retune error when we don't check for card removal
Date: Wed, 30 Jun 2021 06:16:58 +0200 [thread overview]
Message-ID: <20210630041658.7574-1-wsa+renesas@sang-engineering.com> (raw)
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?
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
next reply other threads:[~2021-06-30 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 4:16 Wolfram Sang [this message]
2021-07-30 14:02 ` [RFC PATCH] mmc: only print retune error when we don't check for card removal Wolfram Sang
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=20210630041658.7574-1-wsa+renesas@sang-engineering.com \
--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).