asterisk-tools:sruffells-dahdi-linux.git
9 years agoImporting files for 2.2.0-rc3 release. v2.2.0-rc3
Shaun Ruffell [Thu, 7 May 2009 19:49:33 +0000 (19:49 +0000)]
Importing files for 2.2.0-rc3 release.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.2.0-rc3@6574 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoCreating tag for the release of dahdi-linux-2.2.0-rc3
Shaun Ruffell [Thu, 7 May 2009 19:46:58 +0000 (19:46 +0000)]
Creating tag for the release of dahdi-linux-2.2.0-rc3

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.2.0-rc3@6573 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Create workqueue for each vpmadt032 instance.
Shaun Ruffell [Thu, 7 May 2009 19:42:00 +0000 (19:42 +0000)]
voicebus: Create workqueue for each vpmadt032 instance.

Depending on the system latency, the deferred work for the vpmadt032 can take
up to 200ms.  This change allows each vpmadt032 to use its own workqueue, and
not the global system workqueue.  This prevents vpm operations from blocking
the main system workqueue for extended periods.

This restores the behavior to the way it was before the common vpmadt032 code
was moved out of the wctdm24xxp and wcte12xp drivers.

DAHDI-260

voicebus-squash:  Adding the wq name.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6572 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Changing default NLP type to 'suppression'.
Shaun Ruffell [Thu, 7 May 2009 16:53:32 +0000 (16:53 +0000)]
voicebus:  Changing default NLP type to 'suppression'.

