summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wct4xxp/base.c
AgeCommit message (Collapse)Author
2012-10-04wct4xxp: EC channel calculation in TONEDETECT assumes TE820.Russ Meyerriecks
Since r10290 "wct4xxp: Add support for TE820 and VPMOCT256." [1], the TONEDETECT ioctl was not calculating the VPM channel correctly on non TE820 cards. This fixes a regression first introduced in 2.6.0. [1] http://svnview.digium.com/svn/dahdi?view=revision&revision=10290 Internal-Issue-ID: DAHLIN-302 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@10733 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-10-04wct4xxp: Ensure all spans are configured by default.Russ Meyerriecks
Not configuring all the spans on an octal card can result in some of the spans not working in clear channel modes. Now ensure that all spans receive a default configuration regardless how they are configured from user space. Internal-Issue-ID: DAHLIN-289 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@10728 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-27Assign NULL values to pointers to insure that future kfree calls do not ↵Doug Bailey
cause errors. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10678 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-22wct4xxp: Trivial formatting changes around request_irq.Shaun Ruffell
Quiet some checkpatch warnings introduced by the last patch. I kept this separate since it may have obscured the real change made in the previous commit if combined. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10590 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-22wct4xxp: Disable all interrupts explicitly in interrupt handler.Shaun Ruffell
The driver makes the assumption that interrupts are disabled but this cannot be guaranteed. We'll explicity disable interrupts on the local processor while the interrupt handler is running. This eliminates the "IRQF_DISABLED is not guaranteed on shared IRQs" warning when loading the driver. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10589 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-21wct4xxp: __t4_frame_in and __t4_framer_out slowdowns.Shaun Ruffell
This is a partial revert of r10234 "wct4xxp: __t4_framer_in and __t4_framer_out speedups." There were some platform + firmware version combinations that would fail to properly configure the framer with the aforementioned speedups. The originally reported sympton was that interrupts would fail to start and while troubleshooting I also saw cases where one of the spans would stay in alarm after starting. By adding in additional reads to the version register, the overall process of writing / reading from the framer control registers is slowed down which increases reliability. This change does *not* affect the main path of TDM data which is DMAed directly into buffers in host memory and are not read / written to / from framer registers directly. Reported-and-Tested-by: Vahan Yerkanian <vahan@arminco.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10559 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21wct4xxp: 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@10558 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
2012-01-03wct4xxp: Reduce time spent waiting for auth done bit on TE820.Shaun Ruffell
It is not necessary to wait a full second for the donebit. 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@10395 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-14wct4xxp: Fail startup if not generating interrupts.Shaun Ruffell
I've seen some platforms that do not properly route the interrupt from the card to the host CPU. In these cases the card potentially could appear to be greened up even though no data is flowing over the spans. This change allows dahdi_cfg to return an error when this occurs, and also ensures that all the spans are in RED alarm. For example, dahdi_cfg output when the card is not generating interrupts: # dahdi_cfg DAHDI startup failed: Input/output error And the kernel log will contain a string like: wct4xxp 0000:02:08.0: Interrupts not detected. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10380 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-02wct4xxp: Revise vpm struct due to product name changesRuss Meyerriecks
Renamed most of the "vpm450m" references to just "vpm". 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@10365 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-02wct4xxp: Handle incorrect vpm module/card pairingsRuss Meyerriecks
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@10364 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02wct4xxp: minor: Removed unnecessary instrumentationRuss Meyerriecks
Removed a couple prints of instrumentation that was cluttering up the log output. 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@10310 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-01wct4xxp: Expose serial number in dahdi_device and kernel log.Shaun Ruffell
This will allow the serial number to be exposed in sysfs and also allow span assignment rules to use the serial number. 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@10292 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-01wct4xxp: Add field upgradable firmware support for TE820.Shaun Ruffell
This commit adds field upgradeable support for the TE820 firmware. Firmware can now be silently upgraded as part of updating drivers like most of the existing DAHDI firmware. Previous versions of dual and quad span cards did not support upgrading firmware in the field. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Fixed up some checkpatch issues: Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10291 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-01wct4xxp: Add support for TE820 and VPMOCT256.Shaun Ruffell
TE820 is an 8-span PCI-express digital interface card. VPMOCT256 is a hardware echo canceler that is able to provide echo cancelation on all 8-spans. From: Matthew Fredrickson <creslin@digium.com> 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@10290 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26wct4xxp: Allow linemode (T1/E1/J1) 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 wct4xxp 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@10279 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: 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-24wct4xxp: 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. This change was introduced earlier in the wcte12xp driver. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10269 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Refactor t4_serial_setup() to remove t4.globalconfig.Shaun Ruffell
Allows the globalconfig member to be removed from the struct t4 and not carried around for the life of the card. Also holds the reglock a little longer for all the framer writes but I realize the startup of the wct4xxp based cards does not need to be optimized. 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@10250 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Trivial. Use ARRAY_SIZE in free_wc() and __handle_leds().Shaun Ruffell
Reduces the amount of code to read in the two functions and fixes checkpatch.pl warnings. 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@10249 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Atomically perform some read/modify/write operationsShaun Ruffell
There are read/modify/write operations on the framer that were not protected by any locks. While I didn't notice any code paths that would result in simultaneous accesses to these registers, this change will hopefully save someone else some time in the future verifying that the accesses are safe. A side effect is that the reglock is acquired only once for each read/modify/write cycle as opposed to twice previously. 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@10248 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Fix spellingShaun Ruffell
Contains a minor spelling correction. 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@10247 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Change t4_span.spantype to linemode.Shaun Ruffell
Since 'linemode' more accurately describes what spantype is specifying. We can also use an enumeration for the linemode to make it explicit that linemode is only set to one of three possible values. 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@10246 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Trivial refactoring in t4_init_one().Shaun Ruffell
Use some convenience pointers to make the function easier to read as opposed to indexing into the arrays. 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@10245 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Add has_e1_span() helper.Shaun Ruffell
All those checks for wc->t1e1 span appear to basically be there to determine if there are *any* E1 spans exported by the card. We can make that explicit by wrapping those tests with a has_e1_span() inline function to help with readability. 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@10244 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove redundant 'vpm' from struct t4.Shaun Ruffell
Since removal of the VPM400 support the 'vpm' member of struct t4 is now redundant with the 'vpm450m' member. 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@10242 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove vpm400 support.Shaun Ruffell
The VPM400 module is no longer supported by the wct4xxp driver. The VPMOCT064 and VPMOCT128 are. Signed-off-by: Russ Meyerreicks <rmeyerriecks@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10241 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-20wct4xxp: Remove unused debugging codeShaun Ruffell
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@10240 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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-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-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-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-07-20wct4xxp: Fixed a bug where it sent loopdown signals foreverRuss Meyerriecks
The wct4xxp driver was resetting it's maint state to NONE prematurely. 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@10063 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20wct4xxp: Fix compilation when VPM_SUPPORT is not defined.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10061 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-01wct4xxp: Add module parameter to ignore rotary switch settings.Shaun Ruffell
The dual and quad span cards have a rotary switch onboard which controls the order that cards serviced by this driver are registered with the core of DAHDI. This commit adds a module parameter 'ignore_rotary' which, when set to 1, causes the driver to ignore the position of the rotary switch and only consider the physical slot when registering with DAHDI. Ignoring the rotary switch settings also permits the PCI device to be bound and unbound from the driver at runtime since registration with DAHDI no longer only happens when the module is first initialized. By default, the rotary switch will still be used to determine registration order. This commit does not change the default behavior. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10016 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