public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc/sdio: remember new card RCA when redetecting card
@ 2011-03-01 13:41 Linus Walleij
  2011-03-02 16:04 ` Linus Walleij
  2011-03-02 16:32 ` Chris Ball
  0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2011-03-01 13:41 UTC (permalink / raw)
  To: linux-mmc, Chris Ball; +Cc: Lee Jones, Stefan Nilsson XK, Linus Walleij

From: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>

During redetection of a SDIO card, a request for a new card RCA
was submitted to the card, but was then overwritten by the old RCA.
This caused the card to be deselected instead of selected when using
the incorrect RCA.

Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Reviewed-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-by: Pawel Wieczorkiewicz <pawel.wieczorkiewicz@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mmc/core/sdio.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 617e9ad..30d065d 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -395,6 +395,13 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
 		if (err)
 			goto remove;
 
+		/*
+		 * Update oldcard with the new RCA received from the
+		 * SDIO device.
+		 */
+		if (oldcard)
+			oldcard->rca = card->rca;
+
 		mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
 	}
 
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-03  3:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 13:41 [PATCH] mmc/sdio: remember new card RCA when redetecting card Linus Walleij
2011-03-02 16:04 ` Linus Walleij
2011-03-02 16:32 ` Chris Ball
2011-03-03  2:56   ` Nicolas Pitre
2011-03-03  3:15     ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox