diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c index a6296f0..1f32eb4 100644 --- a/drivers/dahdi/xpp/card_bri.c +++ b/drivers/dahdi/xpp/card_bri.c @@ -863,6 +863,7 @@ static const struct dahdi_span_ops BRI_span_ops = { .maint = xpp_maint, .echocan_create = xpp_echocan_create, .echocan_name = xpp_echocan_name, + .assigned = xpp_span_assigned, #ifdef DAHDI_SYNC_TICK .sync_tick = dahdi_sync_tick, #endif diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index 2012eb1..bdd0f40 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -1242,6 +1242,7 @@ static const struct dahdi_span_ops PRI_span_ops = { .maint = xpp_maint, .echocan_create = xpp_echocan_create, .echocan_name = xpp_echocan_name, + .assigned = xpp_span_assigned, #ifdef DAHDI_SYNC_TICK .sync_tick = dahdi_sync_tick, #endif diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 5dbca26..ccf7f38 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -945,6 +945,19 @@ int xpp_echocan_create(struct dahdi_chan *chan, } EXPORT_SYMBOL(xpp_echocan_create); +void xpp_span_assigned(struct dahdi_span *span) +{ + struct phonedev *phonedev = container_of(span, struct phonedev, span); + xpd_t *xpd = container_of(phonedev, struct xpd, phonedev); + + XPD_INFO(xpd, "Span assigned: %d\n", span->spanno); + if (xpd->card_present) { + span->alarms &= ~DAHDI_ALARM_NOTOPEN; + dahdi_alarm_notify(&phonedev->span); + } +} +EXPORT_SYMBOL(xpp_span_assigned); + static const struct dahdi_span_ops xpp_span_ops = { .owner = THIS_MODULE, .open = xpp_open, @@ -953,6 +966,7 @@ static const struct dahdi_span_ops xpp_span_ops = { .maint = xpp_maint, .echocan_create = xpp_echocan_create, .echocan_name = xpp_echocan_name, + .assigned = xpp_span_assigned, }; static const struct dahdi_span_ops xpp_rbs_span_ops = { @@ -964,6 +978,7 @@ static const struct dahdi_span_ops xpp_rbs_span_ops = { .maint = xpp_maint, .echocan_create = xpp_echocan_create, .echocan_name = xpp_echocan_name, + .assigned = xpp_span_assigned, }; void xpd_set_spanname(xpd_t *xpd) diff --git a/drivers/dahdi/xpp/xpp_dahdi.h b/drivers/dahdi/xpp/xpp_dahdi.h index cd9afb6..f7a0092 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.h +++ b/drivers/dahdi/xpp/xpp_dahdi.h @@ -47,6 +47,7 @@ int xpp_close(struct dahdi_chan *chan); int xpp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long arg); int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig); int xpp_maint(struct dahdi_span *span, int cmd); +void xpp_span_assigned(struct dahdi_span *span); void report_bad_ioctl(const char *msg, xpd_t *xpd, int pos, unsigned int cmd); int total_registered_spans(void); void oht_pcm(xpd_t *xpd, int pos, bool pass);