The 'suppression' default for the NLP provides better echo canceling
performance.  Also ensures that the wctdm24xxp and wcte12xp driver use the
same default values.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6568 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Use the companding type on the span when enabling echocan.
Shaun Ruffell [Tue, 5 May 2009 17:32:29 +0000 (17:32 +0000)]
voicebus: Use the companding type on the span when enabling echocan.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6564 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoInsure that vpmnlptype, vpmnlpmaxsupp, and vpmnlpthresh are set back to module
Doug Bailey [Mon, 4 May 2009 20:36:36 +0000 (20:36 +0000)]
Insure that vpmnlptype, vpmnlpmaxsupp, and vpmnlpthresh are set back to module
level defaults when echo can is freed. (Previously they were zero'd out)

DAHDI-257

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6562 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRemove explicit passing of ARCH to kernel build system
Kevin P. Fleming [Sat, 2 May 2009 07:53:48 +0000 (07:53 +0000)]
Remove explicit passing of ARCH to kernel build system

There is no value in setting a value for ARCH and passing it to the kernel
build system; the configured kernel headers/sources already have an architecture
specified and can't be used for any other architecture anyway.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6556 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agodahdi-base: define __RW_LOCK_UNLOCKED()
Shaun Ruffell [Fri, 1 May 2009 16:43:18 +0000 (16:43 +0000)]
dahdi-base: define __RW_LOCK_UNLOCKED()

Linux 2.6.9 does not contain that definition, but the older definition is
deprecated since it defeats lock state checking. DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6554 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Need Makefile to build on 2.6.9
Shaun Ruffell [Fri, 1 May 2009 16:43:02 +0000 (16:43 +0000)]
voicebus:  Need Makefile to build on 2.6.9

DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6553 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowcb4xxp: Define mmiowb if not already defined.
Shaun Ruffell [Fri, 1 May 2009 16:42:54 +0000 (16:42 +0000)]
wcb4xxp: Define mmiowb if not already defined.

Linux kernel 2.6.9 does not define mmiowb. DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6552 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowctc4xxp: spin_trylock_irqsave is not defined on some kernels.
Shaun Ruffell [Fri, 1 May 2009 16:42:45 +0000 (16:42 +0000)]
wctc4xxp: spin_trylock_irqsave is not defined on some kernels.

DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6551 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowctc4xxp: Defined gfp_t for earlier kernels.
Shaun Ruffell [Fri, 1 May 2009 16:42:35 +0000 (16:42 +0000)]
wctc4xxp: Defined gfp_t for earlier kernels.

This definition was just copied from the xpp driver.
DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6550 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowctc4xxp: Fix inclusion of linux/io.h on 2.6.9 kernels.
Shaun Ruffell [Fri, 1 May 2009 16:42:23 +0000 (16:42 +0000)]
wctc4xxp: Fix inclusion of linux/io.h on 2.6.9 kernels.

DAHDI-253

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6549 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix compilation of applications that use DAHDI ioctls
Kevin P. Fleming [Thu, 30 Apr 2009 20:59:20 +0000 (20:59 +0000)]
Fix compilation of applications that use DAHDI ioctls

Defining ioctl codes in this file requires that linux/ioctl.h be included first.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6546 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoEnsure that vpmsupport=0 module parameter takes proper effect
Kevin P. Fleming [Thu, 30 Apr 2009 19:49:36 +0000 (19:49 +0000)]
Ensure that vpmsupport=0 module parameter takes proper effect

For these drivers, when the vpmsupport module parameter is set to zero, don't
even register the span as supporting echo cancellation.

DAHDI-250

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6544 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: A new FPGA firmware to hopefully help with BRI/FXO.
Tzafrir Cohen [Thu, 30 Apr 2009 13:59:19 +0000 (13:59 +0000)]
xpp: A new FPGA firmware to hopefully help with BRI/FXO.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6542 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoechocan: Improve interface for echo cancelers.
Shaun Ruffell [Wed, 29 Apr 2009 18:24:04 +0000 (18:24 +0000)]
echocan: Improve interface for echo cancelers.

Echo cancelers are now able to report if they are able to automatically disable
their NLP portions in the presence of tones in the audio stream.   Also, the
interface is changed to allow user space to just disable the NLP portion of the
echo canceler.  These changes improve fax and modem handling in DAHDI.

This commit merges in the changes on
http://svn.digium.com/svn/dahdi/linux/team/kpfleming/echocan_work

Patch by: kpfleming

Also contains improvements to CED tone detection.
(closes issue #13286)
Reported by: viniciusfontes

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6529 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowct4xxp: Fix problem when timing source is via external cable.
Shaun Ruffell [Wed, 29 Apr 2009 18:09:41 +0000 (18:09 +0000)]
wct4xxp: Fix problem when timing source is via external cable.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6528 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Move common vpmadt032 interface into voicebus module.
Shaun Ruffell [Wed, 29 Apr 2009 17:48:39 +0000 (17:48 +0000)]
voicebus: Move common vpmadt032 interface into voicebus module.

The voicebus library was previously linked into both the wcte12xp and wctdm24xxp
drivers.  It is now broken out into it's own module and the common parts of the
vpmadt032 interface are now located in that module to reduce duplication between
the wcte12xp and wctdm24xxp drivers.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6527 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowctc4xxp: Change netif_rx_xxx to napi_xxx
Shaun Ruffell [Wed, 29 Apr 2009 17:48:32 +0000 (17:48 +0000)]
wctc4xxp: Change netif_rx_xxx to napi_xxx

The netif_rx_xxx functions were dropped from the linux kernel source on
2009-01-21 in commit 288379f050284087578b77e04f040b57db3db3f8.

(closes issue #14963)
Reported by: tzafrir

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6526 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agowcte12xp: Update cmdqueue processing.
Shaun Ruffell [Wed, 29 Apr 2009 17:48:29 +0000 (17:48 +0000)]
wcte12xp: Update cmdqueue processing.

The command queue for reading from the registers on the framer is now stored in
a linked_list instead of an array.  Allows for the locks to protect this
structure to be held for shorter periods of time and reduces the need to cycle
through all the elements in the array to decide if there is a command in the
queue to process. Remove the usecount and dead members from struct t1 since the
module reference count will allow us to know when it's safe to free up the
memory. This change also moves alarm processing out of the interrupt handler and
removes the need for special interrupt handling of commands.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6525 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agodahdi_dummy: Remove real-time clock support.
Shaun Ruffell [Wed, 29 Apr 2009 17:48:27 +0000 (17:48 +0000)]
dahdi_dummy: Remove real-time clock support.

This removes support for using the real-time clock as a timing source in
dahdi_dummy.  Instead, the normal kernel timers method is now more accurate
since it keeps track of how much real time has passed to determine how many
times to call dahdi_receive and dahdi_transmit.  This method was originally
suggested by bmd.

(closes issue #13930)
(closes issue #14884)
Reported by: tzafrir
Tested by: dbackeberg, ask

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6524 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agovoicebus: Removing unused code blocks and space in flag definitions.
Shaun Ruffell [Wed, 29 Apr 2009 17:48:25 +0000 (17:48 +0000)]
voicebus: Removing unused code blocks and space in flag definitions.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6523 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: hard_hdlc support for the BRI module.
Tzafrir Cohen [Mon, 27 Apr 2009 20:03:15 +0000 (20:03 +0000)]
xpp: hard_hdlc support for the BRI module.

The BRI module will now use hardhdlc unless the DAHDI tree has been
patched with the bri_dchan patch, in which case the old "bristuffed"
code will be used.

Thus it is now built by default.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6513 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoadapt live_dahdi to current xpp tools
Tzafrir Cohen [Sat, 25 Apr 2009 16:35:33 +0000 (16:35 +0000)]
adapt live_dahdi to current xpp tools

* More varibles to set through the environment
* Different way to list drivers

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6487 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRevert r6302 - there was no need to upload them
Tzafrir Cohen [Thu, 23 Apr 2009 15:11:12 +0000 (15:11 +0000)]
Revert r6302 - there was no need to upload them

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6466 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoDon't set the Id keyword on firmwares; restore original ID
Tzafrir Cohen [Thu, 23 Apr 2009 14:48:18 +0000 (14:48 +0000)]
Don't set the Id keyword on firmwares; restore original ID

The Id SVN keyword is set locally in Xorcom and used as an identifier.
That Id should not be overriden by this SVN repository.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6465 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: FPGA_1161.hex: fix FXO PCM issues (new boards only)
Tzafrir Cohen [Thu, 23 Apr 2009 13:57:40 +0000 (13:57 +0000)]
xpp: FPGA_1161.hex: fix FXO PCM issues (new boards only)

FPGA_1161.hex rev. 7024.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6457 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agodon't refer to macros from dahdi_config.h until after it has been included
Kevin P. Fleming [Wed, 22 Apr 2009 12:53:49 +0000 (12:53 +0000)]
don't refer to macros from dahdi_config.h until after it has been included

use the proper type for the flags variable in dahdi_ppp_xmit()

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6444 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMove DAHDI_DEFAULT_MTU_MRU from kernel.h to user.h
Tzafrir Cohen [Tue, 21 Apr 2009 22:16:15 +0000 (22:16 +0000)]
Move DAHDI_DEFAULT_MTU_MRU from kernel.h to user.h

The macro DAHDI_DEFAULT_MTU_MRU needs to be exposed to userspace to
build tools/ppp/dahdi.c .

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6430 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp firmware: stability fixes for firmwares of new Astribanks
Tzafrir Cohen [Mon, 20 Apr 2009 10:49:54 +0000 (10:49 +0000)]
xpp firmware: stability fixes for firmwares of new Astribanks

FPGA_1161.hex:  xpp rev 7007
PIC_TYPE_*.hex: xpp rev 7000

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6409 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: Do use information about number of ports the Astribank provides
Tzafrir Cohen [Mon, 20 Apr 2009 10:26:35 +0000 (10:26 +0000)]
xpp: Do use information about number of ports the Astribank provides

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6408 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: Fix FXS calibration (dec rather than hex)
Tzafrir Cohen [Mon, 20 Apr 2009 10:21:40 +0000 (10:21 +0000)]
xpp: Fix FXS calibration (dec rather than hex)

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6407 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp fxs/fxo: PCM and DTMF fixes
Tzafrir Cohen [Thu, 16 Apr 2009 19:35:48 +0000 (19:35 +0000)]
xpp fxs/fxo: PCM and DTMF fixes

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6393 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp fxs: Notify the user just one about wrong VMWI config
Tzafrir Cohen [Thu, 16 Apr 2009 19:08:53 +0000 (19:08 +0000)]
xpp fxs: Notify the user just one about wrong VMWI config

From xpp rev. 6974.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6386 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp fxs: Ignore registers of disabled SLICs
Tzafrir Cohen [Thu, 16 Apr 2009 18:16:29 +0000 (18:16 +0000)]
xpp fxs: Ignore registers of disabled SLICs

From xpp rev. 6979

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6377 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp bri: explicitly turn off leds on startup
Tzafrir Cohen [Thu, 16 Apr 2009 18:10:41 +0000 (18:10 +0000)]
xpp bri: explicitly turn off leds on startup

If NT/TE was changed (e.g: happened because of firmware bug)
We would be left with a lit led we don't know about.

From xpp rev. 6990

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6376 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMove astribank_hook from linux to tools. Install it by default
Tzafrir Cohen [Fri, 10 Apr 2009 09:53:40 +0000 (09:53 +0000)]
Move astribank_hook from linux to tools. Install it by default

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6344 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAlso install dahdi_config.h to /usr/include/dahdi
Tzafrir Cohen [Sat, 4 Apr 2009 14:22:46 +0000 (14:22 +0000)]
Also install dahdi_config.h to /usr/include/dahdi

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6325 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoUpdate the sample udev astribank_hook for TwinStar
Tzafrir Cohen [Thu, 2 Apr 2009 20:34:34 +0000 (20:34 +0000)]
Update the sample udev astribank_hook for TwinStar

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6312 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoXPP: support for 116x Astribanks.
Tzafrir Cohen [Thu, 2 Apr 2009 20:27:42 +0000 (20:27 +0000)]
XPP: support for 116x Astribanks.

 * New software to load in the udev rules
 * New control protocol ("MPP")
 * More modular FPGA firmware

From Xorcom rev. 6963.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6311 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoXPP FPGA Firmware updates: firmware rev. 6943.
Tzafrir Cohen [Thu, 2 Apr 2009 20:02:28 +0000 (20:02 +0000)]
XPP FPGA Firmware updates: firmware rev. 6943.

Minor bug fixes

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6302 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoReduce the rate for a potentially annoying message
Tzafrir Cohen [Thu, 2 Apr 2009 19:36:36 +0000 (19:36 +0000)]
Reduce the rate for a potentially annoying message

This message is used when an xpp span is a DAHDI sync master but also
set to take timing from the DAHDI master. This means wrong settings:
user is wasting CPU cycles.

However notifying the user about it every second is still too much.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6301 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoensure that the structure being returned by DAHDI_GET_BUFINFO is completely initialized
Kevin P. Fleming [Thu, 2 Apr 2009 17:27:02 +0000 (17:27 +0000)]
ensure that the structure being returned by DAHDI_GET_BUFINFO is completely initialized

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6294 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agocorrect minor spacing issue
Kevin P. Fleming [Thu, 2 Apr 2009 13:34:35 +0000 (13:34 +0000)]
correct minor spacing issue

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6285 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFixes DAHDI-214 crash on driver unload. Affects wcte12xp and wctdm24xxp modules.
Wendell Thompson [Thu, 26 Mar 2009 18:33:28 +0000 (18:33 +0000)]
Fixes DAHDI-214 crash on driver unload. Affects wcte12xp and wctdm24xxp modules.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6262 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoEliminate unnecessary checks for NULL before freeing memory.
Shaun Ruffell [Tue, 24 Mar 2009 19:08:17 +0000 (19:08 +0000)]
Eliminate unnecessary checks for NULL before freeing memory.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6246 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoDo not allocate more memory than is needed when sending packets.
Shaun Ruffell [Tue, 24 Mar 2009 19:08:12 +0000 (19:08 +0000)]
Do not allocate more memory than is needed when sending packets.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6245 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoBlock runt packets from the transcoder.
Shaun Ruffell [Tue, 24 Mar 2009 19:08:06 +0000 (19:08 +0000)]
Block runt packets from the transcoder.

Tested by: Walter Klomp

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6244 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoDo not define the debug flags if CONFIG_SLUB is not set.
Shaun Ruffell [Tue, 24 Mar 2009 15:59:55 +0000 (15:59 +0000)]
Do not define the debug flags if CONFIG_SLUB is not set.

Some versions of the kernel (2.6.18-92.1.22.el5) have patches in them to panic
if a slab cache is created with unsupported flags.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6237 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMake sure the requested echo canceller name is NULL-terminated.
Tzafrir Cohen [Tue, 24 Mar 2009 15:59:32 +0000 (15:59 +0000)]
Make sure the requested echo canceller name is NULL-terminated.

Make sure that the that the name of the echo canceller requested in the
DAHDI ioctl DAHDI_ATTACH_ECHOCAN is NULL-terminated.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6236 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMake some messages debug messages and minor formatting adjustment.
Shaun Ruffell [Mon, 23 Mar 2009 23:49:12 +0000 (23:49 +0000)]
Make some messages debug messages and minor formatting adjustment.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6228 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoVerify checksum on the RTP IP header before queueing.
Shaun Ruffell [Mon, 23 Mar 2009 23:49:06 +0000 (23:49 +0000)]
Verify checksum on the RTP IP header before queueing.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6227 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoPoll the card in a kernel timer when several channels are open.
Shaun Ruffell [Mon, 23 Mar 2009 23:49:03 +0000 (23:49 +0000)]
Poll the card in a kernel timer when several channels are open.

Polling the driver increases overall system throughput when there are several
transcoding channels open by reducing the number of interrupts the the TC400M
generates.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6226 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoOptionally show total number of packets dropped when channel is closed.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:59 +0000 (23:48 +0000)]
Optionally show total number of packets dropped when channel is closed.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6225 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoDo not handle duplicate reponses.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:54 +0000 (23:48 +0000)]
Do not handle duplicate reponses.

It is possible for system activity to prevent the wctc4xxp driver from
responding the the firmware on the TC400M for a period of time.  If this occurs,
the TC400M will resend a response to a command that we sent.  This duplicate
reponse will then sometimes confuse the driver.  Normally this would manifest
as an attempt to connect the same channel together in a transcoding session.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6224 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoCreate our own free list for commands instead of using kmem_cache.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:49 +0000 (23:48 +0000)]
Create our own free list for commands instead of using kmem_cache.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6223 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoSet TX_COMPLETE atomically with changes to the waiting_for_response_list.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:43 +0000 (23:48 +0000)]
Set TX_COMPLETE atomically with changes to the waiting_for_response_list.

This change is to catch a condition where it is possible, for whatever reason,
for a response to come in before the request is marked tx complete.
If this happened, it was possible to leak the response packet and double complete
the command.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6222 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agosplit send_trans_connect into a connect / disconnect pair.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:38 +0000 (23:48 +0000)]
split send_trans_connect into a connect / disconnect pair.

