summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-10-20wct4xxp: Turn off the fancy alarm LEDS.Shaun Ruffell
Saves about a 1us on average from the interrupt handler on one test system. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10239 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Hold a pointer to the devtype directlyShaun Ruffell
Eliminates the need to store a copy of the flags and variety from the global devtype. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10238 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove unused fields from 'struct t4' and 'struct t4_span'Shaun Ruffell
'memaddr' and 'memlen' is already cached as part of the underlying pci device so the wct4xxp driver does not need to cache it again. 'canary', 'passno', 'master', and 'oct_rw_count' are unused. In t4_span 'irqmisses' was incremented, but never used anywhere, and there is already the irqmisses on the span itself. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10237 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove prefetching support.Shaun Ruffell
I was unable to measure a performance change with prefetching. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10236 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Use in-hardirq version of dahdi_receive/transmit.Shaun Ruffell
We are already in hardirq context and can therefore save the cli/sti call. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10235 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: __t4_framer_in and __t4_framer_out speedups.Shaun Ruffell
Speeds up these calls primarily by eliminating unnecessary flushes of writes to the PCI bus. Before: 7.095 us | __t4_framer_in(); 5.835 us | __t4_framer_out(); 7.122 us | __t4_framer_in(); 7.071 us | __t4_framer_in(); 7.059 us | __t4_framer_in(); 5.859 us | __t4_framer_out(); 7.076 us | __t4_framer_in(); 5.852 us | __t4_framer_out(); 7.124 us | __t4_framer_in(); 7.080 us | __t4_framer_in(); After: 1.694 us | __t4_framer_out(); 1.686 us | __t4_framer_out(); 1.695 us | __t4_framer_out(); 3.182 us | __t4_framer_in(); 3.283 us | __t4_framer_in(); 2.889 us | __t4_framer_in(); 2.942 us | __t4_framer_in(); 2.951 us | __t4_framer_in(); 2.906 us | __t4_framer_in(); Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10234 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove 'pedanticpci' module parameter.Shaun Ruffell
The 'pedanticpci' module parameter, which is always on by default, inserts extra reads from the card in order to ensure that all writes are properly flushed through any PCI bridges which may post the writes. The side effect is that this takes more CPU time for registers reads and writes, especially to the framer registers. It is never recommended to run with pedanticpci set to 0, so I'm removing it as a module parameter so that the default case does not take a performance hit checking for whether the parameter is set or not. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10233 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove some debug information from the kernel logs.Shaun Ruffell
Also has the nice side effect of eliminating a comparison from the interrupt handler. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10232 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Slow down the rate we poll the framers in alarm.Shaun Ruffell
The overhead of reading the framer registers is significant and can result in latency bumps / data drops on heavily loaded systems. Instead of checking all spans every millisecond when they are in alarm we will instead only check every 100 ms. On one test system, dropped the % CPU time spent in hard interrupt context from 10% per TDM4XX when all four spans are in alarm to closer to 2%. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10231 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Move "hardware DTMF disabled" message from dev_notice -> dev_infoShaun Ruffell
This is the "normal" condition and can be lumped with the other informational messages. Otherwise, just this one message might go to the console depending on the system configuration which can be confusing. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10230 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wctdm24xxp: Remove DEBOUNCING_RINGING_OFF from ring_detector_state enum.Shaun Ruffell
This value is not used and is now gone. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10229 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wctdm24xxp: Setup all VPMADT032 channels on hybrid cards.Shaun Ruffell
r10160 "wctdm24xxp: Probe for and configure modules in parallel." did not properly setup the VPMADT032 for all ports on hybrid cards. The most immediate sympton being that spans 3 and up on a hybrid card would not come up in Asterisk even though they were out of alarm. This was because the echo canceler was blocking messages on the dchannels. This does not affect any previously released versions of DAHDI-Linux or users of the VPMOCT032. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10228 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20dahdi: Add functions for determining spantype (E1/T1) to include/dahdi/kernel.hShaun Ruffell
Uses the linecompat member to determine what type of span it is. This will allow removing T1/E1 flags from other places where the span type is stored. This function also changes the return value from bool to int for the inlines defined in include/dahdi/kernel.h. This is because not all kernel versions include stdbool.h in the headers and it will conflict with boolean values that are exported via module parameters on some older kernels if dahdi included it globally. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10227 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20dahdi: Define pr_xxx macros if not already defined.Shaun Ruffell
The pr_ macros are the recommended way for subsystems to print messages but not all kernel versions DAHDI support has them defined. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10226 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-12wct4xxp: Fix condition where hardware echo canceler erroneously mutes DTMF.Shaun Ruffell
Commit r9750 "wct4xxp: Reduce the memory footprint of the hardware echocanceler.", as part of reducing the non-pageable memory required to support the VPMOCT064 and VPMOCT128, disabled caching of some hardware echocan registers. This resulted in more physical reads to the echo canceler. These new read transactions exposed an existing issue where sometimes reads could be turned into writes which put a channel into an unintended state preventing Asterisk from detecting any DTMF. This issue is resolved by ensuring that the write signal to the Octasic part is explicitly cleared between when the address is presented on the bus and when the read and chip select signals are asserted. The cost is an increase in the average time to enable / disable echo cancellation by about 5 us on one Intel Xeon X3220 test machine (~250ns increase per read from the Octasic part and 20 reads to enable / disable a channel). This commit resolves a behavioral regression first introduced in 2.5.0 and 2.4.1 which could take many calls before revealing itself. This change only affects cards with a VPMOCT128 or VPMOCT064 installed. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Doug Bailey <dbailey@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10220 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-30wctc4xxp: Allow G723 SID frames to pass to the hardware decoder.Shaun Ruffell
The driver has, until now, dropped G723 SID frames even though the firmware on the TC400/TCE400 can handle them. Now let them on through. Reported-and-Tested-by: Angel Carhuas <acarhuas@colinanet.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10218 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-29wcte12xp: Set uncollected performance counters to -1.Shaun Ruffell
The intent here is to flag to users that the maintenance counters are not collected for spans exported by the wcte12xp driver. dahdi_maint before this change: # dahdi_maint -s 1 Span 1: >Framing Errors : 0: >CRC Errors : 0: >Code Violations : 0: >E-bit Count : 0: >General Errored Seconds : 0: And after: # dahdi_maint -s 1 Span 1: >Framing Errors : -1: >CRC Errors : -1: >Code Violations : -1: >E-bit Count : -1: >General Errored Seconds : -1: This can be combined with a change to dahdi_maint to recognize that the errors are -1 and print an even more explicit warning. 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@10212 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-27wctdm24xxp: Set dahdi_span.devicetype string in one place.Shaun Ruffell
Currently, the devicetype string was set both when the device was first allocated and updated when an echocanceler was detected. For simplicity, combine both these steps into a single function. This change also replaces an improper use of strncat with strlcat. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10210 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-27xpp: fix FXS D DTMF detection (not zero)Tzafrir Cohen
* 'D' DTMF digits were accidentally discarded with the notice message: "Bad DTMF value 0. Ignored". * No need for an odd 1-based translation table anymore - it's 0-based. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10209 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-23dahdi: Check for master in DAHDI_STARTUP / resolves MeetMe regression.Shaun Ruffell
There were a couple of reports that MeetMe conferences were not working in 2.5.0.1 and that downgrading to 2.4.1.2 resolved the issue. This could occur if there were no analog spans in a system, and all the digital spans were out of alarm before DAHDI_STARTUP ioctl was called by dahdi_cfg. If the spans were *not* out of alarm, they would be marked master when the span changes it's alarm state. This would result in a condition where no spans were marked as the "master" and so the core timer was handling conferencing. The core timer runs by default at 4ms and most board drivers run at 1ms intervals, but a channel currently only buffers up 2ms of data when conferenced. Therefore, 2ms of audio from a board was continuously dropped from the conference every 4ms by default. This fixes a regression first introduced in 2.5.0 which was specifically added in revision r9611 "dahdi: Do not locate new master in interrupt context." Internal-reference-ID: DAHDI-894 Signed-off-by: Shaun Ruffell <sruffell@digium.com> Tested-by: Dennis Martinez <dmartinez@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-23wct4xxp: Remove unused t4_span.psync and t4_span.redalarms.Shaun Ruffell
These members are not used anywhere and are now gone. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10204 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-23wctdm24xxp, wcte12xp: Advertise VPMOCT032 presence in dahdi_span.devicetype.Shaun Ruffell
A "(VPMADT032)" string is appended to the devicetype (as shown by dahdi_scan) for the span if one is installed. Now append '(VPMOCT032)' if one is installed as well. Also, for the wcte12xp driver append the VPM name to the device type after initially probing as opposed to only after the span is configured. (Related to issue DAHDI-890) Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10203 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-22xpp: fxs: bugfix for 2fxs+6fxo cardsTzafrir Cohen
* Bug sympthoms: wrong FSK VMWI sent few seconds after offhook. That was caused because the driver kept polling the (physically unconnected) digital inputs. [note: a workaround for drivers without this patch is to zero the 'xpd_fxs.poll_digital_inputs' parameter.] * Also, the digital_inputs/digital_output masks were calculate using a different condition. * Now we determine number of channels, digital inputs and digital outputs in a single place and use this info later to calculate the correct masks. * We poll only if there are digital_inputs * We added a sanity check in process_digital_inputs, so we get a notice if it's called on an xpd without digital inputs (e.g: hypothetic firmware bug). Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10202 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-13dahdi: Decrease the initial coretimer delay to 4ms from 1 second.Shaun Ruffell
DAHDI currently waits a second before checking if a board driver is calling dahdi_receive and switching to internal timing. Some versions of Asterisk (I was looking at 1.4.42 when writing this) only wait 300ms for a timer to expire when first starting and verifying that DAHDI is properly configured. This can result in a "ERROR[27673] asterisk.c: Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection. You have options:" message if asterisk is started soon after loading DAHDI. This change sets the inital polling interval to the same as that used during normal coretimer operation, 4ms. The interval will still be slowed to 1 second if a board driver starts calling dahdi_receive(). DAHDI-892. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10200 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-05xpp: firmware to detect the new 2+6 moduleTzafrir Cohen
New firmwares to handle the new 2FXS/6FXO module. FPGA_1161.hex, PIC_TYPE_1.hex, PIC_TYPE_2.hex of internal rev. 9732 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10179 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wcte12xp, wctdm24xxp: Update VPMOCT032 firmware to 1.11.0.Shaun Ruffell
Firmware version 1.11.0 resolves an issue where the driver fails to detect certain VPMOCT032 modules after a cold boot. Signed-off-by: Doug Bailey <dbailey@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10172 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Remove fwringdetect module parameter.Shaun Ruffell
The driver / FXO modules now always operate in a fwringdetect mode and the module parameter was never checked anywhere. It is now gone. 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@10171 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Use interval for debouncing FXO polarity detection.Shaun Ruffell
Eliminate the assumption that the check function is going to be called for every frame. Also use a state machine to make polarity debouncing similar to the other debouncing code. 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@10170 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Use interval for debouncing FXO battery.Shaun Ruffell
Allows the driver the option of not calling the misc function for every frame. This is part of preparation for moving misc processing out of the interrupt handler. Also use a state machine for the various battery states to unify the technique for debouncing the various signals in the driver. 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@10169 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Use time interval for debouncing FXO ring detect.Shaun Ruffell
Do not assume the ring detection function is called for every frame. Also change the debounce logic to a state machine to clarify what state a port is in and unify the technique for debouncing the various signals. 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@10168 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Use interval for checking FXS on hook transfer timer.Shaun Ruffell
Part of moving more of the module specific processing out of the interrupt handler and allowing the interrupt rate to be slowed down. 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@10167 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: 'oppending_ms' shouldn't assume being checked at 1ms intervals.Shaun Ruffell
Part of preparations for being able to optionally slow the interrupt rate down and opening the door for moving more module processing out of the interrupt handler. 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@10166 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Name the shadow registers for each modules.Shaun Ruffell
Saved me time when reading the code so I don't have to lookup which position in the index is what register for each of the modules. 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@10165 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Change intcount to framecount.Shaun Ruffell
The variable does not necessarily have anything to do with the frequency of interrupts but is instead a count of sframes received. For example, it is possible to slow the interrupt rate down on the voicebus cards to one every 2 frames. 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@10164 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Use fact that handle_transmit/receive are called in hard-irqShaun Ruffell
We can spend less time in interrupt context by not saving and restoring the local interrupt state. This is a particularly noticeable improvement on debug kernels with lockdep. 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@10163 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Protect creation / destruction of VPM instance.Shaun Ruffell
Closes a small window of opportunity where one CPU might free a VPM instance that the interrupt handler may currently be using. 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@10162 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Reset the polarity debounce setting when battery is lost.Shaun Ruffell
Wait until we have de-bounced the presence of battery before moving on the check for changes in polarity. This removes the sometimes random polarity messages generated on an FXO port when the far side drops battery from a supervisor disconnect. 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@10161 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Probe for and configure modules in parallel.Shaun Ruffell
Use the newly create bg_create and bg_join to actually probe / configure groups of 4 modules in parallel. This currently has to be done in groups of four due to the way 4-port modules are identified relative to single port modules. This provides a dramatic improvement in driver load time. When loading a single TDM2400 with 24 FXS ports before this change: # time modprobe wctdm24xxp vpmsupport=0 real 0m46.674s user 0m0.000s sys 0m0.520s And after this change: # time modprobe wctdm24xxp vpmsupport=0 real 0m7.900s user 0m0.000s sys 0m0.070s Note that the boards themselves are still configured serially. Board configuration can be parallelized once the assignment of board position is moved out of the function that is run in parallel. Otherwise it could be possible for board numbers to switch on repeated loads. 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@10160 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30wctdm24xxp: Introduce bg_create/bg_join.Shaun Ruffell
Create a generic facility to spawn tasks to run in parallel. There are interfaces already in the kernel for doing this, but they are not supported on the full range of kernels that DAHDI must support. This will be used to identify and configure FXS/FXO/B400M/VPM modules in parallel. 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@10159 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-28xpp: FXS: new 2+6 module has no digital I/O portsTzafrir Cohen
This module is recognized via subtype==4 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10158 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-25wcte12xp: Abort driver bind if read/write test fails.Shaun Ruffell
When the driver begins to initialize a device it conducts a read/write test on one of the framer registers. The driver ignores the result of that test and results in much output spammed to the kernel logs for a failed card since the driver doesn't then try to unbind from the device. What was getting spammed: wcte12xp 0000:03:01.0: Timeout in t1_getreg wcte12xp 0000:03:01.0: Wrote '0' but read 'fffffffb' Now abort the bind if the read / write test fails. 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@10155 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-24xpp: fix bashism in xpp_debugTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10152 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-24live_dahdi: optionally generate FreePBX DB entriesTzafrir Cohen
If LIVE_DAHDI_FREEPBXDB=yes is set in live.conf, live_dahdi will also generate FreePBX astdb entries for the FXS entensions it probed (using the dahdi_genconf module freepbxdb). Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10151 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19wctdm24xxp: Set 'fastoffhook' counter to 8ms and turn off calibration delay.Shaun Ruffell
r10006 "wctdm24xxp: Add 'fastpick' module parameter." copied the fast-off hook module parameter from the wctdm.c driver, but the setting in that driver does not match the data sheet. The previous commit did not actually change any of the significant bits in that register. Also, that commit changed the timer, but did not disable the callibration delay which is necessary for Type-II callerid. The fastpickup option in the wctdm24xxp driver should now match the fastpickup option in the wctdm driver. DAHDI-224. Reported-By: Kinnith Wallace <kwallace@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10148 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19wctdm: Set 'fastpickup' counter to 8msShaun Ruffell
This fixes what looks like a typo in r1055 [1]. [1] http://svnview.digium.com/svn/dahdi?view=revision&revision=1055 Reported-by: Kinnith Wallace <kwallace@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10147 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-18wctdm24xxp: Use our own free list for IRQ commands.Shaun Ruffell
Really only *necessary* when SLAB debugging is enabled, but in that case, can reduce the chance of latency bumps when first loading the driver. Otherwise the constant slab poisoning / checking in interrupt context from the kmalloc / kfrees is too much. 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@10144 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15wcte12xp, wctdm24xxp: Remove frowny face from vpmoct032 error messageRuss Meyerriecks
:O( Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10141 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15wct4xxp: Bug in timing cable with different span density cardsRuss Meyerriecks
The logic loops through the static cards[] array to determine timing, but the subloop was based off the current card's numspans member. This could cause a null dereference in the case where two cards of different span densities were connected via timing cables. Reported-by: Doug Bailey <dbailey@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10140 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15wctc4xxp: Fix lock imbalance in wctc4xxp_watchdog.Shaun Ruffell
r10082 "wctc4xxp: Cleanup in-flight commands when halting due to hardware error." introduced a lock imblance on the error path where the cmd_list_lock would be unlocked twice when the board is halted due to a hardware error. Thanks sparse. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10138 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-12wcte12xp, wctdm24xxp: Force local interrupts off in the interrupt handler.Shaun Ruffell
r10066 "wctdm24xxp, wcte12xp: Run the ISR with interrupts disabled." requested that the interrupt handler be run in "fast" mode (disabled) but this isn't necessarily guaranteed. This patch makes the interrupt handler itself disable all the interrupts. Linux commit 470c66239ef0336429b35345f3f615d47341e13b [1] contains a comment about why this is necessary. [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=470c66239ef03364 (closes issue DAHLIN-248) Reported-and-Tested-by: Vladimir Mikhelson <vlad@mikhelson.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10118 a0bf4364-ded3-4de4-8d8a-66a801d63aff