Hi, Sorry for the delay. On 14 November 2016 at 11:33, Gao Pan <pandy.gao@xxxxxxx> wrote: > In sd_set_bus_speed_mode(), sd card speed is switched to sd_bus_speed. > However, the switch process may fail. When it happens, sd card is in > default speed mode, which is SDR12 as described in Spec3.0. > > In such case, the sd_bus_speed should be updated according to status[16]. I don't think it's needed. The card->sd_bus_speed is not reflecting the current set speed mode. Instead it's reflecting what the highest speed mode the host and the card together can agree upon. Kind regards Uffe > > Signed-off-by: Gao Pan <pandy.gao@xxxxxxx> > Reviewed-by: Fugang Duan <B38611@xxxxxxxxxxxxx> > --- > drivers/mmc/core/sd.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c > index 73c762a..ac456ec 100644 > --- a/drivers/mmc/core/sd.c > +++ b/drivers/mmc/core/sd.c > @@ -471,9 +471,11 @@ static int sd_set_bus_speed_mode(struct mmc_card *card, u8 *status) > if (err) > return err; > > - if ((status[16] & 0xF) != card->sd_bus_speed) > + if ((status[16] & 0xF) != card->sd_bus_speed) { > + card->sd_bus_speed = status[16] & 0xF; > pr_warn("%s: Problem setting bus speed mode!\n", > mmc_hostname(card->host)); > + } > else { > mmc_set_timing(card->host, timing); > mmc_set_clock(card->host, card->sw_caps.uhs_max_dtr); > -- > 1.9.1 > -- 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