提交 bad3baba 编写于 作者: O Ohad Ben-Cohen 提交者: Chris Ball

mmc: fix CONFIG_MMC_UNSAFE_RESUME regression

30201e7f ("mmc: skip detection of nonremovable cards on rescan")
allowed skipping detection of nonremovable cards on mmc_rescan().
The intention was to only skip detection of hardwired cards that
cannot be removed, so make sure this is indeed the case by directly
checking for (lack of) MMC_CAP_NONREMOVABLE, instead of using
mmc_card_is_removable(), which is overloaded with
CONFIG_MMC_UNSAFE_RESUME semantics.

The user-visible symptom of the bug this patch fixes is that no
"mmc: card XXXX removed" message appears in dmesg when a card is
removed and CONFIG_MMC_UNSAFE_RESUME=y.
Reported-and-tested-by: NDmitry Shmidt <dimitrysh@google.com>
Reported-and-tested-by: NMaxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 214d93b0
...@@ -1529,7 +1529,7 @@ void mmc_rescan(struct work_struct *work) ...@@ -1529,7 +1529,7 @@ void mmc_rescan(struct work_struct *work)
* still present * still present
*/ */
if (host->bus_ops && host->bus_ops->detect && !host->bus_dead if (host->bus_ops && host->bus_ops->detect && !host->bus_dead
&& mmc_card_is_removable(host)) && !(host->caps & MMC_CAP_NONREMOVABLE))
host->bus_ops->detect(host); host->bus_ops->detect(host);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册