From 2d8a785bc7a67ec869f8c1c5e8984f62047f94eb Mon Sep 17 00:00:00 2001 From: Mihail Zenkov Date: Fri, 26 Feb 2016 16:01:53 +0000 Subject: [PATCH] sd-as3525v2: Limit number of retry With current setting we spend few minutes for reading one sector if we have data timeout error. With new setting system (linux) show error after ~10 seconds. Change-Id: Id3922acb2ea146c6ea2f89f26206df9488e6ee4e --- firmware/target/arm/as3525/sd-as3525v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index b4ac40152b..84a2a0db6a 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -777,7 +777,7 @@ static int sd_transfer_sectors(IF_MD(int drive,) unsigned long start, bool aligned = !((uintptr_t)buf & (CACHEALIGN_SIZE - 1)); int const retry_all_max = 1; int retry_all = 0; - int const retry_data_max = 100; /* Generous, methinks */ + int const retry_data_max = 3; int retry_data; unsigned int real_numblocks;