diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 15:36:20 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-18 15:36:20 +0000 |
commit | 2dfa9e1b2997fe4b67c5e6735c4803865a38c9d5 (patch) | |
tree | 22dcd52b9d9fcde2316852f2dec26213f8a8d56f /xpp/xpd.h | |
parent | ddb1b3b11ff6288a7dc5337ae7528b2efa2df427 (diff) |
xpp r5151:
* xpd_pri: Basically ready.
* PCM synchronization changes:
- Each Astribank unit ticks independently. Each with its own PLL.
- HOST synchronization is gone. Loading of xpp will no longer cause
useless 250 ticks per second if you have no Astribank.
- Synchronization from the zaptel sync master requires setting
ZAPTEL as sync source (xpp_sync ZAPTEL).
* rx_tasklet is now a parameter of the module xpp, rather than of xpp_usb.
* New FPGA firmware: 5128 (1151) / 5122 (1141, 1131):
- Fixes synchronization issues.
- PRI module: E1 should now work.
* perl module and utilities:
- Modules no longer magically scan system on initialization.
- Scanning is by calling explicit methods.
- "Serial" has been renamed "Label". It is basically unique, but
should be modifieble.
- Some basic documentation of zaptel perl modules.
* Default sort order of zt_registration is back to SORT_CONNCTOR.
* zt_registration proc file now shows the number of span registered to
if registered. Try: grep . /proc/xpp/XBUS-*/XPD-*/zt_registration
* genzaptelconf: Allow using a custom command instead of
/etc/init.d/asterisk to start/stop asterisk.
* Fixed the typo "Slagish".
Merged revisions 3506 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3508 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r-- | xpp/xpd.h | 154 |
1 files changed, 0 insertions, 154 deletions
@@ -86,62 +86,6 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */ #endif #endif // __KERNEL__ - -typedef struct xbus_ops xbus_ops_t; - -typedef enum xbus_type { - FIRMWARE_LOOPBACK = 1, - FIRMWARE_XPP = 2, -} xbus_type_t; - -#ifdef __KERNEL__ - -struct xbus_ops { - 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); -}; - -/* - * XBUS statistics counters - */ -enum { - XBUS_N_DESC_REQ, - XBUS_N_DEV_DESC_FULL, - XBUS_N_DEV_DESC_EMPTY, - XBUS_N_TX_XFRAME_PCM, - XBUS_N_RX_XFRAME_PCM, - XBUS_N_TX_PACK_PCM, - XBUS_N_RX_PACK_PCM, - XBUS_N_TX_BYTES, - XBUS_N_RX_BYTES, - XBUS_N_TX_PCM_FRAG, -}; - -#define XBUS_COUNTER(xbus, counter) ((xbus)->counters[XBUS_N_ ## counter]) - -#define C_(x) [ XBUS_N_ ## x ] = { #x } - -/* yucky, make an instance so we can size it... */ -static struct xbus_counters { - char *name; -} xbus_counters[] = { - C_(DESC_REQ), - C_(DEV_DESC_FULL), - C_(DEV_DESC_EMPTY), - C_(TX_XFRAME_PCM), - C_(RX_XFRAME_PCM), - C_(TX_PACK_PCM), - C_(RX_PACK_PCM), - C_(TX_BYTES), - C_(RX_BYTES), - C_(TX_PCM_FRAG), -}; - -#undef C_ - -#define XBUS_COUNTER_MAX ARRAY_SIZE(xbus_counters) - #define CARD_DESC_MAGIC 0xca9dde5c struct card_desc_struct { @@ -155,103 +99,6 @@ struct card_desc_struct { xpp_line_t line_status; /* Initial line status (offhook) */ }; -#ifdef XPP_DEBUGFS -/* definition in xbus-core.c */ -struct debugfs_data; -#endif - -/* - * Encapsulate all poll related data of a single xbus. - */ -struct xbus_poller { - /* - * Bus scanning - */ - xbus_t *xbus; - struct workqueue_struct *wq; - bool is_polling; - atomic_t count_poll_answers; - struct list_head poll_results; - wait_queue_head_t wait_for_polls; - - struct work_struct xpds_init_work; - - atomic_t count_xpds_to_initialize; - atomic_t count_xpds_initialized; - wait_queue_head_t wait_for_xpd_initialization; -}; - -/* - * An xbus is a transport layer for Xorcom Protocol commands - */ -struct xbus { - char busname[XBUS_NAMELEN]; /* set by xbus_new() */ - - /* low-level bus drivers set these 2 fields */ - char busdesc[XBUS_DESCLEN]; - char serialnum[SERIALNUM_SIZE]; - - int num; - xbus_ops_t *ops; - struct xpd *xpds[MAX_XPDS]; - int max_xframe_size; - - /* Device-Model */ - struct device astribank; -#define dev_to_xbus(dev) container_of(dev, struct xbus, astribank) - - /* Simulator data */ - xbus_type_t bus_type; - - spinlock_t lock; - atomic_t pcm_nesting; - - bool hardware_exists; /* Hardware is functional */ - int open_counter; /* Number of open channels */ - atomic_t packet_counter; /* Allocated packets */ - wait_queue_head_t packet_cache_empty; - - /* PCM metrics */ - struct timeval last_tx_sync; - struct timeval last_rx_sync; - unsigned long max_tx_sync; - unsigned long min_tx_sync; - unsigned long max_rx_sync; - unsigned long min_rx_sync; - unsigned long max_rx_process; /* packet processing time (usec) */ - - struct xbus_poller *poller; - - /* - * Sync adjustment - */ - int sync_adjustment; - int sync_adjustment_offset; - long pll_updated_at; - - struct rw_semaphore in_use; - 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; - struct proc_dir_entry *proc_xbus_waitfor_xpds; -#ifdef PROTOCOL_DEBUG - struct proc_dir_entry *proc_xbus_command; -#endif -#endif - - /* statistics */ - int counters[XBUS_COUNTER_MAX]; -}; -#endif - typedef enum xpd_direction { TO_PSTN = 0, TO_PHONE = 1, @@ -345,7 +192,6 @@ struct xpd { struct xpd_addr addr; struct list_head xpd_list; unsigned int timer_count; - volatile u_char *readchunk; /* Double-word aligned read memory */ /* Echo cancelation */ u_char ec_chunk1[CHANNELS_PERXPD][ZT_CHUNKSIZE]; u_char ec_chunk2[CHANNELS_PERXPD][ZT_CHUNKSIZE]; |