linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fang Hongjie(方洪杰)" <hongjiefang@asrmicro.com>
To: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>
Cc: "adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"wsa+renesas@sang-engineering.com"
	<wsa+renesas@sang-engineering.com>,
	"bst@pengutronix.de" <bst@pengutronix.de>,
	"jinqian@google.com" <jinqian@google.com>,
	"chanho.min@lge.com" <chanho.min@lge.com>,
	"kyle.roeschley@ni.com" <kyle.roeschley@ni.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V2] mmc: core: improve reasonableness of bus width setting for HS400es
Date: Mon, 16 Jul 2018 08:23:59 +0000	[thread overview]
Message-ID: <ec4d793a90ed43af998c89b86b024e10@mail2012.asrmicro.com> (raw)
In-Reply-To: <1531278049-22213-1-git-send-email-hongjiefang@asrmicro.com>


> mmc_select_hs400es() calls mmc_select_bus_width() which will continue
> to set 4bit transfer mode if fail to set 8bit mode. The bus width
> should not be set to 4bit in HS400es.
> 
> When fail to set 8bit mode, need return error directly for HS400es.
> 
> Signed-off-by: Hongjie Fang <hongjiefang@asrmicro.com>
> ---
>  drivers/mmc/core/mmc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 4466f5d..4bd6c09 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1021,8 +1021,11 @@ static int mmc_select_bus_width(struct mmc_card *card)
>  				 EXT_CSD_BUS_WIDTH,
>  				 ext_csd_bits[idx],
>  				 card->ext_csd.generic_cmd6_time);
> -		if (err)
> +		if (err) {
> +			if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES)
> +				return err;
>  			continue;
> +		}
> 
>  		bus_width = bus_widths[idx];
>  		mmc_set_bus_width(host, bus_width);
> --
> 1.9.1

Ping.
Any suggestion for this patch ?


B&R
Hongjie

  reply	other threads:[~2018-07-16  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  3:00 [PATCH V2] mmc: core: improve reasonableness of bus width setting for HS400es Hongjie Fang
2018-07-16  8:23 ` Fang Hongjie(方洪杰) [this message]
2018-07-16 10:11 ` Ulf Hansson
2018-07-16 11:01   ` Fang Hongjie(方洪杰)

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=ec4d793a90ed43af998c89b86b024e10@mail2012.asrmicro.com \
    --to=hongjiefang@asrmicro.com \
    --cc=adrian.hunter@intel.com \
    --cc=bst@pengutronix.de \
    --cc=chanho.min@lge.com \
    --cc=jinqian@google.com \
    --cc=kyle.roeschley@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).