public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: 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: [RFC PATCH] mmc: disable retuning when tuning
Date: Wed, 23 Jun 2021 18:01:38 +0200	[thread overview]
Message-ID: <YNNa4vgo2/ggVrIR@ninjato> (raw)
In-Reply-To: <0979048f-b477-c65e-0f53-8bef284ba3f4@intel.com>

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

Hi Adrian,

> mmc_retune_disable() is not meant for temporarily preventing re-tuning.
> It is meant for exiting a transfer mode that requires re-tuning.

Okay, I will add this as documentation.

> I would prefer something like below:
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index b039dcff17f8..f6d97bffc559 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -937,11 +937,14 @@ int mmc_execute_tuning(struct mmc_card *card)
>  
>  	err = host->ops->execute_tuning(host, opcode);
>  
> -	if (err)
> +	if (err) {
>  		pr_err("%s: tuning execution failed: %d\n",
>  			mmc_hostname(host), err);
> -	else
> +	} else {
>  		mmc_retune_enable(host);
> +		host->retune_now = 0;
> +		host->need_retune = 0;
> +	}
>  
>  	return err;
>  }
> 
> 
> Would that work?

I will check it and report back. Thanks for the input!

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-06-23 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  7:39 [RFC PATCH] mmc: disable retuning when tuning Wolfram Sang
2021-06-18 10:45 ` Ulf Hansson
2021-06-21  6:56   ` Adrian Hunter
2021-06-23 16:01     ` Wolfram Sang [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=YNNa4vgo2/ggVrIR@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=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