Trivial change that makes the code read more naturally.  Also changes the order
of members in the channel_pvt structure. For more natural alignment.  Both
non-functional changes.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6221 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoIf the driver fails to register, make sure we cleanup the command cache.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:33 +0000 (23:48 +0000)]
If the driver fails to register, make sure we cleanup the command cache.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6220 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoSetup the TC400M to poll the own bit on the descriptor ring.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:27 +0000 (23:48 +0000)]
Setup the TC400M to poll the own bit on the descriptor ring.

On certain systems having the hardware poll the descriptor ring provides more
reliable operation that strobbing the transmit demand poll and receive demand
poll register.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6219 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMake sure that messages sitting in the outbound queue cause the timer to
Shaun Ruffell [Mon, 23 Mar 2009 23:48:22 +0000 (23:48 +0000)]
Make sure that messages sitting in the outbound queue cause the timer to
reschedule.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6218 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRefactor channel command handling.
Shaun Ruffell [Mon, 23 Mar 2009 23:48:16 +0000 (23:48 +0000)]
Refactor channel command handling.

Makes commands and reponses clearer and easier to trouble shoot, reduces
pressure on the stack, and brings driver closer to kernel coding standards.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6217 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix a typo
Jason Parker [Wed, 18 Mar 2009 18:48:41 +0000 (18:48 +0000)]
Fix a typo

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6201 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp USB_FW.hex rev 6885: fixes reading label from USB
Tzafrir Cohen [Tue, 17 Mar 2009 17:59:18 +0000 (17:59 +0000)]
xpp USB_FW.hex rev 6885: fixes reading label from USB

