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 <mlichvar@redhat.com>
master
Miroslav Lichvar 2013-09-19 13:15:39 +02:00 committed by Richard Cochran
parent bf659ae09d
commit b366b79306
1 changed files with 1 additions and 0 deletions

1
port.c
View File

@ -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)) {