File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,18 @@ OnuStickyStatus Ttc::getOnuStickyStatus(bool monitoring)
166166 is = mBar ->readRegister (Cru::Registers::TTC_ONU_STICKY.index );
167167 }
168168
169- if (is == 0x0 || is == 0x8 ) {
169+ // onu sticky bits: [mgtRxPllLocked][mgtTxPllLocked][mgtRxReady][mgtTxReady][operational][rxLocked][phaseGood][rx40Locked]
170+ // bit 0 = no error = GOOD | bit 1 = error = BAD
171+ // first we invert the sticky status: after inversion 1 = GOOD
172+ auto notIs = ~is;
173+
174+ // mgtTxPllLocked | mgtTxReady | operational | phaseGood <-- these should be GOOD for upstream to be UP
175+ if ((notIs & 0xb01011010 ) == 0xb01011010 ) {
170176 upstreamStatus = LinkStatus::Up;
171- downstreamStatus = LinkStatus::Up;
172- } else if (is == 0x1a ) {
177+ }
178+
179+ // mgtRxPllLocked | mgtRxReady | rxLocked | rx40Locked <-- these should be GOOD for upstream to be UP
180+ if ((notIs & 0xb10100101 ) == 0xb10100101 ) {
173181 downstreamStatus = LinkStatus::Up;
174182 }
175183
You can’t perform that action at this time.
0 commit comments