From: Raul Rangel <rrangel@chromium.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Daniel Kurtz <djkurtz@chromium.org>,
hongjiefang <hongjiefang@asrmicro.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Shawn Lin <shawn.lin@rock-chips.com>,
Kyle Roeschley <kyle.roeschley@ni.com>,
Avri Altman <avri.altman@wdc.com>
Subject: Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset
Date: Wed, 19 Jun 2019 08:56:25 -0600 [thread overview]
Message-ID: <20190619145625.GA50985@google.com> (raw)
In-Reply-To: <fcdf6cc4-2729-abe2-85c8-b0d04901c5ae@intel.com>
On Tue, Jun 11, 2019 at 01:30:55PM +0300, Adrian Hunter wrote:
> Does the following work?
>
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 0cd5f2ce98df..f672171246b0 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -341,8 +341,19 @@ static void sdhci_init(struct sdhci_host *host, int soft)
>
> static void sdhci_reinit(struct sdhci_host *host)
> {
> + u32 cd = host->ier & (SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT);
> +
> sdhci_init(host, 0);
> sdhci_enable_card_detection(host);
> +
> + /*
> + * A change to the card detect bits indicates a change in present state,
> + * refer sdhci_set_card_detection(). A card detect interrupt might have
> + * been missed while the host controller was being reset, so trigger a
> + * rescan to check.
> + */
> + if (cd != (host->ier & (SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT)))
> + mmc_detect_change(host->mmc, msecs_to_jiffies(200));
> }
>
> static void __sdhci_led_activate(struct sdhci_host *host)
Your patch looks good. I tried it out and got over 57k insertion/removal
iterations. Do you want me to send out your patch, or do you want to do
it?
Just to recap, the patch you proposed + the AMD SDHCI specific patch fix
the problem.
Thanks!
next prev parent reply other threads:[~2019-06-19 14:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 17:54 [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset Raul E Rangel
2019-05-01 17:54 ` [RFC PATCH 2/2] mmc: sdhci: Quirk for AMD SDHC Device 0x7906 Raul E Rangel
2019-05-02 6:32 ` Adrian Hunter
2019-05-02 15:42 ` Raul Rangel
2019-05-12 17:04 ` S-k, Shyam-sundar
2019-05-13 6:44 ` Adrian Hunter
2019-05-28 7:41 ` Ulf Hansson
2019-06-03 20:34 ` Raul Rangel
2019-05-03 15:12 ` [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset Raul Rangel
2019-05-08 19:00 ` Raul Rangel
2019-05-28 7:38 ` Ulf Hansson
2019-06-07 16:05 ` Raul Rangel
2019-06-10 16:17 ` Ulf Hansson
2019-06-10 16:32 ` Raul Rangel
2019-06-11 10:30 ` Adrian Hunter
2019-06-19 14:56 ` Raul Rangel [this message]
2019-08-01 15:16 ` Raul Rangel
2019-08-02 4:58 ` Adrian Hunter
2019-08-05 16:49 ` Raul Rangel
2019-08-06 5:51 ` Adrian Hunter
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=20190619145625.GA50985@google.com \
--to=rrangel@chromium.org \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=djkurtz@chromium.org \
--cc=hongjiefang@asrmicro.com \
--cc=kyle.roeschley@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.org \
/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).