diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 19ac4c482f..bdd7894231 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1380,6 +1380,18 @@ static int mmc_startup(struct mmc *mmc) unsigned int extw = ext_csd_bits[idx]; unsigned int caps = ext_to_hostcaps[extw]; + /* + * If the bus width is still not changed, + * don't try to set the default again. + * Otherwise, recover from switch attempts + * by switching to 1-bit bus width. + */ + if (extw == EXT_CSD_BUS_WIDTH_1 && + mmc->bus_width == 1) { + err = 0; + break; + } + /* * Check to make sure the card and controller support * these capabilities