Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] mmc: sdhci: return generic tuning failures
Date: Fri, 3 Jul 2026 18:22:35 +0300	[thread overview]
Message-ID: <b398eeef-1141-4b66-b1a6-01bc6078ed5c@intel.com> (raw)
In-Reply-To: <20260623140206.73221-1-pengpeng@iscas.ac.cn>

On 23/06/2026 17:02, Pengpeng Hou wrote:
> __sdhci_execute_tuning() returns tuning errors such as -ETIMEDOUT and
> -EAGAIN. The generic sdhci_execute_tuning() path stores that value in
> host->tuning_err, but keeps its public return variable at zero, so
> callers see success even when generic tuning failed.

Callers that need to, check tuning_err

> 
> Return the generic tuning result while still preserving
> host->tuning_err. This is intended as an RFC patch because some users
> may rely on the historical fixed-clock fallback behavior.
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>  drivers/mmc/host/sdhci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index e3bf901b1..a90e48383 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2967,7 +2967,8 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
>  
>  	sdhci_start_tuning(host);
>  
> -	host->tuning_err = __sdhci_execute_tuning(host, opcode);
> +	err = __sdhci_execute_tuning(host, opcode);
> +	host->tuning_err = err;

No, the code is meant to be the way it is.

>  
>  	sdhci_end_tuning(host);
>  out:


      reply	other threads:[~2026-07-03 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 14:02 [RFC PATCH] mmc: sdhci: return generic tuning failures Pengpeng Hou
2026-07-03 15:22 ` Adrian Hunter [this message]

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=b398eeef-1141-4b66-b1a6-01bc6078ed5c@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --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