mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
mmc: the ext_csd data may be used during init even if reading failed
The mmc_startup() function uses the ext_csd data even if reading it
from the mmc device failed. This bug was introduced in commit
bc897b1d4d
. We now bail out if
reading it fails, this should not be a problem as ext_csd was
introduced in MMC 4.0 and this code is conditional on MMC >= 4.0.
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
This commit is contained in:
parent
8a0cf49010
commit
9cf199ebcf
1 changed files with 3 additions and 1 deletions
|
@ -972,7 +972,9 @@ static int mmc_startup(struct mmc *mmc)
|
|||
if (!IS_SD(mmc) && (mmc->version >= MMC_VERSION_4)) {
|
||||
/* check ext_csd version and capacity */
|
||||
err = mmc_send_ext_csd(mmc, ext_csd);
|
||||
if (!err && (ext_csd[EXT_CSD_REV] >= 2)) {
|
||||
if (err)
|
||||
return err;
|
||||
if (ext_csd[EXT_CSD_REV] >= 2) {
|
||||
/*
|
||||
* According to the JEDEC Standard, the value of
|
||||
* ext_csd's capacity is valid if the value is more
|
||||
|
|
Loading…
Add table
Reference in a new issue