mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Naveen Kumar Parna <naveenkumar.parna@gmail.com>
To: ulf.hansson@linaro.org, adrian.hunter@intel.com, chris@printf.net
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Naveen Kumar Parna <naveenkumar.parna@gmail.com>
Subject: [PATCH] mmc: core: Fix bug on signal voltage switch failure
Date: Thu, 31 Mar 2016 19:47:11 +0530	[thread overview]
Message-ID: <1459433831-4162-1-git-send-email-naveenkumar.parna@gmail.com> (raw)

When switching SD and SDIO cards from 3.3V to 1.8V signal level fails, a bug in sdhci_set_power() will trigger.
To fix the kernel crash during recovery from signal voltage switch failure, OCR should be reset to avail voltage mask before power-cycle the card.

Signed-off-by: Naveen Kumar Parna <naveenkumar.parna@gmail.com>
---
 drivers/mmc/core/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f26a5f1..e7eb427 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1477,6 +1477,8 @@ power_cycle:
 	if (err) {
 		pr_debug("%s: Signal voltage switch failed, "
 			"power cycling card\n", mmc_hostname(host));
+		/* Reset OCR mask */
+		ocr =  host->ocr_avail;
 		mmc_power_cycle(host, ocr);
 	}
 
-- 
1.9.1

             reply	other threads:[~2016-03-31 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 14:17 Naveen Kumar Parna [this message]
2016-04-01  7:29 ` Adrian Hunter
2016-04-01  8:45   ` Naveen Kumar P

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=1459433831-4162-1-git-send-email-naveenkumar.parna@gmail.com \
    --to=naveenkumar.parna@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=chris@printf.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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

all inboxes | Powered by JetHome®