提交 0aab3995 编写于 作者: S Stefan Nilsson XK 提交者: Chris Ball

mmc: sdio: remember new card RCA when redetecting card

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.  This bug's been present since the "oldcard"
handling was introduced in 2.6.32.
Signed-off-by: NStefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Reviewed-by: NUlf Hansson <ulf.hansson@stericsson.com>
Reviewed-by: NPawel Wieczorkiewicz <pawel.wieczorkiewicz@stericsson.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Cc: <stable@kernel.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 ba6a902d
......@@ -395,6 +395,14 @@ 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 -- we're doing this so that it's updated in the
* "card" struct when oldcard overwrites that later.
*/
if (oldcard)
oldcard->rca = card->rca;
mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册