summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2010-09-20dahdi: Modify "is_monitor_mode" to be usable by dahdi_chan_unreg.Shaun Ruffell
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9367 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Reduce 'chans' dereferencing in dahdi_check_confShaun Ruffell
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9366 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Issue warning if DAHDI_INDIRECT ioctl is used.Shaun Ruffell
DAHDI_INDIRECT is only used when setting up pciradio channels. dahdi_cfg no longer should need DAHDI_INDIRECT since revision 9352. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9365 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in dahdi_receive.Shaun Ruffell
Simplifies the function and may increase performance due to decreased dereferencing of the span and channel array. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9364 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in process_masterspan.Shaun Ruffell
Reduces the amount of indexing into the global channel array. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9363 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in dahdi_transmit.Shaun Ruffell
I believe this makes it a little more clear what is happening. Also could provide a potential speedup if the span doesn't need to be constantly dereferenced (although an optimizer might make this moot). Regardless, this change doesn't hurt. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9362 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: chans[ms->confna] -> conf_chan.Shaun Ruffell
In __dahdi_process_getaudio_chunk and __dahdi_process_putaudio_chunk we can streamline the operation slightly by saving a constant pointer to the conference channel instead of constantly dereferencing the master channel and indexing into the chan array. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9361 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unused parameter in three ioctl handlers.Shaun Ruffell
The 'int cmd' parameter is unused and unneeded in dahdi_ioctl_getgains, dahdi_ioctl_setgains, and dahdi_ioctl_chandiag. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9360 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move handlers for DAHDI_[GET|SET]_PARAMS into separate functions.Shaun Ruffell
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9359 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move the conferencing ioctls into their own functions.Shaun Ruffell
DAHDI_GETCONF, DAHDI_SETCONF, DAHDI_CONFLINK, and DAHDI_CONFDIAG are all now in their own functions. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9358 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move DAHDI_CHANCONFIG ioctl into separate function.Shaun Ruffell
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9357 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move DAHDI_CHANDIAG ioctl into separate function.Shaun Ruffell
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9356 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Refactor some of the access to the 'spans' array.Shaun Ruffell
It is still used at span registration / unregistration to assign the span number, and when iterating through all spans. Otherwise, moves the code base a step closer to removal of the 'spans' array. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Embed the proc entries in struct dahdi_span.Shaun Ruffell
Part of preparations for replacing the array of spans with a list of spans. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Be more tolerant of surprise removal of channels.Shaun Ruffell
Enable DAHDI to detect if an operation on a file handle refers to a channel that may have been unregistered. This can occur, for example, when a board driver is hot-swapped out in a live system. This patch ensures that file->private_data is always properly set for any open channel, and it's set back to NULL when a channel is unregistered. This way file->private_data can be used to check whether it's valid to perform an operation on the channel. (NOTE: There is still a race condition here if the driver was unbound on one processor during the window of time between when file->private_data was checked and the system call finishes). Also, since DAHDI should only return -ENODEV on read or write when there was a surprise device removal on a running system this sleep can prevent the system from becoming unresponsive if the userspace application does not check for the -ENODEV error and constantly tries to call read with elevated privileges. (issue #17669) Reported by: tzafrir Tested by: sruffell Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9353 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove '#if 1' in dahdi_transmit.Shaun Ruffell
Most likely some stale debugging code that slipped in and is now gone. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9350 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20wcte12xp: Remove unused 'dtmfactive', 'dtmfmask', and 'dtmfmutemask' members.Shaun Ruffell
These members are no longer used in the driver and are now gone. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9348 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-16vpmadt032: Remove potential endless waits when resetting.Shaun Ruffell
It is possible to softlock if the board stops delivering interrupts in the middle of a reset. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9332 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp: Remove unused 'unchannelized' global.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9329 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: '0x0c' -> PCI_CACHE_LINE_SIZE.Shaun Ruffell
Magic number removal. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9327 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: Add call to 'pci_set_mwi' on initialization.Shaun Ruffell
I have yet to personally come across a system where this actually changes the observable behavior, but it certainly seems like the sane thing to do and I would rather not let this float around as a patch when I can just merge it in. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: Remove redundant vb_enable_io_access.Shaun Ruffell
These three bits are already set by 'pci_enable_device' and 'pci_set_master' calls. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9325 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14dahdi: 0 -> DAHDI_LAW_DEFAULTShaun Ruffell
Makes it a little more clear what the '0' parameter represents. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp: '4' -> 'VPM150M_ACTIVE'.Shaun Ruffell
Replacing magic number. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9323 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14dahdi: Remove unused functions __buf_munge and __buf_cpush.Shaun Ruffell
These functions were only defined if BUF_MUNGE was defined, but even if that symbol is defined there is not anyplace in the driver where these functions were then called. This has been in the code since rev 87 so this is most likely stale debugging code. Feel free to revert if this is actually used somewhere that is not apparent. Here is where the functions were originally added to the drivers: http://svnview.digium.com/svn/zaptel?view=revision&revision=87 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9322 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14dahdi: Remove the unused label from __buf_pull and __buf_push calls.Shaun Ruffell
These label parameters were not used in the functions. They are most likely some debug code that was left over. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9321 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wct4xxp: Put two DMA messages behind debug flag.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9320 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-11wctdm24xxp, wcte12xp: Fix comment. RELAXED is no longer a mode name.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9319 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-11wcte12xp: Remove unused functions from t1_span_ops.Shaun Ruffell
'open' and 'close' were already empty. 't1xxp_shutdown' only cleared DAHDI_FLAGBIT_RUNNING which is already done in dahdi-base.c after calling shutdown. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9318 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-10dahdi-base: All channels for a span are now unconfigured on shutdownKinsey Moore
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9317 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-10wcte11xp, wcte12xp: Fix a long-standing issue with shutdownKinsey Moore
Upon shutdown, both drivers would attempt to power down external interfaces, but never attempted to bring them back up when the span was restarted. Removing that code allows the driver to work properly until a better solution can be found. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9316 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-08wct4xxp: Update span-local struct with timing infoRuss Meyerriecks
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 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9312 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-07dahdi_dummy: #include <linux/slab.h> for kzalloc and friends.Shaun Ruffell
Fix the same issue as in r8550 for dahdi_dummy.c (closes issue #17959) Reported by: glen201 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9307 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-03dahdi-base: Hide "Master changed to" messageRuss Meyerriecks
Put the "Master changed to xxx/x/x" message behind a debug flag. It's an implementation specific detail and has caused confusion with customers. DAHDI-692 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9299 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01dahdi: A couple of trivial spelling changes.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9248 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01dahdi: Fix compilation error when CONFIG_DAHDI_NET is defined.Shaun Ruffell
Kernel interface for network devices changed. This is the patch from issue plus a few trivial checkpatch.pl formatting changes (minus the >80 column warnings). (closes issue #17857) Reported by: msink Patches: dahdi_net-v2.patch uploaded by msink (license 1103) Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9247 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01dahdi, dahdi_transcode: Remove mmap interface.Shaun Ruffell
There are not any existing users of the interface (and it would always return -ENOSYS to the caller anyway). Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9246 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-01wctdm24xxp: Minor spacing change on module parameter descriptions.Shaun Ruffell
Primarily to add a space between 'use' and 'the' in the alawoverride description. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9245 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-24wcb4xxp: 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@9188 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-20dahdi: Uncross dest if dacs is not supported between two different chans.Russ Meyerriecks
This removes a confusing message introduced in 9120 when bridging channels on two differnt cards. i.e. "dahdi: unable to cross connect 'TE4/0/2/2' with 'WCTDM/0/0'" "dahdi: unable to cross connect 'WCTDM/0/0' with 'TE4/0/2/2'" git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9168 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-19dahdi: move 'dahdi_is_digital_span' back into wctdm24xp driver.Shaun Ruffell
Older kernels do not like the 'bool' type and I cannot just add it into include/dahdi/kernel.h without compile messages in the xpp driver where bool is defined directly. Since the wctdm24xxp driver is the only place using that function, I just moved it back there for now. This fixes a regression introduced in 9130. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9167 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-17wcte12xp: Clean up -vpm workqueue if there is not a VPMADT032 installed.Shaun Ruffell
DAHDI-681. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9145 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-17wcte12xp, wctdm24xxp: Add compile time option CONFIG_VOICEBUS_ECREFERENCE.Shaun Ruffell
Add compile time option to improve the reference signal provided to software echo cancelers. The intent here is for this functionality to become the default behavior but more testing and work on the edge cases is needed. It's being brought in now as a compile time option since there have been reports that it helps in some environments. Instead of using two buffers, which means that at best we're two milliseconds behind, use a circular buffer where audio data is written on the transmit side and read on the receive path. In this way high latency values will not interfere with the operation of software echo cancelers. DAHDI-291. DAHDI-387. This work was originally on: http://svn.asterisk.org/svn/dahdi/linux/team/sruffell/improved_ecreference@9143 and includes a generic kfifo replacement by Matt Fredrickson. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9144 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-16wctdm24xxp: Set the companding mode on the analog ports in fixup.Russ Meyerriecks
Fixes a regression from 9101 'wctdm24xxp: Added "auto" companding option' where the analog modules were not defaulted to alaw properly when a digital module is on an Hx8. This could result in very poor audio since the modules were providing ulaw data, but dahdi-base believed the audio was in alaw when converting to signed linear. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9143 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-16dahdi_transcode: No need for ioctl when unlocked_ioctl is availableShaun Ruffell
More work to kill the BKL (Big Kernel Lock) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10041d2d14688e207d0d829095147aa82c1f211b git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9142 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-13wct4xxp: Move 'oct612x' from an svn:external directly into dahdi-linux.Shaun Ruffell
From http://svn.digium.com/svn/octasic_api/oct612x/tags/PR49-03/software@44 This is only currently maintained as part of DAHDI linux so it makes sense to have it directly in DAHDI linux. This obliterates any chance of having 0 checkpatch.pl errors between the 2.3.0 and 2.4.0 releases. Oh well... Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9138 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-13wctdm24xxp: Set the 'spantype' for the digital spans.Shaun Ruffell
Defaults to "TE" but can be set by software to "NT" by dahdi_cfg. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9132 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-13wctdm24xxp: 'is_span_digital' -> 'dahdi_is_span_digital'Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9131 a0bf4364-ded3-4de4-8d8a-66a801d63aff