Clear all timers when changing port state.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
3481c99c70
commit
62afef45db
10
port.c
10
port.c
|
@ -628,26 +628,24 @@ void port_dispatch(struct port *p, enum fsm_event event)
|
||||||
pr_info("port %hu: %s to %s on %s", portnum(p),
|
pr_info("port %hu: %s to %s on %s", portnum(p),
|
||||||
ps_str[p->state], ps_str[next], ev_str[event]);
|
ps_str[p->state], ps_str[next], ev_str[event]);
|
||||||
|
|
||||||
|
port_clr_tmo(p->fda.fd[FD_ANNOUNCE_TIMER]);
|
||||||
|
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
|
||||||
|
port_clr_tmo(p->fda.fd[FD_QUALIFICATION_TIMER]);
|
||||||
|
|
||||||
switch (next) {
|
switch (next) {
|
||||||
case PS_INITIALIZING:
|
case PS_INITIALIZING:
|
||||||
case PS_FAULTY:
|
case PS_FAULTY:
|
||||||
case PS_DISABLED:
|
case PS_DISABLED:
|
||||||
port_clr_tmo(p->fda.fd[FD_ANNOUNCE_TIMER]);
|
|
||||||
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
|
|
||||||
break;
|
break;
|
||||||
case PS_LISTENING:
|
case PS_LISTENING:
|
||||||
port_set_announce_tmo(p);
|
port_set_announce_tmo(p);
|
||||||
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
|
|
||||||
break;
|
break;
|
||||||
case PS_PRE_MASTER:
|
case PS_PRE_MASTER:
|
||||||
case PS_MASTER:
|
case PS_MASTER:
|
||||||
case PS_GRAND_MASTER:
|
case PS_GRAND_MASTER:
|
||||||
port_clr_tmo(p->fda.fd[FD_ANNOUNCE_TIMER]);
|
|
||||||
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
|
|
||||||
break;
|
break;
|
||||||
case PS_PASSIVE:
|
case PS_PASSIVE:
|
||||||
port_set_announce_tmo(p);
|
port_set_announce_tmo(p);
|
||||||
port_clr_tmo(p->fda.fd[FD_DELAY_TIMER]);
|
|
||||||
break;
|
break;
|
||||||
case PS_UNCALIBRATED:
|
case PS_UNCALIBRATED:
|
||||||
case PS_SLAVE:
|
case PS_SLAVE:
|
||||||
|
|
Loading…
Reference in New Issue