diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-12 22:49:13 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-07-12 22:49:13 +0000 |
commit | 5e3f82cf4b7a4788fc9e0a78782ad05988c4502c (patch) | |
tree | db449f3f67ff0991e55df5aca04ff1c6b9419981 /xpp/xbus-core.h | |
parent | eeb46da049ee996c180b0bbc716bcabdf1931e7e (diff) |
xpp driver r4371:
* Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward)
* Fix a critical race with zaptel synchronization (r4362)
* Added a /proc/xpp/cmds for statistics about command timing (r4360)
* Fix a digit mapping bug with hardware dtmf detection (r4357)
* In xpp/utils/Makefile add perl syntax checks to our scripts (r4337)
* Better USB data error checking (r4336)
* udev rules (xpp.rules) avoid false calls from wrong nodes (r4331)
* Improve hardware detection and reporting in lszaptel,
zaptel_hardware. zapconf is basically functional.
* Leds are blinked synchronously on all Astribanks now (r4262)
* Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258)
(This feature was not yet accepted into official zaptel)
* Removed compile warning about HZ != 1000 (r4218)
* Firmware updates.
* fpga_load now supports USB pathes without zeros (r4211)
* XPD numbers have changed to '<Unit><Subunit>' (r4196)
* Proper support for ZT_VMWI ioctl, if used in zaptel (r4092)
* Fix FXO power denial detection (r4054)
* FXO could accidentally go off-hook with some compilers (r4048)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2732 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xbus-core.h')
-rw-r--r-- | xpp/xbus-core.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xpp/xbus-core.h b/xpp/xbus-core.h index 58cd28b..f105d3a 100644 --- a/xpp/xbus-core.h +++ b/xpp/xbus-core.h @@ -28,8 +28,10 @@ #define XFRAME_DATASIZE 512 struct xframe { - atomic_t frame_len; - byte *packets; /* max XFRAME_DATASIZE */ + atomic_t frame_len; + xbus_t *xbus; + struct timeval tv_created; + byte *packets; /* max XFRAME_DATASIZE */ }; #define XFRAME_LEN(frame) atomic_read(&(frame)->frame_len) @@ -46,6 +48,8 @@ int xbus_log(xbus_t *xbus, xpd_t *xpd, int direction, const void *buf, unsigned xframe_t *xbus_frame_new(xbus_t *xbus, gfp_t flags); void xbus_frame_free(xbus_t *xbus, xframe_t *p); void dump_xframe(const char msg[], const xbus_t *xbus, const xframe_t *xframe); +int xframe_send(xbus_t *xbus, xframe_t *xframe); +int send_cmd_frame(xbus_t *xbus, xframe_t *xframe); /* * Return pointer to next packet slot in the frame @@ -54,8 +58,17 @@ void dump_xframe(const char msg[], const xbus_t *xbus, const xframe_t *xframe); xpacket_t *xframe_next_packet(xframe_t *xframe, int len); /* XBUS handling */ + +/* + * Map: unit+subunit <--> index in xbus->xpds[] + */ +#define XPD_IDX(unit,subunit) ((unit) * MAX_SUBUNIT + (subunit)) +#define XBUS_UNIT(idx) ((idx) / MAX_SUBUNIT) +#define XBUS_SUBUNIT(idx) ((idx) % MAX_SUBUNIT) + xbus_t *xbus_of(int xbus_num); xpd_t *xpd_of(const xbus_t *xbus, int xpd_num); +xpd_t *xpd_byaddr(const xbus_t *xbus, uint unit, uint subunit); xbus_t *xbus_new(xbus_ops_t *ops); void xbus_remove(xbus_t *xbus); void xbus_activate(xbus_t *xbus); |