Previous USB_FW.hex, 6770, has failed to properly read the USB iSerial
field ("Label" in xpp terms). This is fixed here.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6191 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMove dahdi_config.h to be under include/dahdi/
Tzafrir Cohen [Mon, 16 Mar 2009 19:29:10 +0000 (19:29 +0000)]
Move dahdi_config.h to be under include/dahdi/

This makes dahdi_config.h part of the "offcial" interface to external
modules. Practically most of its configuration items are internal to
dahdi-base. But some are intended for other drivers.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6177 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMake ecdis.h used by dahdi-base.h alone
Tzafrir Cohen [Mon, 16 Mar 2009 17:45:46 +0000 (17:45 +0000)]
Make ecdis.h used by dahdi-base.h alone

ecdis.h is no longer #include-d in kernel.h . it was there because of
decleration of some structs that are part of struct dahdi_chan. The
declerations of those structs were moved into kernel.h directly.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6170 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix handling of 'w' in a pulse dial string
Tzafrir Cohen [Fri, 13 Mar 2009 10:21:16 +0000 (10:21 +0000)]
Fix handling of 'w' in a pulse dial string

Make the special "digit" 'w' work in pulse dialing as it works with tone
dialing (a delay of 0.5 second till the next digit). Note that the digit
gets uppercased before it gets to this function.

