diff options
author | Mike Spiceland <mspiceland@digium.com> | 2009-01-30 16:53:30 +0000 |
---|---|---|
committer | Mike Spiceland <mspiceland@digium.com> | 2009-01-30 16:53:30 +0000 |
commit | 3c2688ae3fff795fefa68b31534b1207c3c7716f (patch) | |
tree | 4b404b0581e20b9e4d45f869aab24339b95d73b3 | |
parent | 833d6652559d89ba03e2fecd3314dfb128ef58e1 (diff) |
Do a stricter test for FXS modules. FXO modules will be hi-z during this time and the value will be
undefined. This test ensures that FXO modules will not falsely trigger during FXS probes. The value
of 0x88 from register 1 has been confirmed during this stage on quad and single port modules.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5916 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 6c7fd27..da48cfe 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -1622,7 +1622,7 @@ static int wctdm_voicedaa_insane(struct wctdm *wc, int card) static int wctdm_proslic_insane(struct wctdm *wc, int card) { - int blah,insane_report; + int blah, reg1, insane_report; insane_report=0; blah = wctdm_getreg(wc, card, 0); @@ -1639,6 +1639,15 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card) /* SLIC not loaded */ return -1; } + + /* let's be really sure this is an FXS before we continue */ + reg1 = wctdm_getreg(wc, card, 1); + if ((0x80 != (blah & 0xf0)) || (0x88 != reg1)) { + if (debug & DEBUG_CARD) + printk("DEBUG: not FXS b/c reg0=%x or reg1 != 0x88 (%x).\n", blah, reg1); + return -1; + } + if ((blah & 0xf) < 2) { printk(KERN_INFO "ProSLIC 3210 version %d is too old\n", blah & 0xf); return -1; |