mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
mmc: Add debug() output on read errors
Allow read errors to be diagnosed more easily. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e7ecf7cb5a
commit
1169299135
1 changed files with 6 additions and 2 deletions
|
@ -250,14 +250,18 @@ static ulong mmc_bread(int dev_num, lbaint_t start, lbaint_t blkcnt, void *dst)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mmc_set_blocklen(mmc, mmc->read_bl_len))
|
if (mmc_set_blocklen(mmc, mmc->read_bl_len)) {
|
||||||
|
debug("%s: Failed to set blocklen\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
cur = (blocks_todo > mmc->cfg->b_max) ?
|
cur = (blocks_todo > mmc->cfg->b_max) ?
|
||||||
mmc->cfg->b_max : blocks_todo;
|
mmc->cfg->b_max : blocks_todo;
|
||||||
if(mmc_read_blocks(mmc, dst, start, cur) != cur)
|
if (mmc_read_blocks(mmc, dst, start, cur) != cur) {
|
||||||
|
debug("%s: Failed to read blocks\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
blocks_todo -= cur;
|
blocks_todo -= cur;
|
||||||
start += cur;
|
start += cur;
|
||||||
dst += cur * mmc->read_bl_len;
|
dst += cur * mmc->read_bl_len;
|
||||||
|
|
Loading…
Add table
Reference in a new issue