(closes issue #13999)
Reported by: IgorG
Patches:
      dahdi-base.c.pulse2.diff uploaded by tzafrir (license 46)
Tested by: litnimax

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6147 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoA better sample xpp.conf
Tzafrir Cohen [Thu, 12 Mar 2009 15:15:18 +0000 (15:15 +0000)]
A better sample xpp.conf

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6136 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp init_card_* scripts now less verbose
Tzafrir Cohen [Thu, 12 Mar 2009 15:12:50 +0000 (15:12 +0000)]
xpp init_card_* scripts now less verbose

* Demote some messages to be debug messages.
* Rephrase the message about defaults for the PRI module (the driver's
  defaults are used, which is OK)

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6135 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix handling of DAHDI_GETGAINS_V1 missing from r6124 .
Tzafrir Cohen [Thu, 12 Mar 2009 14:50:58 +0000 (14:50 +0000)]
Fix handling of DAHDI_GETGAINS_V1 missing from r6124 .

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6134 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAllow 10ms for voicebus hardware to settle after reset.
Shaun Ruffell [Wed, 11 Mar 2009 14:51:11 +0000 (14:51 +0000)]
Allow 10ms for voicebus hardware to settle after reset.

The voicebus hardware needs more time to settle after a reset.  The short settle
time explains why there was frequently one IRQ miss reported in the proc file
for the spans.

Reported by: jsloan

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6126 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRelax ident wheel requirements.
Shaun Ruffell [Wed, 11 Mar 2009 14:51:04 +0000 (14:51 +0000)]
Relax ident wheel requirements.

Do not require the first card to be set to 0 and allow skips in the ident wheel
numbers.  The ident wheel allows a user to determine the order that cards
register there spans with DAHDI.

(closes issue #13078)
Reported by: opticron
Patch by: opticron

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6125 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix direction bits on several ioctls.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:58 +0000 (14:50 +0000)]
Fix direction bits on several ioctls.

(related to issue #14499)
Reported by: ys

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6124 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAdding spaces around some other operators and moving 'inline' keyword.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:53 +0000 (14:50 +0000)]
Adding spaces around some other operators and moving 'inline' keyword.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6123 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoNo need to assign 0 to static variables.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:48 +0000 (14:50 +0000)]
No need to assign 0 to static variables.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6122 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRemoving assignement in condition.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:43 +0000 (14:50 +0000)]
Removing assignement in condition.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6121 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRemoved braces around single line statements in accordance with kernel coding
Shaun Ruffell [Wed, 11 Mar 2009 14:50:37 +0000 (14:50 +0000)]
Removed braces around single line statements in accordance with kernel coding
standards.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6120 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAdding required spaces after semicolons.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:32 +0000 (14:50 +0000)]
Adding required spaces after semicolons.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6119 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMoving the pointer specifier away from the type.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:27 +0000 (14:50 +0000)]
Moving the pointer specifier away from the type.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6118 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFixed up spacing around parenthesis.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:22 +0000 (14:50 +0000)]
Fixed up spacing around parenthesis.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6117 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRemove trailing whitespace.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:17 +0000 (14:50 +0000)]
Remove trailing whitespace.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6116 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAdding spaces after commas.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:12 +0000 (14:50 +0000)]
Adding spaces after commas.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6115 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoKeep transcoders on a list in registration order.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:06 +0000 (14:50 +0000)]
Keep transcoders on a list in registration order.

