From 90b6712d01995b97b4399c4723fc6b80bbc6552f Mon Sep 17 00:00:00 2001 From: Russ Meyerriecks Date: Wed, 23 Jul 2014 15:00:07 -0500 Subject: [PATCH] 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 Acked-by: Shaun Ruffell --- drivers/dahdi/wcte13xp-base.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c index 4fe954a..c061975 100644 --- a/drivers/dahdi/wcte13xp-base.c +++ b/drivers/dahdi/wcte13xp-base.c @@ -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,