[sdmmc] Change internal read/write retries

This can fix busy errors when writing to sd cards.
Additionally it now returns properly on success
This commit is contained in:
Kostas Missos
2018-05-29 02:28:07 +03:00
committed by nwert
parent 746a557deb
commit 7a771f4855
2 changed files with 18 additions and 6 deletions

View File

@@ -850,8 +850,8 @@ int dump_emmc_part(char *sd_path, sdmmc_storage_t *storage, emmc_part_t *part)
EPRINTFARGS("Error reading %d blocks @ LBA %08X from eMMC (try %d), retrying...",
num, lba_curr, ++retryCount);
sleep(500000);
if (retryCount >= 10)
sleep(150000);
if (retryCount >= 3)
{
EPRINTFARGS("\nFailed to read %d blocks @ LBA %08X from eMMC. Aborting..\n",
num, lba_curr);