diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 1b34aeb81fec..9c9bd3c90637 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2596,6 +2596,12 @@ void mmc_rescan(struct work_struct *work) host->detect_change = 0; + /* If the card was removed the bus will be marked + * as dead - extend the wakelock so userspace + * can respond */ + if (host->bus_dead) + extend_wakelock = 1; + /* * Let mmc_bus_put() free the bus/bus_ops if we've found that * the card is no longer present.