mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
mmc: fsl_esdhc_spl: Fix checking for number of read sectors
Commit0980cbba7b
("mmc: fsl_esdhc_spl: pre-PBL: implement redundancy support") changed number of sectors which are read but did not adjusted error check. Fix it and check for if correct number of sectors were read. Fixes:0980cbba7b
("mmc: fsl_esdhc_spl: pre-PBL: implement redundancy support") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
2d25f63cc0
commit
c1abf7659c
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ again:
|
|||
blk_off = (sector * 512) % mmc->read_bl_len;
|
||||
blk_cnt = DIV_ROUND_UP(512, mmc->read_bl_len);
|
||||
err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, tmp_buf);
|
||||
if (err != 1) {
|
||||
if (err != blk_cnt) {
|
||||
puts("spl: mmc read failed!!\n");
|
||||
hang();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue