[dahdi-commits] dahdi/linux.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Jan 17 15:57:27 CST 2014
branch "master" has been updated
via 1add33efe7adaf0f76e54610b7805c12f6b3e193 (commit)
via 094e30483d60cab9f0bed9db5994039f31165407 (commit)
via e4ea886ee0f45c54e28d276d638054d88d45eaa7 (commit)
from 860eb4ab48edb1277b8ca95ace034b1a2581f98d (commit)
Summary of changes:
drivers/dahdi/firmware/Makefile | 4 +--
drivers/dahdi/wcaxx-base.c | 7 ++++-
drivers/dahdi/wcte13xp-base.c | 56 +++++++++++++++++----------------------
3 files changed, 33 insertions(+), 34 deletions(-)
- Log -----------------------------------------------------------------
commit 1add33efe7adaf0f76e54610b7805c12f6b3e193
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date: Tue Dec 17 15:51:13 2013 -0600
wcte13xp: Add support for te131 and te132 products
These are similar to te133 and te134 but without integrated echo cancel.
Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index 4d9651b..02ba172 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -657,7 +657,7 @@ static struct vpm450m *init_vpm450m(struct t13x *wc, int isalaw,
}
}
- if (vpmsupport != 0)
+ if (vpmsupport)
wcxb_enable_echocan(&wc->xb);
kfree(ChipOpen);
@@ -797,8 +797,8 @@ struct t13x_desc {
const char *name;
};
-static const struct t13x_desc te133 = {"Wildcard TE133"}; /* pci express */
-static const struct t13x_desc te134 = {"Wildcard TE134"}; /* legacy pci */
+static const struct t13x_desc te133 = {"Wildcard TE131/TE133"}; /* pci express*/
+static const struct t13x_desc te134 = {"Wildcard TE132/TE134"}; /* legacy pci */
static inline bool is_pcie(const struct t13x *t1)
{
@@ -2187,7 +2187,7 @@ static void te13x_handle_receive(struct wcxb *xb, void *vfp)
}
}
- if (0 == vpmsupport) {
+ if (!vpmsupport || !wc->vpm) {
for (i = 0; i < wc->span.channels; i++) {
struct dahdi_chan *const c = wc->span.chans[i];
__dahdi_ec_chunk(c, c->readchunk, c->readchunk,
@@ -2440,6 +2440,7 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
int res;
unsigned int index = -1;
enum linemode type;
+ bool vpmcapable = false;
for (x = 0; x < ARRAY_SIZE(ifaces); x++) {
if (!ifaces[x]) {
@@ -2526,6 +2527,17 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
}
wc->ddev->hardware_id = t13x_read_serial(wc);
+ if (!wc->ddev->hardware_id) {
+ dev_info(&wc->dev->dev, "No serial number found.\n");
+ res = -EIO;
+ goto fail_exit;
+ }
+
+ /* Check for hardware echo cancel support */
+ if (!strncmp("TE133", wc->ddev->hardware_id+1, 5) ||
+ !strncmp("TE134", wc->ddev->hardware_id+1, 5)) {
+ vpmcapable = true;
+ }
wc->wq = create_singlethread_workqueue(wc->name);
if (!wc->wq) {
@@ -2565,7 +2577,7 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
goto fail_exit;
#ifdef VPM_SUPPORT
- if (!wc->vpm)
+ if (!wc->vpm && vpmsupport && vpmcapable)
t13x_vpm_init(wc);
#endif
commit 094e30483d60cab9f0bed9db5994039f31165407
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date: Tue Dec 17 13:37:21 2013 -0600
wcte13xp: Update firmware to 0x780017
This firmware adds support for the te131 and te132 products.
Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile
index e2d7ca6..74c3e70 100644
--- a/drivers/dahdi/firmware/Makefile
+++ b/drivers/dahdi/firmware/Makefile
@@ -31,8 +31,8 @@ VPMADT032_VERSION:=1.25.0
HX8_VERSION:=2.06
VPMOCT032_VERSION:=1.12.0
WCT820_VERSION:=1.76
-TE133_VERSION:=6f0017
-TE134_VERSION:=6f0017
+TE133_VERSION:=780017
+TE134_VERSION:=780017
TE435_VERSION:=e0017
A8A_VERSION:=1d0017
A8B_VERSION:=1d0017
diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index 2270e6b..4d9651b 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -45,7 +45,7 @@
static const char *TE133_FW_FILENAME = "dahdi-fw-te133.bin";
static const char *TE134_FW_FILENAME = "dahdi-fw-te134.bin";
-static const u32 TE13X_FW_VERSION = 0x6f0017;
+static const u32 TE13X_FW_VERSION = 0x780017;
#define VPM_SUPPORT
#define WC_MAX_IFACES 8
commit e4ea886ee0f45c54e28d276d638054d88d45eaa7
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date: Mon Dec 16 18:09:59 2013 -0600
wcte13xp: wcaxx: Fix broken devicetype attributes
struct dahdi_device.devicetype was set incorrectly in both drivers. This caused
the vpm module to not show up after the device name when reading this field
from a spanstat.
Reported-by: Charles Moye <cmoye 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 b0fa8c6..5faf442 100644
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -4299,7 +4299,12 @@ __wcaxx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENOMEM;
}
- wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s", wc->desc->name);
+ if (wc->vpm)
+ wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s (%s)",
+ wc->desc->name, "VPMOCT032");
+ else
+ wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s",
+ wc->desc->name);
if (!wc->ddev->devicetype) {
wcaxx_back_out_gracefully(wc);
diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index 40e9134..2270e6b 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -1252,25 +1252,6 @@ static void t13x_framer_start(struct t13x *wc)
set_bit(DAHDI_FLAGBIT_RUNNING, &wc->span.flags);
}
-static void set_span_devicetype(struct t13x *wc)
-{
- const char *olddevicetype;
- olddevicetype = wc->ddev->devicetype;
-
-#ifndef VPM_SUPPORT
- wc->ddev->devicetype = kasprintf(GFP_KERNEL,
- "%s (VPMOCT032)", wc->devtype->name);
-#else
- wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s", wc->devtype->name);
-#endif /* VPM_SUPPORT */
-
- /* On the off chance that we were able to allocate it previously. */
- if (!wc->ddev->devicetype)
- wc->ddev->devicetype = olddevicetype;
- else
- kfree(olddevicetype);
-}
-
/**
* te13xp_check_for_interrupts - Return 0 if the card is generating interrupts.
* @wc: The card to check.
@@ -1308,8 +1289,6 @@ static int t13x_startup(struct file *file, struct dahdi_span *span)
unsigned long flags;
int ret;
- set_span_devicetype(wc);
-
/* Stop the DMA since the clock source may have changed. */
wcxb_stop_dma(&wc->xb);
ret = wcxb_wait_for_stop(&wc->xb, 50);
@@ -1727,8 +1706,6 @@ static int t13x_software_init(struct t13x *wc, enum linemode type)
goto error_exit;
}
- set_span_devicetype(wc);
-
/* Because the interrupt handler is running, we need to atomically
* swap the channel arrays. */
spin_lock_irqsave(&wc->reglock, flags);
@@ -1780,8 +1757,6 @@ static int t13x_software_init(struct t13x *wc, enum linemode type)
wc->chans[x]->chanpos = x + 1;
}
- set_span_devicetype(wc);
-
return 0;
error_exit:
@@ -2594,6 +2569,13 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
t13x_vpm_init(wc);
#endif
+ if (wc->vpm)
+ wc->ddev->devicetype = kasprintf(GFP_KERNEL,
+ "%s (VPMOCT032)", wc->devtype->name);
+ else
+ wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s",
+ wc->devtype->name);
+
wc->span.ops = &t13x_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
-----------------------------------------------------------------------
--
dahdi/linux.git
More information about the dahdi-commits
mailing list