This is an automated email from Gerrit. Conor O'Gorman ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1247
-- gerrit commit d819562eb50af7bdc70028922c62094d7606500e Author: Conor O'Gorman <[email protected]> Date: Fri Mar 15 17:45:56 2013 +0000 jlink: fix usb buffer handling At least on newer firmware, 4.62, I have had good success with this patch. Allow extra room for result byte and retrieve the correct extra result byte. The code appears to have had some capacity for this, but wasn't quite right. Change-Id: I6638cb76aebe7b98585eaf58cb0c9ff8a756375f Signed-off-by: Conor O'Gorman <[email protected]> diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index 33b15d2..24fa004 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -1542,7 +1542,7 @@ static int jlink_usb_message(struct jlink *jlink, int out_length, int in_length) return ERROR_JTAG_DEVICE_ERROR; } - result = jlink_usb_read(jlink, in_length); + result = jlink_usb_read(jlink, in_length+1); if ((result != in_length) && (result != (in_length + 1))) { LOG_ERROR("usb_bulk_read failed (requested=%d, result=%d)", in_length, result); @@ -1572,7 +1572,7 @@ static int jlink_usb_message(struct jlink *jlink, int out_length, int in_length) result2 = usb_emu_result_buffer[0]; } else { /* Save the result, then remove it from return value */ - result2 = usb_in_buffer[result--]; + result2 = usb_in_buffer[--result]; } if (result2) { -- ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
