summaryrefslogtreecommitdiff
path: root/wcte12xp/base.c
diff options
context:
space:
mode:
authormspiceland <mspiceland@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-11 00:07:19 +0000
committermspiceland <mspiceland@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-11 00:07:19 +0000
commit16175dac3a1e5b73f8bd2ca6a5d65d2c55dc4901 (patch)
treec68cb896b9c5ca36a42b5306cdc9d1c0d6303460 /wcte12xp/base.c
parent8d7bc1c2959659c6649ca6ade2467f0ee88b7864 (diff)
If we detect that we have a VPMADT032 module but there is an error during
initialization, we don't proceed and register with Zaptel. This will prevent customers with faulty VPMADT032 modules from going undetected. Customers can always load with vpmsupport=0 to proceed with this error but will do so knowingly. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3405 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcte12xp/base.c')
-rw-r--r--wcte12xp/base.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/wcte12xp/base.c b/wcte12xp/base.c
index 26598be..1bd6c5b 100644
--- a/wcte12xp/base.c
+++ b/wcte12xp/base.c
@@ -1425,7 +1425,10 @@ static int t1_hardware_post_init(struct t1 *wc)
t1_setleds(wc, wc->ledtestreg, 0);
#ifdef VPM_SUPPORT
- t1_vpm150m_init(wc);
+ if (t1_vpm150m_init(wc) < 0) {
+ module_printk("VPMADT032 module detected but there was an error during initialization. If you still wish to use this card, please disable echo cancellation using vpmsupport=0 as a module parameter or replace the echo cancellation module.\n");
+ return -1;
+ }
if (wc->vpm150m) {
module_printk("VPM present and operational (Firmware version %x)\n", wc->vpm150m->version);
wc->ctlreg |= 0x10; /* turn on vpm (RX audio from vpm module) */
@@ -1955,7 +1958,10 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
t1_enable_interrupts(wc);
t1_start_dma(wc);
- t1_hardware_post_init(wc);
+ if (t1_hardware_post_init(wc) < 0) {
+ module_printk("Hardware init failed. Refusing to register broken hardware interface.\n");
+ return 0;
+ }
t1_software_init(wc);
module_printk("Found a %s\n", wc->variety);