From f827a94c0f0e6ef22b5bc672c4092d354217b42a Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Wed, 11 May 2005 16:58:12 +0000 Subject: [PATCH] Make the retrier in case of rx timeouts more robust, by increasing the receive timeout once a timeout happened. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@458 81a1dc3b-b13d-400b-aceb-764788c761c2 --- jtagmkII.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jtagmkII.c b/jtagmkII.c index dca287a7..d3f8d357 100644 --- a/jtagmkII.c +++ b/jtagmkII.c @@ -1234,8 +1234,10 @@ static int jtagmkII_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, "%s: jtagmkII_paged_write(): " "timeout/error communicating with programmer (status %d)\n", progname, status); - if (tries++ < 3) + if (tries++ < 4) { + serial_recv_timeout *= 2; goto retry; + } fprintf(stderr, "%s: jtagmkII_paged_write(): fatal timeout/" "error communicating with programmer (status %d)\n", @@ -1326,8 +1328,10 @@ static int jtagmkII_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, "%s: jtagmkII_paged_load(): " "timeout/error communicating with programmer (status %d)\n", progname, status); - if (tries++ < 3) + if (tries++ < 4) { + serial_recv_timeout *= 2; goto retry; + } fprintf(stderr, "%s: jtagmkII_paged_load(): fatal timeout/" "error communicating with programmer (status %d)\n",