Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, <linux-mmc@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Erick Shepherd <erick.shepherd@ni.com>, <stable@vger.kernel.org>,
	Jonathan Liu <net147@gmail.com>,
	"Salvatore Bonaccorso" <carnil@debian.org>
Subject: Re: [PATCH] Revert "mmc: sdhci: Disable SD card clock before changing parameters"
Date: Tue, 24 Jun 2025 14:29:48 +0300	[thread overview]
Message-ID: <a0343926-1495-4766-a7d2-108d40fe9ea1@intel.com> (raw)
In-Reply-To: <20250624110932.176925-1-ulf.hansson@linaro.org>

On 24/06/2025 14:09, Ulf Hansson wrote:
> It has turned out the trying to strictly conform to the SDHCI specification
> is causing problems. Let's revert and start over.
> 
> This reverts commit fb3bbc46c94f261b6156ee863c1b06c84cf157dc.
> 
> Cc: Erick Shepherd <erick.shepherd@ni.com>
> Cc: stable@vger.kernel.org
> Fixes: fb3bbc46c94f ("mmc: sdhci: Disable SD card clock before changing parameters")
> Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
> Reported-by: Jonathan Liu <net147@gmail.com>
> Reported-by: Salvatore Bonaccorso <carnil@debian.org>
> Closes: https://bugs.debian.org/1108065
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 4c6c2cc93c41..3a17821efa5c 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2065,15 +2065,10 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
>  
>  	host->mmc->actual_clock = 0;
>  
> -	clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> -	if (clk & SDHCI_CLOCK_CARD_EN)
> -		sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
> -			SDHCI_CLOCK_CONTROL);
> +	sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
>  
> -	if (clock == 0) {
> -		sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
> +	if (clock == 0)
>  		return;
> -	}
>  
>  	clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
>  	sdhci_enable_clk(host, clk);


  reply	other threads:[~2025-06-24 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 11:09 [PATCH] Revert "mmc: sdhci: Disable SD card clock before changing parameters" Ulf Hansson
2025-06-24 11:29 ` Adrian Hunter [this message]
2025-06-24 12:19   ` 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=a0343926-1495-4766-a7d2-108d40fe9ea1@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=carnil@debian.org \
    --cc=erick.shepherd@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=net147@gmail.com \
    --cc=stable@vger.kernel.org \
    --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