From: openocd-gerrit <ope...@us...> - 2024-02-18 18:42:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b6ee13720688a9860f3397bb89ea171b0fc5ccce (commit) from 9d5117a23e21fd0eba4662a7068e4e2ffb09b784 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b6ee13720688a9860f3397bb89ea171b0fc5ccce Author: Kirill Radkin <kir...@sy...> Date: Fri Jun 16 12:09:32 2023 +0300 driver: Add additional check for count of BYPASS devices At least one TAP shouldn't be in BYPASS mode Change-Id: Ic882acbfc9b6a9f4b0c3bb4741a49f3981503c8c Signed-off-by: Kirill Radkin <kir...@sy...> Reviewed-on: https://review.openocd.org/c/openocd/+/7741 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/driver.c b/src/jtag/drivers/driver.c index fae2aad22..e52816d3a 100644 --- a/src/jtag/drivers/driver.c +++ b/src/jtag/drivers/driver.c @@ -116,12 +116,21 @@ int interface_jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, /* count devices in bypass */ size_t bypass_devices = 0; + size_t all_devices = 0; for (struct jtag_tap *tap = jtag_tap_next_enabled(NULL); tap; tap = jtag_tap_next_enabled(tap)) { + all_devices++; + if (tap->bypass) bypass_devices++; } + if (all_devices == bypass_devices) { + LOG_ERROR("At least one TAP shouldn't be in BYPASS mode"); + + return ERROR_FAIL; + } + struct jtag_command *cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command *scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field *out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(struct scan_field)); ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) hooks/post-receive -- Main OpenOCD repository |