This fixes a bug where it was possible for there to be a transcoder in position
"1" but not in position "0" if a transcoder hardware driver was loaded,
unloaded, and reloaded again without also reloading dahdi_transcode.  The result
is that codec_dahdi fails to enumerate all the transcoders in the system.

(closes issue #14627)
Reported by: xblurone

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6114 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoEliminating an unused parameter to dahdi_specchan_open.
Shaun Ruffell [Wed, 11 Mar 2009 14:50:00 +0000 (14:50 +0000)]
Eliminating an unused parameter to dahdi_specchan_open.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6113 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoWorkarounds for SLUB sysfs problems in kernel 2.6.22 with CONFIG_SLUB and CONFIG_SLUB...
Wendell Thompson [Fri, 6 Mar 2009 21:43:34 +0000 (21:43 +0000)]
Workarounds for SLUB sysfs problems in kernel 2.6.22 with CONFIG_SLUB and CONFIG_SLUB_DEBUG, as in Fedora Core 6.
Fixes kernel oops when loading/unloading dahdi modules. DAHDI-226

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6096 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoxpp: FPGA firmwares 6799
Tzafrir Cohen [Thu, 5 Mar 2009 18:53:45 +0000 (18:53 +0000)]
xpp: FPGA firmwares 6799

New FPGA firmware with a number of bug fixes.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6079 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoNew XPP code: xpp rev 6795:
Tzafrir Cohen [Sun, 1 Mar 2009 13:56:23 +0000 (13:56 +0000)]
New XPP code: xpp rev 6795:
  * Fix cases where the command_queue overflowed during initialization.
    - Also add a 'command_queue_length' parameter to xpp.ko
  * More migrations to sysfs:
    - Add a 'transport' attribute to our astribank devices which
      points to the usb device we use. E.g:
       /sys/bus/astribanks/devices/xbus-00/transport is symlinked to
       ../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4
    - Move /proc/xpp/XBUS-??/XPD-??/span to
      /sys/bus/xpds/devices/??:?:?/span
    - Migrate from /proc/xpp/sync to:
      /sys/bus/astribanks/drivers/xppdrv/sync
    - New 'offhook' attribute in:
      /sys/bus/xpds/devices/??:?:?/offhook
  * PRI: change the "timing" priority to match the convention used by
         other PRI cards -- I.e: lower numbers (not 0) have higher
 priority.
  * FXO:
    - Power denial: create two module parameters instead of hard-coded
      constants (power_denial_safezone, power_denial_minlen).
      For sites that get non-standard power-denial signals from central
      office on offhook.
    - Don't hangup on power-denial, just notify Dahdi and wait for
    - Fix caller-id detection for the case central office sends it before
      first ring without any indication before.
      Asterisk's desicion.
  * USB_FW.hex:
    - Fixes cases where firmware loading would fail.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6046 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoUse the proper pci_device when handling dma buffers.
Shaun Ruffell [Wed, 11 Feb 2009 05:41:56 +0000 (05:41 +0000)]
Use the proper pci_device when handling dma buffers.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6005 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoSet default alarm debounce time to 500ms to debounce NT L1 deactivations
Matthew Fredrickson [Tue, 10 Feb 2009 14:07:21 +0000 (14:07 +0000)]
Set default alarm debounce time to 500ms to debounce NT L1 deactivations

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5997 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoFix building DAHDI with module unloading disabled
Tzafrir Cohen [Mon, 9 Feb 2009 06:03:25 +0000 (06:03 +0000)]
Fix building DAHDI with module unloading disabled

As moduel_refcount is only used for debugging, disable it in this
non-common case.
(Closes issue #14402)

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5987 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoUndoing commit for revision 5944. This still needs more testing before
Shaun Ruffell [Wed, 4 Feb 2009 17:38:52 +0000 (17:38 +0000)]
Undoing commit for revision 5944.  This still needs more testing before
going into trunk.  It appears that changing the battthresh reveals other
potential issues with determining the battery / alarm state of FXO ports.
Issue: DAHDI-166

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5970 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoRaise the voltage threshhold for detecting when there is battery loss from 3V
Shaun Ruffell [Mon, 2 Feb 2009 22:48:53 +0000 (22:48 +0000)]
Raise the voltage threshhold for detecting when there is battery loss from 3V
to 40V.

Patch provided by angler
Issue: DAHDI-166

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5944 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoArray-style echo canceller updates first appeared in Zaptel, because HPEC only suppor...
Kevin P. Fleming [Mon, 2 Feb 2009 14:13:50 +0000 (14:13 +0000)]
Array-style echo canceller updates first appeared in Zaptel, because HPEC only supports that mode. However, when the function for doing array-style updates was written, the argument names were reversed. In Zaptel this did no harm, because HPEC was the only module that used array-style updates.

When DAHDI was created, non-array-style updates were removed, and the existing modules were converted to using array-style updates. Unfortunately the new code was written based on the argument names, which were incorrect. This caused all the echo cancellers to be broken (except HPEC, although we did not know that at the time), and it was corrected by reversing the order of the arguments passed when the array-style update function was called (leading to a confusing mismatch). This fixed all the non-HPEC modules, but left HPEC broken, which was just discovered.

This commit corrects all these problems, so that the argument names and the data passed actually make sense, and all the modules work properly.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5936 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMake sure that we pass alarm notification up the stack whenever alarms occur on the...
Matthew Fredrickson [Fri, 30 Jan 2009 23:42:36 +0000 (23:42 +0000)]
Make sure that we pass alarm notification up the stack whenever alarms occur on the B410P

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5924 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoDo a stricter test for FXS modules. FXO modules will be hi-z during this time and...
Mike Spiceland [Fri, 30 Jan 2009 16:53:30 +0000 (16:53 +0000)]
Do a stricter test for FXS modules.  FXO modules will be hi-z during this time and the value will be
undefined.  This test ensures that FXO modules will not falsely trigger during FXS probes.  The value
of 0x88 from register 1 has been confirmed during this stage on quad and single port modules.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5916 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoMinor comment rearangement to avoid possible confusion.
Richard Mudgett [Wed, 28 Jan 2009 23:17:49 +0000 (23:17 +0000)]
Minor comment rearangement to avoid possible confusion.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5895 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoEnsure the teignorered parameter is exposed as a module parameter.
Shaun Ruffell [Wed, 28 Jan 2009 04:41:45 +0000 (04:41 +0000)]
Ensure the teignorered parameter is exposed as a module parameter.
Related to issue #14031 .

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5870 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAllow EXTRA_CFLAGS to propagate to builds in the subfolders for wct4xxp,
Shaun Ruffell [Wed, 28 Jan 2009 01:11:36 +0000 (01:11 +0000)]
Allow EXTRA_CFLAGS to propagate to builds in the subfolders for wct4xxp,
wctdm24xxp, wctc4xxp, wcb4xxp, and wcte12xp.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5856 a0bf4364-ded3-4de4-8d8a-66a801d63aff

9 years agoAnd once again I'm reminded why I should always compile before committing.
Shaun Ruffell [Tue, 27 Jan 2009 17:45:37 +0000 (17:45 +0000)]
And once again I'm reminded why I should always compile before committing.

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5850 a0bf4364-ded3-4de4-8d8a-66a801d63aff