From: Stefan Nilsson XK <stefan.xk.nils...@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.nils...@stericsson.com>
Reviewed-by: Ulf Hansson <ulf.hans...@stericsson.com>
Reviewed-by: Pawel Wieczorkiewicz <pawel.wieczorkiew...@stericsson.com>
Signed-off-by: Linus Walleij <linus.wall...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to