summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp
AgeCommit message (Collapse)Author
2012-07-11wcte12xp: Fix stack corruption when checking T1 RBS states.Russ Meyerriecks
This fixes an (embarrassing) error in t1_check_sigbits in the previous commit where I was writing pass the end of an array on the stack. Now instead of using an array on the stack, of which all elements were not used, the pending commands are now stored on a list. I also removed the automatic free of commands from __t1_getresults and now the function that allocated the command now frees them. I believe this will be less error-prone going forward. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10700 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-06-26wcte12xp: Fix pulse digit detection when set for FXO signalling modes.Shaun Ruffell
The frequency that the RBS registers were polled was too slow to catch the pulse dialing digits. The result was that often times dahdi would generate WINK events instead of PULSEDIGIT events. This speeds up the rate at which the registers are checked from 100ms to 33ms and also makes the process of checking the registers quicker by queing up all the reads at once. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10699 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-06-22wcte12xp: Allow default_linemode to be set to j1.Shaun Ruffell
To enable J1 mode previously one would configure the card in T1 mode and then set the j1mode module parameter. Now "modprobe wcte12xp default_linemode=j1" will work like the other linemodes globally for all cards manged by this driver. J1 can also be set on a card-by-card basis in sysfs. Also move pr_fmt to top of file so pr_xxx macros print the module name as intended. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10696 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-06-22wcte12xp: Destroy the cache if the linemode is not recognized.Shaun Ruffell
Fixes the following errors when running: # modprobe wcte12xp default_linemode=blah; modprobe wcte12xp default_linemode=blah 'blah' is an unknown span type.kmem_cache_create: duplicate cache wcte12xp Call Trace: [<ffffffff800394cf>] kmem_cache_create+0x572/0x5ac [<ffffffff800a926e>] __link_module+0x0/0x18 [<ffffffff80064624>] __down_read+0x12/0x92 [<ffffffff8002224d>] __up_read+0x19/0x7f [<ffffffff8818b01f>] :wcte12xp:te12xp_init+0x1f/0xde [<ffffffff800a9e37>] sys_init_module+0xbd/0x206 [<ffffffff8005d28d>] tracesys+0xd5/0xe0 Reported-by: James Brown <jbrown@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10695 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-05-23convert span->spantype to enumerated typeTzafrir Cohen
* This is a minimal convertion -- everything compiles and looks OK. * We print a warning for spans registering without a spantype. * Low-level drivers may later want (but not required) to fold their internal representations to this canonical representation -- it will save code and make it more readable. 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@10683 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-02Remove Makefiles that are only needed on kernels < 2.6.9Shaun Ruffell
Newer versions of kernel build system do not require these Makefiles and support for kernels older than 2.6.9 are no longer supported by DAHDI. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10617 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21Update Digium copyright on files changed since beginning of the year.Shaun Ruffell
In addition to updating the year, this also adds some boilerplate to dahdi-sysfs.c and dahdi-sysfs-chan.c that wasn't there previously. 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@10560 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21wcte12xp, wctdm24xxp: Add compile-time option to disable ASPM for PCIe devices.Shaun Ruffell
Certain BIOSes appear to enable ASPM even though it is not fully supported by the platform. Also, since the PCIe links for TDM cards are always in use it does not make sense to allow them to transition to the disabled state. Just turn off power management on the PCIe links completely. For more information see http://lwn.net/Articles/449448/. Internal-Issue-ID: DAHLIN-283 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10557 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-13Remove support for kernels < 2.6.18Tzafrir Cohen
This patch removes support for kernel versions < 2.6.18, as those are not actively supported in any major Linux distribution (except RHEL4, which is in the "extended" support level of the product life cycle). This removes much of the more #ifdef-rich parts of the code. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Acked-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@10472 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26wcte12xp: Allow linemode (T1/E1) to be changed via sysfs attribute.Tzafrir Cohen
Allowing the linemode to be configured with sysfs before the spans are assigned opens the eventualy capability for line mode to be configured with the other physical layer settings per card. Currently linemode is set with either physical jumpers or with a module parameter to the wcte12xp driver that is global for all cards. Default behavior is not changed with this commit. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10278 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26dahdi: Remove dahdi_span.irq and move dahdi_span.irqmisses into dahdi_device.Tzafrir Cohen
'irqmisses' is more a function of the device and there are better ways to get to IRQ for a device than storing it in any DAHDI structures. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10276 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26dahdi: Expose dahdi devices in sysfs.Tzafrir Cohen
This exposes dahdi devices in sysfs and also exposes attributes that will allow user space to control the registration order in spans. This facilitates loading drivers out of order yet keeping consistent span/channel numbering, which in turn will eventually allow the blacklist for DAHDI drivers to be removed. The default behavior, controlled with the auto_register module parameter on dahdi is to number the spans / channels in order like is currently done. So this change does not introduce any new behavior by default. * Writing (anything) to this attribute returns the span to its unassigned state * Fix dahdi_chan_unreg() echocan refcount * Add safeguard against duplicate unassignment to _dahdi_unregister_span() * Remove the span from device_node list, only in dahdi_unregister_device() and not in dahdi_unregister_span() * Free allocated span->span_device in span_sysfs_remove() [is it safe?, didn't cause problem so far...] Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> dahdi: Add "hardware_id" dahdi_device attribute. - The "hardware_id" does not change with device location (e.g: when a PCI card is moved from one slot to another). - Not all devices have this attribute. It is legal for it to be NULL (that is the default for all low-level drivers that do not set it explicitly). - When "hardware_id" is NULL, the sysfs attribute value is "\n" Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10275 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26dahdi: Register devices instead of individual spans.Tzafrir Cohen
Increasingly, spans are implemented by devices that support more than a single span. Introduce a 'struct dahdi_device' object which explicitly contains multiple spans. This will allow a cleaner representation of spans and devices in sysfs since order of arrival will not determine the layout of the devices. This also gives the core of dahdi a way to know the relationship between spans. This generalizes similar concepts that were previously xpp specific. The conversion of the xpp code was almost entirely done by Oron and Tzafrir. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10273 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wcte12xp: Deprecate 't1e1override' module parameter in favor of ↵Shaun Ruffell
'default_linemode'. 't1e1override' isn't immediately apparent what it is supposed to do by the name. Instead 'default_linemode' module parameter can be set to "auto", "t1", or "e1" to make it clear. 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@10243 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-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-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-07-20wcte12xp: Fix bug when not recognizing loopup codesRuss Meyerriecks
The wcte12xp wasn't recognizing loopup/loopdown signals. The debounce was so long that it was preventing the loopup/loopdown signals from being registered properly. Removed the debounce entirely as it was unnecessary to the operation. 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@10064 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-18wcte12xp: Close a potential race on driver unload.Shaun Ruffell
The shutdown logic requires that all CPUs see that the INITIALIZED bit has been cleared. Otherwise it may be possible for the workqueue to run after the hardware resources have been released. 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@10047 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28wcte12xp, wctdm24xxp: Load VPMOCT032 firmware in background.Russ Meyerriecks
The firmware load has been moved into a workqueue to prevent the module load from blocking for the duration of the firmware upload. This could be up to 40 seconds. Driver prevents configuration until firmware load is finished and is_initialized() returns true. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28wcte12xp, wctdm24xxp: Add support for the VPMOCT032 hardware echocanceler.Russ Meyerriecks
Support enabled for the vpmoct032 echo cancellation module for the wctdm24xxp and wcte12xp drivers. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9997 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-20wcte12xp: Start alarm timer after marking board initialized.Shaun Ruffell
r9946, "wcte12xp: Move the VPMADT032 test/configuration to module load time." introduced a race condition where it was possible for the timer that initiates the check for the alarms to fire before the board was marked initialized. This would result in a board that would never again check it's alarm state since the first time the timer runs INITIALIZED may not be set and it will not reschedule a check since it believes the driver is unloading. This happened because the check for the VPM was moved between when the timer was first setup and when INITIALIZED was then set. Now we make sure INITIALIZED is set before the timer is first setup, and move those two operations together. 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@9981 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Limit how many consecutive times to reset the VPMADT032 module.Shaun Ruffell
Both limit the amount of junk in the kernel log and also prevent dahdi_cfg from running indefinitely if there is a module with a hardware problem which prevents it from completing the startup sequence. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9953 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Remove unused vpm100 member from 'struct t1'Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9952 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp, wctdm24xxp: Separate test for VPMADT032 and initialization.Shaun Ruffell
Part of increasing system startup speed. Splitting these two operations facilitate checking if there is a module present synchronously on driver load from the actual load of the firmware and configuration of the channels. This will allow the presence of the VPM module to be flagged on the span before registration, but load and configuration can happen in the background. When the modules are eventually loaded via udev, there will be enough time from the time the drivers are loaded to when dahdi_cfg will run to complete the firmware load, eliminating the need to block the driver here. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9951 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp, wctdm24xxp: Use a constant string for the VPM workqueue name.Shaun Ruffell
In my opinion naming the VPM workqueues for each board is not worth the extra complexity. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9950 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Set the t1.vpmadt032 pointer under the reglock.Shaun Ruffell
Ensures that a single run of the interrupt service routine is consistent about whether there are VPMADT032 commands to process or not. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9949 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Put "Span configured" message behind debug flag.Shaun Ruffell
This message also duplicates what is in the /etc/dahdi/system.conf file and should only be necessary when troubleshooting problems. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9948 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: kmalloc/memset -> kzalloc.Shaun Ruffell
This is trivial cleanup. Fixing up a couple of places that followed a kmalloc with a memset to 0 and also sneaked in one ARRAY_SIZE usage change. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9947 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Move the VPMADT032 test/configuration to module load time.Shaun Ruffell
The firmware load of the VPMADT032 was moved to startspan because a quad-span card in the same system would would lock interrupts for several seconds to load VPMOCT064/128 firmware. Now that the wct4xxp driver no longer locks interrupts while loading its VPM module this driver can move the VPMADT032 check/load back to module load time. This is also required so that the presence of a hardware echo canceler is marked on the span before it is registered with dahdi-base.c. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9946 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp: Force spanconfig/chanconfig to wait for ready.Shaun Ruffell
This is always true currently but will not necessarily be in the future. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9945 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Do not allow 'hwec' to be attached to channels that do not have one.Shaun Ruffell
This defines a NULL value for the name of an echocan as invalid. This will allow dahdi_genconf to probe for the presence of a hardware echocan on a channel by trying to attach one. If there is not a hardware echocan available DAHDI_ATTACH_ECHOCAN ioctl will return -EINVAL if 'hwec' was specified as the name of the echo canceler now. 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@9943 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-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-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-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-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: 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-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-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-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-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-01-03"struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"Shaun Ruffell
2.6.25 added the DEFINE_PCI_DEVICE_TABLE macro to make sure that the pci_device_id tables are put into the correct section in the binary. Convert all the places where the tables were defined to use them. This is linux-2.6 commit where the change went in along with the rationale: 90a1ba0c5e39eeea278f263c28ae02166c5911c8 Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9584 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03wcte12xp: Remove GpakHpi.h file from drivers/dahdi/wcte12xpShaun Ruffell
This file is now in drivers/dahdi/voicebus folder. This file should have been removed when the Gpak API was moved out of the individual board drivers. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9559 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03Trivial removal of duplicate #includesShaun Ruffell
Mostly linux/errno.h was included more than once. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9557 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15wcte12xp: Unregister the span before any additional cleanup.Shaun Ruffell
Span registration is the last step in during initialization and it should be the first on unregistration. I also was hit by this when looking at adding other members to the span and made the assumption that the span was in a consistent state during unregistration. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9536 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09dahdi-base, dahdi_echocan_*, wcb4xxp, wct4xxp, wctdm24xxp, wcte12xp, kernel: ↵Kinsey Moore
Allow name of EC factory to vary based on channel Changed the echocan factory name to a function (get_name) called to get the name. This allows a factory to return a different name when being called in reference to a channel such as in the case of hardware echo cancellers. To further accommodate this change for HWEC, a new echocan_name function was added to the span ops struct and is used in hwec_factory in dahdi-base for all cards that support hardware echo cancellation. Signed-off-by: Kinsey Moore <kmoore@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9524 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-09dahdi-base, kernel, dahdi_echocan_*, wcb4xxp, wct4xxp, wctdm24xxp, wcte12xp: ↵Kinsey Moore
Remove name field from echocan ops This field was redundant and was only used in places where the factory's name could be used. Signed-off-by: Kinsey Moore <kmoore@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9523 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-08dahdi: Fixed loopup/loopdown signalsRuss Meyerriecks
The loopup/loopdown T1 maintenance feature in the single through quad-span drivers now function properly, according to AT&T TR54016, by sending a full rate pattern down the line. T1.403 ESF/Data Link patterns are not supported currently. Also grouped all the maint reset register clears under a single irq lock to crank the performance up past 11. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9516 a0bf4364-ded3-4de4-8d8a-66a801d63aff