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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Drops the size of the wctdm_ioctl stack from 524 to 204 bytes.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9748 a0bf4364-ded3-4de4-8d8a-66a801d63aff
The code is duplicated in the config_vpmadt032 function.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9747 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Fixes a regression introduced in r9611. Analog spans would never become
the master since the SPANSTART ioctl is not typically called on them,
and therefore they were never marked RUNNING. The result could be audio
problems.
I'm marking this as related to issue 13205 since it's generally all
related to how should the drivers select which span is the master. I
also mark as related to issue 16165 because the problems experienced are
a result of the same fundamental issue.
(issue #13205)(issue #16165)
Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9729 a0bf4364-ded3-4de4-8d8a-66a801d63aff
With the release of Linux 2.6.37, the Big Kernel Lock is now a compile
time option. This change adds a mutex around the one place in the code
that we already knew was dependent on the lock_kernel/unlock_kernel
calls for serialization and drops the other calls to
lock_kernel/unlock_kernel if CONFIG_BKL is not defined.
This is *mostly* the dahdi-no-bkl.patch with a few minor whitespace
changes, the global_dialparmslock made static, and a warning added to
let people know they are running an experimental configuration.
(issue #18604)
Reported by: jkroon
Patches:
dahdi-no-bkl.patch uploaded by jkroon (license 714)
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9721 a0bf4364-ded3-4de4-8d8a-66a801d63aff
The VPM100 and S100M modules are no longer supported. Analog cards supported
by the wctdm24xxp are still compatible with the S110 and VPMADT032 modules.
DAHDI-302
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9720 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Folded XPD_STATE() "protocol method" into the card_state() method.
It was only called from these (otherwise empty) methods.
Also it is not a "protocol method" for a very very very long time.
Signed-off-by: Oron Peled <oron@actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9715 a0bf4364-ded3-4de4-8d8a-66a801d63aff
* Caller to CALL_XMETHOD() no longer need to explicitly pass xbus
(calculate xpd->xbus)
* Create CALL_PHONE_METHOD() similar to CALL_XMETHOD() -- inlining
the extra parameters (more readable)
* Reverse parameter order in PHONE_METHOD() and CALL_PHONE_METHOD()
to be consistent with XMETHOD() and CALL_XMETHOD()
* Rename XPD_STATE phonedev method to card_state:
- Consistency with other phonedev methods.
- These calls now Wrap internal calls to XPD_STATE protocol HOSTCMD
in PRI, BRI, FXS, FXO
Signed-off-by: Oron Peled <oron@actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9706 a0bf4364-ded3-4de4-8d8a-66a801d63aff
* Add IS_PHONEDEV(xpd) macro
* Reject dahdi_register_xpd()/dahdi_unregister_xpd() for non-PHONEDEV
* Make sysfs 'offhook' attribute contain '\n' if empty (no channels)
* Skip PHONEDEV related xbus_tick() parts -- we still want to process
the end of it for the card_tick() calls.
* Remove BUG_ON() for missing phoneops
(also remove old duplicate test for XBUS_IS...)
* Call XPD_STATE method only for PHONEDEV XPD's
Signed-off-by: Oron Peled <oron@actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9705 a0bf4364-ded3-4de4-8d8a-66a801d63aff
* Allow having XPDs that represent a device that is not a span.
* Refactor all span related data from 'struct xpd' to 'struct phonedev'
* Refactor span related methods into 'phonedev->phoneops'
* Refactor phone related initialization into phonedev_init()/phonedev_cleanup()
Signed-off-by: Oron Peled <oron@actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9704 a0bf4364-ded3-4de4-8d8a-66a801d63aff
linux/kobject.h was removed from linux/fs.h in upstream commit 57cc721.
Add it back in in order to pick up the linux/kref.h include.
Reported-by: Raoul Bönisch <jkl345@alice-dsl.net>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9697 a0bf4364-ded3-4de4-8d8a-66a801d63aff
_t4_remove_one is now used during module initialization so it should not
be placed in the exit section of the module.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9650 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Eliminates the interruptible_sleep_on deprecated and prevents the driver from
triggering the SLEEP_ON_BKLCHECK warning.
It is still desirable to convert the cmdq to something more like what is in
the single span to eliminate the need to schedule the sleeping process every
millisecond while we're waiting for the command to complete.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9646 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Just clarifying a parameter that is never updated.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9644 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Move the description of the master span processing to above the
process_masterspan function.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9643 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This fixes a regression introduced in r9603. That commit removed
DAHDI_CONF_DIGITALMON handling (which is used to natively bridge two
channels that cannot be crossed in the board driver / hardware) since I
mistakenly thought that it was only part of the DACS handling. The
symptom of the regression is muted audio when Asterisk tries to natively
bridge two channels.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9642 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Move pseudo channel numbers up into a high range so that their presence
does not interfere with assigning channel numbers for the channels
implemented on spans. Otherwise, if a pseudo channel was opened up
before an expected span was registered, all the channel numbers in the
newly registered span would be bumped up one. This does limit the number
of real channels that a single system may have registered to 32K (but in
dahdi-linux 2.4.0 and below you were limited to 1024 channels anyway,
both real and pseudo).
Also, the string name of the Pseudo channel is now based off the
number of Pseudo channels and not the total number of channels.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9637 a0bf4364-ded3-4de4-8d8a-66a801d63aff
If dahdi_register fails, we would like the error to propagate to the
user who ran modprobe.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9636 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Extended reset is needed primarily with the PCI express version of the
dual and quad-span cards. Enable it by default for those cards and
allow it to be forced on or off globally for the driver as a compile
time option.
The options to force it should be able to come out if there aren't any
further reports that the compile time option needs to be set.
DAHDI-773
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9635 a0bf4364-ded3-4de4-8d8a-66a801d63aff