linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [RFC PATCH] mmc: only print retune error when we don't check for card removal
Date: Wed, 4 Aug 2021 10:11:22 +0300	[thread overview]
Message-ID: <610ab795-22b2-1efe-d3a9-2724ec44c8b6@intel.com> (raw)
In-Reply-To: <20210630041658.7574-1-wsa+renesas@sang-engineering.com>

On 30/06/21 7:16 am, Wolfram Sang wrote:
> Skip printing a retune error when we scan for a removed card because we
> then expect a failed command.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Seems OK to me, but needs re-base. Nevertheless:

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

> ---
> 
> In my tests, detect_change was only set when a card was removed.
> Inserting a card or resuming from RPM would print an error. Did I
> overlook somethign or is this good to go?
> 
>  drivers/mmc/core/core.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index b039dcff17f8..b7e6e5640640 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -937,11 +937,13 @@ int mmc_execute_tuning(struct mmc_card *card)
>  
>  	err = host->ops->execute_tuning(host, opcode);
>  
> -	if (err)
> +	if (!err)
> +		mmc_retune_enable(host);
> +
> +	/* Only print error when we don't check for card removal */
> +	if (err && !host->detect_change)
>  		pr_err("%s: tuning execution failed: %d\n",
>  			mmc_hostname(host), err);
> -	else
> -		mmc_retune_enable(host);
>  
>  	return err;
>  }
> 


  parent reply	other threads:[~2021-08-04  7:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30  4:16 Wolfram Sang
2021-07-30 14:02 ` Wolfram Sang
2021-08-04  7:11 ` Adrian Hunter [this message]
2021-08-06 13:07   ` 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=610ab795-22b2-1efe-d3a9-2724ec44c8b6@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    --subject='Re: [RFC PATCH] mmc: only print retune error when we don'\''t check for card removal' \
    /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

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).