[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Jan 22 18:05:46 CST 2014


branch "master" has been updated
       via  4cd09feb54c97148e8792a393396f3fc31744372 (commit)
       via  1f024713ed63bf0ef2c332349415903fbab8ef80 (commit)
       via  0b499d9566a994f640dc1da03f4e4d8853af6d63 (commit)
      from  438b2a36b30fa57a99f53ebb32b19c7c521ecd3f (commit)

Summary of changes:
 drivers/dahdi/wcaxx-base.c    |    7 +++++++
 drivers/dahdi/wct4xxp/base.c  |    9 ++-------
 drivers/dahdi/wcte13xp-base.c |    7 +++++++
 drivers/dahdi/wcte43x-base.c  |   16 +++++++++-------
 drivers/dahdi/wcxb.c          |    6 ++++++
 5 files changed, 31 insertions(+), 14 deletions(-)


- Log -----------------------------------------------------------------
commit 4cd09feb54c97148e8792a393396f3fc31744372
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Wed Jan 22 12:24:04 2014 -0600

    wcte43x, wcte13xp, wcaxx: Bump irqmisses counter when there are DMA underruns.
    
    This makes the behavior of IRQ misses for these drivers behave the same as the
    wcte12xp, wctdm24xxp, and wct4xxp drivers.
    
    Previously irqmisses would never increase. The presence of underruns would still
    show up in dmesg as latency bumps.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/wcaxx-base.c b/drivers/dahdi/wcaxx-base.c
index 504cccf..c17f1bc 100644
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -3864,9 +3864,16 @@ static void wcaxx_back_out_gracefully(struct wcaxx *wc)
 	kfree(wc);
 }
 
+static void wcaxx_handle_error(struct wcxb *xb)
+{
+	struct wcaxx *wc = container_of(xb, struct wcaxx, xb);
+	wc->ddev->irqmisses++;
+}
+
 static const struct wcxb_operations wcxb_operations = {
 	.handle_receive = wcaxx_handle_receive,
 	.handle_transmit = wcaxx_handle_transmit,
+	.handle_error = wcaxx_handle_error,
 };
 
 struct cmd_results {
diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index 3ab89b1..726a63c 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -115,10 +115,17 @@ static void te13x_handle_transmit(struct wcxb *xb, void *vfp);
 static void te13x_handle_receive(struct wcxb *xb, void *vfp);
 static void te13x_handle_interrupt(struct wcxb *xb, u32 pending);
 
+static void te13x_handle_error(struct wcxb *xb)
+{
+	struct t13x *wc = container_of(xb, struct t13x, xb);
+	wc->ddev->irqmisses++;
+}
+
 static struct wcxb_operations xb_ops = {
 	.handle_receive = te13x_handle_receive,
 	.handle_transmit = te13x_handle_transmit,
 	.handle_interrupt = te13x_handle_interrupt,
+	.handle_error = te13x_handle_error,
 };
 
 /* Maintenance Mode Registers */
diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index 056e113..af7b787 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -144,10 +144,17 @@ static void t43x_handle_transmit(struct wcxb *xb, void *vfp);
 static void t43x_handle_receive(struct wcxb *xb, void *vfp);
 static void t43x_handle_interrupt(struct wcxb *xb, u32 pending);
 
+static void t43x_handle_error(struct wcxb *xb)
+{
+	struct t43x *wc = container_of(xb, struct t43x, xb);
+	wc->ddev->irqmisses++;
+}
+
 static struct wcxb_operations xb_ops = {
 	.handle_receive = t43x_handle_receive,
 	.handle_transmit = t43x_handle_transmit,
 	.handle_interrupt = t43x_handle_interrupt,
+	.handle_error = t43x_handle_error,
 };
 
 /* Maintenance Mode Registers */
diff --git a/drivers/dahdi/wcxb.c b/drivers/dahdi/wcxb.c
index 191a0b0..5ae5325 100644
--- a/drivers/dahdi/wcxb.c
+++ b/drivers/dahdi/wcxb.c
@@ -397,6 +397,12 @@ static irqreturn_t _wcxb_isr(int irq, void *dev_id)
 		if (pending & DESC_UNDERRUN) {
 			u32 reg;
 
+			/* Report the error in case drivers have any custom
+			 * methods for indicating potential data corruption. An
+			 * underrun means data loss in the TDM channel. */
+			if (xb->ops->handle_error)
+				xb->ops->handle_error(xb);
+
 			/* bump latency */
 			spin_lock(&xb->lock);
 

commit 1f024713ed63bf0ef2c332349415903fbab8ef80
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Mon Jan 13 12:58:36 2014 -0600

    wct4xxp: Trivial drop of unnecessary local variables.
    
    These were left over from when the VPM callbacks depended on the different VPM
    installed. On the wcte43x this is unnecessary.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index 338771d..20432a5 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -1121,16 +1121,11 @@ static int t4_echocan_create(struct dahdi_chan *chan,
 	struct t4 *wc = chan->pvt;
 	struct t4_span *tspan = container_of(chan->span, struct t4_span, span);
 	int channel;
-	const struct dahdi_echocan_ops *ops;
-	const struct dahdi_echocan_features *features;
 	const bool alaw = (chan->span->deflaw == 2);
 
 	if (!vpmsupport || !wc->vpm)
 		return -ENODEV;
 
-	ops = &vpm_ec_ops;
-	features = &vpm_ec_features;
-
 	if (ecp->param_count > 0) {
 		dev_warn(&wc->dev->dev, "%s echo canceller does not support "
 			 "parameters; failing request\n",
@@ -1139,8 +1134,8 @@ static int t4_echocan_create(struct dahdi_chan *chan,
 	}
 
 	*ec = tspan->ec[chan->chanpos - 1];
-	(*ec)->ops = ops;
-	(*ec)->features = *features;
+	(*ec)->ops = &vpm_ec_ops;
+	(*ec)->features = vpm_ec_features;
 
 	channel = has_e1_span(wc) ? chan->chanpos : chan->chanpos + 4;
 

commit 0b499d9566a994f640dc1da03f4e4d8853af6d63
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Mon Jan 13 12:58:36 2014 -0600

    wcte43x: Trivial drop of unnecessary local variables.
    
    These were left over from when the VPM callbacks depended on the different VPM
    installed. On the wcte43x this is unnecessary.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index aaae81a..056e113 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -648,16 +648,11 @@ static int t43x_echocan_create(struct dahdi_chan *chan,
 	struct t43x *wc = chan->pvt;
 	struct t43x_span *ts = container_of(chan->span, struct t43x_span, span);
 	int channel = chan->chanpos - 1;
-	const struct dahdi_echocan_ops *ops;
-	const struct dahdi_echocan_features *features;
 	const bool alaw = (chan->span->deflaw == 2);
 
 	if (!vpmsupport || !wc->vpm)
 		return -ENODEV;
 
-	ops = &vpm_ec_ops;
-	features = &vpm_ec_features;
-
 	if (ecp->param_count > 0) {
 		dev_warn(&wc->xb.pdev->dev,
 			 "%s echo canceller does not support parameters; failing request\n",
@@ -666,8 +661,8 @@ static int t43x_echocan_create(struct dahdi_chan *chan,
 	}
 
 	*ec = ts->ec[channel];
-	(*ec)->ops = ops;
-	(*ec)->features = *features;
+	(*ec)->ops = &vpm_ec_ops;
+	(*ec)->features = vpm_ec_features;
 
 	channel += (32*chan->span->offset);
 	vpm450m_set_alaw_companding(wc->vpm, channel, alaw);

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list