Skip to content
Commit cdf0d578 authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti Committed by Vijay Viswanath
Browse files

mmc: core: Ignore bus resume flags when card removal event is detected



Ignore bus resume flags in the resume path if there is an outstanding card
removal event.

With deferred resume feature enabled, we don't check for card presence
(i.e., mmc_detect_change) in the resume path. This is to improve the resume
latency. If at all card is removed during suspend state, in some cases we
may not detect the card removal immediately but only when a request was
issued to it.

In some scenarios, card removal in suspend state leading to card suspend to
fail (since the card is removed) and which is causing system suspend to
fail. And we don't try to resume card because of deferred resume it
leading to system suspend to fail continuously.

To fix this scenario, ignore the bus resume flag in the resume path only if
there an outstanding card removal event. By doing so, we are ensuring that
the driver would check for card presence (mmc_detect_change) in the resume
path (mmc_pm_notify) and it will mark the card as removed if it finds the
card is no more present.

Change-Id: I7d075c2a5c2aaba1ff92f4072fdd2541bb98aa95
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent a134670c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment