diff mbox

[v2] mmc: mmc: correct the logic for setting HS400ES signal voltage

Message ID 1502189641-29092-1-git-send-email-haibo.chen@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bough Chen Aug. 8, 2017, 10:54 a.m. UTC
Change the default err value to -EINVAL, make sure the card only
has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage
setting when select hs400es mode.

Fixes: commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
Cc: <stable@vger.kernel.org>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shawn Lin Aug. 8, 2017, 10:51 a.m. UTC | #1
On 2017/8/8 18:54, Haibo Chen wrote:
> Change the default err value to -EINVAL, make sure the card only
> has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage
> setting when select hs400es mode.
> 

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>

> Fixes: commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>   drivers/mmc/core/mmc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 30a13f0..83d9468 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
>   static int mmc_select_hs400es(struct mmc_card *card)
>   {
>   	struct mmc_host *host = card->host;
> -	int err = 0;
> +	int err = -EINVAL;
>   	u8 val;
>   
>   	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Aug. 8, 2017, 11:34 a.m. UTC | #2
On 8 August 2017 at 12:54, Haibo Chen <haibo.chen@nxp.com> wrote:
> Change the default err value to -EINVAL, make sure the card only
> has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage
> setting when select hs400es mode.
>
> Fixes: commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Thanks, applied for fixes!

Kind regards
Uffe

> ---
>  drivers/mmc/core/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 30a13f0..83d9468 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
>  static int mmc_select_hs400es(struct mmc_card *card)
>  {
>         struct mmc_host *host = card->host;
> -       int err = 0;
> +       int err = -EINVAL;
>         u8 val;
>
>         if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 30a13f0..83d9468 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1289,7 +1289,7 @@  int mmc_hs400_to_hs200(struct mmc_card *card)
 static int mmc_select_hs400es(struct mmc_card *card)
 {
 	struct mmc_host *host = card->host;
-	int err = 0;
+	int err = -EINVAL;
 	u8 val;
 
 	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {