summaryrefslogtreecommitdiff
path: root/xpp/xpp_zap.c
AgeCommit message (Collapse)Author
2007-08-16xpp rev. 4515:tzafrir
* BRI improvement: an 'nt_keepalive' parameter to xpd_bri forces a BRI_NT to retry a connection indefinitely (this is our default). When false it revert to the behaviour in changeset:4415 ("Bezeq like") * Improvement in DBG macros. The print_dbg parameter is now set of flags to debug. They are defined in zap_debug.h * Don't use Astribanks connected to USB1 interfaces Unless the user set the option usb1=1 for xpp_usb (r4504). * And some more documentation... * Include some of our variables in the default zaptel sample file. Merged revisions 2860 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 Merged revisions 2866 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2867 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-08-03xpp.r4415: (from 1.2 r2811)tzafrir
* Show Astribank 6+2 as 6/2 channels and not 8/8 channels. - Added as a "subtype" to the device type (r4391). * Fixed a panic in BRI span shutdown method (r4393). * Changes to debug macros. * Add proper sysfs support (r4406) - A bus on whuch all of the Astribanks reside. - Replaces useless sysfs code that existed in the module. - Currently used to set the sync source automatically at device adition / removal. * BRI: We do need the T1 timer in NT. If it gets into G2 state (r4407). Merged revisions 2812 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Ignore generated files on the new wctdm24xxp dir. (from 1.2 r2796) * Ignore two extra man pages on xpp/utils . Merged revisions 2797 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Generate list of Zaptel Modules directories automatically. * Evaluate PERLLIBDIR only once. Closes: #10223 (Xorcom changeset:4379, from 1.2 r2758) Merged revisions 2759 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2814 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-08-02Merge xpp r4372:tzafrir
* 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) (From branches/1.2 r2732, r2735 - branches/1.4 2736) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2813 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-05-17XPP revision 3965:tzafrir
* 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
2007-04-29xpp rev. 3814:tzafrir
* Protocol no. 2.6: syncing improvements. * Support for 8-port Astribank BRI. * Firmware unloading now works: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset * Defaults of kernel parameters are now part of parameter description. * World-readable kernel parameters. * No need for extra patch beyond bristuff for Astribank BRI. * Default poll intervals changed: 500 in BRI and FXO. * Allow changing FXS polls interval at run time. * BRI initalization fixed on SUSE (path to logger). * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in /etc/sysconfig/zaptel . * zt_registration not verbose by default. * xpp_sync warns if FXO is sync slave. * Fixed genzaptelconf -z (zapscan output emulation). * PCM fixes. * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2478 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-02-28Merge xpp rev. 3495:tzafrir
------------------------------------------------------------------------ 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/trunk@2247 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-02-09Merged revisions 2123-2124 via svnmerge from tzafrir
https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ r2123 | tzafrir | 2007-02-08 02:05:17 +0200 (Thu, 08 Feb 2007) | 27 lines Branch 1.4 is back in sync (currently: xorcom rev. 3332): * Performance improvements for multi-XPD (span) devices. * Astribank BRI driver (in next commit). * Changes under /proc: - XBUS and XPD numbers have two digits. - Every script wildcard should be replaced from XBUS-? to XBUS-[0-9]* - Added /proc/xpp/XBUS-*/XPD-*/blink: echo 1 to start and 0 to stop. * Several countries (South Africa, UAE, anybody else) require a shorter ring delay. Adjust FXO reg 0x17 (23)'s bits 0:2 to 011. * Use tasklets to move most of the interrupt PCM copying out of the interrupt. * Debugfs-based code to dump data to userspace (used to debug BRI D channel). * Pretend every 2.6.9 actually has later RHEL's typedefs. * fpga_load supports /dev/bus/usb . * Fixed physical order sorting in genzaptelconf. * Reverse polarity and power denial detection. * A short led flash at registration time. * Add a real version of the xpp modules to them (independent of the Zaptel version). * Update our line status even when not registered. * Fixed a false SIG_CHANGED when inserting or removing cable to FXO. * Fixed compilation fixes for 2.6.20 (Bug #8982) * A cleaner fix for the bool changes of 2.6.19 . * Automatically detect echo_can_state_t at debug time. * Automaitcally set XPP_DEBUGFS (depending on debugfs) at compile time. * Bug-fixes to zaptel-helper. Moved to xpp/utils . * Xbus protocol version: 2.4 (Zaptel 1.2.12/1.4.0 had 2.3). XPS Init scripts renamed accordingly. ........ r2124 | tzafrir | 2007-02-08 02:30:56 +0200 (Thu, 08 Feb 2007) | 1 line Now 'chans' is used after all. ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2144 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-01-23Merged revisions 1921 via svnmerge from kpfleming
https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r1921 | kpfleming | 2007-01-23 09:29:28 -0600 (Tue, 23 Jan 2007) | 10 lines Merged revisions 1920 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1920 | kpfleming | 2007-01-23 09:25:42 -0600 (Tue, 23 Jan 2007) | 2 lines clean up various compiler warnings ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1922 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-27Merged revisions 1767 via svnmerge from kpfleming
https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r1767 | kpfleming | 2006-12-27 16:49:37 -0600 (Wed, 27 Dec 2006) | 10 lines Merged revisions 1766 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1766 | kpfleming | 2006-12-27 16:47:19 -0600 (Wed, 27 Dec 2006) | 2 lines remove pointless duplication of ZAPTEL_VERSION that causes these modules to be rebuilt every time a commit is made to any part of Zaptel ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1768 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-18 r1727@boole: tzafrir | 2006-12-18 15:59:13 +0200tzafrir
r1722@boole: tzafrir | 2006-12-18 15:50:36 +0200 xpp_zap.c: Better error hanlding during module init. orig r2948: oron | 2006-12-17 18:54:00 +0200 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1731 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-15r1719@boole: tzafrir | 2006-12-15 15:50:57 +0200tzafrir
Sync to xpp RELEASE-1.2.0 2933. r2847@boole: diego | 2006-12-03 10:33:00 +0200 added documentation which explains which packages are needed to build the drivers on different distributions. r2862@boole: tzafrir | 2006-12-05 08:43:50 +0200 README.Astribank: A typo in the sample config (changeset:2861). r2891@boole: tzafrir | 2006-12-08 01:11:45 +0200 Re-accept changeset:2832 after all. r2892@boole: tzafrir | 2006-12-08 02:46:07 +0200 Merge genzaptelconf changeset:2866 from trunk: * Zapata comment on unidentified channel goes to $zapata_file * Correct pattern for Sangoma A200 card's channels. r2893@boole: tzafrir | 2006-12-08 03:11:37 +0200 genzaptelconf: * Add options xpp_fxo_rxgain: add a custom rxgain for every XPP FXO channel. * Do print the original line for every channel. r2909@boole: tzafrir | 2006-12-10 20:03:59 +0200 Add some sleeps in older kernels in the firmware loading script. r2932@boole: tzafrir | 2006-12-14 17:30:12 +0200 Make the warning about a call to off-hook FXO debug. At least if we cannot suppress it at module load time. r2933@boole: tzafrir | 2006-12-14 17:32:00 +0200 Don't redefine 'bool' on newer kerenls to fix building with kernel 2.6.19. Taken from Digium tree. (from changeset:2930) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1720 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-01 r1676@boole: tzafrir | 2006-12-01 02:09:53 +0200tzafrir
r1668@boole: tzafrir | 2006-11-30 23:48:25 +0200 r2832@boole: tzafrir | 2006-11-29 11:06:06 +0200 Add parameter xpp_ec to the module xpp (xpp_zap.c). Defaults to 1. If 0, module will use Zaptel echo canceller even with XPP_EC_CHUNK. Parameter is read-only for now: cannot be set through /sys/modules. (Merge of changeset:2830) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1682 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-11-06 r1557@boole: tzafrir | 2006-11-06 20:12:16 +0200tzafrir
Merging xpp driver release 1.2 (rev. 2569), originally team/tzafrir/xpp_1.2 * Should build well. Almost final. * genzaptelconf: Also work when zap_autoreg=0 * README.Astribank updated for rev. 1.2. * xpp/utils/Makefile: Use $< with cc -c * Get xpp/utils configuration from autoconf (without changesin top dir) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1563 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06Fix problems reported by sparsetzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1423 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06Cleanup the unused non-RBS code:tzafrir
* remove all non WITH_RBS code. No need for the define. * unused recv_errors and seq_errors. * CID_START_TICKS, CID_STOP_TICKS cid_timer from trunk/ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1411 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06More cleanup:tzafrir
xpp_zap.c: * Remove old and long unused character device interface. * Show some extra fields in XPD summary proc file. * Move atomic_dec() to correct position card_fxs.c: Remove unused label. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1409 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-05SPAN_REGISTERED() should not rely on zaptel ZT_FLAG_REGISTERED sincetzafrir
zaptel set it before registration is finished. (right: xpp needs to replicate zaptel's bookkeeping here). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1397 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04FXO caller-id now works.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1393 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Rename the bitmask xpd->hookstate into xpd->offhook (for readability).tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1391 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Move all zt_hooksig(...{OFF,ON}HOOK) calls into update_line_status() tzafrir
in xpp_zap.c git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1390 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Send ring signalling to zaptel directly from card_fxo.c:tzafrir
no need to xpp_ring_generate() git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1388 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Solves spinlock-panic in CentOS 4.tzafrir
zt_transmit() was called in spinlock protected context. However, it may call back our hook setting code which tries to lock the same spinlock. As a safeguard, the same logic was applied to zt_receive(). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1289 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Improve checking order in xpp_zap.ctzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1287 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Bugfix: should not call zaptel for unregistered XPD's.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1286 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10* New SOFT_RING detection in FXO:tzafrir
- Poll register 0x05 on each DAA - When enough energy (value of 0x20|0x40 occurs enough times), raise the ringing[] flag. - When the value show no energy, lower the ringing[] flag. - When we get SIG_CHANGED of stop ringing -- stop polling. * More debugging messages for proc files git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1285 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-14NULLify pointers to /proc files after removing them (so anyone who tries to tzafrir
access them afterwards causes iimmediate Oops instead of unknown behaviour). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1225 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-08just #include "zaptel.h". No STANDALONE_ZAPATA or other strange stuff.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1211 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-06Tons of updates to the Astribank (xpp) driver:tzafrir
* xpd_fxo.ko (FXO span) is now operational * Remove obsolete .inc initialization files (we use user-space init) * Added an install target to the utils dir. * Updated README.Astribank accordingly. * Using RBS signalling, as caller ID did not work well otherwise. * Better handling of USB protocol errors. * Fixed some procfs-related races. * per-card-module ioctls. * fxotune support. * opermode support (set through /etc/default/zaptel for now) * Userspace initialization script can also read registers. * Power calibration works (and implemented in perl) * some fine-tuning to the regster initialization parameters. * Leds turn on before registration and turn off after it. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1204 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-05yet another header file installation location change... Zaptel headers are ↵kpfleming
now installed into /usr/include/zaptel, not /usr/include git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1200 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-06-17* Echo canceller not disablerdtzafrir
* card_fxo.c: Fixed an unreleased spinlock * utils/Makefile: No more C++ flags * utils/Makefile: An install target * fpga_load: usb1 support * genzaptelconf: Support for more cards (Any Sangoma A20x testers?) * xpp_fxloder: The new USB ID, even for manual loads... * xpp_zap.c: Print module fetures in a better format at load time. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1114 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-05-03xpp driver release 1.1.0 (first part of commit)tzafrir
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-04-03by default don't debugtzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@996 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-02-15Merged revisions 949 via svnmerge from kpfleming
https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r949 | kpfleming | 2006-02-14 20:24:18 -0600 (Tue, 14 Feb 2006) | 2 lines initial import of Xorcom Astribank driver (issue #6452, with minor mods) ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@950 5390a7c7-147a-4af0-8ec9-7488f05a26cb