From: Vincent Cheng <vsch...@gmail.com>

In case of broken network there may be an absolute absence of delay packets.
In this scenario ptp4l log messages do not indicate anything is wrong because
the delay response timer is only activate for LOCKED servo state.

This patch expands the delay_response_timeout feature to be active in the 
UNLOCKED servo state.

Signed-off-by: Vincent Cheng <vsch...@gmail.com>
---
 port.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/port.c b/port.c
index 3453716..f2d7f57 100644
--- a/port.c
+++ b/port.c
@@ -2897,7 +2897,8 @@ static enum fsm_event bc_event(struct port *p, int 
fd_index)
                if (port_delay_request(p)) {
                        return EV_FAULT_DETECTED;
                }
-               if (p->delay_response_timeout && p->state == PS_SLAVE) {
+               if (p->delay_response_timeout && (p->state == PS_SLAVE ||
+                                                 p->state == PS_UNCALIBRATED)) 
{
                        p->delay_response_counter++;
                        if (p->delay_response_counter >= 
p->delay_response_timeout) {
                                p->delay_response_counter = 0;
-- 
2.34.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to