[dahdi-commits] sruffell: branch linux/2.2 r7539 - in /linux/branches/2.2: ./ drivers/dahdi/ ...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Nov 9 13:32:49 CST 2009
Author: sruffell
Date: Mon Nov 9 13:32:45 2009
New Revision: 7539
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7539
Log:
Merged revisions 6699,6706,6714,6768,6771,6785,6812-6818,6821,6838,6928-6929,6941,6945-6946,6952,6981-6982,7003-7004,7008,7023,7027,7094-7097,7110,7117-7118,7125,7140,7147,7155,7194,7284,7293,7319,7437-7438,7445,7480,7486-7487,7512-7524,7527-7528,7534-7536 via svnmerge from
https://origsvn.digium.com/svn/dahdi/linux/trunk
........
r6699 | kpfleming | 2009-06-23 15:32:01 -0500 (Tue, 23 Jun 2009) | 3 lines
Use the same mutex lock for channel allocation and license checking in dahdi_echocan_hpec, so that channel allocation won't happen while the license is being checked (or rechecked)
........
r6706 | sruffell | 2009-06-23 18:21:25 -0500 (Tue, 23 Jun 2009) | 1 line
README: Minor corrections to the README.
........
r6714 | twilson | 2009-06-24 15:23:07 -0500 (Wed, 24 Jun 2009) | 1 line
Remove unused torisa code from header
........
r6768 | sruffell | 2009-06-26 12:07:39 -0500 (Fri, 26 Jun 2009) | 1 line
wct4xxp: Unmap the same size DMA window that was mapped.
........
r6771 | sruffell | 2009-06-26 12:22:45 -0500 (Fri, 26 Jun 2009) | 6 lines
dahdi_dynamic: Release the dlock before calling accross modules.
Resolves a hard lock due to a recursive spinlock grab at startup.
Reported by: mapacheco
(closes issue #15210)
........
r6785 | sruffell | 2009-06-28 23:47:26 -0500 (Sun, 28 Jun 2009) | 5 lines
echocan: Properly keep the reference counts for the echocan modules.
(closes issue #13504)
(closes issue #15327)
Reported by: sruffell, tzafrir
........
r6812 | tzafrir | 2009-07-02 14:25:54 -0500 (Thu, 02 Jul 2009) | 5 lines
wcb4xxp: Don't assume we have 4 spans (ports).
First part of extra hfcmulti drivers: the number of ports is still
hardwired to 4, but just in a single place.
........
r6813 | tzafrir | 2009-07-02 14:34:05 -0500 (Thu, 02 Jul 2009) | 4 lines
wcb4xxp: Extra bit macros that a needed for kernels < 2.6.24
Macros borrowed from xpp/ .
........
r6814 | tzafrir | 2009-07-02 14:42:25 -0500 (Thu, 02 Jul 2009) | 2 lines
wcb4xxp: Adjust debug filter code to number of ports.
........
r6815 | tzafrir | 2009-07-02 14:52:14 -0500 (Thu, 02 Jul 2009) | 6 lines
wcb4xxp: support for other HFC-xS cards (info, not code)
This commit includes skeleton for the support of other HFC-[248]S-based
cards. It still does not include all the different cases for different
cards.
........
r6816 | tzafrir | 2009-07-02 14:59:44 -0500 (Thu, 02 Jul 2009) | 2 lines
The B410P differs from other HFC-xS cards with respect to the EC unit
........
r6817 | tzafrir | 2009-07-02 15:07:36 -0500 (Thu, 02 Jul 2009) | 7 lines
More B410P differences: Clock and NT/TE.
* The B410P reads the NT/TE switches the other way around from other
cards.
* Its clock is also 1/2 of that of other cards, which causes wierd PCM
on an unmodified driver.
........
r6818 | tzafrir | 2009-07-02 15:14:39 -0500 (Thu, 02 Jul 2009) | 4 lines
wcb4xxp: Fix PCM handling for various cards.
HFC-8S cards behave quite differently than HFC-4S cards here.
........
r6821 | tzafrir | 2009-07-02 15:18:59 -0500 (Thu, 02 Jul 2009) | 6 lines
wcb4xxp: Fix LED handling in OpenVox cards (maybe also others)
This commit adds extra functions to handle LEDs in the non-B410P cards.
Only tested on OpenVox cards. OpenVox cards are known to have slightly
different LEDs so this is likely to be slightly broken for others.
........
r6838 | sruffell | 2009-07-13 09:33:39 -0500 (Mon, 13 Jul 2009) | 1 line
wctc4xxp: Remove deprecated DMA_xxBIT_MASK usage.
........
r6928 | sruffell | 2009-08-04 11:22:23 -0500 (Tue, 04 Aug 2009) | 1 line
wcte12xp: Remove unused 'schluffen' declaration in wcte12xp.h
........
r6929 | sruffell | 2009-08-04 11:22:26 -0500 (Tue, 04 Aug 2009) | 4 lines
wctdm24xxp: Eliminate 'variety' and 'type' members from 'struct wctdm'.
struct wctdm can hold a pointer to struct wctdm_desc directly, and eliminate
the need to copy members of wctdm_desc into wctdm.
........
r6941 | dbailey | 2009-08-05 09:40:45 -0500 (Wed, 05 Aug 2009) | 14 lines
Change proslic linefeed register setting
Insure that proslic linefeed register is not transitioned from Active to
On-Hook Transmission while the channel is off-hook.
Replaced magic numbers assigned to linefeed associated variables with more
descriptive constants.
(issue #15352)
Reported by: alecdavis
Patches:
wctdm_prevent_ohttimer_click.diff3.txt uploaded by dbailey (license 819)
Tested by: alecdavis, dbailey, vmikhelson
........
r6945 | sruffell | 2009-08-05 14:39:10 -0500 (Wed, 05 Aug 2009) | 6 lines
wctdm24xxp, wctdm: Formatting changes.
Update the lines affected by revision 6941. I'm taking every opportunity
to move DAHDI closer to the kernel coding conventions short of just
reformatting for the sake of reformatting. The majority of these changes
are to bring the line lengths under 80 chars.
........
r6946 | sruffell | 2009-08-05 14:39:13 -0500 (Wed, 05 Aug 2009) | 1 line
dahdi_dummy: Remove some trailing whitespace.
........
r6952 | sruffell | 2009-08-11 13:47:21 -0500 (Tue, 11 Aug 2009) | 3 lines
wctdm24xxp: Remove unused members related to hardware DTMF detection.
Not used anymore, so they are gone.
........
r6981 | sruffell | 2009-08-13 09:42:05 -0500 (Thu, 13 Aug 2009) | 1 line
wctc4xxp: Remove flag member that is not used.
........
r6982 | sruffell | 2009-08-13 09:42:08 -0500 (Thu, 13 Aug 2009) | 1 line
wctdm24xxp: Use the ARRAY_SIZE macro where appropriate.
........
r7003 | sruffell | 2009-08-13 19:46:26 -0500 (Thu, 13 Aug 2009) | 9 lines
wctdm24xxp, wctdm: Detect if our hookstate has been set back to the initial state.
Check if our hookstate has been set back to the initial state, typically the
result of a chanconfig, and if so, if we're an FXO port, forget our current
battery state. This allows the driver to determine and report again what the
hook state of the port is.
(related to issue #14577)
(closes issue #15429)
........
r7004 | sruffell | 2009-08-13 19:46:28 -0500 (Thu, 13 Aug 2009) | 1 line
dahdi-base: Add comment to explain why rxhooksig is reset on span start.
........
r7008 | sruffell | 2009-08-14 10:47:39 -0500 (Fri, 14 Aug 2009) | 11 lines
wcfxo: Reset the DAA on module initialization.
The X100p and clones will sometimes work and sometimes not depending on wether
the DAA powers up in running state- this seems to be related to the power
supply. This problem is caused by the driver not reseting the DAA and may be
the source of a great many intermittent problems with this card.
(closes issue #14232)
Reported by: tallen8840
Patch by: tallen8840
Tested by: explidous, Flavio
........
r7023 | sruffell | 2009-08-17 09:07:06 -0500 (Mon, 17 Aug 2009) | 4 lines
README: Update known issues section.
Remove note about echocanceler reference counts, since that is fixed, and add
a note about issue with KB1 when configured with more than 128 taps.
........
r7027 | seanbright | 2009-08-17 14:31:54 -0500 (Mon, 17 Aug 2009) | 7 lines
Silence spurious warnings when trying to remove Zaptel directories during install.
(closes issue #15479)
Reported by: pprindeville
Patches:
dahdi-linux-rm.patch uploaded by pprindeville (license 347)
........
r7094 | sruffell | 2009-09-07 16:40:19 -0500 (Mon, 07 Sep 2009) | 4 lines
wctdm24xxp: Remove a few more unneeded 'volatile' keywords.
The writechunk and readchunk parameters are never accessed by hardware at
the same time that the software is accessing them anymore.
........
r7095 | sruffell | 2009-09-07 16:40:22 -0500 (Mon, 07 Sep 2009) | 5 lines
dahdi-base: Reduce the stack usage of dahdi_common_ioctl.
Split the DAHDI_GETGAINS and DAHDI_SETGAINS ioctls into their own functions
and dynamically allocate the 'struct dahdi_gains' structure to reduce the
pressure on the stack.
........
r7096 | sruffell | 2009-09-07 16:40:25 -0500 (Mon, 07 Sep 2009) | 1 line
dahdi-base: Prevent compilation if both EMPULSE and EMFLASH are defined.
........
r7097 | sruffell | 2009-09-07 16:40:29 -0500 (Mon, 07 Sep 2009) | 4 lines
dahdi-base: Fix flag check in dahdi_rbs_sethook.
As long as any of the flags were set, this check would have always
passed.
........
r7110 | rmeyerriecks | 2009-09-14 15:30:24 -0500 (Mon, 14 Sep 2009) | 1 line
Fixed issue where the clear channel flags were not being set at the appropriate time causing a channel re-configure to mis-set the last channel in each span
........
r7117 | dbailey | 2009-09-14 15:51:56 -0500 (Mon, 14 Sep 2009) | 17 lines
Race condition in handling writes to proslic LINEFEED register (64)
The wctdm24xxp driver has a problem where a VMWI IOCTL call followed immediately
by a ONHOOKTRANSFER IOCTL call will cause the ONHOOK transfer request to be
dropped. This occurs if the write to the proslic's LINEFEED register for the
VMWI ICTL call is not completed when the ONHOOK transfer request IOCTL is
processed.
I also cleaned out some magic numbers used in setting the linefeed register.
(closes issue #15875)
Reported by: dbailey
Patches:
15875-wctdm24xxp.diff uploaded by dbailey (license 819)
Tested by: dbailey
........
r7118 | seanbright | 2009-09-14 16:10:38 -0500 (Mon, 14 Sep 2009) | 1 line
Change zap -> dahdi.
........
r7125 | rmeyerriecks | 2009-09-15 09:59:06 -0500 (Tue, 15 Sep 2009) | 2 lines
dahdi-base: Minor syntax change to meet style guidelines
........
r7140 | dbailey | 2009-09-15 15:50:45 -0500 (Tue, 15 Sep 2009) | 12 lines
Change WCTDM SPI clock off state polarity and read timing
Change the off state of the SPI clock to high and provide more time for data to
settle out on SPI reads.
(closes issue #15261)
Reported by: alecdavis
Patches:
wctdm_spi_clocking.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, dbailey
........
r7147 | sruffell | 2009-09-16 13:19:00 -0500 (Wed, 16 Sep 2009) | 4 lines
wct4xxp: Check the alarm state if we're debouncing a red alarm.
This fixes a problem where if you set the alarmdebounce module parameter on
gen2+ cards, you never detect when you go into red alarm.
........
r7155 | sruffell | 2009-09-21 10:24:36 -0500 (Mon, 21 Sep 2009) | 8 lines
dahdi-base: dahdi_ioctl_[get|set]gains should return the res value.
In function dahdi_ioctl_getgains() and dahdi_ioctl_setgains() return value
assigned to res variable, but these function always return 0 which is an
error.
(closes issue #15916.)
Patch by: ys
........
r7194 | dbailey | 2009-09-22 09:03:53 -0500 (Tue, 22 Sep 2009) | 12 lines
wctdm: Add missing break
A break was missing that caused DAHDI_ONHOOKTRANSFER ioctl call to fall into
DAHDI_SETPOLARITY ioctl call.
(issue #14261)
Reported by: alecdavis
Patches:
wctdm_fix_ONHOOKTRANSFER.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis
........
r7284 | mattf | 2009-09-30 11:34:11 -0500 (Wed, 30 Sep 2009) | 1 line
Update echocan API so it only uses channel offset in free routine
........
r7293 | tzafrir | 2009-09-30 13:09:42 -0500 (Wed, 30 Sep 2009) | 2 lines
move the dev->bus_id fix from xpp to kernel.h: needed elsewhere
........
r7319 | sruffell | 2009-10-02 16:09:01 -0500 (Fri, 02 Oct 2009) | 1 line
wcte12xp: The timer is called every 200ms, not every 100ms. Fix comment.
........
r7437 | sruffell | 2009-10-29 13:26:16 -0500 (Thu, 29 Oct 2009) | 10 lines
dahdi-base: Do not allow jumps in system time to lock up the system w/core_timer
Since dahdi coretimer uses the number of milliseconds that has actually passed
to determine how many times to call dahdi_receive, it is possible that if the
system time shifts after dahdi is started, that the system can appear to lock
up while the core timer attempts to catch up. This change prevents soft lock
ups under these conditions. This is brings the dahdi_dummy changes in r6933
into dahdi-base.
(related to issue #15647)
........
r7438 | sruffell | 2009-10-29 13:26:17 -0500 (Thu, 29 Oct 2009) | 1 line
wcte12xp, wctdm24xxp: VPMADT032 firmware update to 1.20.
........
r7445 | mspiceland | 2009-10-29 16:37:45 -0500 (Thu, 29 Oct 2009) | 3 lines
Debounce alarms by default for wct4xxp per AT&T 54016. Also, the
various alarm conditions can be debounced separately.
........
r7480 | sruffell | 2009-11-04 14:43:05 -0600 (Wed, 04 Nov 2009) | 4 lines
voicebus: Increase the NLP converged threshold to 18.
Brings in the change from r7065 that was on the team/sruffell/dahdi-linux-vpm119
branch.
........
r7486 | mspiceland | 2009-11-04 17:25:32 -0600 (Wed, 04 Nov 2009) | 9 lines
Adding alarm debounce to single span driver (wcte12xp).
Debounce yellow alarm also.
In wcte12xp, change check alarm frequency to 100ms for better debounce
granularity.
Fix lines over 80 cols from last alarm debounce commit.
........
r7487 | mspiceland | 2009-11-04 17:28:21 -0600 (Wed, 04 Nov 2009) | 2 lines
Remove commented out code block that was unintentionally left in.
........
r7512 | sruffell | 2009-11-06 18:35:38 -0600 (Fri, 06 Nov 2009) | 1 line
wcte12xp: Remove unused flag member and make const the t1_descs.
........
r7513 | sruffell | 2009-11-06 18:35:38 -0600 (Fri, 06 Nov 2009) | 4 lines
voicebus: Remove the VB_PRINTK macro.
Unnecessarily duplicates the dev_xxx macros. Also removes the need for the
board_name member from struct voicebus.
........
r7514 | sruffell | 2009-11-06 18:35:39 -0600 (Fri, 06 Nov 2009) | 4 lines
voicebus: Remove sdi member from 'struct voicebus'
This is only used during startup so we don't need to carry it around in the
structure at all times.
........
r7515 | sruffell | 2009-11-06 18:35:40 -0600 (Fri, 06 Nov 2009) | 1 line
voicebus: Set the DMA_BIT_MASK
........
r7516 | sruffell | 2009-11-06 18:35:40 -0600 (Fri, 06 Nov 2009) | 1 line
voicebus: Use DAHDI_IRQ_SHARED instead of defining our own.
........
r7517 | sruffell | 2009-11-06 18:35:40 -0600 (Fri, 06 Nov 2009) | 24 lines
voicebus: Send 'idle' buffers when the transmit descriptor underruns.
Previously, when the host system fails to service the interrupt in a timely
fashion, the transmit descriptor ring for the voicebus card would "go empty"
since the interface wouldn't have another descriptor to read in. The driver
only knows that it went empty, not how far behind it actually was. Therefore,
the driver could just increase the latency by a millisecond and keep going
waiting for another bump.
Additionally, when the transmit descriptor actually goes empty, there are some
cases where an in process SPI transaction to one of the modules is interrupted,
which may result in corrupted module register writes on rare occassions.
This now makes it possible for the voicebus drivers to coexist with some devices
that periodically lock interrupts for longer than 25ms. Before this patch, the
latency would constantly increase until either the modules received a corrupted
frame.
This patch preconfigures all the receive descriptors to send an "idle" packet
that will be transmitted to the onboard modules when the host doesn't service
the interrupt within (latency - 2)ms. There are now two kinds of underruns,
softunderuns where the driver can detect that these idlebuffers have made it to
the TX FIFO, and the normal hard underrun where the part signals a transmit
descriptor unavailable interrupt. DAHDI-278.
........
r7518 | sruffell | 2009-11-06 18:35:41 -0600 (Fri, 06 Nov 2009) | 7 lines
voicebus: Add function to lock the latency.
Now that increases in the latency produce less undefined behavior on the SPI
busses, provide an interface for client drivers to inform the voicebus library
to not increase the latency if underruns are detected. This can speed up loads
of the driver since latency bumps do not trigger a restart of the driver
initialization. DAHDI-278.
........
r7519 | sruffell | 2009-11-06 18:35:42 -0600 (Fri, 06 Nov 2009) | 4 lines
wcte12xp: Lock latency when loading
No longer need to restart board initialization if the latency would have
increased during initialization. DAHDI-278.
........
r7520 | sruffell | 2009-11-06 18:35:42 -0600 (Fri, 06 Nov 2009) | 4 lines
wctdm24xxp: Lock latency when loading
We no longer need to retry board initialization if the latency would have
increased during the initialization. DAHDI-278
........
r7521 | sruffell | 2009-11-06 18:35:43 -0600 (Fri, 06 Nov 2009) | 4 lines
voicebus, wctdm24xxp, wcte12xp: Move a print out of the interrupt handler.
This can be handled just as well in process context and printing to a serial
console from the interrupt handler has the potential to cause long latencies.
........
r7522 | sruffell | 2009-11-06 18:35:44 -0600 (Fri, 06 Nov 2009) | 5 lines
voicebus: Add optional sysfs entry for reading a boards current latency.
This is off by default since it hasn't been tested on a full range of kernels,
but can be useful for quickly seeing differences for latencies on different
cards installed in the system.
........
r7523 | sruffell | 2009-11-06 18:35:44 -0600 (Fri, 06 Nov 2009) | 1 line
voicebus: Remove 'assert' macros and use BUG_ON/WARN_ON directly.
........
r7524 | sruffell | 2009-11-06 18:35:45 -0600 (Fri, 06 Nov 2009) | 1 line
voicebus: Be just a little more graceful if we cannot grab our interrupt line.
........
r7527 | sruffell | 2009-11-06 18:58:03 -0600 (Fri, 06 Nov 2009) | 1 line
wcte12xp: Fix up some continued strings.
........
r7528 | sruffell | 2009-11-06 18:58:03 -0600 (Fri, 06 Nov 2009) | 1 line
wct4xxp: Fix up some continued strings.
........
r7534 | sruffell | 2009-11-09 12:02:40 -0600 (Mon, 09 Nov 2009) | 1 line
wct4xxp: Only print the new debounce messages when debug is set.
........
r7535 | sruffell | 2009-11-09 12:02:41 -0600 (Mon, 09 Nov 2009) | 1 line
wcte12xp: Only print the new debounce messages when debug is set.
........
r7536 | sruffell | 2009-11-09 12:11:06 -0600 (Mon, 09 Nov 2009) | 4 lines
wcte12xp: use the dev_xxx macro for the debounce messages.
We want to know which device is reporting the debounce when there are more than
one card in the system.
........
Modified:
linux/branches/2.2/ (props changed)
linux/branches/2.2/Makefile
linux/branches/2.2/README
linux/branches/2.2/drivers/dahdi/dahdi-base.c
linux/branches/2.2/drivers/dahdi/dahdi_dummy.c
linux/branches/2.2/drivers/dahdi/dahdi_dynamic.c
linux/branches/2.2/drivers/dahdi/firmware/Makefile
linux/branches/2.2/drivers/dahdi/hpec/dahdi_echocan_hpec.c
linux/branches/2.2/drivers/dahdi/proslic.h
linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c
linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.h
linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c
linux/branches/2.2/drivers/dahdi/voicebus/voicebus.h
linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c
linux/branches/2.2/drivers/dahdi/wcb4xxp/wcb4xxp.h
linux/branches/2.2/drivers/dahdi/wcfxo.c
linux/branches/2.2/drivers/dahdi/wct4xxp/base.c
linux/branches/2.2/drivers/dahdi/wct4xxp/wct4xxp-diag.c
linux/branches/2.2/drivers/dahdi/wctc4xxp/base.c
linux/branches/2.2/drivers/dahdi/wctdm.c
linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c
linux/branches/2.2/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
linux/branches/2.2/drivers/dahdi/wcte12xp/base.c
linux/branches/2.2/drivers/dahdi/wcte12xp/wcte12xp.h
linux/branches/2.2/drivers/dahdi/xpp/xdefs.h
linux/branches/2.2/include/dahdi/kernel.h
linux/branches/2.2/include/dahdi/user.h
Propchange: linux/branches/2.2/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: linux/branches/2.2/Makefile
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/Makefile?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/Makefile (original)
+++ linux/branches/2.2/Makefile Mon Nov 9 13:32:45 2009
@@ -128,8 +128,7 @@
for hdr in $(INST_HEADERS); do \
install -D -m 644 include/dahdi/$$hdr $(DESTDIR)/usr/include/dahdi/$$hdr; \
done
- - at rm -f $(DESTDIR)/usr/include/zaptel/*.h
- - at rmdir $(DESTDIR)/usr/include/zaptel
+ @rm -rf $(DESTDIR)/usr/include/zaptel
uninstall-include:
for hdr in $(INST_HEADERS); do \
Modified: linux/branches/2.2/README
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/README?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/README (original)
+++ linux/branches/2.2/README Mon Nov 9 13:32:45 2009
@@ -528,22 +528,17 @@
Known Issues
------------
-Removing echocan modules
-~~~~~~~~~~~~~~~~~~~~~~~~
-Before unloading an echo-canceller module you must remove an reference to it.
-Using 'etc/init.d/dahdi stop' is the preferred method.
-
-However if, for some reason, you want to unload just a single dahdi_echocan_*
-module that you use, you must first edit /etc/dahdi/system.conf and change any
-echocan lines referring to it to refer to a different echo canceller module.
-
-https://issues.asterisk.org/view.php?id=15327[0015327: oops after removing an echocan module that is in use]
+KB1 does not function when echocancel > 128
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+KB1 was not designed to function at greater than 128 taps, and if configured
+this way, will result in the destruction of audio. Ideally DAHDI would return
+an error when a KB1 echocanceller is configured with greater than 128 taps.
Reporting Bugs
--------------
Please report bug and patches to the Asterisk bug tracker at
-http://bugs.digium.com in the "DAHDI" category.
+http://issues.asterisk.org in the "DAHDI" category.
Links
-----
Modified: linux/branches/2.2/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/dahdi-base.c?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/dahdi-base.c (original)
+++ linux/branches/2.2/drivers/dahdi/dahdi-base.c Mon Nov 9 13:32:45 2009
@@ -78,6 +78,10 @@
#include "hpec/hpec_user.h"
+#if defined(EMPULSE) && defined(EMFLASH)
+#error "You cannot define both EMPULSE and EMFLASH"
+#endif
+
/* Get helper arithmetic */
#include "arith.h"
#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
@@ -183,13 +187,6 @@
#define class_create class_simple_create
#define class_destroy class_simple_destroy
#endif
-
-/*
- * See issue http://bugs.digium.com/view.php?id=13504 for more information.
- * on why reference counting on the echo canceller modules is disabled
- * currently.
- */
-#undef USE_ECHOCAN_REFCOUNT
static int deftaps = 64;
@@ -397,13 +394,14 @@
struct ecfactory {
const struct dahdi_echocan_factory *ec;
- struct module *owner;
struct list_head list;
};
int dahdi_register_echocan_factory(const struct dahdi_echocan_factory *ec)
{
struct ecfactory *cur;
+
+ WARN_ON(!ec->owner);
write_lock(&ecfactory_list_lock);
@@ -1122,18 +1120,13 @@
list_for_each_entry(cur, &ecfactory_list, list) {
if (!strcmp(name_upper, cur->ec->name)) {
-#ifdef USE_ECHOCAN_REFCOUNT
- if (try_module_get(cur->owner)) {
+ if (try_module_get(cur->ec->owner)) {
read_unlock(&ecfactory_list_lock);
return cur->ec;
} else {
read_unlock(&ecfactory_list_lock);
return NULL;
}
-#else
- read_unlock(&ecfactory_list_lock);
- return cur->ec;
-#endif
}
}
@@ -1159,10 +1152,8 @@
static void release_echocan(const struct dahdi_echocan_factory *ec)
{
-#ifdef USE_ECHOCAN_REFCOUNT
if (ec)
module_put(ec->owner);
-#endif
}
/**
@@ -1878,6 +1869,8 @@
might_sleep();
+ release_echocan(chan->ec_factory);
+
#ifdef CONFIG_DAHDI_NET
if (chan->flags & DAHDI_FLAG_NETDEV) {
unregister_hdlc_device(chan->hdlcnetdev->netdev);
@@ -2304,7 +2297,7 @@
if (!chan->span)
return;
- if (!chan->span->flags & DAHDI_FLAG_RBS) {
+ if (!(chan->span->flags & DAHDI_FLAG_RBS)) {
module_printk(KERN_NOTICE, "dahdi_rbs: Tried to set RBS hook state on non-RBS channel %s\n", chan->name);
return;
}
@@ -3462,16 +3455,136 @@
return 0;
}
+static int dahdi_ioctl_getgains(struct inode *node, struct file *file,
+ unsigned int cmd, unsigned long data, int unit)
+{
+ int res = 0;
+ struct dahdi_gains *gain;
+ int i, j;
+
+ gain = kzalloc(sizeof(*gain), GFP_KERNEL);
+ if (!gain)
+ return -ENOMEM;
+
+ if (copy_from_user(gain, (struct dahdi_gains *)data, sizeof(*gain))) {
+ res = -EFAULT;
+ goto cleanup;
+ }
+ i = gain->chan; /* get channel no */
+ /* if zero, use current channel no */
+ if (!i)
+ i = unit;
+
+ /* make sure channel number makes sense */
+ if ((i < 0) || (i > DAHDI_MAX_CHANNELS) || !chans[i]) {
+ res = -EINVAL;
+ goto cleanup;
+ }
+
+ if (!(chans[i]->flags & DAHDI_FLAG_AUDIO)) {
+ res = -EINVAL;
+ goto cleanup;
+ }
+ gain->chan = i; /* put the span # in here */
+ for (j = 0; j < 256; ++j) {
+ gain->txgain[j] = chans[i]->txgain[j];
+ gain->rxgain[j] = chans[i]->rxgain[j];
+ }
+ if (copy_to_user((struct dahdi_gains *)data, gain, sizeof(*gain))) {
+ res = -EFAULT;
+ goto cleanup;
+ }
+cleanup:
+
+ kfree(gain);
+ return res;
+}
+
+static int dahdi_ioctl_setgains(struct inode *node, struct file *file,
+ unsigned int cmd, unsigned long data, int unit)
+{
+ int res = 0;
+ struct dahdi_gains *gain;
+ unsigned char *txgain, *rxgain;
+ int i, j;
+ unsigned long flags;
+ const int GAIN_TABLE_SIZE = sizeof(defgain);
+
+ gain = kzalloc(sizeof(*gain), GFP_KERNEL);
+ if (!gain)
+ return -ENOMEM;
+
+ if (copy_from_user(gain, (struct dahdi_gains *)data, sizeof(*gain))) {
+ res = -EFAULT;
+ goto cleanup;
+ }
+ i = gain->chan; /* get channel no */
+ /* if zero, use current channel no */
+ if (!i)
+ i = unit;
+ /* make sure channel number makes sense */
+ if ((i < 0) || (i > DAHDI_MAX_CHANNELS) || !chans[i]) {
+ res = -EINVAL;
+ goto cleanup;
+ }
+ if (!(chans[i]->flags & DAHDI_FLAG_AUDIO)) {
+ res = -EINVAL;
+ goto cleanup;
+ }
+
+ rxgain = kzalloc(GAIN_TABLE_SIZE*2, GFP_KERNEL);
+ if (!rxgain) {
+ res = -ENOMEM;
+ goto cleanup;
+ }
+
+ gain->chan = i; /* put the span # in here */
+ txgain = rxgain + GAIN_TABLE_SIZE;
+
+ for (j = 0; j < GAIN_TABLE_SIZE; ++j) {
+ rxgain[j] = gain->rxgain[j];
+ txgain[j] = gain->txgain[j];
+ }
+
+ if (!memcmp(rxgain, defgain, GAIN_TABLE_SIZE) &&
+ !memcmp(txgain, defgain, GAIN_TABLE_SIZE)) {
+ kfree(rxgain);
+ spin_lock_irqsave(&chans[i]->lock, flags);
+ if (chans[i]->gainalloc)
+ kfree(chans[i]->rxgain);
+ chans[i]->gainalloc = 0;
+ chans[i]->rxgain = defgain;
+ chans[i]->txgain = defgain;
+ spin_unlock_irqrestore(&chans[i]->lock, flags);
+ } else {
+ /* This is a custom gain setting */
+ spin_lock_irqsave(&chans[i]->lock, flags);
+ if (chans[i]->gainalloc)
+ kfree(chans[i]->rxgain);
+ chans[i]->gainalloc = 1;
+ chans[i]->rxgain = rxgain;
+ chans[i]->txgain = txgain;
+ spin_unlock_irqrestore(&chans[i]->lock, flags);
+ }
+
+ if (copy_to_user((struct dahdi_gains *)data, gain, sizeof(*gain))) {
+ res = -EFAULT;
+ goto cleanup;
+ }
+cleanup:
+
+ kfree(gain);
+ return res;
+}
+
static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned int cmd, unsigned long data, int unit)
{
union {
- struct dahdi_gains gain;
struct dahdi_spaninfo spaninfo;
struct dahdi_params param;
} stack;
struct dahdi_chan *chan;
unsigned long flags;
- unsigned char *txgain, *rxgain;
int i,j;
int return_master = 0;
size_t size_to_copy;
@@ -3597,68 +3710,9 @@
break;
case DAHDI_GETGAINS_V1: /* Intentional drop through. */
case DAHDI_GETGAINS: /* get gain stuff */
- if (copy_from_user(&stack.gain,(struct dahdi_gains *) data,sizeof(stack.gain)))
- return -EFAULT;
- i = stack.gain.chan; /* get channel no */
- /* if zero, use current channel no */
- if (!i) i = unit;
- /* make sure channel number makes sense */
- if ((i < 0) || (i > DAHDI_MAX_CHANNELS) || !chans[i]) return(-EINVAL);
-
- if (!(chans[i]->flags & DAHDI_FLAG_AUDIO)) return (-EINVAL);
- stack.gain.chan = i; /* put the span # in here */
- for (j=0;j<256;j++) {
- stack.gain.txgain[j] = chans[i]->txgain[j];
- stack.gain.rxgain[j] = chans[i]->rxgain[j];
- }
- if (copy_to_user((struct dahdi_gains *) data,&stack.gain,sizeof(stack.gain)))
- return -EFAULT;
- break;
+ return dahdi_ioctl_getgains(node, file, cmd, data, unit);
case DAHDI_SETGAINS: /* set gain stuff */
- if (copy_from_user(&stack.gain,(struct dahdi_gains *) data,sizeof(stack.gain)))
- return -EFAULT;
- i = stack.gain.chan; /* get channel no */
- /* if zero, use current channel no */
- if (!i) i = unit;
- /* make sure channel number makes sense */
- if ((i < 0) || (i > DAHDI_MAX_CHANNELS) || !chans[i]) return(-EINVAL);
- if (!(chans[i]->flags & DAHDI_FLAG_AUDIO)) return (-EINVAL);
-
- if (!(rxgain = kmalloc(512, GFP_KERNEL)))
- return -ENOMEM;
-
- stack.gain.chan = i; /* put the span # in here */
- txgain = rxgain + 256;
-
- for (j=0;j<256;j++) {
- rxgain[j] = stack.gain.rxgain[j];
- txgain[j] = stack.gain.txgain[j];
- }
-
- if (!memcmp(rxgain, defgain, 256) &&
- !memcmp(txgain, defgain, 256)) {
- if (rxgain)
- kfree(rxgain);
- spin_lock_irqsave(&chans[i]->lock, flags);
- if (chans[i]->gainalloc)
- kfree(chans[i]->rxgain);
- chans[i]->gainalloc = 0;
- chans[i]->rxgain = defgain;
- chans[i]->txgain = defgain;
- spin_unlock_irqrestore(&chans[i]->lock, flags);
- } else {
- /* This is a custom gain setting */
- spin_lock_irqsave(&chans[i]->lock, flags);
- if (chans[i]->gainalloc)
- kfree(chans[i]->rxgain);
- chans[i]->gainalloc = 1;
- chans[i]->rxgain = rxgain;
- chans[i]->txgain = txgain;
- spin_unlock_irqrestore(&chans[i]->lock, flags);
- }
- if (copy_to_user((struct dahdi_gains *) data,&stack.gain,sizeof(stack.gain)))
- return -EFAULT;
- break;
+ return dahdi_ioctl_setgains(node, file, cmd, data, unit);
case DAHDI_SPANSTAT:
size_to_copy = sizeof(struct dahdi_spaninfo);
if (copy_from_user(&stack.spaninfo, (struct dahdi_spaninfo *) data, size_to_copy))
@@ -3877,6 +3931,13 @@
spin_lock_irqsave(&spans[j]->chans[x]->lock, flags);
dahdi_hangup(spans[j]->chans[x]);
spin_unlock_irqrestore(&spans[j]->chans[x]->lock, flags);
+ /*
+ * Set the rxhooksig back to
+ * DAHDI_RXSIG_INITIAL so that new events are
+ * queued on the channel with the actual
+ * recieved hook state.
+ *
+ */
spans[j]->chans[x]->rxhooksig = DAHDI_RXSIG_INITIAL;
}
}
@@ -3972,9 +4033,6 @@
if ((sigcap & ch.sigtype) != ch.sigtype)
res = -EINVAL;
- if (!res && chans[ch.chan]->span->chanconfig)
- res = chans[ch.chan]->span->chanconfig(chans[ch.chan], ch.sigtype);
-
if (chans[ch.chan]->master != chans[ch.chan]) {
struct dahdi_chan *oldmaster = chans[ch.chan]->master;
@@ -4045,6 +4103,12 @@
else
chans[ch.chan]->flags &= ~DAHDI_FLAG_MTP2;
}
+
+ if (!res && chans[ch.chan]->span->chanconfig) {
+ res = chans[ch.chan]->span->chanconfig(chans[ch.chan],
+ ch.sigtype);
+ }
+
#ifdef CONFIG_DAHDI_NET
if (!res &&
(newmaster == chans[ch.chan]) &&
@@ -4963,14 +5027,12 @@
ret = chan->span->echocan_create(chan, ecp, params, &ec);
if ((ret == -ENODEV) && chan->ec_factory) {
-#ifdef USE_ECHOCAN_REFCOUNT
/* try to get another reference to the module providing
this channel's echo canceler */
if (!try_module_get(chan->ec_factory->owner)) {
module_printk(KERN_ERR, "Cannot get a reference to the '%s' echo canceler\n", chan->ec_factory->name);
goto exit_with_free;
}
-#endif
/* got the reference, copy the pointer and use it for making
an echo canceler instance if possible */
@@ -7939,6 +8001,7 @@
const unsigned long MAX_INTERVAL = 100000L;
const unsigned long FOURMS_INTERVAL = HZ/250;
const unsigned long ONESEC_INTERVAL = HZ;
+ const unsigned long MS_LIMIT = 3000;
now = current_kernel_time();
@@ -7953,6 +8016,23 @@
mod_timer(&core_timer.timer, jiffies + FOURMS_INTERVAL);
ms_since_start = core_diff_ms(&core_timer.start_interval, &now);
+
+ /*
+ * If the system time has changed, it is possible for us to be
+ * far behind. If we are more than MS_LIMIT milliseconds
+ * behind, just reset our time base and continue so that we do
+ * not hang the system here.
+ *
+ */
+ if (unlikely((ms_since_start - atomic_read(&core_timer.count)) > MS_LIMIT)) {
+ if (printk_ratelimit())
+ module_printk(KERN_INFO, "Detected time shift.\n");
+ atomic_set(&core_timer.count, 0);
+ atomic_set(&core_timer.last_count, 0);
+ core_timer.start_interval = now;
+ return;
+ }
+
while (ms_since_start > atomic_read(&core_timer.count))
process_masterspan();
Modified: linux/branches/2.2/drivers/dahdi/dahdi_dummy.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/dahdi_dummy.c?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/branches/2.2/drivers/dahdi/dahdi_dummy.c Mon Nov 9 13:32:45 2009
@@ -168,7 +168,7 @@
now = current_kernel_time();
ms_since_start = timespec_diff_ms(&ztd->start_interval, &now);
-
+
/*
* If the system time has changed, it is possible for us to be far
* behind. If we are more than MS_LIMIT milliseconds behind, just
Modified: linux/branches/2.2/drivers/dahdi/dahdi_dynamic.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/dahdi_dynamic.c (original)
+++ linux/branches/2.2/drivers/dahdi/dahdi_dynamic.c Mon Nov 9 13:32:45 2009
@@ -239,7 +239,9 @@
dahdi_receive(&z->span);
dahdi_transmit(&z->span);
/* Handle all transmissions now */
+ spin_unlock_irqrestore(&dlock, flags);
ztd_sendmessage(z);
+ spin_lock_irqsave(&dlock, flags);
}
z = z->next;
}
Modified: linux/branches/2.2/drivers/dahdi/firmware/Makefile
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/firmware/Makefile?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/firmware/Makefile (original)
+++ linux/branches/2.2/drivers/dahdi/firmware/Makefile Mon Nov 9 13:32:45 2009
@@ -16,7 +16,7 @@
OCT6114_064_VERSION:=1.05.01
OCT6114_128_VERSION:=1.05.01
TC400M_VERSION:=MR6.12
-VPMADT032_VERSION:=1.17.0
+VPMADT032_VERSION:=1.20.0
FIRMWARE_URL:=http://downloads.digium.com/pub/telephony/firmware/releases
Modified: linux/branches/2.2/drivers/dahdi/hpec/dahdi_echocan_hpec.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/hpec/dahdi_echocan_hpec.c?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/hpec/dahdi_echocan_hpec.c (original)
+++ linux/branches/2.2/drivers/dahdi/hpec/dahdi_echocan_hpec.c Mon Nov 9 13:32:45 2009
@@ -114,7 +114,7 @@
hpec_channel_update(pvt->hpec, isig, iref);
}
-DECLARE_MUTEX(alloc_lock);
+DECLARE_MUTEX(license_lock);
static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec)
@@ -133,12 +133,12 @@
pvt->dahdi.ops = &my_ops;
pvt->dahdi.features = my_features;
- if (down_interruptible(&alloc_lock))
+ if (down_interruptible(&license_lock))
return -ENOTTY;
pvt->hpec = hpec_channel_alloc(ecp->tap_length);
- up(&alloc_lock);
+ up(&license_lock);
if (!pvt->hpec) {
kfree(pvt);
@@ -154,8 +154,6 @@
{
return 1;
}
-
-DECLARE_MUTEX(license_lock);
static int hpec_license_ioctl(unsigned int cmd, unsigned long data)
{
Modified: linux/branches/2.2/drivers/dahdi/proslic.h
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/proslic.h?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/proslic.h (original)
+++ linux/branches/2.2/drivers/dahdi/proslic.h Mon Nov 9 13:32:45 2009
@@ -34,6 +34,23 @@
// Defines
#define LPT 0X378
+
+/* Proslic Linefeed options for register 64 - Linefeed Control */
+#define SLIC_LF_OPEN 0x0
+#define SLIC_LF_ACTIVE_FWD 0x1
+#define SLIC_LF_OHTRAN_FWD 0x2 /* Forward On Hook Transfer */
+#define SLIC_LF_TIP_OPEN 0x3
+#define SLIC_LF_RINGING 0x4
+#define SLIC_LF_ACTIVE_REV 0x5
+#define SLIC_LF_OHTRAN_REV 0x6 /* Reverse On Hook Transfer */
+#define SLIC_LF_RING_OPEN 0x7
+
+#define SLIC_LF_SETMASK 0x7
+#define SLIC_LF_OPPENDING 0x10
+
+/* Mask used to reverse the linefeed mode between forward and
+ * reverse polarity. */
+#define SLIC_LF_REVMASK 0x4
#define IDA_LO 28
#define IDA_HI 29
Modified: linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c Mon Nov 9 13:32:45 2009
@@ -370,10 +370,9 @@
}
EXPORT_SYMBOL(vpmadt032_echocan_create);
-void vpmadt032_echocan_free(struct vpmadt032 *vpm, struct dahdi_chan *chan,
+void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo,
struct dahdi_echocan_state *ec)
{
- int channo = chan->chanpos - 1;
adt_lec_init_defaults(&vpm->desiredecstate[channo], 0);
vpm->desiredecstate[channo].nlp_type = vpm->options.vpmnlptype;
vpm->desiredecstate[channo].nlp_threshold = vpm->options.vpmnlpthresh;
@@ -525,8 +524,9 @@
return res;
}
vpm->curpage = -1;
+
+ dev_info(&voicebus_get_pci_dev(vb)->dev, "Booting VPMADT032\n");
set_bit(VPM150M_SWRESET, &vpm->control);
-
while (test_bit(VPM150M_SWRESET, &vpm->control))
msleep(1);
@@ -565,7 +565,7 @@
p->EcanDblTalkThresh = 6;
p->EcanMaxDoubleTalkThres = 40;
p->EcanNlpThreshold = DEFAULT_NLPTHRESH;
- p->EcanNlpConv = 0;
+ p->EcanNlpConv = 18;
p->EcanNlpUnConv = 12;
p->EcanNlpMaxSuppress = DEFAULT_NLPMAXSUPP;
p->EcanCngThreshold = 43;
Modified: linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.h
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.h?view=diff&rev=7539&r1=7538&r2=7539
==============================================================================
--- linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.h Mon Nov 9 13:32:45 2009
@@ -145,7 +145,7 @@
void vpmadt032_free(struct vpmadt032 *vpm);
int vpmadt032_echocan_create(struct vpmadt032 *vpm, int channo,
struct dahdi_echocanparams *ecp, struct dahdi_echocanparam *p);
-void vpmadt032_echocan_free(struct vpmadt032 *vpm, struct dahdi_chan *chan,
+void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo,
struct dahdi_echocan_state *ec);
struct GpakEcanParms;
Modified: linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c
[... 4052 lines stripped ...]
More information about the dahdi-commits
mailing list