summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2011-06-02dahdi: Update the dahdi_ec_chunk interface to support preec streams.Shaun Ruffell
dahdi_ec_chunk is the function that saves the received audio and places a signed linear copy of it in the pre echocanceled buffer on the channel. By splitting the input and output of this function into two parameters, a driver that can provide separate pre and post ec streams can pass them independently to DAHDI, without worrying about DAHDI overwriting a stream that may have already been echocanceled by the hardware. Previously, the dahdi_ec_chunk interface took a received audio buffer and overwrote it after canceling the echo. Now the input and output from the function are broken up in order to support hardware echocans that have a different preechocan stream. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9941 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Allow dahdi_span_ops.[chan|span]config and startup to block.Shaun Ruffell
This change ensures that the dahdi_span_ops callbacks are not called with any spinlocks held, and that the module is pinned in memory, and also passes the struct file * pointer to the callbacks. Passing the file pointer to the callbacks allows the board drivers to check any flags on the file descriptor used to configure the span/channel. The intent here is to allow dahdi_config to open the /dev/dahdi/ctl file in a non-blocking mode in case there is a lengthy processes that needs to happen as part of configuration. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9940 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Do not release the echocan under lock.Shaun Ruffell
This allows any echocan cleanup to block if necessary. Especially useful for hardware echocans that may need to wait for hardware to complete the cleanup process. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9939 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: If a timer is not configured then we should block indefinitely.Shaun Ruffell
Some older Asterisk versions do not handle well the error message when poll is called on an unconfigured channel. The result would be constant __ast_read: No/unknown event '0' on timer for 'DAHDI/1-1'? messages from Asterisk. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9937 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Make tone zone registration messages debug only.Shaun Ruffell
This duplicates information that is already in the /etc/dahdi/system.conf file and should normally only be necessary for the user when debugging problems. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9936 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Propagate shutdown returncode to user space.Shaun Ruffell
This change fixes a condition where 'dahdi_cfg -s' would always return success regardless of whether a board driver was able to complete the shutdown. Only impacts board drivers that implemented the shutdown span callback. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9935 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Fix compilation on Linux 2.6.26 w/CONFIG_DAHDI_NET.Shaun Ruffell
The hdlc_stats function was removed from the mainline kernel in commit 198191c4a7ce4daba379608fb38b9bc5a4eedc61 [1] which was first released in linux 2.6.27. [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=198191c4a7ce4 (closes issue #19354) Reported by: biohumanoid Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9934 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wct4xxp: Move the check for the VPM to module load time.Shaun Ruffell
This allows dahdi-base to know whether or not there is a VPM attached to the module as soon as it's registered as opposed to waiting for start span. This will simplify dahdi_genconf's task of creating a valid configuration file. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9933 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wct4xxp: Do not set maintstat in t4_clear_maint.Shaun Ruffell
If we always set maintstat to DAHDI_MAINT_NONE, dahdi_base will lose track of what it thinks the current state of the span is. For example, if you run $ dahdi_maint -s 1 --loopback localhost When t4_clear_maint is called, the current maintenance mode state, 'maintstat', is set to DAHDI_MAINT_NONE. So the next time you call: $ dahdi_maint -s 1 --loopback off dahdi-base.c will believe that the user is trying to set the maintenance state from DAHDI_MAINT_NONE to DAHDI_MAINT_NONE and will not actually do anything. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9932 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wct4xxp: Atomically set framer bits for maintenance modes.Shaun Ruffell
Do not allow the interrupt handler or another CPU to change the value between when we get the initial value and when we write the modified value. Also includes a minor formatting fix where braces were not aligned, and remove 'inline' from t4_framer_in and t4_framer_out definitions. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9931 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wct4xxp: Set -Wno-unused-but-set-variable compiler option if available.Shaun Ruffell
Turn this option on for the entire wct4xxp driver in order to quiet the warnings in the oct612x source files. These files are from a vendor drop and the goal is to limit the deviations from the vendor if possible. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9930 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02Remove unused variables.Shaun Ruffell
gcc-4.6 now warns about variables that are set but never used. Clean up unused variables everywhere except the oct612x subdirectory. The oct612x should go in a separate patch in case that needs to be pulled out into a separate project again. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Check if the FXS signaling setting is valid.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9928 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-31xpp: empty labels are not duplicateTzafrir Cohen
Some older Asttribanks had an empty label string. They should be ignored when testing for a duplicate label at device probe time. While we're at it, reduce panic level in the notice. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9925 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23xpp: Remove obsolete XPP_DEBUGFS codeTzafrir Cohen
XPP_DEBUGFS code was some code used to send BRI D-Channel data through debugfs for, well, debugging. Unused in recent years. Time to remove. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9917 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23xpp: Remove obsolete and unused OLD_PROC codeTzafrir Cohen
OLD_PROC marked old and unused code that was used for writing to procfs. It has long ago been replaced with different sysfs interfaces. Time to remove it. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9916 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-19wcte12xp: Fix regression preventing VPMADT032 from loading.Shaun Ruffell
Commit r9781, "wcte12xp, wctdm24xxp: Remove unused support for booting VPMADT032 from SPI", introduced a bug that would prevent the VPMADT032 from ever being able to complete its startup. This regression did not make it to any releases. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9914 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-25dahdi: Enable DTMF A,B,C, and D digits.Shaun Ruffell
This appears to be an old regression from zaptel r4063 [1] that would prevent DAHDI from generating the A,B,C, and D digits due to unintentional drop through on a case statement. [1] http://svn.asterisk.org/view/zaptel?view=revision&revision=4063 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9912 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-25wcb4xxp: Updating copyright.Shaun Ruffell
The wcb4xxp driver was edited this year. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9911 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-15dahdi: Bug fix for enabling buffer eventsKinsey Moore
Introduced in rev 9905, this bug could cause buffer events to become disabled if the kernel was unable to access userland data. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9907 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-15dahdi: Add capability to generate events on buffer underruns and overrunsKinsey Moore
Add BUFFEVENTS and individual buffer event channel flags so that DAHDI can notify userspace processes when it is dropping data. This can be useful when trouble shooting fax problems since DAHDI currently silently discards data becasuse of scheduling latency. With this change, Asterisk could log an event as opposed to just leaving it up to the tone detectors to figure out there was some unexpected phase shift. Acked-by: Shaun Ruffell <sruffell@digium.com> (original patch by Matt Fredrickson) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9905 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-14wcte12xp: If we cannot read the mode selection pins fail the module load.Shaun Ruffell
Alexandre reported that on a particular server he would get a server crash when loading the wcte12xp driver after receiving a line about a timeout when trying to read the mode selection jumpers. If the driver times out when trying to read the mode selection bits there is a serious problem and it should not try to continue on with configuration / registration. Reported-and-Tested-by: Alexandre Abreu <alexandre.abreu@redt.com.br> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9902 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04b4xxp: Only create the timing_master attributes in the context of probeShaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9892 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04dahdi: Group dahdi timers into "rates" for improved CPU utilization.Shaun Ruffell
Most of the timers added to the kernel will be configured to fire at the same rate. This allows one "wake_up" from interrupt context to wake up all the waiters. On one test system, I saw about a ~10% improvement in CPU utilization when 10,000 timers were opened. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9891 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wctdm: Reduce memory used by fxo_modes array.Shaun Ruffell
Saves ~2K bytes from the size of wctdm24xxp.ko module, which saves system memory when the driver is loaded. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9890 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp: Unroll the TDM extraction/insertion from the sframe.Shaun Ruffell
This change saves around 2.5 us from the interrupt handler. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9889 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp, wctdm24xxp: decriptor_list.count does not need to be atomic.Shaun Ruffell
It is only ever accessed in interrupt context anyway. Saves several hundred nanoseconds from hard interrupt context. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9888 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp, wctdm24xxp: Remove a PCI read from hardirq context.Shaun Ruffell
No need for the CPU to wait there for that write to flush when all the writes will be flushed when the interrupt is acknoledged later. Saves nearly a 1 us from the interrupt handler on a 3Ghz Xeon test system. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9887 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp: Use the in-hardirq versions of dahdi_receive/dahdi_transmit.Shaun Ruffell
We are in hard-irq context already, so we do not need to disable all local interrupts. On one 3.06GHz Xeon test machine, drops the average time in the interrupt handler from 23.10 us to 21.87 us. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9886 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp: Always call handle_transmit/receive in hardirq context.Shaun Ruffell
Allows the board drivers to use the regular locks instead of the irqsave/irqrestore variants. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9885 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04dahdi: Add in-hardirq versions of the dahdi_receive/transmit/ec_span.Shaun Ruffell
Since cli/sti are expensive instructions, if the board drivers are calling receive/transmit/ec_span from interrupt context all local interrupts do not need to be disabled. The board drivers all still use the normal dahdi_receive and dahdi_transmit. _dahdi_receive and _dahdi_transmit are the "in-hardirq" versions of those functions. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9884 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp: Use the reglock to protect the framer command lists.Shaun Ruffell
Reduces the number of locks that must be grabbed and released in interrupt context. On one 3.06Ghz Intel Xeon test machine, drops the average time in the interrupt handler from 29.83 us to 23.10 us. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9883 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp, wct4xxp, wcb4xxp, wctdm: Do not support suspend.Shaun Ruffell
These drivers (all DAHDI drivers) should explicitly block suspend if they are loaded. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wct4xxp: Add shutdown handler for kexec.Shaun Ruffell
Makes the driver a little more kexec friendly when sharing an interrupt line with another device. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9881 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp: Add voicebus_quiesce function.Shaun Ruffell
voicebus_quiesce is like voicebus_stop, except that it doesn't wait for any information to come back from the card. This prevents kexec from blocking waiting for information from a potentially dead card. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9880 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04dahdi: Do not enable interrupts before processing entire span.Shaun Ruffell
Fixes regression introduced in r9603 where if a channel was "dacs" with another interrupts would be reenabled prematurely. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9878 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04voicebus: Update the network debug device to use dma_pools.Shaun Ruffell
r9402 switched to dma_pool for the SFRAMES. This updates the network debug device to use the dma_pools for SFRAME allocation. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9877 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04core timer: don't hang when the clock goes back.Shaun Ruffell
If the clock shifts back, don't hang in a loop of running process_masterspan from the timer interrupt forever. Fixes a regression of r9407. (closes issue #19035) Reported by: tzafrir Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> After talking with Tzafrir on IRC, I combined the check if your far ahead with the check if you're behind and added a '\n' at the end of the existing "detected time shift" message. That is why this patch is different than what is posted on issue #19035. Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9876 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-19wctdm24xxp: Remove SLIC_LF_OPPENDING setting on fxs->idletxhookstate from ↵Alec L Davis
set_vmwi git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9868 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-15wctdm24xxp: Fix regression with LEDS on TDM410.Shaun Ruffell
r9720 disabled the LEDs on the front panel of the TDM410. This commit restores the behavior and clarify which part of the TDM410 eframes control the LED operation. (closes issue #18939) Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9827 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wcte12xp, wctdm24xxp: Remove unused support for booting VPMADT032 from SPI.Shaun Ruffell
Since there never was a VPMADT032 module shipped with non-volatile memory no need to check that bit contantly in interrupt context. Also remove the unused VPM150M_DTMFDETECT bit. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9781 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wctdm24xxp: Remove unused wctdm_vpm_check, wctdm_vpm_in, and wctdm_vpm_out.Shaun Ruffell
These functions were accidentally left in. They should have been remove in "wctdm24xxp: Remove code for unsupported modules." r9720 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9780 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wcte12xp, wctdm24xxp: Minor fixes for big endian host architectures.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9779 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wctc4xxp: Minor fixes for big endian host architectures.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9778 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28dahdi: Do not rebuild dahdi-base.c when only updating the version.Shaun Ruffell
This moves the version string into dahdi-version.c that is then linked into dahdi-base.c and dahdi-sysfs.c. This speeds builds on slow computers since dahdi-base.c and dahdi-sysfs.c does not need to be rebuilt if only the version string is changing. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Oron Peled <oron.peled@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9777 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-20replace old proc interface by modern seq_fileTzafrir Cohen
Switch to using the newer seq_file interface for procfs. Fixes a race when you read the "file" while its size increases (e.g. the span enters an alarm state). Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com> (closes issue #18760) Patches: 0001-DAHDI-linux-trunk-replace-old-proc-interface-by-mode.patch uploaded by tzafrir (license 46) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9770 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-18wctdm24xxp,wcte12xp: Replace read/writechunk with eframe/sframeRuss Meyerriecks
Trival name change to increase readability in the transmitprep and recieveprep functions. Now we clearly define if we are working with an sframe or an eframe. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-By: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9768 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-10wct4xxp: Do not lock interrupts while loading the VPM firmware.Shaun Ruffell
Since the oct6100 API consumes less stack there is no longer a danger of overflowing our stack during load. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9752 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-10wct4xxp: Reduce stack usage in oct612x API.Shaun Ruffell
Reduce the stack usage by replacing the mOCT6100_RETRIEVE_NLP_CONF_DWORD and mOCT6100_SAVE_NLP_CONF_DWORD macros with functions. Some compilers do a better job of optimizing the local variables declared in those macros than others. For example, with gcc 4.3.0, running ]# make stackcheck | grep Oct6100 | head -n 20 | sed -e 's/^0\S* //g' | uniq Before: Oct6100ApiWriteVqeNlpMemory [wct4xxp]: 1112 Oct6100ApiInvalidateChanPlayoutStructs [wct4xxp]:520 Oct6100ApiSetChannelLevelControl [wct4xxp]: 392 Oct6100ApiBridgeEventRemove [wct4xxp]: 344 Oct6100ApiDebugChannelOpen [wct4xxp]: 312 Oct6100ApiWriteVqeAfMemory [wct4xxp]: 296 Oct6100ApiSetChannelTailConfiguration [wct4xxp]:264 Oct6100ApiRandomMemoryWrite [wct4xxp]: 248 Oct6100ApiTransferToneEvents [wct4xxp]: 248 Oct6100ApiModifyChannelStructs [wct4xxp]: 232 After: Oct6100ApiBridgeEventRemove [wct4xxp]: 344 Oct6100ApiDebugChannelOpen [wct4xxp]: 312 Oct6100ApiRandomMemoryWrite [wct4xxp]: 248 Oct6100ApiTransferToneEvents [wct4xxp]: 248 Oct6100ApiInvalidateChanPlayoutStructs [wct4xxp]:248 Oct6100ApiModifyChannelStructs [wct4xxp]: 232 Oct6100ApiBridgeRemoveParticipantFromChannel [wct4xxp]:216 Oct6100ApiWriteVqeNlpMemory [wct4xxp]: 200 Oct6100ApiInitChannels [wct4xxp]: 168 Oct6100ApiProgramNLP [wct4xxp]: 168 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9751 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-10wct4xxp: Reduce the memory footprint of the hardware echocanceler.Shaun Ruffell
This saves ~300K of kernel memory for each quad or dual span VPM. Due to the fact that this change disables caching of the NLP words (among other things), the time to disable the echocans appears to have increased by ~1ms. Before this change: ======================================================================= 0) ! 356.498 us | vpm450m_setecmode(); <--- disable 0) ! 387.762 us | vpm450m_setecmode(); <--- enable 0) ! 429.839 us | vpm450m_setecmode(); <--- disable ]# echo 1 > /proc/sys/vm/drop_caches && free -k total used free shared buffers cached Mem: 2005352 228368 1776984 0 132 5540 -/+ buffers/cache: 222696 1782656 Swap: 983036 0 983036 After this change: ======================================================================= 0) ! 1109.515 us | vpm450m_setecmode(); <--- disable 0) ! 339.017 us | vpm450m_setecmode(); <--- enable 0) ! 1431.460 us | vpm450m_setecmode(); <--- disable ]# echo 1 > /proc/sys/vm/drop_caches && free -k total used free shared buffers cached Mem: 2005352 228080 1777272 0 112 5484 -/+ buffers/cache: 222484 1782868 Swap: 983036 0 983036 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9750 a0bf4364-ded3-4de4-8d8a-66a801d63aff