summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wct4xxp/base.c
AgeCommit message (Collapse)Author
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10220 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10224 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-12wct4xxp: Bug in timing cable with different span density cardsShaun Ruffell
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10140 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10222 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-27Move test for DEFINE_SPINLOCK into include/dahdi/kernel.hShaun Ruffell
The check for DEFINE_SPINLOCK was spread throughout the source tree. If not defined we can just define it in inlucde/dahdi/kernel.h. Now include/dahdi/kernel.h is the only place that references SPIN_LOCK_UNLOCKED (which breaks lockdep checking if DEFINE_SPINLOCK is otherwise defined in the kernel). Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Review: https://reviewboard.asterisk.org/r/940/ Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9411 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9924 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21wct4xxp: Perform an extended reset on PCI-Express cards by default.Shaun Ruffell
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9635 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9695 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21"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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9584 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9691 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21wct4xxp: Drop usage of 'volatile' qualifier.Shaun Ruffell
The registers on the device are already accessed with readl/writel and the readchunk and writechunk are mapped into coherent DMA region. The contents of those buffers should not be changing in the middle of any transmit/receive prep call. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9400 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9671 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21wct4xxp: Update span-local struct with timing infoShaun Ruffell
dahdi_tool was incorrectly reporting all spans to be in local timing mode. This is because the driver tracks which span it's timing syncs to, within the card local struct "wc". We have to manually go through and copy timing updates to the span local structs because this is what dahdi_tool actually reads. dahdi-526 Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9312 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9654 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-27wct4xxp: Moving the transmit short detection behind debug module param.Shaun Ruffell
This needs some more testing before it's on by default. If the card is otherwise functioning, these messages may be confusing to the user. If the card is not functioning, the driver can be reloaded with debug to check for this condition. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-27wct4xxp: Removed transmit line open fault detectionShaun Ruffell
The transmit line open detection was pretty weak in that it trips upon receiving 32 consecutive zeroes. We were getting false positives from looping and other miscellaneous functions. Removing this feature, but leaving the transmit line short detector as it actually detects physical shorts. From: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9204 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-06wct4xxp: minor checkpatch changesRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9105 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-06wct4xxp: Added card level timing information in sysfsRuss Meyerriecks
For kernels >= 2.6.18, each individual card has it's local timing hung off the pci device in the sysfs tree. dahdi-626 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9102 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-06wct4xxp: module param "extendedreset" now a compile optionRuss Meyerriecks
Due to the very small number of affected customers we have removed the module parameter "extendedreset" in favor of a compile time option "CONFIG_EXTENDED_RESET". dahdi-673 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9098 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29wct4xxp, wcte12xp: restrict signaling and line combinations to what actually ↵Kinsey Moore
works git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9056 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29wct4xxp, wcte12xp: remove loobpack parameter, functionality provided by ↵Kinsey Moore
dahdi_maint git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9051 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29wct4xxp: increase consistency and decrease verbosity of kernel loggingKinsey Moore
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9049 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wct4xxp: Several minor changes to make sparse/checkpatch.pl happy.Shaun Ruffell
Make setup_chunks static, eliminate a dynamic array in the interrupt handler, don't cast away a memory region specifier, and don't initialize statics to 0. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9042 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-27wct4xxp: Enabled network facing looping for E1Russ Meyerriecks
Added the abililty to loop the line back towards the network for E1 modes. This supports both network loop and network payload loop. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9019 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-27wct4xxp: Fixed error injection bugRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9016 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wct4xxp: Error counter injection for E1 modeRuss Meyerriecks
Added support for error counter injection for E1 mode git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9013 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wct4xxp: Removed card level event handlerRuss Meyerriecks
Upon review the event introduced in r8998 seemed to be redundant, as the same information was already available. Performance issues were also a concern. This reverts r8998. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9010 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added hardware transformer checkRuss Meyerriecks
QuadFalc has the ability to test if the transformer is performing correctly. If the components between the framer and the physical span interface are shorted out or opened for any reason we can now detect it. Possible causes for tripping this error could be a broken transformer from an electrical spike or a board manufacturing error. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8999 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added card level event handlerRuss Meyerriecks
When a loss of syncronization signal occurs on one of the spans, it affects all spans on that card. Since we do not have a span or card level event system, we have to queue up a global event on all channels for that card The new event is DAHDI_EVENT_SYNC git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added the ability to trigger alarm simulation states in theRuss Meyerriecks
qfalc framer. Added some more verbose red alarm states in the upper byte of the alarm member of the dahdi_span structure Removed some unnecessary instrumentation regarding the enabling of the errored second and 1 second counters for performance collecting. Also added a couple comments. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8997 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the 'owner' field from dahdi_span to dahdi_span_ops.Shaun Ruffell
One more thing that can be moved out of the per-span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8986 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the callbacks in dahdi_span into its own structure.Shaun Ruffell
Part of preparation for adding additional callbacks to allow board drivers to advertise and support gathering pre-echocan data from hardware echocans. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8985 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Remove the 'pvt' member from dahdi_span.Shaun Ruffell
The vast majority of board drivers already keep the dahdi_span structure in a driver specific structure. The others were easily converted. This way board drivers can use the container_of macro to find what was previously pointed to by the "pvt" member of the span. One less thing to think about in the span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8984 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-22Make sure we check max_latency to see if it's greater than the minimum ↵Matthew Fredrickson
required latency for the board in question. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8968 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14Make noburst parameter override burst flag.Matthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8935 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-02Add support for max_latency module parameter in wct4xxpMatthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8849 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-30Fix for circumstances where the framer needs extra help to reset itself.Matthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8841 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-24Fix trailing whitespace and make last change more readible. (sruffell ↵Mike Spiceland
suggestion) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8805 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-24Impliments a workaround for an errata in the qfalc v3.1 chip which causedMike Spiceland
RBS modes to be broken when using AMI coding. DAHDI-647. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8801 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-14Expose some dynamic latency options as module parameters for the wct4xxp driverMike Spiceland
latency - the default number of ms of buffering to start off with ms_per_irq - how often the card interrupts git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8768 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-08wct4xxp, wcte12xp: Fixed broken E1 and unsupported function bugsRuss Meyerriecks
* Fixed the bug where the card could not be brought out of local loopback in E1 mode. * Fixed a bunch of issues where the drivers didn't report unsupported maintenance functions correctly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8291 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-08dahdi_maint: Added local loopback capability in E1 modesRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8279 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-08wct4xxp: wcte12xp: Revised maint clearingRuss Meyerriecks
Looping modes are now mutually exclusive. If two looping modes are enabled simultaneously it tends to hose up our framer chip. Now, all looping modes are cleared in the driver before any are set. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8274 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-05wct4xxp: Fixed inability to disable network payload loopingRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8255 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-05wct4xxp: Removed over-verbose instrumentationRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8250 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-24wct4xxp: Removed a spurious paste.Russ Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8087 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-22Branch merge from the maintenance modes projectRuss Meyerriecks
* Added logic for both the single and dual/quad span cards for supporting local loopback (virtual loopback plug), network loopback, network payload loopback, loopup, and loopback transmitting. * Added logic for the dual/quad span driver to support exporting the performance and error counters including : - errored seconds - framing errors - coding violations - bipolar violations - crc4 errors - ebit errors - fas errors * Moved the error and performance counters into a substructure for all drivers taking advantage of dahdi_span bpvcount. * Modified the DAHDI_SPANSTAT ioctl interface, so I moved the old interface to DAHDI_SPANSTAT_V1. The new interface comes with a nice, new shiny packed struct dahdi_spaninfo. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8061 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08dahdi: Update the Digium copyright on files changed since 2010-01-01.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8008 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Replaced a lost member of the t4 struct, which was clobbered inRuss Meyerriecks
the merge commits. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7941 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Gen5-rc1 updates the device_id.Russ Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7934 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Make Missed interrupt message off by default, and incrementingRuss Meyerriecks
irqmisses if we have to do a latency bump git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7933 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: One more readback in the _in routines to make sure the writesRuss Meyerriecks
clear bridges and such git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7932 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Make sure 2 port cards only use 2 portsRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7931 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Add new 5th gen identifiersRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7930 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Fix problems so that pedantic pci does not have to be enabledRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Add a few bug fixes for latency bumps and for the newRuss Meyerriecks
ms_per_irq variable git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7928 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-18wct4xxp: Add some protection to prevent latency bumps during load time onlyRuss Meyerriecks
events such as firmware load git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7927 a0bf4364-ded3-4de4-8d8a-66a801d63aff