diff options
author | Peter Horn <peter.horn@bluewin.ch> | 2012-09-29 18:16:46 +0200 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2012-09-29 17:08:52 +0000 |
commit | 1ab99c3fe58bc7ecb74df7e4ef4b9de485671874 (patch) | |
tree | d2db50e48a2167d76bd1dd24bad101ef9fb2e20a /src/jtag/drivers | |
parent | 0b118583f70c0169d4aa3b3fc83393cb007c60cd (diff) | |
download | riscv-openocd-1ab99c3fe58bc7ecb74df7e4ef4b9de485671874.zip riscv-openocd-1ab99c3fe58bc7ecb74df7e4ef4b9de485671874.tar.gz riscv-openocd-1ab99c3fe58bc7ecb74df7e4ef4b9de485671874.tar.bz2 |
Fix: Error while reading from USB endpoint
This patch fixes the bug reported here:
http://sourceforge.net/mailarchive/message.php?msg_id=28350157
When using Rlink under Linux, openocd exits with:
"Error: Read of endpoint 2 returned -75, expected 17"
The return value of -75 translates into EOVERFLOW. The cause is a wrong output buffer size argument passed to dtc_run_download().
Change-Id: I5d056705181ab6a6d4355524df06a0ea9c605961
Signed-off-by: Peter Horn <peter.horn@bluewin.ch>
Reviewed-on: http://openocd.zylin.com/862
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'src/jtag/drivers')
-rw-r--r-- | src/jtag/drivers/rlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jtag/drivers/rlink.c b/src/jtag/drivers/rlink.c index c5c2701..8a8c8c1 100644 --- a/src/jtag/drivers/rlink.c +++ b/src/jtag/drivers/rlink.c @@ -642,7 +642,7 @@ static int dtc_queue_run(void) usb_err = dtc_run_download(pHDev, dtc_queue.cmd_buffer, dtc_queue.cmd_index, - reply_buffer, dtc_queue.reply_index + reply_buffer, sizeof(reply_buffer) ); if (usb_err < 0) { LOG_ERROR("dtc_run_download: %s", usb_strerror()); |