From 606dd58a479172c4cb71dcad2def9d9b45be3b49 Mon Sep 17 00:00:00 2001 From: Oron Peled Date: Mon, 7 Apr 2014 07:05:50 -0400 Subject: [PATCH] xpp: fix failed multi-PRI E1<->T1 transition In an Astribank with >= 2 PRI ports, switching from E1 to T1 at run-time may fail at the DAHDI_CHANCONFIG ioctl on the first channel in a span, That is, on first run of dahdi_cfg, it fails on second span, on second: it fails on third span, etc. The code clears the D-channel information on the DAHDI_CHANCONFIG call for the first channel in the span. However The code tested for the global "channo" rather than the per-span "chanpos" to check for the first channel in the span. This the test failed. Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/card_pri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index c586115..f4a40bf 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -1231,7 +1231,7 @@ static int pri_chanconfig(struct file *file, struct dahdi_chan *chan, if (priv->pri_protocol != PRI_PROTO_E1 && priv->is_cas != 0) set_mode_cas(xpd, 0); } else { - if (chan->channo == 1) { + if (chan->chanpos == 1) { XPD_DBG(GENERAL, xpd, "channel %d (%s) marked a not DChan\n", chan->channo, chan->name);