Hi, On Wed, Aug 22 2012, Shawn Guo wrote: > Since commit 30832ab (mmc: sdhci: Always pass clock request value zero > to set_clock host op) gets in, esdhc_set_clock starts hitting > "if (clock == 0)" where ESDHC_SYSTEM_CONTROL has been operated. This > causes SDHCI card-detection function being broken. Fix the regression > by moving "if (clock == 0)" above ESDHC_SYSTEM_CONTROL operation. > > Cc: <stable@xxxxxxxxxxxxxxx> > Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx> > --- > drivers/mmc/host/sdhci-esdhc.h | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h > index b97b2f5..d25f9ab 100644 > --- a/drivers/mmc/host/sdhci-esdhc.h > +++ b/drivers/mmc/host/sdhci-esdhc.h > @@ -48,14 +48,14 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock) > int div = 1; > u32 temp; > > + if (clock == 0) > + goto out; > + > temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); > temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN > | ESDHC_CLOCK_MASK); > sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); > > - if (clock == 0) > - goto out; > - > while (host->max_clk / pre_div / 16 > clock && pre_div < 256) > pre_div *= 2; Thanks, pushed to mmc-next for 3.6. (stable@ shouldn't be CC'd.) - Chris. -- Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/> One Laptop Per Child -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html