This is an automated email from Gerrit.

Paul Fertser (fercer...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2697

-- gerrit

commit 2376a6abdadd139183aaf4180df293b60a6940fe
Author: Paul Fertser <fercer...@gmail.com>
Date:   Mon Apr 6 16:04:05 2015 +0300

    jtag/adi_v5_jtag: fix infinite recursion in jtagdp_transaction_endcheck()
    
    Calling ahbap_debugport_init() is wrong here because the actions
    performed by it might lead to jtagdp_transaction_endcheck errors thus
    leading to infinite recursion.
    
    The removed code is not needed now because target polling should lead
    to reexamination automatically, and both cortex_a and cortex_m call
    ahbap_debugport_init() as part of their target examine handler.
    
    This was reported as a real life issue on IRC by Weaselweb with
    Cortex-A target. Quitte reports similar results in some circumstances
    (adapter_khz too high) with LPC17xx.
    
    Change-Id: I7148022f76a1272b5262d251f2e807ffb1543547
    Signed-off-by: Paul Fertser <fercer...@gmail.com>

diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c
index 1100b17..c1e1286 100644
--- a/src/target/adi_v5_jtag.c
+++ b/src/target/adi_v5_jtag.c
@@ -271,9 +271,8 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap 
*dap)
                LOG_DEBUG("jtag-dp: CTRL/STAT error, 0x%" PRIx32, ctrlstat);
                /* Check power to debug regions */
                if ((ctrlstat & 0xf0000000) != 0xf0000000) {
-                       retval = ahbap_debugport_init(dap);
-                       if (retval != ERROR_OK)
-                               return retval;
+                       LOG_ERROR("Debug regions are unpowered, an unexpected 
reset might have happened");
+                       return ERROR_JTAG_DEVICE_ERROR;
                } else {
                        uint32_t mem_ap_csw, mem_ap_tar;
 

-- 

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to