This is an automated email from Gerrit. "N S <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9241
-- gerrit commit eacf051116e40f1693255b66f99ef2564307be10 Author: N S <[email protected]> Date: Mon Nov 17 15:05:56 2025 -0800 jtag/drivers: Speed up OpenJTAG adapter by using async reads Improve performance of USB OpenJTAG adapters by requesting async USB read result before sending TAP commands to device. Allows device to immediately start sending results to host before all commands have been processed. Change-Id: Ic4ba83097b34eed92605d9edd6d8573548ee75fe Signed-off-by: N S <[email protected]> diff --git a/src/jtag/drivers/openjtag.c b/src/jtag/drivers/openjtag.c index 1817df1b01..3e9b242edc 100644 --- a/src/jtag/drivers/openjtag.c +++ b/src/jtag/drivers/openjtag.c @@ -569,7 +569,14 @@ static void openjtag_write_tap_buffer(void) } } - openjtag_start_buf_read(usb_rx_buf, rx_expected); + /* + * Here we should run write() followed by read(). To reduce the delay + * and improve the performance, we would like to put write and read in + * a single bulk transfer, but libftdi does not provide such feature. + * Queue the async read() in advance, so it will get the data as soon + * as the write() gets completed. + */ + openjtag_start_buf_read(usb_rx_buf, rx_expected); openjtag_buf_write(usb_tx_buf, usb_tx_buf_offs, &written); openjtag_buf_read(usb_rx_buf, rx_expected, &usb_rx_buf_len); --
