mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 12:40:53 +07:00
mmc: core: improve reasonableness of bus width setting for HS400es
mmc_select_hs400es() calls mmc_select_bus_width() which will continue to set 4bit transfer mode if fail to set 8bit mode. The bus width should not be set to 4bit in HS400es. When fail to set 8bit mode, need return error directly for HS400es. Signed-off-by: Hongjie Fang <hongjiefang@asrmicro.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
e401bfdadd
commit
7f38abf220
@ -1348,8 +1348,12 @@ static int mmc_select_hs400es(struct mmc_card *card)
|
||||
goto out_err;
|
||||
|
||||
err = mmc_select_bus_width(card);
|
||||
if (err < 0)
|
||||
if (err != MMC_BUS_WIDTH_8) {
|
||||
pr_err("%s: switch to 8bit bus width failed, err:%d\n",
|
||||
mmc_hostname(host), err);
|
||||
err = err < 0 ? err : -ENOTSUPP;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
/* Switch card to HS mode */
|
||||
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||
|
Loading…
Reference in New Issue
Block a user