From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulrich Hecht <uli@fpond.eu>, Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc <linux-mmc@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH] mmc: disable tuning when checking card presence
Date: Sat, 26 Jun 2021 20:58:04 +0200 [thread overview]
Message-ID: <YNd4vIJjpaSmFD9t@ninjato> (raw)
In-Reply-To: <b5062770-ba5c-32d5-15f0-505a09bb4a2e@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
Hi Adrian, Ulf, everyone,
> With the code above, if the host controller knows the card has been
> removed, it can return -ENOMEDIUM from ->execute_tuning() to suppress
> the message.
On second thought, I like the idea with -ENOMEDIUM. Because tuning can
still fail for reasons other than a removed card and we want to see an
error message then.
So, I checked when/how to return -ENOMEDIUM for the SDHI driver but this
lead me to more questions. The few driver which return this error code
all follow a similar pattern:
xxx_request()
{
if (host->get_cd == 1)
submit_mrq
else
cmd->error = -ENOMEDIUM
mmc_request_done()
}
So, my first question would be if we can't apply this pattern in the
core before calling the .request callback? A lot of drivers are not
implementing this pattern although it seems useful. Is it required?
Recommended? Nice to have? However, I could imagine an answer for moving
it into the core is "no, that should be checked atomically"? E.g. sdhci
does it, but atmel-mci and s3cmci do not. If I just look at moving the
card detection call into the core, I don't really see the reason for
atomic. Am I missing something?
All the best,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-06-26 18:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 8:23 [PATCH] mmc: disable tuning when checking card presence Wolfram Sang
2021-06-18 10:34 ` Ulrich Hecht
2021-06-18 10:42 ` Ulf Hansson
2021-06-21 7:15 ` Adrian Hunter
2021-06-21 7:32 ` Ulrich Hecht
2021-06-21 7:54 ` Adrian Hunter
2021-06-21 8:11 ` Wolfram Sang
2021-06-21 8:26 ` Adrian Hunter
2021-06-26 18:58 ` Wolfram Sang [this message]
2021-06-29 14:16 ` Ulf Hansson
2021-06-29 16:01 ` Adrian Hunter
2021-06-30 4:08 ` Wolfram Sang
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=YNd4vIJjpaSmFD9t@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=ulf.hansson@linaro.org \
--cc=uli@fpond.eu \
--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