diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-28 00:56:59 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-28 00:56:59 +0000 |
commit | a1a97753d4018fe1becf193b2882953737f013e4 (patch) | |
tree | cd5614ed0784e14245391c592f094cc7ecc410ef /xpp/xpd.h | |
parent | 2fcb494422456ed1dc6cff0c92bb4bada6545da8 (diff) |
xpp rev. 3495:
------------------------------------------------------------------------
r2243 | tzafrir | 2007-02-28 02:05:59 +0200 (Wed, 28 Feb 2007) | 4 lines
* xpp rev. 3495: fix a race in the FXO driver of recent weeks.
* Add the Astribank BRI driver (though still needs bristuffed zaptel
to build and thus will not build by default)
------------------------------------------------------------------------
r2239 | tzafrir | 2007-02-27 08:14:18 +0200 (Tue, 27 Feb 2007) | 18 lines
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 ;-) .
------------------------------------------------------------------------
r2223 | tzafrir | 2007-02-24 03:05:05 +0200 (Sat, 24 Feb 2007) | 3 lines
Add the Zaptel and Zaptel::Xpp perl modules, and some simple
utilities that use them. disabled by default for now.
------------------------------------------------------------------------
r2222 | tzafrir | 2007-02-24 02:55:05 +0200 (Sat, 24 Feb 2007) | 2 lines
Make the xpp/utils/Makefile in 1.2 closer to the one in 1.4 .
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2244 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; |