wcte13xp: Reset span alarm to RED on startup

A fresh modprobe and dahdi_cfg would cause a temporary green alarm state on the
driver for a second while the alarm debounced into RED. New logic keeps the
spans alarm state as NONE during the unconfigured state, but sets the alarm
state to RED after the framer reset in the startup logic.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 90b6712d01)
This commit is contained in:
Russ Meyerriecks 2014-07-23 15:00:07 -05:00
parent a951dd5e32
commit 8a58e9a0ce

View File

@ -1316,6 +1316,10 @@ static int t13x_startup(struct file *file, struct dahdi_span *span)
/* Reset framer with proper parameters and start */
t13x_framer_start(wc);
/* Reset span alarm state to RED to prevent false
* temporary GREEN state on span bringup */
span->alarms |= DAHDI_ALARM_RED;
/* Do we want to SYNC on receive or not. This must always happen after
* the framer is fully reset. */
wcxb_set_clksrc(&wc->xb,