Message ID | 1501788520-26244-1-git-send-email-zjwu@marvell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 3 August 2017 at 21:28, Zhoujie Wu <zjwu@marvell.com> wrote: > One issue was found on a removable high speed sd card with > runtime pm enabled. > When SD card is unplugged, it keep printing "Switching to 3.3V > signalling voltage failed". > And found below sequence triggers the error. > > mmc_rescan > -> mmc_sd_detect > -> mmc_power_off -- mmc->ios.vdd is updated to 0. > -> mmc_claim_host > -> sdhci_runtime_resume_host > -> sdhci_start_signal_voltage_switch > -> mmc_regulator_set_vqmmc > -> mmc_ocrbitnum_to_vdd > > When mmc_ocrbitnum_to_vdd is called, the mmc->ios.vdd is 0, so it > always return -EINVAL. The signal switch will always fail and > print out warning. > Ignore restoring the I/O state when runtime resume if MMC_POWER_OFF. > > Signed-off-by: Zhoujie Wu <zjwu@marvell.com> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Thanks, applied for next! Kind regards Uffe > --- > This patch is the updated version for my previous patch > mmc: sdhci: ignore 3.3v voltage switch if ios.vdd is 0. > Suggested by Adrian, so added his name in signed-off-by as well. > > drivers/mmc/host/sdhci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 98700f9..c3f67f1 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -2934,7 +2934,8 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) > > sdhci_init(host, 0); > > - if (mmc->ios.power_mode != MMC_POWER_UNDEFINED) { > + if (mmc->ios.power_mode != MMC_POWER_UNDEFINED && > + mmc->ios.power_mode != MMC_POWER_OFF) { > /* Force clock and power re-program */ > host->pwr = 0; > host->clock = 0; > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 98700f9..c3f67f1 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2934,7 +2934,8 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) sdhci_init(host, 0); - if (mmc->ios.power_mode != MMC_POWER_UNDEFINED) { + if (mmc->ios.power_mode != MMC_POWER_UNDEFINED && + mmc->ios.power_mode != MMC_POWER_OFF) { /* Force clock and power re-program */ host->pwr = 0; host->clock = 0;