From 4bbd40415d9566be2758e4d737df20f0887d2c75 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Tue, 21 Nov 2006 16:13:08 +0000 Subject: [PATCH] In jtagmkII_read_byte() and jtagmkII_write_byte(), return an error upon failure now that the upper layers won't fall back to the cmd() method anymore in that case. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@691 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ jtagmkII.c | 15 ++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed35b7cc..65e8046f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-11-21 Joerg Wunsch + + * jtagmkII.c: In jtagmkII_read_byte() and jtagmkII_write_byte(), + return an error upon failure now that the upper layers won't fall + back to the cmd() method anymore in that case. + 2006-11-21 Joerg Wunsch Implement debugWire programming support. diff --git a/jtagmkII.c b/jtagmkII.c index 7e6f38a1..f65552d1 100644 --- a/jtagmkII.c +++ b/jtagmkII.c @@ -1802,14 +1802,8 @@ static int jtagmkII_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, return 0; fail: - /* - * XXX should return an error status here, but that would cause - * the generic methods to retry the request using the SPI method, - * which is complete nonsense for JTAG. - */ - *value = 42; free(resp); - return 0; + return -1; } static int jtagmkII_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, @@ -1903,13 +1897,8 @@ static int jtagmkII_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, return 0; fail: - /* - * XXX should return an error status here, but that would cause - * the generic methods to retry the request using the SPI method, - * which is complete nonsense for JTAG. - */ free(resp); - return 0; + return -1; }