diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-27 06:14:18 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-27 06:14:18 +0000 |
commit | 75a1b90515aa90729ba32cb9698a6db53e19cdd4 (patch) | |
tree | 2fbd3fc7760e0326d61150659f619446b4b71e48 /xpp/xpd.h | |
parent | d2bc5edd30ddb4258feca767eb6cd5d2bc96ad30 (diff) |
Xorcom rev. 3491:
* Version of xpp modules is set from xpp/.version, rather than "unknown".
* Astribank devices are now initialized in parallel: faster startup
when there are multiple Astribanks.
* Re-added support for the old format of /proc/xpp/sync write:
(echo N 0 > /proc/xpp/sync ) . The new format (SYNC=NN) is preffered.
* Firmware update to fix a PCM issue.
* Fixed a build issue with kernel 2.6.8 .
* Fixed missing initialization in Zaptel::Xpp::Xbus .
* genzaptelconf will now set FXS ports as LS by default. To set them as
KS, use fxs_default_start=ks in /etc/default/zaptel / /etc/sysconfig/zaptel
(Also a workaround for #7755 ).
* Groundwork for sync from zaptel master span: if zaptel is built with
ZAPTEL_SYNC_TIC (see zaptel/team/tzafrir/sync ), xpp will report its
drift from the zaptel sync master.
* USB firmware update: had bad lines checksums (and fxload did not report).
* fpga_load can now better report bad hex file checksum ;-) .
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2239 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r-- | xpp/xpd.h | 49 |
1 files changed, 23 insertions, 26 deletions
@@ -155,6 +155,7 @@ struct card_desc_struct { byte rev; /* Revision number */ byte type; /* LSB: 1 - to_phone, 0 - to_line */ xpd_addr_t xpd_addr; + xpp_line_t line_status; /* Initial line status (offhook) */ }; #ifdef XPP_DEBUGFS @@ -163,6 +164,27 @@ 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 { @@ -186,18 +208,7 @@ struct xbus { atomic_t packet_counter; /* Allocated packets */ wait_queue_head_t packet_cache_empty; - /* - * Bus scanning - */ - 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; + struct xbus_poller *poller; struct rw_semaphore in_use; int num_xpds; @@ -255,16 +266,6 @@ static struct xpd_counters { #define XPD_COUNTER_MAX (sizeof(xpd_counters)/sizeof(xpd_counters[0])) -/* Values of SLIC register 0x40 */ -enum fxs_state { - FXS_LINE_DISABLED = 0x00, - FXS_LINE_ENABLED = 0x01, - FXS_LINE_CID = 0x02, - FXS_LINE_TIPOPEN = 0x03, /* For GroundStart signalling */ - FXS_LINE_RING = 0x04, - FXS_LINE_REV_ACTIVE = 0x05 -}; - /* * An XPD is a single Xorcom Protocol Device */ @@ -285,10 +286,6 @@ struct xpd { bool ringing[CHANNELS_PERXPD]; - enum fxs_state lasttxhook[CHANNELS_PERXPD]; - int idletxhookstate[CHANNELS_PERXPD]; /* IDLE changing hook state */ - int ohttimer[CHANNELS_PERXPD]; - xbus_t *xbus; /* The XBUS we are connected to */ spinlock_t lock; |