[dahdi-commits] dahdi/linux.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Nov 20 10:11:09 CST 2013
branch "master" has been updated
via 1ab5723b85572712f70fb64c7c03358e542a2a55 (commit)
via cbad5a7ae194e59fe96814644685503232482117 (commit)
from b3c6320374b07b5cfef50446c99634a3891488a2 (commit)
Summary of changes:
drivers/dahdi/wcte43x-base.c | 40 +---------------------------------------
1 file changed, 1 insertion(+), 39 deletions(-)
- Log -----------------------------------------------------------------
commit 1ab5723b85572712f70fb64c7c03358e542a2a55
Author: Shaun Ruffell <sruffell at digium.com>
Date: Wed Nov 20 09:39:12 2013 -0600
wcte43x: Remove 'dcxo' debug attribute.
Removes another bit of debugging instrumentation that I let slip through.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index 8324162..55d1803 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -1276,31 +1276,6 @@ static ssize_t t43x_timing_master_show(struct device *dev,
static DEVICE_ATTR(timing_master, 0400, t43x_timing_master_show, NULL);
-static ssize_t
-dcxo_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct t43x *wc = dev_get_drvdata(dev);
- return sprintf(buf, "0x%08x\n", ioread32be(wc->xb.membase + 0x2008));
-}
-
-static ssize_t
-dcxo_store(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
-{
- int ret;
- struct t43x *wc = dev_get_drvdata(dev);
- u32 dcxo_setting;
- ret = sscanf(buf, "%x", &dcxo_setting);
- iowrite32be(dcxo_setting, wc->xb.membase + 0x2008);
- ioread32be(wc->xb.membase + 0x2008);
- iowrite32be(dcxo_setting, wc->xb.membase + 0x2008);
- ioread32be(wc->xb.membase + 0x2008);
- return count;
-}
-
-static DEVICE_ATTR(dcxo, 0644, dcxo_show, dcxo_store);
-
static void create_sysfs_files(struct t43x *wc)
{
int ret;
@@ -1310,19 +1285,11 @@ static void create_sysfs_files(struct t43x *wc)
dev_info(&wc->xb.pdev->dev,
"Failed to create device attributes.\n");
}
-
- dev_warn(&wc->xb.pdev->dev, "WARNING: Creating dcxo file. Do not release like this.\n");
- ret = device_create_file(&wc->xb.pdev->dev, &dev_attr_dcxo);
- if (ret) {
- dev_info(&wc->xb.pdev->dev,
- "Failed to create DCXO device attributes.\n");
- }
}
static void remove_sysfs_files(struct t43x *wc)
{
device_remove_file(&wc->xb.pdev->dev, &dev_attr_timing_master);
- device_remove_file(&wc->xb.pdev->dev, &dev_attr_dcxo);
}
static inline void __t43x_update_timing(struct t43x *wc)
commit cbad5a7ae194e59fe96814644685503232482117
Author: Shaun Ruffell <sruffell at digium.com>
Date: Wed Nov 20 09:33:00 2013 -0600
wcte43x: Do not grab reglock in handle_transmit/handle_receive.
If the driver is loaded with vpmsupport=0, then it was possible to create a
deadlock situation since the call into __dahdi_ec_chunk might then try to grab
the channel lock while already holding the reglock.
The purpose of grabbing reglock in the DMA routines was to protect the channel
array, which can be changed when linemode is changing. So instead, we'll
completely mask off that interrupt line from all CPUs when potentially changing
the channel array.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index efe1378..8324162 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -2454,10 +2454,9 @@ t43x_init_one_span(struct t43x *wc, struct t43x_span *ts, enum linemode type)
goto error_exit;
}
+ /* Stop the interrupt handler so that we may swap the channel array. */
disable_irq(wc->xb.pdev->irq);
- /* Because the interrupt handler is running, we need to atomically
- * swap the channel arrays. */
spin_lock_irqsave(&wc->reglock, flags);
for (x = 0; x < ARRAY_SIZE(ts->chans); x++) {
kfree(ts->chans[x]);
@@ -2997,7 +2996,6 @@ static void t43x_handle_receive(struct wcxb *xb, void *vfp)
if (!test_bit(DAHDI_FLAGBIT_REGISTERED, &ts->span.flags))
continue;
- spin_lock(&wc->reglock);
for (j = 0; j < DAHDI_CHUNKSIZE; j++) {
for (i = 0; i < ts->span.channels; i++) {
ts->chans[i]->readchunk[j] =
@@ -3012,7 +3010,6 @@ static void t43x_handle_receive(struct wcxb *xb, void *vfp)
c->writechunk);
}
}
- spin_unlock(&wc->reglock);
_dahdi_receive(&ts->span);
}
@@ -3034,12 +3031,10 @@ static void t43x_handle_transmit(struct wcxb *xb, void *vfp)
_dahdi_transmit(&ts->span);
- spin_lock(&wc->reglock);
for (j = 0; j < DAHDI_CHUNKSIZE; j++)
for (i = 0; i < ts->span.channels; i++)
frame[j*WCXB_DMA_CHAN_SIZE+(s+1+i*4)] =
ts->chans[i]->writechunk[j];
- spin_unlock(&wc->reglock);
}
}
-----------------------------------------------------------------------
--
dahdi/linux.git
More information about the dahdi-commits
mailing list