[asterisk-users] Conflict between jumper settings and dmesg with OctoBRI
Andre
a.valentin at ddimension.net
Fri May 28 18:53:34 CDT 2010
Hi!
Try this patch. IF you apply it you can tell dahdi the port mode to use like this
modprobe wcb4xxp port_mode=0,0,1,1
means TE,TE,NT,NT
Tell me if it works!
----------------------------
--- drivers-old/dahdi/wcb4xxp/base.c 2009-11-09 20:32:45.000000000 +0100
+++ drivers/dahdi/wcb4xxp/base.c 2010-05-29 01:46:03.000000000 +0200
@@ -95,6 +95,8 @@ static int alarmdebounce = 500;
static int vpmsupport = 1;
static int timer_1_ms = 2000;
static int timer_3_ms = 30000;
+static int port_mode[MAX_SPANS_PER_CARD] = {};
+static int port_mode_count = 0;
#if !defined(mmiowb)
#define mmiowb() barrier()
@@ -1472,8 +1474,13 @@ static void hfc_init_all_st(struct b4xxp
*/
if (b4->card_type == B410P)
nt = ((gpio & (1 << (i + 4))) == 0);
- else
- nt = ((gpio & (1 << (i + 4))) != 0);
+ else {
+ if (i<port_mode_count) {
+ nt = (port_mode[i] > 0);
+ } else {
+ nt = ((gpio & (1 << (i + 4))) != 0);
+ }
+ }
s->te_mode = !nt;
@@ -2938,6 +2945,7 @@ module_param(alarmdebounce, int, S_IRUGO
module_param(vpmsupport, int, S_IRUGO);
module_param(timer_1_ms, int, S_IRUGO | S_IWUSR);
module_param(timer_3_ms, int, S_IRUGO | S_IWUSR);
+module_param_array(port_mode, int, &port_mode_count, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "bitmap: 1=general 2=dtmf 4=regops 8=fops 16=ec 32=st
state 64=hdlc 128=alarm");
MODULE_PARM_DESC(spanfilter, "debug filter for spans. bitmap: 1=port 1, 2=port
2, 4=port 3, 8=port 4");
@@ -2951,6 +2959,7 @@ MODULE_PARM_DESC(alarmdebounce, "msec to
MODULE_PARM_DESC(vpmsupport, "1=enable hardware EC, 0=disable hardware EC");
MODULE_PARM_DESC(timer_1_ms, "NT: msec to wait for link activation, TE: unused.");
MODULE_PARM_DESC(timer_3_ms, "TE: msec to wait for link activation, NT: unused.");
+MODULE_PARM_DESC(port_mode, "Port Mode 0=TE,1=NT");
MODULE_AUTHOR("Digium Incorporated <support at digium.com>");
MODULE_DESCRIPTION("B410P & Similars multi-port BRI module driver.");
More information about the asterisk-users
mailing list