Skip to content
Commit 8fee476b authored by Trey Ramsay's avatar Trey Ramsay Committed by Chris Ball
Browse files

mmc: core: Fix some driver hangs when dealing with broken devices



There are infinite loops in the mmc code that can be caused by bad
hardware.  The code will loop forever if the device never comes back
from program mode, R1_STATE_PRG, and it is not ready for data,
R1_READY_FOR_DATA.

A long timeout is added to prevent the code from looping forever.
The timeout will occur if the device never comes back from program
state or the device never becomes ready for data.

It's not clear whether the timeout will do more than log a pr_err()
and then start a fresh hang all over again.  We may need to extend
this patch later to perform some kind of reset of the device (is
that possible?) or rejection of new I/O to the device.

Signed-off-by: default avatarTrey Ramsay <tramsay@linux.vnet.ibm.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent e95baf13
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment