summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorDong Aisheng2013-10-18 13:48:45 +0200
committerChris Ball2013-10-21 21:58:06 +0200
commit114f2bf6a158cd84c1a7280cf6233904c8bce430 (patch)
tree63751ea2586da28c8906502e4210375cc2ee53a6 /drivers/mmc/host/sdhci.c
parentmmc: sdhci-esdhc-imx: fix reading cap_1 register value for mx6sl (diff)
downloadkernel-qcow2-linux-114f2bf6a158cd84c1a7280cf6233904c8bce430.tar.gz
kernel-qcow2-linux-114f2bf6a158cd84c1a7280cf6233904c8bce430.tar.xz
kernel-qcow2-linux-114f2bf6a158cd84c1a7280cf6233904c8bce430.zip
mmc: sdhci: report error once the maximum tuning loops exhausted or timeout
The original code missed to report an error when the maximum tuning loops exhausted or timeout, it will cause the upper layer to wrongly think the tuning process is passed. Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 66bce7a8e996..cbde17d97e9d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1989,6 +1989,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
if (!tuning_loop_counter || !timeout) {
ctrl &= ~SDHCI_CTRL_TUNED_CLK;
sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
+ err = -EIO;
} else {
if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) {
pr_info(DRIVER_NAME ": Tuning procedure"