diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-12-10 17:52:36 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-12-17 08:56:54 +0100 |
commit | a0741ba40a009f97c019ae7541dc61c1fdf41efb (patch) | |
tree | bc43bd662995610cc77edad7a4b73903c2ac89b3 /drivers | |
parent | 0b479790684192ab7024ce6a621f93f6d0a64d92 (diff) | |
download | linux-stable-a0741ba40a009f97c019ae7541dc61c1fdf41efb.tar.gz linux-stable-a0741ba40a009f97c019ae7541dc61c1fdf41efb.tar.bz2 linux-stable-a0741ba40a009f97c019ae7541dc61c1fdf41efb.zip |
mmc: core: Reset HPI enabled state during re-init and in case of errors
During a re-initialization of the eMMC card, we may fail to re-enable HPI.
In these cases, that isn't properly reflected in the card->ext_csd.hpi_en
bit, as it keeps being set. This may cause following attempts to use HPI,
even if's not enabled. Let's fix this!
Fixes: eb0d8f135b67 ("mmc: core: support HPI send command")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/mmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index bc1bd2c25613..f0e8e39a7938 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1782,9 +1782,11 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, if (err) { pr_warn("%s: Enabling HPI failed\n", mmc_hostname(card->host)); + card->ext_csd.hpi_en = 0; err = 0; - } else + } else { card->ext_csd.hpi_en = 1; + } } /* |