drivers: call adapter_get_required_serial() in jtag_libusb_open()
Now that adapter serial is handled independently from the adapter drivers, move inside jtag_libusb_open() the call to adapter_get_required_serial(), so every adapter that uses libusb will automagically get USB serial support. Extend the documentation to list the adapters involved. Change-Id: I75b3482d38f8ed3418329f3106c5e8b689fd460b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6663 Tested-by: jenkins
This commit is contained in:
@@ -2085,7 +2085,7 @@ static int aice_usb_open(struct aice_port_param_s *param)
|
||||
const uint16_t pids[] = { param->pid, 0 };
|
||||
struct libusb_device_handle *devh;
|
||||
|
||||
if (jtag_libusb_open(vids, pids, NULL, &devh, NULL) != ERROR_OK)
|
||||
if (jtag_libusb_open(vids, pids, &devh, NULL) != ERROR_OK)
|
||||
return ERROR_FAIL;
|
||||
|
||||
/* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS
|
||||
@@ -2109,7 +2109,7 @@ static int aice_usb_open(struct aice_port_param_s *param)
|
||||
/* reopen jlink after usb_reset
|
||||
* on win32 this may take a second or two to re-enumerate */
|
||||
int retval;
|
||||
while ((retval = jtag_libusb_open(vids, pids, NULL, &devh, NULL)) != ERROR_OK) {
|
||||
while ((retval = jtag_libusb_open(vids, pids, &devh, NULL)) != ERROR_OK) {
|
||||
usleep(1000);
|
||||
timeout--;
|
||||
if (!timeout)
|
||||
|
||||
Reference in New Issue
Block a user