From 970d8577c8e329dbf4c59abbae73e6577f798def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Mon, 22 Dec 2008 20:55:22 +0000 Subject: [PATCH] limit maximum number of bytes queued, equivalent for Bug 2456024 - FTD2XX fails with certain SVF file git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1413 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 4 ++++ jtag/src/tap/cable/usbblaster.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index c5914305..eb26a776 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,5 +1,9 @@ 2008-12-22 Arnim Laeuger + * src/tap/cable/usbblaster.c: + limit maximum number of bytes queued, equivalent for + Bug 2456024 - FTD2XX fails with certain SVF file + * src/tap/cable/ft2232.c: set cable frequency to real FT2232 frequency diff --git a/jtag/src/tap/cable/usbblaster.c b/jtag/src/tap/cable/usbblaster.c index ecda841c..ebea3bec 100644 --- a/jtag/src/tap/cable/usbblaster.c +++ b/jtag/src/tap/cable/usbblaster.c @@ -159,6 +159,16 @@ usbblaster_clock_schedule( cable_t *cable, int tms, int tdi, int n ) int chunkbytes = (m >> 3); if(chunkbytes > 63) chunkbytes = 63; + if (cx_cmd_space( cmd_root, FTDX_MAXSEND ) < chunkbytes+1) + { + /* no space left for next clocking command + transfer queued commands to device and read receive data + to internal buffer */ + cx_xfer( cmd_root, NULL, cable, COMPLETELY ); + cx_cmd_queue( cmd_root, 0 ); + } + + cx_cmd_push( cmd_root, (1<