From 3af1b5fa2ec86d21762ad1cea81d2b275d4a9d48 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Thu, 17 May 2007 22:55:21 +0000 Subject: XPP revision 3965: * Tested with zaptel-1.2.17.1 * Add D-Channel TX, RX and BAD frames count in /proc/xpp/XBUS-*/XPD-*/bri_info * Adjust output of xpp_sync script. Pad for 8 port BRI. * Added a debugging module parport_debug (not compiled by default). * Added an optional patch to zaptel: - compiles only if ZAPTEL_SYNC_TICK is defined - Allow interested driver to register for "sync" notification. - Does not affect drivers that do not use this feature. * Added external synchronization feature: - Only if ZAPTEL_SYNC_TICK feature is compiled in - Than XPP may be synchronized by another card (e.g: an Astribank with FXS can be synchronized by a Digium PRI card). - May be enabled/disabled in runtime via the 'sync_tick_active' module parameter to the xpp.ko module. * Fixed a potential bug in D-Channel hexdump printing. * New visual indications in BRI leds: - Constant ON RED/GREEN: Shows the port type -- NT/TE. - Very fast "double blink": Layer1 work, no D-Channel yet. - Steady blinking (1/2 sec): D-Channel trafic detected. * xpp_fxloader moved to /usr/share/zaptel . * adj_clock removed: never really used. * Now we have Zaptel::Hardware and a sample zaptel_hardware script (not (installed by default). * We also have a sample perl zapconf (not installed by default) which aims at replacing genzaptelconf (sans the modules detection). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2537 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/card_global.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xpp/card_global.c') diff --git a/xpp/card_global.c b/xpp/card_global.c index 0ec6227..70886a8 100644 --- a/xpp/card_global.c +++ b/xpp/card_global.c @@ -20,13 +20,14 @@ * */ +#include #include "xdefs.h" #include "xpd.h" #include "xpp_zap.h" #include "xproto.h" #include "zap_debug.h" #include "xbus-core.h" -#include +#include "parport_debug.h" static const char rcsid[] = "$Id$"; @@ -125,8 +126,8 @@ HANDLER_DEF(GLOBAL, PCM_READ) int unit; int subunit; struct timeval now; - long sec_diff; - long usec_diff; + unsigned long sec_diff; + unsigned long usec_diff; BUG_ON(!xbus); do_gettimeofday(&now); @@ -196,6 +197,7 @@ HANDLER_DEF(GLOBAL, PCM_READ) if (!IS_BRI(tmp_xpd)) /* only BRI has subunits */ break; } + flip_parport_bit(2); /* * Firmware marks the sync packets. * This is out of the loop, so we don't send multiple times @@ -220,6 +222,7 @@ HANDLER_DEF(GLOBAL, SYNC_REPLY) DBG("%s/%s: mode=0x%X drift=%d\n", xpd->xbus->busname, xpd->xpdname, mode, drift); dump_packet("SYNC_REPLY", pack, 1); + xbus->sync_adjustment = (signed char)drift; return 0; } -- cgit v1.2.3