openocd/src
Gabor Csapo f0d8c3b0e0 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>
2022-04-03 20:12:03 +00:00
..
flash flash/stm32l4x: fix auto-probe when RDP is promoted from 0 to 0.5 2022-03-19 09:13:55 +00:00
helper helper/bits: add BIT_ULL and GENMASK macros 2022-03-26 13:35:55 +00:00
jtag libusb_helper.h: Increase USB timeout 2022-04-03 20:12:03 +00:00
pld openocd: use single line for register_commands*() 2021-11-23 11:03:38 +00:00
rtos helper/bits: add BIT_ULL and GENMASK macros 2022-03-26 13:35:55 +00:00
rtt openocd: include config.h in every file .c 2022-03-26 13:32:57 +00:00
server gdb_server: Improve logging of GDB-remote packets 2022-04-03 20:11:08 +00:00
svf openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
target openocd: include config.h in every file .c 2022-03-26 13:32:57 +00:00
transport openocd: remove NULL comparisons with checkpatch [1/2] 2021-07-24 10:38:00 +01:00
xsvf openocd: fix simple cases of NULL comparison 2021-07-24 10:37:49 +01:00
hello.c openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
Makefile.am build: Fix out-of-tree with --disable-dependency-tracking configure flag 2021-04-05 23:24:14 +01:00
openocd.c log: fix memory leak when log to file is enabled 2022-01-22 10:15:48 +00:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00