clock: redecide state if get EV_FAULT_DETECTED event

IEEE 802.1AS-2011's methodology for faults is to avoid waiting
in that FAULTY state in hopes that management will notice.
Instead, move on to search for a valid non-faulty state. If
supported, the fault is logged so that management can notice
later, but that logging isn't a requirement.

This patch is to invoke BMCA to redecide state if get
EV_FAULT_DETECTED event.

Signed-off-by: Rodney Greenstreet <rodney.greenstreet@ni.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
master
Rodney Greenstreet 2019-10-24 12:45:17 +08:00 committed by Vladimir Oltean
parent 416058d136
commit 76657d6da3
1 changed files with 3 additions and 0 deletions

View File

@ -1584,6 +1584,9 @@ int clock_poll(struct clock *c)
if (EV_ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES == event) {
c->sde = 1;
}
if (EV_FAULT_DETECTED == event) {
c->sde = 1;
}
port_dispatch(p, event, 0);
/* Clear any fault after a little while. */
if (PS_FAULTY == port_state(p)) {