mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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: eb0d8f135b
("mmc: core: support HPI send command")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
0b47979068
commit
a0741ba40a
1 changed files with 3 additions and 1 deletions
|
@ -1782,10 +1782,12 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_warn("%s: Enabling HPI failed\n",
|
pr_warn("%s: Enabling HPI failed\n",
|
||||||
mmc_hostname(card->host));
|
mmc_hostname(card->host));
|
||||||
|
card->ext_csd.hpi_en = 0;
|
||||||
err = 0;
|
err = 0;
|
||||||
} else
|
} else {
|
||||||
card->ext_csd.hpi_en = 1;
|
card->ext_csd.hpi_en = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If cache size is higher than 0, this indicates
|
* If cache size is higher than 0, this indicates
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue