diff options
author | mlu <mlu@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-25 00:58:49 +0000 |
---|---|---|
committer | mlu <mlu@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-25 00:58:49 +0000 |
commit | 773ebb6bba3334b6339d9df9c7f541adaabb82c0 (patch) | |
tree | a92e40de4a4a745c686e426e5c7854f12c00bbd1 /src | |
parent | 4b9f6fcdb7581abf81fc1eea2330e4b9079b5772 (diff) | |
download | openocd_libswd-773ebb6bba3334b6339d9df9c7f541adaabb82c0.tar.gz openocd_libswd-773ebb6bba3334b6339d9df9c7f541adaabb82c0.tar.bz2 openocd_libswd-773ebb6bba3334b6339d9df9c7f541adaabb82c0.tar.xz openocd_libswd-773ebb6bba3334b6339d9df9c7f541adaabb82c0.zip |
Fix ft2232 TX buffer overflow
git-svn-id: svn://svn.berlios.de/openocd/trunk@1527 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/ft2232.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index 9bcd1660..a9854653 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -1589,6 +1589,13 @@ static int ft2232_execute_queue() { if (ft2232_execute_command(cmd) != ERROR_OK) retval = ERROR_JTAG_QUEUE_FAILED; + /* Start reading input before FT2232 TX buffer fills up */ + if (ft2232_expect_read > 280) + { + if (ft2232_send_and_recv(first_unsent, cmd) != ERROR_OK) + retval = ERROR_JTAG_QUEUE_FAILED; + first_unsent = cmd; + } cmd = cmd->next; } |