All of lore.kernel.org
 help / color / mirror / Atom feed
From: Venkatraman S <svenkatr@ti.com>
To: cjb@laptop.org
Cc: linux-mmc@vger.kernel.org, girish.shivananjappa@linaro.org,
	marvin24@gmx.de, Venkatraman S <svenkatr@ti.com>,
	Ulf Hansson <ulf.hansson@stericsson.com>,
	Subhash Jadavani <subhashj@codeaurora.org>,
	Saugata Das <saugata.das@linaro.org>
Subject: [PATCH] mmc: core: Revert "skip card initialization if power class selection fails"
Date: Mon, 2 Jul 2012 12:26:34 +0530	[thread overview]
Message-ID: <1341212194-24650-1-git-send-email-svenkatr@ti.com> (raw)

This reverts commit 3d93576e(skip card initialization if
power class selection fails).
Problem has been reported when this is used with eMMC4.41
card with Tegra Platform. Till the issue is root caused,
bus width selection failure should not be treated as fatal.

Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-Off-by: Venkatraman S <svenkatr@ti.com>
CC: Ulf Hansson <ulf.hansson@stericsson.com>
CC: Subhash Jadavani <subhashj@codeaurora.org>
CC: Saugata Das <saugata.das@linaro.org>
---
 drivers/mmc/core/mmc.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 258b203..4f4489a 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -717,10 +717,6 @@ static int mmc_select_powerclass(struct mmc_card *card,
 				 card->ext_csd.generic_cmd6_time);
 	}
 
-	if (err)
-		pr_err("%s: power class selection for ext_csd_bus_width %d"
-		       " failed\n", mmc_hostname(card->host), bus_width);
-
 	return err;
 }
 
@@ -1104,7 +1100,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 				EXT_CSD_BUS_WIDTH_8 : EXT_CSD_BUS_WIDTH_4;
 		err = mmc_select_powerclass(card, ext_csd_bits, ext_csd);
 		if (err)
-			goto err;
+			pr_warning("%s: power class selection to bus width %d"
+				   " failed\n", mmc_hostname(card->host),
+				   1 << bus_width);
 	}
 
 	/*
@@ -1136,7 +1134,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 			err = mmc_select_powerclass(card, ext_csd_bits[idx][0],
 						    ext_csd);
 			if (err)
-				goto err;
+				pr_warning("%s: power class selection to "
+					   "bus width %d failed\n",
+					   mmc_hostname(card->host),
+					   1 << bus_width);
 
 			err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
 					 EXT_CSD_BUS_WIDTH,
@@ -1164,7 +1165,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 			err = mmc_select_powerclass(card, ext_csd_bits[idx][1],
 						    ext_csd);
 			if (err)
-				goto err;
+				pr_warning("%s: power class selection to "
+					   "bus width %d ddr %d failed\n",
+					   mmc_hostname(card->host),
+					   1 << bus_width, ddr);
 
 			err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
 					 EXT_CSD_BUS_WIDTH,
-- 
1.7.11.1.25.g0e18bef


             reply	other threads:[~2012-07-02  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02  6:56 Venkatraman S [this message]
2012-07-02  8:43 ` [PATCH] mmc: core: Revert "skip card initialization if power class selection fails" Saugata Das
2012-07-02  8:53   ` Girish K S
2012-07-02  8:58     ` Girish K S
2012-07-02 11:20       ` Re: [PATCH] mmc: core: Revert "skip card initialization if powerclass " Marc Dietrich
2012-07-03  3:55         ` Girish K S
2012-07-03 20:19           ` [PATCH] mmc: core: Revert "skip card initialization ifpowerclass " Marc Dietrich
2012-07-02 11:17   ` [PATCH] mmc: core: Revert "skip card initialization if powerclass " Marc Dietrich
2012-07-02 13:44     ` Saugata Das

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=1341212194-24650-1-git-send-email-svenkatr@ti.com \
    --to=svenkatr@ti.com \
    --cc=cjb@laptop.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=marvin24@gmx.de \
    --cc=saugata.das@linaro.org \
    --cc=subhashj@codeaurora.org \
    --cc=ulf.hansson@stericsson.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.