summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-04-01 16:04:22 -0700
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-02 10:33:24 +0200
commit4e6c71788d6bb0e5438fc9211fa6e52dcca01474 (patch)
treeae5fce16a3076b11bd1803d67f1c61f48192dd1d /drivers/mmc/core/core.c
parent6aef2eecc4d4c9edb8c8d3e3a7f6af3cee42b2ec (diff)
downloadlinux-4e6c71788d6bb0e5438fc9211fa6e52dcca01474.tar.bz2
mmc: core: Do regular power cycle when lacking eMMC HW reset support
The eMMC HW reset may be implemented either via the host ops ->hw_reset() callback or through DT and the eMMC pwrseq. Additionally some eMMC cards don't support HW reset. To allow a reset to be done for the different combinations of mmc hosts and eMMC/MMC cards, let's implement a fallback via trying a regular power cycle. This improves the mmc block layer retry mechanism of failing I/O requests. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> [Ulf: Rewrote changelog] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f80b3ab3266a..99275e40bf2f 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2456,8 +2456,9 @@ int mmc_hw_reset(struct mmc_host *host)
ret = host->bus_ops->reset(host);
mmc_bus_put(host);
- if (ret != -EOPNOTSUPP)
- pr_warn("%s: tried to reset card\n", mmc_hostname(host));
+ if (ret)
+ pr_warn("%s: tried to reset card, got error %d\n",
+ mmc_hostname(host), ret);
return ret;
}