From b366b79306f0d5d8c7da0ae10acdca2b01cb54fe Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 19 Sep 2013 13:15:39 +0200 Subject: [PATCH] Reset delay timer when switching to P2P delay mechanism. When ptp4l was configured to use the auto delay mechanism and the first pdelay request was not received in the slave or uncalibrated state, it would not make any pdelay requests itself, because there was no delay timer running. Signed-off-by: Miroslav Lichvar --- port.c | 1 + 1 file changed, 1 insertion(+) diff --git a/port.c b/port.c index 43105d1..3fc262a 100644 --- a/port.c +++ b/port.c @@ -1561,6 +1561,7 @@ static int process_pdelay_req(struct port *p, struct ptp_message *m) if (p->delayMechanism == DM_AUTO) { pr_info("port %hu: peer detected, switch to P2P", portnum(p)); p->delayMechanism = DM_P2P; + port_set_delay_tmo(p); } if (p->peer_portid_valid) { if (!pid_eq(&p->peer_portid, &m->header.sourcePortIdentity)) {