diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-25 10:48:33 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-25 10:48:33 +0000 |
commit | d717b83056e5076a64c9471dd85573de409582d7 (patch) | |
tree | f46ebf64df73d8f513989d29f54e5b22b8bce2a5 /xpp/xpd.h | |
parent | a11cf4664ea4fd14478f88c9118acd0f87ad7008 (diff) |
* Xbus protocol version: 2.4 (Zaptel 1.2.12/1.4.0 had 2.3).
XPS Init scripts renamed accordingly.
* Performance improvements for multi-XPD (span) devices.
* Astribank BRI driver (in next commit).
* Changes under /proc:
- XBUS and XPD numbers have two digits.
- Every script wildcard should be replaced from XBUS-? to XBUS-[0-9]*
- Added /proc/xpp/XBUS-*/XPD-*/blink: echo 1 to start and 0 to stop.
* Several countries (South Africa, UAE, anybody else) require a shorter
ring delay. Adjust FXO reg 0x17 (23)'s bits 0:2 to 011.
* Use tasklets to move most of the interrupt PCM copying out of the interrupt.
* Debugfs-based code to dump data to userspace (used to debug BRI D channel).
* Pretend every 2.6.9 actually has later RHEL's typedefs.
* fpga_load supports /dev/bus/usb .
* Fixed physical order sorting in genzaptelconf.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1966 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r-- | xpp/xpd.h | 31 |
1 files changed, 25 insertions, 6 deletions
@@ -32,7 +32,15 @@ #include <asm/atomic.h> #include <asm/semaphore.h> #include <linux/moduleparam.h> +#ifdef XPP_DEBUGFS +#ifndef CONFIG_DEBUG_FS +#warning kernel does not include CONFIG_DEBUG_FS, canceling XPP_DEBUGFS support +#undef XPP_DEBUGFS +#else +#include <linux/debugfs.h> +#endif #endif +#endif /* __KERNEL__ */ #include <zaptel.h> @@ -92,9 +100,9 @@ typedef struct packet_queue { } packet_queue_t; struct xbus_ops { - int (*packet_send)(xbus_t *xbus, xpacket_t *packet); - xpacket_t *(*packet_new)(xbus_t *xbus, gfp_t flags); - void (*packet_free)(xbus_t *xbus, xpacket_t *p); + int (*xframe_send)(xbus_t *xbus, xframe_t *xframe); + xframe_t *(*xframe_new)(xbus_t *xbus, gfp_t flags); + void (*xframe_free)(xbus_t *xbus, xframe_t *p); }; /* @@ -104,7 +112,7 @@ enum { XBUS_N_DESC_REQ, XBUS_N_DEV_DESC_FULL, XBUS_N_DEV_DESC_EMPTY, - XBUS_N_PCM_WRITE, + XBUS_N_SEND_PCM, XBUS_N_PCM_READ, XBUS_N_TX_BYTES, XBUS_N_RX_BYTES, @@ -121,7 +129,7 @@ static struct xbus_counters { C_(DESC_REQ), C_(DEV_DESC_FULL), C_(DEV_DESC_EMPTY), - C_(PCM_WRITE), + C_(SEND_PCM), C_(PCM_READ), C_(TX_BYTES), C_(RX_BYTES), @@ -142,6 +150,11 @@ struct card_desc_struct { xpd_addr_t xpd_addr; }; +#ifdef XPP_DEBUGFS +/* definition in xbus-core.c */ +struct debugfs_data; +#endif + /* * An xbus is a transport layer for Xorcom Protocol commands */ @@ -183,6 +196,11 @@ struct xbus { int num_xpds; void *priv; /* Pointer to transport level data structures */ +#ifdef XPP_DEBUGFS + struct dentry *debugfs_dir; + struct dentry *debugfs_file; + struct debugfs_data *debugfs_data; +#endif #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_xbus_dir; struct proc_dir_entry *proc_xbus_summary; @@ -281,11 +299,13 @@ struct xpd { atomic_t open_counter; /* Number of open channels */ int flags; + bool blink_mode; /* for visual identification */ #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_xpd_dir; struct proc_dir_entry *proc_xpd_summary; struct proc_dir_entry *proc_xpd_ztregister; + struct proc_dir_entry *proc_xpd_blink; #endif int counters[XPD_COUNTER_MAX]; @@ -302,7 +322,6 @@ struct xpd { xpd_addr_t addr; struct list_head xpd_list; unsigned int timer_count; - volatile u_char *writechunk; /* Double-word aligned write memory */ volatile u_char *readchunk; /* Double-word aligned read memory */ /* Echo cancelation */ u_char ec_chunk1[CHANNELS_PERXPD][ZT_CHUNKSIZE]; |