aboutsummaryrefslogtreecommitdiff
path: root/src/helper/jep106.inc
diff options
context:
space:
mode:
authorGabor Csapo <gaborcsapo@google.com>2022-03-18 18:11:49 +0800
committerAntonio Borneo <borneo.antonio@gmail.com>2022-04-03 20:12:03 +0000
commitf0d8c3b0e024d045262ba50a516a3bd66bf22686 (patch)
tree6c1d9ef087a4d2c889a430c559bb980abbcd2363 /src/helper/jep106.inc
parent017d3ddafbfac459a799f7e60613312c61fa3195 (diff)
downloadriscv-openocd-f0d8c3b0e024d045262ba50a516a3bd66bf22686.zip
riscv-openocd-f0d8c3b0e024d045262ba50a516a3bd66bf22686.tar.gz
riscv-openocd-f0d8c3b0e024d045262ba50a516a3bd66bf22686.tar.bz2
libusb_helper.h: Increase USB timeout
When we debug a target that works as a USB device, halting the target causes the USB communication with the USB host to become unresponsive. The host will try to reconnect/reset/setup the unresponsive device during which communication with other devices on the same USB bus can get stalled for several seconds. If the JTAG adapter is on the same bus, we need to make sure openOCD will wait for packets at least as long as the host USB stack. Otherwise the USB stack might deliver a valid packet, but openOCD would ignore it due to the timeout. The xHCI spec uses 5 sec timeouts, so let's use that in openOCD with some margin. Use this value in all libusb calls. HID API might have a libusb backend and would probably be victim to the same bug, so it should use this timeout, too. Ticket: https://sourceforge.net/p/openocd/tickets/343/ Signed-off-by: Gabor Csapo <gaborcsapo@google.com> Change-Id: Ia3dc1356e676fe550f57a4c72f7a24ba296b6af2 Reviewed-on: https://review.openocd.org/c/openocd/+/6882 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/helper/jep106.inc')
0 files changed, 0 insertions, 0 deletions