- Fix workaround for SD UHS-I voltage switch
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmMR0WEXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClw3RAAqcZcNdb3lIiYof5EYr4Z9I35
 Ki1hFoXeonv7fK9Wie+hdkjsJ25oHbZJJcU0Ui5l8UTM5wNrZrUzU+ARkzVnFhHO
 RQ4KHAJauckZxMLnM1UVWlnHOaUbB9LuWc372ZgJVfbAJnBhI29A//fdzCwXnc+q
 pQULAXZkV9yUIiVSV+Ny9LRKsoDAt1M53tWArp7BdQl8JkFM1QcBSp4cXSjaNVAW
 XwKEveOETvN6VyqaCXuTkZI4KV1WYkFtUwTpJWj6gDS3BiOdJKL/zpNtGw8aAgSc
 9docePew7yqWXmtp2WtjZ5H0JLNZHc5j2M88vHUntB3fJUYRE7xBwZjdOgvCR/9z
 r958JxX7mvzcE7G74KiSqpW9T3wJ5dZ7F6BjU80LKk1ABLGwNt6qtrm22Xj5xcP4
 emuwSQK4ou0VKfovqIyVE/a962UNeibl2VGYzx60Fx1t7wbRID+R7VJkSaihW0GY
 TVZB6fS7VsHDdiSjv2mCjrVY+0JpVTmT/Mb+Mnnri5Dwm6JdPCpekktuAtStTGCf
 3OBhV+4Seoqik1581TZPoMnIV7jkWHYoNvPbfN6Zh+PF+Tcd0HWxcuK7sJBFXUYE
 jB5+eujU4U2eAp2KNdPoYSzAEMID84hgIivnBLalcr41BrkQHHX1aQtZcQ9x0W1i
 UGFm5l140SOMFXO4YW8=
 =xnd1
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

 - Fix workaround for SD UHS-I voltage switch

* tag 'mmc-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: core: Fix inconsistent sd3_bus_mode at UHS-I SD voltage switch failure
  mmc: core: Fix UHS-I SD 1.8V workaround branch
This commit is contained in:
Linus Torvalds 2022-09-02 15:03:12 -07:00
Родитель 1e8e515edd 63f1560930
Коммит b307e70457
1 изменённых файлов: 18 добавлений и 28 удалений

Просмотреть файл

@ -949,14 +949,15 @@ int mmc_sd_setup_card(struct mmc_host *host, struct mmc_card *card,
/* Erase init depends on CSD and SSR */
mmc_init_erase(card);
}
/*
* Fetch switch information from card.
* Fetch switch information from card. Note, sd3_bus_mode can change if
* voltage switch outcome changes, so do this always.
*/
err = mmc_read_switch(card);
if (err)
return err;
}
/*
* For SPI, enable CRC as appropriate.
@ -1480,16 +1481,6 @@ retry:
if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_uhs(host) &&
mmc_sd_card_using_v18(card) &&
host->ios.signal_voltage != MMC_SIGNAL_VOLTAGE_180) {
/*
* Re-read switch information in case it has changed since
* oldcard was initialized.
*/
if (oldcard) {
err = mmc_read_switch(card);
if (err)
goto free_card;
}
if (mmc_sd_card_using_v18(card)) {
if (mmc_host_set_uhs_voltage(host) ||
mmc_sd_init_uhs_card(card)) {
v18_fixup_failed = true;
@ -1498,8 +1489,7 @@ retry:
mmc_remove_card(card);
goto retry;
}
goto done;
}
goto cont;
}
/* Initialization sequence for UHS-I cards */
@ -1534,7 +1524,7 @@ retry:
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
}
}
cont:
if (!oldcard) {
/* Read/parse the extension registers. */
err = sd_read_ext_regs(card);
@ -1566,7 +1556,7 @@ retry:
err = -EINVAL;
goto free_card;
}
done:
host->card = card;
return 0;