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

mmc: skip detection of nonremovable cards on rescan

mmc_rescan() checks whether registered cards are still present before
skipping them, by calling the bus-specific ->detect() handler.

With buses that support runtime PM, the card may be powered off at
this point, so they need to be powered on and fully reinitialized before
->detect() executes.

This whole process is redundant with nonremovable cards; in those cases,
we can safely skip calling ->detect() and implicitly assume its success.
Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
Reviewed-by: NChris Ball <cjb@laptop.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 8f230f45
...@@ -1506,8 +1506,12 @@ void mmc_rescan(struct work_struct *work) ...@@ -1506,8 +1506,12 @@ void mmc_rescan(struct work_struct *work)
mmc_bus_get(host); mmc_bus_get(host);
/* if there is a card registered, check whether it is still present */ /*
if ((host->bus_ops != NULL) && host->bus_ops->detect && !host->bus_dead) * if there is a _removable_ card registered, check whether it is
* still present
*/
if (host->bus_ops && host->bus_ops->detect && !host->bus_dead
&& mmc_card_is_removable(host))
host->bus_ops->detect(host); host->bus_ops->detect(host);
mmc_bus_put(host); mmc_bus_put(host);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册