From ab73c106674668e70336aea80573ff050c73edfe Mon Sep 17 00:00:00 2001 From: "H. Nikolaus Schaller" Date: Fri, 29 Jan 2016 18:48:48 +0100 Subject: [PATCH] omap_hsmmc: print and abort if mmc controller reports other error/status Signed-off-by: H. Nikolaus Schaller --- drivers/mmc/omap_hsmmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 5b6cd60faf9..b81b5b03a33 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -467,7 +467,6 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size) return TIMEOUT; } } while (mmc_stat == 0); - if ((mmc_stat & (IE_DTO | IE_DCRC | IE_DEB)) != 0) mmc_reset_controller_fsm(mmc_base, SYSCTL_SRD); @@ -495,6 +494,10 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size) &mmc_base->stat); break; } + if (mmc_stat & ~(IE_DTO | IE_DCRC | IE_DEB | ERRI_MASK | BRR_MASK | BWR_MASK | TC_MASK)) { + printf("%s: unhandled mmc_stat = %x\n", __func__, mmc_stat); + return 1; + } } return 0; } -- 2.47.2