summaryrefslogtreecommitdiff
path: root/wctdm24xxp
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-04 13:55:19 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-04 13:55:19 +0000
commit62315ace88956c4456598eaf6b6d278d13c86a17 (patch)
treeeea5aa85c604d11f62cc6ae376ff88f3edb7efb9 /wctdm24xxp
parentfd130696615d48e186afb5def7e4b3a3b796bd7d (diff)
add a new Zaptel scanning tool, primarily for use by the Asterisk GUI, called 'ztscan'. this tool outputs an Asterisk-style
configuration file containing one context for each Zaptel span with all the details that can be learned about that span. to enable this tool, the ZT_SPANSTAT ioctl gained a number of new elements to report information about the spans: - linecompat (available signaling modes for digital spans) - spantype (T1, E1 or J1 for digital spans) - location (PCI/PCI-Express location) - manufacturer - devicetype Along the way I also found that the digital span drivers always set T1-style signaling bits in 'linecompat' even for E1 spans, and that the ZT_SPANCONFIG ioctl did not properly check these bits when configuring E1 spans. The result of this is that it was possible to configure T1-only coding/framing (AMI/B8Zs, D4/ESF) on E1 spans (but not the reverse); this has been corrected and any attempt to use T1-only coding/framing on E1 spans will now result in an error from ztcfg. Also did some minor simplification of the Makefile rules that build the userspace tools. (the basics of ztscan were written by Brandon Kruse then reworked and fleshed out by me) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3278 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp')
-rw-r--r--wctdm24xxp/base.c7
-rw-r--r--wctdm24xxp/wctdm24xxp.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c
index 0470725..4104d8d 100644
--- a/wctdm24xxp/base.c
+++ b/wctdm24xxp/base.c
@@ -253,8 +253,8 @@ struct wctdm_desc {
static struct wctdm_desc wctdm2400 = { "Wildcard TDM2400P", 0, 24 };
static struct wctdm_desc wctdm800 = { "Wildcard TDM800P", 0, 8 };
static struct wctdm_desc wctdm410 = { "Wildcard TDM410P", 0, 4 };
-static struct wctdm_desc wcaex2400 = { "Wildcard AEX2400", 0, 24 };
-static struct wctdm_desc wcaex800 = { "Wildcard AEX800", 0, 8 };
+static struct wctdm_desc wcaex2400 = { "Wildcard AEX2400", FLAG_EXPRESS, 24 };
+static struct wctdm_desc wcaex800 = { "Wildcard AEX800", FLAG_EXPRESS, 8 };
static int acim2tiss[16] = { 0x0, 0x1, 0x4, 0x5, 0x7, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x2, 0x0, 0x3 };
@@ -3046,6 +3046,9 @@ static int wctdm_initialize(struct wctdm *wc)
/* Zapata stuff */
sprintf(wc->span.name, "WCTDM/%d", wc->pos);
sprintf(wc->span.desc, "%s Board %d", wc->variety, wc->pos + 1);
+ sprintf(wc->span.location, "PCI%s Bus %02d Slot %02d", (wc->flags[0] & FLAG_EXPRESS) ? " Express" : "", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
+ wc->span.manufacturer = "Digium";
+ wc->span.devicetype = wc->variety;
if (alawoverride) {
printk("ALAW override parameter detected. Device will be operating in ALAW\n");
wc->span.deflaw = ZT_LAW_ALAW;
diff --git a/wctdm24xxp/wctdm24xxp.h b/wctdm24xxp/wctdm24xxp.h
index 61291d7..5fa99b9 100644
--- a/wctdm24xxp/wctdm24xxp.h
+++ b/wctdm24xxp/wctdm24xxp.h
@@ -22,6 +22,7 @@
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
#define FLAG_3215 (1 << 0)
+#define FLAG_EXPRESS (1 << 1)
#define EFRAME_SIZE 108
#define ERING_SIZE 16 /* Maximum ring size */