mmc: core: fix issue with HPI polling timeout
Out of CPU time for the MMC context included into measured timeout. System under heavy load will easily exceed out_of_int_time (typically 20 ms), because the MMC context is not running and when it is back to running, timeout already elapsed. In this case real card status checked again and error reported for wrong card state only. Change-Id: I0da3bd2e7d41e4933ad3b1333d7135705a1eafec Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org> Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
This commit is contained in:
parent
03dbfc78cf
commit
aaa56f8a93
1 changed files with 7 additions and 2 deletions
|
@ -727,8 +727,13 @@ int mmc_interrupt_hpi(struct mmc_card *card)
|
|||
|
||||
if (!err && R1_CURRENT_STATE(status) == R1_STATE_TRAN)
|
||||
break;
|
||||
if (time_after(jiffies, prg_wait))
|
||||
err = -ETIMEDOUT;
|
||||
if (time_after(jiffies, prg_wait)) {
|
||||
err = mmc_send_status(card, &status);
|
||||
if (!err && R1_CURRENT_STATE(status) != R1_STATE_TRAN)
|
||||
err = -ETIMEDOUT;
|
||||
else
|
||||
break;
|
||||
}
|
||||
} while (!err);
|
||||
|
||||
out:
|
||||
|
|
Loading…
Add table
Reference in a new issue