summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp/base.c
AgeCommit message (Collapse)Author
2010-04-06wcte12xp: Load the VPM in startup, not spanconfigShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8489 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Check and dequeue/decipher the VPM commands atomicallyShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8488 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Make sure the interrupt is stopped before freeing the vpmadt032Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8487 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Eliminate a trailing whitespace.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8482 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Do not reconfigure the VPMADT032 if shutting down.Shaun Ruffell
If we try to unload the driver soon after a high latency event, it is possible to get stuck for several seconds reloading the firmware. DAHDI-573. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8481 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Do not restart the timer on alarm poll if shutting down.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8480 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Expose the maximum latency as a module parameterShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8479 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06wcte12xp: Reprogram the VPM only when neccessary.Shaun Ruffell
Only program the VPM in spanconfig if it either is not setup, or if it fails a ping test. Also, if the channel config fails (but ping would otherwise work), force a reset / reconfiguration if the VPM module. DAHDI-573. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8478 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-05wcte12xp: Try to reconfigure the VPM if we fail to configure the channels.Shaun Ruffell
Also, fall back to any software echocan configured for this channel for new calls while we're in the middle of a recovery. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8473 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-04wcte12xp: Poll the VPM and reset it if necessary.Shaun Ruffell
When the transmit descriptor runs out completely, there (appears to be) a chance for a random command to be sent that results in the VPMADT032 to no longer respond, typically resulting in one way audio. This change introduces a poll of the VPM. If it fails the poll, it will be bypassed temporarily while the driver resets and reprograms it. Also, the VPM is initially programmed in the spanconfig callback instead of at driver load. This moves the potential for underruns until later in the boot process. DAHDI-573. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8468 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-04wcte12xp: Use ARRAY_SIZE in a couple more placesShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8466 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp, wtdm24xxp: Make sure the writes are retried.Shaun Ruffell
r8454 and r8460 introduced a change where writes are not retried when other module/framer commands are retried. This was an error and wasn't what was actually under test. This commit restores the behavior in wctdm24xxp and makes sure the vpm writes are retried in the wcte12xp. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8461 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp, wctdm24xxp: Close a memory leak when processing VPM commands.Shaun Ruffell
Closes a memory leak when processing the VPM write commands introduced in r8454. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8460 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp: Use our own workqueue for the timer and maint events.Shaun Ruffell
When the latency is large and register reads can take 100s of milliseconds, the alarm polling function could tie up one of the global workqueue threads long enough to interfere with other system operations. Most noticeably the console. DAHDI-573 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8455 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp: Resend both framer and VPM commands when reads may have been lost.Shaun Ruffell
Latency conditions could cause the driver to misconfigure the VPM which would result in one way audio. DAHDI-572. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8454 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-24wcte12xp: Fix typo in last commit.Shaun Ruffell
Wouldn't compile on kernels >= 2.6.20. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8416 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-24wcte12xp: t1xxp_maint is also called with interrupts disabled from dahdi_ioctlShaun Ruffell
So just push all the maintenance mode processing off to the workqueue. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8415 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-24wcte12xp: t1xxp_maint can be called from interrupt context.Shaun Ruffell
Since t1xxp_maint can be called from interrupt context with the DAHDI_MAINT_LOOPSTOP cmd, push the processing of that command to a workqueue since it may sleep in the t1_getreg call. DAHDI-560. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8410 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-23wcte12xp: Fix potential race on command handling.Shaun Ruffell
If we timeout a command, don't free it right away unless we are the one who removed it from whatever list it was on. Also, increase the timeout (2 seconds wasn't enough when the firmware for the VPMOCT was being loaded on a system with 4K stacks) and check the return value from t1_getreg in case there were timeouts. DAHDI-560. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8400 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-22wcte12xp, wctdm24xxp: Do not keep individual free lists for VPM commands.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8375 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-04Fix issue with T1/E1 selection jumper always readingMike Spiceland
E1 selection. DAHDI-553 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8245 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wctdm24xxp, wcte12xp: Add optional module parameter to set the maximum latency.Shaun Ruffell
Setting the maximum latency can be useful if you have a system event that normally causes a latency increase, but you would rather have a break in the audio or frame slip, then let the latency grow to the current default maximum which is 25ms. DAHDI-278. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8198 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wcmtd24xxp, wcte12xp: Make vpmsupport module parameter read only.Shaun Ruffell
The vpmsupport module parameter (and a few other ones) do not do anything if they are changed after the driver is first loaded. Therefore, let's make these module parameters read only at runtime. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8188 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wcte12xp: Increase a few timeouts, and cleanup on timeout.Shaun Ruffell
Also, check for good frames as the wctdm24xxp driver does now. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8178 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wcte12xp: Cleanup if voicebus_start fails.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8177 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wcte12xp: Fix for a couple of issues introduced in recent commits.Shaun Ruffell
handle_transmit was clearing out the wrong size value and checking for timeouts wasn't handled correctly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8156 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wctdm24xxp: Add support for Hx8 series cards.Shaun Ruffell
The Hx8 series cards support BRI modules in addition to analog modules. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8123 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wctdm24xxp, wcte12xp: Updating the interface for the VPMADT032.Shaun Ruffell
This description needs to be filled in more. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8121 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-25wctdm24xxp, wcte12xp: Buffer handling improvements.Shaun Ruffell
This patch moves the majority of the buffer processing for the voicebus based cards out of the interrupt handler and into a tasklet. When multiple cards are running on the same CPU, and there was a latency condition that would cause them to get behind, this now allows the tasklet to limit how many buffers are processed on each card before giving the other card a chance to start working on it's backlog. Additionally, when the card detects a hard under run, instead of trying to fix it up in the handling routine, it will now reschedule a work item that will completely reset the descriptor rings. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8095 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-24wctdm24xxp, wcte12xp: Abort attach if interface fails to come out of reset.Shaun Ruffell
If the reset bit never clears, then just assume we cannot talk to the board and error on the attach. DAHDI-515. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8080 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-02-08wctdm24xxp, wcte12xp: Abort the search for modules if killed.Shaun Ruffell
If the user kills the modprobe process that is initializing the modules, exit as soon as possible and do not look for any other modules. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8007 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08wcte12xp: Identify the card that is printing to the kernel log.Shaun Ruffell
Drops all users of module_printk in order to use 't1_info', which is a wrapper for dev_info. Also updates debug_printk to also print the bus location information. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8006 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08wcte12xp, wctdm24xxp: Declare static symbols that aren't externally referenced.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8005 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08vpmadt032,wcte12xp: Use a timeout on the read/write commands and during load.Shaun Ruffell
It is possible for poorly behaving hardware (and driver bugs) to lockup the modprobe process by having it wait indefinitely for a command to complete that never will. DAHDI-451. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8003 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-08voicebus: Remove framesize, buffer_cache, and cache_line members from struct.Shaun Ruffell
Framesize is the same on all the clients, so it can be removed from the 'struct voicebus' (and changed back again if needed). Since the framesize is the same, each board doesn't need it's own buffer_cache, and cache_line is only used during startup and can be read directly from pci configuration space, so we don't need to keep it around in our context. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7779 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-08voicebus: Make 'struct voicebus' embeddable by the client driver strutures.Shaun Ruffell
In addition to making 'struct voicebus' embeddable, also add an 'voicebus_operations' structure. This was done so that a) remove the "context" pointer from struct voicebus, and also to show that handle_recieve/transmit are to be managed together. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7778 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-12-22voicebus, wcte12xp: Only define SLAB_STORE_USER when CONFIG_SLUB is defined.Shaun Ruffell
On 2.6.22, there is was a bug in the SLUB allocator that required defining SLAB_STORE_USER, however this setting is only valid when CONFIG_SLUB is defined and not when using the previous slab allocator. DAHDI-424. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7722 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-23Even if we are debouncing the LOS declaration, we still expect the LED toMike Spiceland
turn red as soon as we unplug the physical cable. This impliments this on the wcte12xp just as it already does on the wct4xxp. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7632 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12wcte12xp, voicebus: Set the companding mode correctly on E1.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7582 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12wcte12xp: Change serial port configuration setting for hw echocan.Shaun Ruffell
The wcte12xp, like the wctdm24xpp, should have the PcmOutPortA set to SerialPortNull. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7570 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Use dev_xxx macro when printing vpm messages.Shaun Ruffell
We also do not need the unused context member of the vpmadt032 structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7569 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Remove redundant MAX_CHANNELS_FROM_SPANShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7568 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12wctdm24xxp, wcte12xp: We no longer have any DTMF events to check for.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7566 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Fix race when enabling/disabling hardware echocan.Shaun Ruffell
This closes a race condition where it was possible for the driver to believe it has enabled the VPMADT032 when in fact, it really has not. This fixes a regression introduced in dahdi-linux 2.2.0. (issue #15724) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-10wcte12xp: Export features and operations for VPMADT032.Shaun Ruffell
Fixes a regression in dahdi-linux 2.2.0 where it was impossible for userspace to reset the state of a channel in the VPM. (issue #15724) Patches: mantis-15724-2.patch uploaded by sruffell (license 456) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7549 a0bf4364-ded3-4de4-8d8a-66a801d63aff