FROMLIST: mmc: core: fall back host->f_init if failing to init mmc card after resume
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 16 Aug 2016 02:41:35 +0000 (10:41 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 18 Aug 2016 10:22:32 +0000 (18:22 +0800)
commit877c53f44e3366fc2d9ebabc1909d6edd35eaf88
treee2a6af0b2a0d3f84e6ba329dffb36dd6b5f90878
parent7883352078f2fc640d6aa2a33848bf2f6926a8ee
FROMLIST: mmc: core: fall back host->f_init if failing to init mmc card after resume

We observed the failure of initializing card after resume
accidentally. It's hard to reproduce but we did get report from
the suspend/resume test of our RK3399 mp test farm . Unfortunately,
we still fail to figure out what was going wrong at that time.
Also we can't achieve it by retrying the host->f_init without falling
back it. But this patch will solve the problem as we could add some log
there and see that we resume the mmc card successfully after falling
back the host->f_init. There is no obvious side effect found, so it seems
this patch will improve the stability.

[   93.405085] mmc1: unexpected status 0x800900 after switch
[   93.408474] mmc1: switch to bus width 1 failed
[   93.408482] mmc1: mmc_select_hs200 failed, error -110
[   93.408492] mmc1: error -110 during resume (card was removed?)
[   93.408705] PM: resume of devices complete after 213.453 msecs

Change-Id: I5b24cb84a223394392450a1f10d8bbacb9e1006e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/core/mmc.c