Compare commits

..

24 Commits

Author SHA1 Message Date
Shaun Ruffell
e87ec518e4 Importing files for 2.4.2 release.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.4.2@10584 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21 22:05:20 +00:00
Shaun Ruffell
1e87525755 Creating tag for the release of dahdi-linux-2.4.2
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.4.2@10583 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21 22:04:43 +00:00
Shaun Ruffell
68a0bf1d47 xpp: '%d' -> '%lu' when displaying module_refcount on kernel versions >= 3.3
Upstream commit bd77c047 "module: struct module_ref should contains long
fields" changed the return of module_refcount from int to unsigned long. This
change eliminates a warning from the string format specifier.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10485

Conflicts:

	drivers/dahdi/xpp/xproto.c

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10533 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 17:08:04 +00:00
Shaun Ruffell
51c53f217b xpp: Use 'bool' type for boolean module parameters on kernel versions >= 2.6.31.
Eliminates warnings that are a result of upstream commit 72db395ffa
"module_param: check that bool parameters really are bool."

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10484

Conflicts:

	drivers/dahdi/xpp/xpd.h

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10532 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 17:08:00 +00:00
Shaun Ruffell
82bd4c0b27 wctc4xxp: Replace 'ndo_set_multicast_list' with 'set_rx_mode'
The ndo_set_multicast_list callback was removed in b81693d9, which was
first released in Linux Kernel 3.2-rc1

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10360

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10531 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 17:07:56 +00:00
Shaun Ruffell
af9a9751fa dahdi: #include <linux/module.h> in dahdi/kernel.h and GpakCust.h
Commit de47725, first released in 3.2-rc1 removed module.h from some
kernel headers. Include it explicitly now.

Resolves compilation errors like:
error: implicit declaration of function 'try_module_get'
error: 'THIS_MODULE' undeclared (first use in this function)
error: implicit declaration of function 'module_put'

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10361

Conflicts:

	include/dahdi/kernel.h

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10530 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 17:07:51 +00:00
Shaun Ruffell
7e2b9485e4 wct4xxp: Fix condition where hardware echo canceler erroneously mutes DTMF.
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-12 16:32:58 +00:00
Shaun Ruffell
b44162f69a wctc4xxp: Allow G723 SID frames to pass to the hardware decoder.
The driver has, until now, dropped G723 SID frames even though the
firmware on the TC400/TCE400 can handle them. Now let them on
through.

Reported-and-Tested-by: Angel Carhuas <acarhuas@colinanet.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10218

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10223 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-12 16:32:54 +00:00
Russ Meyerriecks
49de604d12 wct4xxp: Bug in timing cable with different span density cards
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-10-12 16:32:49 +00:00
Tzafrir Cohen
40f2fa685a xpp: FXS: new 2+6 module has no digital I/O ports
This module is recognized via subtype==4

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10156 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-28 09:42:50 +00:00
Shaun Ruffell
06fdf8a772 dahdi: Define HAVE_NET_DEVICE_OPS on kernels > 2.6.29
HAVE_NET_DEVICE_OPS was defined in the mainline kernel in commit
47fd5b83 which was first released in 2.6.29. Any kernels after that will
have those fields defined.

Mainline commit e2270ea62ae4d7a removed the feature test macros, so
the easiest thing to do is define HAVE_NET_DEVICE_OPS ourselves on the
kernels since it was committed.

This change is needed to compile against the 3.1 kernel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10109

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10114 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:54:52 +00:00
Wagner Gegler
8fcc88893c dahdi_dynamic: Call dahdi_receive in rx packet handler.
Currently dahdi_receive is called on all channels in the context of the
master dynamic span. If one span (not the master) receive two packets
before the master span received a packet, the older packet on the
dynamic span would end up lost because the "readchunk" for the
channels would be overwritten by the new packet. DAHLIN-245

Signed-off-by: Wagner Gegler <wagner@aligera.com.br> (License #6268)
Changed dahdi_ec_chunk to dahdi_ec_span.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10110

Conflicts:

	drivers/dahdi/dahdi_dynamic.c

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10113 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:54:48 +00:00
Shaun Ruffell
39bc4ef672 wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIV
DAHDI currently supports kernels >= 2.6.9. netdev_priv() has been in the
mainline kernel since versions 2.6.6 so it's available in all the
supported kernels. This change is needed to compile against the 3.1 kernel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10096

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10112 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:54:44 +00:00
Doug Bailey
e60eb95453 oct612x: Increase the size of some of the instance variables.
Revision 9750 "wct4xxp: Reduce the memory footprint of the hardware
echocanceler" reduced the number of bits used to store some structure
members. Some of the new field lengths were unable to store all the
possible values the API as used assigned to the fields, resulting in
channels never entering power down mode when they were disabled like
they were previously.

The change for byEchoOperationMode was found in testing the operation of
the VPMOCT032 which currently uses the same code. The others were done
via a review of the API doc.

This change represents negligable risk and contains no logic changes.
It only increases the memory footprint of the API instance in the
kernel.

Signed-off-by: Doug Bailey <dbailey@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10060

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10111 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:54:39 +00:00
Shaun Ruffell
cc7cc7cb51 wctc4xxp: Cleanup in-flight commands when halting due to hardware error.
On one system I was seeing the board reset in the middle of a
transaction. Any commands that were on the response list when this would
happen would never be completed and the process would then be stuck in
an uninterruptible sleep. This change also prevents the driver from
sleeping in timer context, which would result in a kernel panic.

This change at least lets an error message propogate back to the user.

DAHDI-880

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10082

Conflicts:

	drivers/dahdi/wctc4xxp/base.c

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10084 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-27 16:27:47 +00:00
Russ Meyerriecks
53cbba5c8b wcb4xxp: Prevent null pointer dereference on spanconfig
In the rare case where spanconfig is called while there is pending data
on the hdlc channel, the hdlc_getbuf interrupt could try to read from
the hdlc buffer before the channel was fully setup. This could
potentially result in a null pointer dereference. This condition has
existed since the creation of the wcb4xxp driver.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10079

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10080 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-22 18:03:48 +00:00
Shaun Ruffell
35c833afef wcte12xp: Close a potential race on driver unload.
The shutdown logic requires that all CPUs see that the INITIALIZED bit
has been cleared. Otherwise it may be possible for the workqueue to run
after the hardware resources have been released.

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=10047

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10049 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-19 19:45:01 +00:00
Shaun Ruffell
d0bf20c36d wctdm24xxp: Ensure battery drops on FXS hangups honor the channel otimer.
If an FXS port is configured to use kewl start signalling, when the FXS port
is "hungup" it should drop battery for 500ms so that any attached devices can
detect that the remote side has disconnected.  The wctdm24xxp driver
since version 2.4.0 was only dropping battery for ~5-10 ms because it would
set "open" on the line, but then the next time it read the line feed register
state, it was setting the LINE feed register to the idle state.

This change checks if the line is forced open before setting the FXS port back
"onhook" so as to not turn on battery prematurely.

This fixes a regression introduced in r9070 "wctdm24xxp: Prevent FXS Proslic
staying in "Forward/Reverse OnHookTransfer...". DAHDI-849.

Checking for open on the line feed registered was originally suggested by Alec
Davis.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10002

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10005 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-29 18:36:34 +00:00
Shaun Ruffell
6fb24bc346 dahdi: Fix compilation on Linux 2.6.26 w/CONFIG_DAHDI_NET.
The hdlc_stats function was removed from the mainline kernel in commit
198191c4a7ce4daba379608fb38b9bc5a4eedc61 [1] which was first released in
linux 2.6.27.

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=198191c4a7ce4

(closes issue #19354)
Reported by: biohumanoid

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9934

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10004 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-29 18:36:26 +00:00
Tzafrir Cohen
346fccbea0 xpp: empty labels are not duplicate
Some older Asttribanks had an empty label string. They should be ignored
when testing for a duplicate label at device probe time.

While we're at it, reduce panic level in the notice.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9926 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-31 13:16:54 +00:00
Shaun Ruffell
de59662acb Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h
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-05-27 16:48:46 +00:00
Shaun Ruffell
fb35e6afd2 dahdi: Enable DTMF A,B,C, and D digits.
This appears to be an old regression from zaptel r4063 [1] that would
prevent DAHDI from generating the A,B,C, and D digits due to
unintentional drop through on a case statement.

[1] http://svn.asterisk.org/view/zaptel?view=revision&revision=4063

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9912

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9923 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-27 16:48:40 +00:00
Shaun Ruffell
3be68a1105 wcb4xxp: Updating copyright.
The wcb4xxp driver was edited this year.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9911

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9922 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-27 16:48:35 +00:00
Shaun Ruffell
21875abb42 wcte12xp: If we cannot read the mode selection pins fail the module load.
Alexandre reported that on a particular server he would get a server
crash when loading the wcte12xp driver after receiving a line about a
timeout when trying to read the mode selection jumpers.

If the driver times out when trying to read the mode selection bits
there is a serious problem and it should not try to continue on with
configuration / registration.

Reported-and-Tested-by: Alexandre Abreu <alexandre.abreu@redt.com.br>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9902

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9904 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-14 20:32:29 +00:00
29 changed files with 436 additions and 284 deletions

View File

@@ -1 +1 @@
2.4.1.2
2.4.2

286
ChangeLog
View File

@@ -1,3 +1,289 @@
2012-03-21 Shaun Ruffell <sruffell@digium.com>
* dahdi-linux version 2.4.2 released.
2012-03-16 17:08 +0000 [r10530-10533] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/xpp/xproto.c: xpp: '%d' -> '%lu' when displaying
module_refcount on kernel versions >= 3.3 Upstream commit
bd77c047 "module: struct module_ref should contains long fields"
changed the return of module_refcount from int to unsigned long.
This change eliminates a warning from the string format
specifier. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10485 Conflicts:
drivers/dahdi/xpp/xproto.c
* drivers/dahdi/xpp/xpd.h: xpp: Use 'bool' type for boolean module
parameters on kernel versions >= 2.6.31. Eliminates warnings that
are a result of upstream commit 72db395ffa "module_param: check
that bool parameters really are bool." Signed-off-by: Shaun
Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen
<tzafrir.cohen@xorcom.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10484 Conflicts:
drivers/dahdi/xpp/xpd.h
* drivers/dahdi/wctc4xxp/base.c: wctc4xxp: Replace
'ndo_set_multicast_list' with 'set_rx_mode' The
ndo_set_multicast_list callback was removed in b81693d9, which
was first released in Linux Kernel 3.2-rc1 Signed-off-by: Shaun
Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10360
* drivers/dahdi/voicebus/GpakCust.h, include/dahdi/kernel.h: dahdi:
#include <linux/module.h> in dahdi/kernel.h and GpakCust.h Commit
de47725, first released in 3.2-rc1 removed module.h from some
kernel headers. Include it explicitly now. Resolves compilation
errors like: error: implicit declaration of function
'try_module_get' error: 'THIS_MODULE' undeclared (first use in
this function) error: implicit declaration of function
'module_put' Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10361
Conflicts: include/dahdi/kernel.h
2011-10-12 16:32 +0000 [r10222-10224] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wct4xxp/base.c: wct4xxp: Fix condition where
hardware echo canceler erroneously mutes DTMF. 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
* drivers/dahdi/wctc4xxp/base.c: wctc4xxp: Allow G723 SID frames to
pass to the hardware decoder. The driver has, until now, dropped
G723 SID frames even though the firmware on the TC400/TCE400 can
handle them. Now let them on through. Reported-and-Tested-by:
Angel Carhuas <acarhuas@colinanet.com> Signed-off-by: Shaun
Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10218
* drivers/dahdi/wct4xxp/base.c: wct4xxp: Bug in timing cable with
different span density cards 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
2011-08-28 09:42 +0000 [r10156] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* drivers/dahdi/xpp/card_fxs.c: xpp: FXS: new 2+6 module has no
digital I/O ports This module is recognized via subtype==4
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2011-08-11 19:54 +0000 [r10111-10114] Shaun Ruffell <sruffell@digium.com>
* include/dahdi/kernel.h: dahdi: Define HAVE_NET_DEVICE_OPS on
kernels > 2.6.29 HAVE_NET_DEVICE_OPS was defined in the mainline
kernel in commit 47fd5b83 which was first released in 2.6.29. Any
kernels after that will have those fields defined. Mainline
commit e2270ea62ae4d7a removed the feature test macros, so the
easiest thing to do is define HAVE_NET_DEVICE_OPS ourselves on
the kernels since it was committed. This change is needed to
compile against the 3.1 kernel. Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10109
* drivers/dahdi/dahdi_dynamic.c: dahdi_dynamic: Call dahdi_receive
in rx packet handler. Currently dahdi_receive is called on all
channels in the context of the master dynamic span. If one span
(not the master) receive two packets before the master span
received a packet, the older packet on the dynamic span would end
up lost because the "readchunk" for the channels would be
overwritten by the new packet. DAHLIN-245 Signed-off-by: Wagner
Gegler <wagner@aligera.com.br> (License #6268) Changed
dahdi_ec_chunk to dahdi_ec_span. Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10110 Conflicts:
drivers/dahdi/dahdi_dynamic.c
* drivers/dahdi/voicebus/voicebus_net.c,
drivers/dahdi/wctc4xxp/base.c: wctc4xxp, wcte12xp, wctdm24xxp:
Remove check for HAVE_NETDEV_PRIV DAHDI currently supports
kernels >= 2.6.9. netdev_priv() has been in the mainline kernel
since versions 2.6.6 so it's available in all the supported
kernels. This change is needed to compile against the 3.1 kernel.
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10096
* drivers/dahdi/oct612x/include/oct6100api/oct6100_channel_inst.h:
oct612x: Increase the size of some of the instance variables.
Revision 9750 "wct4xxp: Reduce the memory footprint of the
hardware echocanceler" reduced the number of bits used to store
some structure members. Some of the new field lengths were unable
to store all the possible values the API as used assigned to the
fields, resulting in channels never entering power down mode when
they were disabled like they were previously. The change for
byEchoOperationMode was found in testing the operation of the
VPMOCT032 which currently uses the same code. The others were
done via a review of the API doc. This change represents
negligable risk and contains no logic changes. It only increases
the memory footprint of the API instance in the kernel.
Signed-off-by: Doug Bailey <dbailey@digium.com> Acked-by: Shaun
Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen
<tzafrir.cohen@xorcom.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10060
2011-07-27 16:27 +0000 [r10084] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wctc4xxp/base.c: wctc4xxp: Cleanup in-flight
commands when halting due to hardware error. On one system I was
seeing the board reset in the middle of a transaction. Any
commands that were on the response list when this would happen
would never be completed and the process would then be stuck in
an uninterruptible sleep. This change also prevents the driver
from sleeping in timer context, which would result in a kernel
panic. This change at least lets an error message propogate back
to the user. DAHDI-880 Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10082 Conflicts:
drivers/dahdi/wctc4xxp/base.c
2011-07-22 18:03 +0000 [r10080] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wcb4xxp/base.c: wcb4xxp: Prevent null pointer
dereference on spanconfig In the rare case where spanconfig is
called while there is pending data on the hdlc channel, the
hdlc_getbuf interrupt could try to read from the hdlc buffer
before the channel was fully setup. This could potentially result
in a null pointer dereference. This condition has existed since
the creation of the wcb4xxp driver. Signed-off-by: Russ
Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun
Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10079
2011-07-19 19:45 +0000 [r10049] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wcte12xp/base.c: wcte12xp: Close a potential race
on driver unload. The shutdown logic requires that all CPUs see
that the INITIALIZED bit has been cleared. Otherwise it may be
possible for the workqueue to run after the hardware resources
have been released. 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=10047
2011-06-29 18:36 +0000 [r10004-10005] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wctdm24xxp/base.c: wctdm24xxp: Ensure battery drops
on FXS hangups honor the channel otimer. If an FXS port is
configured to use kewl start signalling, when the FXS port is
"hungup" it should drop battery for 500ms so that any attached
devices can detect that the remote side has disconnected. The
wctdm24xxp driver since version 2.4.0 was only dropping battery
for ~5-10 ms because it would set "open" on the line, but then
the next time it read the line feed register state, it was
setting the LINE feed register to the idle state. This change
checks if the line is forced open before setting the FXS port
back "onhook" so as to not turn on battery prematurely. This
fixes a regression introduced in r9070 "wctdm24xxp: Prevent FXS
Proslic staying in "Forward/Reverse OnHookTransfer...".
DAHDI-849. Checking for open on the line feed registered was
originally suggested by Alec Davis. Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=10002
* drivers/dahdi/dahdi-base.c: dahdi: Fix compilation on Linux
2.6.26 w/CONFIG_DAHDI_NET. The hdlc_stats function was removed
from the mainline kernel in commit
198191c4a7ce4daba379608fb38b9bc5a4eedc61 [1] which was first
released in linux 2.6.27. [1]
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=198191c4a7ce4
(closes issue #19354) Reported by: biohumanoid Signed-off-by:
Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen
<tzafrir.cohen@xorcom.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=9934
2011-05-31 13:16 +0000 [r9926] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* drivers/dahdi/xpp/xbus-core.c: xpp: empty labels are not
duplicate Some older Asttribanks had an empty label string. They
should be ignored when testing for a duplicate label at device
probe time. While we're at it, reduce panic level in the notice.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2011-05-27 16:48 +0000 [r9922-9924] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/xpp/parport_debug.c, drivers/dahdi/xpp/xbus-pcm.c,
drivers/dahdi/dahdi_dynamic_loc.c,
drivers/dahdi/dahdi_transcode.c, drivers/dahdi/dahdi_dynamic.c,
drivers/dahdi/dahdi_dynamic_eth.c, drivers/dahdi/xpp/mmapdrv.c,
drivers/dahdi/xpp/xbus-core.c, drivers/dahdi/dahdi-base.c,
drivers/dahdi/tor2.c, drivers/dahdi/wcte12xp/base.c,
drivers/dahdi/xpp/xpp_usb.c, include/dahdi/kernel.h,
drivers/dahdi/wct4xxp/base.c, drivers/dahdi/wcte12xp/wcte12xp.h,
drivers/dahdi/dahdi_dynamic_ethmf.c: Move test for
DEFINE_SPINLOCK into include/dahdi/kernel.h 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
* drivers/dahdi/dahdi-base.c: dahdi: Enable DTMF A,B,C, and D
digits. This appears to be an old regression from zaptel r4063
[1] that would prevent DAHDI from generating the A,B,C, and D
digits due to unintentional drop through on a case statement. [1]
http://svn.asterisk.org/view/zaptel?view=revision&revision=4063
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=9912
* drivers/dahdi/wcb4xxp/base.c: wcb4xxp: Updating copyright. The
wcb4xxp driver was edited this year. Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=9911
2011-04-14 20:32 +0000 [r9904] Shaun Ruffell <sruffell@digium.com>
* drivers/dahdi/wcte12xp/base.c: wcte12xp: If we cannot read the
mode selection pins fail the module load. Alexandre reported that
on a particular server he would get a server crash when loading
the wcte12xp driver after receiving a line about a timeout when
trying to read the mode selection jumpers. If the driver times
out when trying to read the mode selection bits there is a
serious problem and it should not try to continue on with
configuration / registration. Reported-and-Tested-by: Alexandre
Abreu <alexandre.abreu@redt.com.br> Signed-off-by: Shaun Ruffell
<sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=9902
2011-04-11 18:45 +0000 [r9895] Shaun Ruffell <sruffell@digium.com>
* include/dahdi/kernel.h: dahdi: Do not define dev_name if already
backported. RHEL 5.6 has backported dev_name in
include/dahdi/devices.h. We now need to check for a back ported
definition before defining our own version on pre 2.6.26 kernels.
(closes issue #18992) Reported by: ndupeux, AlexCeli Tested by:
elguero Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com> Origin:
http://svnview.digium.com/svn/dahdi?view=rev&rev=9894
2011-04-11 Shaun Ruffell <sruffell@digium.com>
* dahdi-linux version 2.4.1.2 released.

View File

@@ -1,61 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - dahdi-linux-2.4.1.2</title></head>
<body>
<h1 align="center"><a name="top">Release Summary</a></h1>
<h3 align="center">dahdi-linux-2.4.1.2</h3>
<h3 align="center">Date: 2011-04-11</h3>
<h3 align="center">&lt;asteriskteam@digium.com&gt;</h3>
<hr/>
<h2 align="center">Table of Contents</h2>
<ol>
<li><a href="#summary">Summary</a></li>
<li><a href="#contributors">Contributors</a></li>
<li><a href="#issues">Closed Issues</a></li>
<li><a href="#diffstat">Diffstat</a></li>
</ol>
<hr/>
<a name="summary"><h2 align="center">Summary</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
<p>The data in this summary reflects changes that have been made since the previous release, dahdi-linux-2.4.1.1.</p>
<hr/>
<a name="contributors"><h2 align="center">Contributors</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
<table width="100%" border="0">
<tr>
<td width="33%"><h3>Coders</h3></td>
<td width="33%"><h3>Testers</h3></td>
<td width="33%"><h3>Reporters</h3></td>
</tr>
<tr valign="top">
<td>
1 sruffell<br/>
</td>
<td>
1 elguero<br/>
</td>
<td>
1 ndupeux<br/>
</td>
</tr>
</table>
<hr/>
<a name="issues"><h2 align="center">Closed Issues</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
<h3>Category: dahdi (the module)</h3><br/>
<a href="https://issues.asterisk.org/view.php?id=18992">#18992</a>: [patch] Unable to compile dahdi-linux-mod of RHEL 5.6 (and derivates)<br/>
Revision: <a href="http://svn.digium.com/view/dahdi/linux/branches/2.4?view=revision&revision=9895">9895</a><br/>
Reporter: ndupeux<br/>
Testers: elguero<br/>
Coders: sruffell<br/>
<br/>
<hr/>
<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
<pre>
kernel.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
</pre><br/>
<hr/>
</body>
</html>

View File

@@ -1,97 +0,0 @@
Release Summary
dahdi-linux-2.4.1.2
Date: 2011-04-11
<asteriskteam@digium.com>
--------------------------------------------------------------------------
Table of Contents
 1. [1]Summary
 2. [2]Contributors
 3. [3]Closed Issues
 4. [4]Diffstat
--------------------------------------------------------------------------
Summary
[5][Back to Top]
This release includes only bug fixes. The changes included were made only
to address problems that have been identified in this release series.
Users should be able to safely upgrade to this version if this release
series is already in use. Users considering upgrading from a previous
release series are strongly encouraged to review the UPGRADE.txt document
as well as the CHANGES document for information about upgrading to this
release series.
The data in this summary reflects changes that have been made since the
previous release, dahdi-linux-2.4.1.1.
--------------------------------------------------------------------------
Contributors
[6][Back to Top]
This table lists the people who have submitted code, those that have
tested patches, as well as those that reported issues on the issue tracker
that were resolved in this release. For coders, the number is how many of
their patches (of any size) were committed into this release. For testers,
the number is the number of times their name was listed as assisting with
testing a patch. Finally, for reporters, the number is the number of
issues that they reported that were closed by commits that went into this
release.
Coders Testers Reporters
1 sruffell 1 elguero 1 ndupeux
--------------------------------------------------------------------------
Closed Issues
[7][Back to Top]
This is a list of all issues from the issue tracker that were closed by
changes that went into this release.
Category: dahdi (the module)
[8]#18992: [patch] Unable to compile dahdi-linux-mod of RHEL 5.6 (and
derivates)
Revision: [9]9895
Reporter: ndupeux
Testers: elguero
Coders: sruffell
--------------------------------------------------------------------------
Diffstat Results
[10][Back to Top]
This is a summary of the changes to the source code that went into this
release that was generated using the diffstat utility.
kernel.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--------------------------------------------------------------------------
References
Visible links
1. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#summary
2. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#contributors
3. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#issues
4. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#diffstat
5. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#top
6. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#top
7. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#top
8. https://issues.asterisk.org/view.php?id=18992
9. http://svn.digium.com/view/dahdi/linux/branches/2.4?view=revision&revision=9895
10. file:///home/sruffell/repotools/dahdi-linux-2.4.1.2-summary.html#top

View File

@@ -386,13 +386,8 @@ struct dahdi_timer {
static LIST_HEAD(zaptimers);
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(zaptimerlock);
static DEFINE_SPINLOCK(bigzaplock);
#else
static spinlock_t zaptimerlock = SPIN_LOCK_UNLOCKED;
static spinlock_t bigzaplock = SPIN_LOCK_UNLOCKED;
#endif
struct dahdi_zone {
atomic_t refcount;
@@ -1675,7 +1670,7 @@ static inline void print_debug_writebuf(struct dahdi_chan* ss, struct sk_buff *s
#endif
#ifdef CONFIG_DAHDI_NET
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26)
static inline struct net_device_stats *hdlc_stats(struct net_device *dev)
{
return &dev->stats;
@@ -3330,6 +3325,7 @@ struct dahdi_tone *dahdi_mf_tone(const struct dahdi_chan *chan, char digit, int
case 'C':
case 'D':
tone_index = DAHDI_TONE_DTMF_A + (digit - 'A');
break;
case 'W':
return &tone_pause;
default:

View File

@@ -113,13 +113,8 @@ struct dahdi_dynamic {
struct list_head list;
};
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(dspan_lock);
static DEFINE_SPINLOCK(driver_lock);
#else
static spinlock_t dspan_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
#endif
static LIST_HEAD(dspan_list);
static LIST_HEAD(driver_list);
@@ -227,16 +222,10 @@ static void __ztdynamic_run(void)
{
struct dahdi_dynamic *z;
struct dahdi_dynamic_driver *drv;
int y;
rcu_read_lock();
list_for_each_entry_rcu(z, &dspan_list, list) {
if (!z->dead) {
for (y=0;y<z->span.channels;y++) {
/* Echo cancel double buffered data */
dahdi_ec_chunk(z->span.chans[y], z->span.chans[y]->readchunk, z->span.chans[y]->writechunk);
}
dahdi_receive(&z->span);
dahdi_transmit(&z->span);
/* Handle all transmissions now */
ztd_sendmessage(z);
@@ -402,6 +391,9 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
if (unlikely(rxpos != rxcnt))
printk(KERN_NOTICE "Span %s: Expected seq no %d, but received %d instead\n", span->name, rxcnt, rxpos);
dahdi_ec_span(span);
dahdi_receive(span);
/* If this is our master span, then run everything */
if (master)
ztdynamic_run();

View File

@@ -42,11 +42,7 @@ struct ztdeth_header {
/* We take the raw message, put it in an ethernet frame, and add a
two byte addressing header at the top for future use */
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(zlock);
#else
static spinlock_t zlock = SPIN_LOCK_UNLOCKED;
#endif
static struct sk_buff_head skbs;

View File

@@ -129,11 +129,7 @@ struct ztdeth {
/**
* Lock for adding and removing items in ethmf_list
*/
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(ethmf_lock);
#else
static spinlock_t ethmf_lock = SPIN_LOCK_UNLOCKED;
#endif
/**
* The active list of all running spans
@@ -401,7 +397,7 @@ static int ztdethmf_transmit(void *pvt, unsigned char *msg, int msglen)
unsigned char addr[ETH_ALEN];
int spans_ready = 0, index = 0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
static spinlock_t lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
unsigned long flags;
#endif

View File

@@ -57,11 +57,7 @@
#include <dahdi/kernel.h>
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(zlock);
#else
static spinlock_t zlock = SPIN_LOCK_UNLOCKED;
#endif
static struct ztdlocal {
unsigned short key;

View File

@@ -46,7 +46,7 @@ static LIST_HEAD(registration_list);
* is used as a simplistic way to spread the load amongst the different hardware
* transcoders in the system. */
static LIST_HEAD(active_list);
static spinlock_t translock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(translock);
EXPORT_SYMBOL(dahdi_transcoder_register);
EXPORT_SYMBOL(dahdi_transcoder_unregister);

View File

@@ -48,10 +48,10 @@ typedef struct _OCT6100_API_CHANNEL_TDM_
UINT8 byRoutPcmLaw : 1;
UINT8 bySoutPcmLaw : 1;
UINT8 byRinNumTssts : 1;
UINT8 bySinNumTssts : 1;
UINT8 byRoutNumTssts : 1;
UINT8 bySoutNumTssts : 1;
UINT8 byRinNumTssts : 2;
UINT8 bySinNumTssts : 2;
UINT8 byRoutNumTssts : 2;
UINT8 bySoutNumTssts : 2;
/* RIN port. */
UINT16 usRinTimeslot;
@@ -93,19 +93,20 @@ typedef struct _OCT6100_API_CHANNEL_VQE_
UINT8 fSoutAdaptiveNoiseReduction : 1;
UINT8 fDtmfToneRemoval : 1;
UINT8 fAcousticEcho : 1;
UINT8 byComfortNoiseMode : 1;
UINT8 byComfortNoiseMode : 2;
UINT8 fSoutNaturalListenerEnhancement : 1;
UINT8 fRoutNoiseReduction : 1;
UINT8 fEnableMusicProtection : 1;
UINT8 fIdleCodeDetection : 1;
UINT8 byAnrVoiceNoiseSegregation : 1;
UINT8 byAnrVoiceNoiseSegregation : 4;
UINT8 byDoubleTalkBehavior : 1;
UINT8 fSoutNoiseBleaching : 1;
UINT8 fSoutConferencingNoiseReduction : 1;
UINT8 bySoutAutomaticListenerEnhancementGainDb : 1;
UINT8 byNonLinearityBehaviorA : 1;
UINT8 byNonLinearityBehaviorB : 1;
UINT8 bySoutNaturalListenerEnhancementGainDb : 1;
UINT8 byNonLinearityBehaviorA : 4;
UINT8 byNonLinearityBehaviorB : 4;
UINT8 bySoutAutomaticListenerEnhancementGainDb;
UINT8 bySoutNaturalListenerEnhancementGainDb;
OCT_INT8 chRinAutomaticLevelControlTargetDb;
OCT_INT8 chSoutAutomaticLevelControlTargetDb;
@@ -134,15 +135,15 @@ typedef struct _OCT6100_API_CHANNEL_CODEC_
UINT8 byAdpcmNibblePosition : 1;
UINT8 fEnableSilenceSuppression : 1;
UINT8 byEncoderPort : 1;
UINT8 byEncodingRate : 1;
UINT8 byEncoderPort : 4;
UINT8 byDecoderPort : 4;
UINT8 byDecoderPort : 1;
UINT8 byDecodingRate : 1;
UINT8 byPhasingType : 2;
UINT8 byEncodingRate;
UINT8 byDecodingRate;
UINT8 byPhase : 1;
UINT8 byPhasingType : 1;
UINT16 byPhase;
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
typedef struct _OCT6100_API_CHANNEL_
@@ -163,7 +164,7 @@ typedef struct _OCT6100_API_CHANNEL_
UINT8 fEnableToneDisabler : 1;
/* Current echo operation mode. */
UINT8 byEchoOperationMode : 1;
UINT8 byEchoOperationMode : 3;
UINT8 byToneDisablerStatus : 1;
@@ -359,7 +360,7 @@ typedef struct _OCT6100_API_BIDIR_CHANNEL_
/* Flag specifying whether the entry is used or not. */
UINT8 fReserved : 1;
/* Count used to manage entry handles allocated to user. */
UINT8 byEntryOpenCnt : 1;
UINT8 byEntryOpenCnt;
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;

View File

@@ -1129,11 +1129,7 @@ static void tor2_tasklet(unsigned long data)
static int syncsrc = 0;
static int syncnum = 0 /* -1 */;
static int syncspan = 0;
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(synclock);
#else
static spinlock_t synclock = SPIN_LOCK_UNLOCKED;
#endif
static int tor2_findsync(struct tor2 *tor)
{

View File

@@ -36,6 +36,7 @@
#ifndef _GPAKCUST_H /* prevent multiple inclusion */
#define _GPAKCUST_H
#include <linux/module.h>
#include <linux/device.h>
#include <linux/completion.h>
#include <linux/workqueue.h>

View File

@@ -35,22 +35,16 @@
#ifdef VOICEBUS_NET_DEBUG
#ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv {
struct voicebus *vb;
};
#endif
static inline struct voicebus *
voicebus_from_netdev(struct net_device *netdev)
{
#ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv *priv;
priv = netdev_priv(netdev);
return priv->vb;
#else
return netdev->priv;
#endif
}
static void *
@@ -206,23 +200,14 @@ int vb_net_register(struct voicebus *vb, const char *board_name)
{
int res;
struct net_device *netdev;
# ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv *priv;
# endif
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
# ifdef HAVE_NETDEV_PRIV
netdev = alloc_netdev(sizeof(*priv), board_name, ether_setup);
if (!netdev)
return -ENOMEM;
priv = netdev_priv(netdev);
priv->vb = vb;
# else
netdev = alloc_netdev(0, vb->board_name, ether_setup);
if (!netdev)
return -ENOMEM;
netdev->priv = vb;
# endif
memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
# ifdef HAVE_NET_DEVICE_OPS
netdev->netdev_ops = &vb_netdev_ops;

View File

@@ -2,7 +2,7 @@
* WCB410P Quad-BRI PCI Driver
* Written by Andrew Kohlsmith <akohlsmith@mixdown.ca>
*
* Copyright (C) 2009 Digium, Inc.
* Copyright (C) 2009-2011 Digium, Inc.
* All rights reserved.
*
*/
@@ -2303,6 +2303,9 @@ static int b4xxp_chanconfig(struct dahdi_chan *chan, int sigtype)
if (alreadyrunning && bspan->sigchan) {
hdlc_stop(b4, fifo);
atomic_set(&bspan->hdlc_pending, 0);
bspan->sigactive = 0;
smp_mb();
bspan->sigchan = NULL;
}

View File

@@ -763,11 +763,9 @@ static inline unsigned int __t4_raw_oct_in(struct t4 *wc, const unsigned int add
__t4_pci_out(wc, WC_LADDR, (WC_LWRITE | WC_LALE));
if (!pedanticpci)
__t4_pci_in(wc, WC_VERSION);
#ifdef PEDANTIC_OCTASIC_CHECKING
__t4_pci_out(wc, WC_LADDR, (WC_LALE));
if (!pedanticpci)
__t4_pci_in(wc, WC_VERSION);
#endif
if (!octopt) {
__t4_gpio_setdir(wc, 0xff, 0x00);
__t4_gpio_set(wc, 0xff, 0x00);
@@ -2231,11 +2229,7 @@ static void t4_serial_setup(struct t4 *wc, int unit)
static int syncsrc = 0;
static int syncnum = 0 /* -1 */;
static int syncspan = 0;
#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(synclock);
#else
static spinlock_t synclock = SPIN_LOCK_UNLOCKED;
#endif
static void __t4_set_rclk_src(struct t4 *wc, int span)
{
@@ -2357,7 +2351,7 @@ static int __t4_findsync(struct t4 *wc)
while (p < 8) {
nonzero = 0;
for (x=0;cards[x];x++) {
for (i = 0; i < wc->numspans; i++) {
for (i = 0; i < cards[x]->numspans; i++) {
if (cards[x]->tspans[i]->syncpos) {
nonzero = 1;
if ((cards[x]->tspans[i]->syncpos == p) &&

View File

@@ -399,22 +399,16 @@ struct wcdte {
#endif
};
#ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv {
struct wcdte *wc;
};
#endif
static inline struct wcdte *
wcdte_from_netdev(struct net_device *netdev)
{
#ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv *priv;
priv = netdev_priv(netdev);
return priv->wc;
#else
return netdev->priv;
#endif
}
@@ -499,6 +493,7 @@ wctc4xxp_skb_to_cmd(struct wcdte *wc, const struct sk_buff *skb)
return cmd;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
static void
wctc4xxp_net_set_multi(struct net_device *netdev)
{
@@ -506,6 +501,15 @@ wctc4xxp_net_set_multi(struct net_device *netdev)
DTE_DEBUG(DTE_DEBUG_GENERAL, "%s promiscuity:%d\n",
__func__, netdev->promiscuity);
}
#else
static void
wctc4xxp_set_rx_mode(struct net_device *netdev)
{
struct wcdte *wc = wcdte_from_netdev(netdev);
DTE_DEBUG(DTE_DEBUG_GENERAL, "%s promiscuity:%d\n",
__func__, netdev->promiscuity);
}
#endif
static int
wctc4xxp_net_up(struct net_device *netdev)
@@ -669,7 +673,11 @@ wctc4xxp_net_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
#ifdef HAVE_NET_DEVICE_OPS
static const struct net_device_ops wctc4xxp_netdev_ops = {
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
.ndo_set_multicast_list = &wctc4xxp_net_set_multi,
#else
.ndo_set_rx_mode = &wctc4xxp_set_rx_mode,
#endif
.ndo_open = &wctc4xxp_net_up,
.ndo_stop = &wctc4xxp_net_down,
.ndo_start_xmit = &wctc4xxp_net_hard_start_xmit,
@@ -691,23 +699,14 @@ wctc4xxp_net_register(struct wcdte *wc)
{
int res;
struct net_device *netdev;
# ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv *priv;
# endif
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
# ifdef HAVE_NETDEV_PRIV
netdev = alloc_netdev(sizeof(*priv), wc->board_name, ether_setup);
if (!netdev)
return -ENOMEM;
priv = netdev_priv(netdev);
priv->wc = wc;
# else
netdev = alloc_netdev(0, wc->board_name, ether_setup);
if (!netdev)
return -ENOMEM;
netdev->priv = wc;
# endif
memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
# ifdef HAVE_NET_DEVICE_OPS
@@ -1615,6 +1614,20 @@ wctc4xxp_transmit_cmd(struct wcdte *wc, struct tcb *cmd)
{
int res;
/* If we're shutdown all commands will timeout. Just complete the
* command here with the timeout flag */
if (unlikely(test_bit(DTE_SHUTDOWN, &wc->flags))) {
if (cmd->flags & DO_NOT_AUTO_FREE) {
cmd->flags |= DTE_CMD_TIMEOUT;
list_del_init(&cmd->node);
complete(&cmd->complete);
} else {
list_del(&cmd->node);
free_cmd(cmd);
}
return;
}
if (cmd->data_len < MIN_PACKET_LEN) {
memset((u8 *)(cmd->data) + cmd->data_len, 0,
MIN_PACKET_LEN-cmd->data_len);
@@ -2159,12 +2172,13 @@ wctc4xxp_write(struct file *file, const char __user *frame,
}
if (DAHDI_FORMAT_G723_1 == dtc->srcfmt) {
if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) {
if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count) &&
(G723_SID_BYTES != count)) {
DTE_DEBUG(DTE_DEBUG_GENERAL,
"Trying to transcode packet into G723 format " \
"that is %Zu bytes instead of the expected " \
"%d/%d bytes.\n", count, G723_5K_BYTES,
G723_6K_BYTES);
"%d/%d/%d bytes.\n", count, G723_5K_BYTES,
G723_6K_BYTES, G723_SID_BYTES);
return -EINVAL;
}
cpvt->timestamp += G723_SAMPLES;
@@ -2741,11 +2755,10 @@ wctc4xxp_start_dma(struct wcdte *wc)
}
static void
wctc4xxp_stop_dma(struct wcdte *wc)
_wctc4xxp_stop_dma(struct wcdte *wc)
{
/* Disable interrupts and reset */
unsigned int reg;
unsigned long newjiffies;
/* Disable interrupts */
wctc4xxp_setintmask(wc, 0x00000000);
wctc4xxp_setctl(wc, 0x0084, 0x00000000);
@@ -2754,7 +2767,14 @@ wctc4xxp_stop_dma(struct wcdte *wc)
reg = wctc4xxp_getctl(wc, 0x0000);
reg |= 0x00000001;
wctc4xxp_setctl(wc, 0x0000, reg);
}
static void
wctc4xxp_stop_dma(struct wcdte *wc)
{
unsigned long newjiffies;
_wctc4xxp_stop_dma(wc);
newjiffies = jiffies + HZ; /* One second timeout */
/* We'll wait here for the part to come out of reset */
while (((wctc4xxp_getctl(wc, 0x0000)) & 0x00000001) &&
@@ -2762,7 +2782,6 @@ wctc4xxp_stop_dma(struct wcdte *wc)
msleep(1);
}
#define MDIO_SHIFT_CLK 0x10000
#define MDIO_DATA_WRITE1 0x20000
#define MDIO_ENB 0x00000
@@ -3307,13 +3326,19 @@ wctc4xxp_watchdog(unsigned long data)
if (time_after(jiffies, cmd->timeout)) {
if (++cmd->retries > MAX_RETRIES) {
if (!(cmd->flags & TX_COMPLETE)) {
cmd->flags |= DTE_CMD_TIMEOUT;
list_del_init(&cmd->node);
complete(&cmd->complete);
set_bit(DTE_SHUTDOWN, &wc->flags);
spin_unlock(&wc->cmd_list_lock);
wctc4xxp_stop_dma(wc);
_wctc4xxp_stop_dma(wc);
DTE_PRINTK(ERR,
"Board malfunctioning. " \
"Halting operation.\n");
return;
reschedule_timer = 0;
break;
}
/* ERROR: We've retried the command and
* haven't received the ACK or the response.

View File

@@ -1817,7 +1817,8 @@ static void wctdm_fxs_off_hook(struct wctdm *wc, const int card)
SLIC_LF_ACTIVE_FWD;
break;
}
wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_OFFHOOK);
if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN)
wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_OFFHOOK);
dahdi_hooksig(wc->aspan->span.chans[card], DAHDI_RXSIG_OFFHOOK);
#ifdef DEBUG
@@ -1833,7 +1834,8 @@ static void wctdm_fxs_on_hook(struct wctdm *wc, const int card)
if (debug & DEBUG_CARD)
dev_info(&wc->vb.pdev->dev,
"fxs_on_hook: Card %d Going on hook\n", card);
wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_ONHOOK);
if ((fxs->lasttxhook & SLIC_LF_SETMASK) != SLIC_LF_OPEN)
wctdm_fxs_hooksig(wc, card, DAHDI_TXSIG_ONHOOK);
dahdi_hooksig(wc->aspan->span.chans[card], DAHDI_RXSIG_ONHOOK);
fxs->oldrxhook = 0;
}

View File

@@ -88,7 +88,6 @@ static const struct dahdi_echocan_ops vpm150m_ec_ops = {
};
static struct t1 *ifaces[WC_MAX_IFACES];
spinlock_t ifacelock = SPIN_LOCK_UNLOCKED;
struct t1_desc {
const char *name;
@@ -628,12 +627,22 @@ static void t1_setleds(struct t1 *wc, int leds)
submit_cmd(wc, cmd);
}
static inline int t1_getpins(struct t1 *wc, int inisr)
/**
* t1_getpins - Returns the value of the jumpers on the card.
* @wc: The card to read from.
* @pins: Pointer to u8 character to hold the pins value.
*
* Returns 0 on success, otherwise an error code.
*
*/
static int t1_getpins(struct t1 *wc, u8 *pins)
{
struct command *cmd;
unsigned long flags;
unsigned long ret;
*pins = 0;
cmd = get_free_cmd(wc);
BUG_ON(!cmd);
@@ -656,9 +665,9 @@ static inline int t1_getpins(struct t1 *wc, int inisr)
}
return ret;
}
ret = cmd->data;
*pins = cmd->data;
free_cmd(wc, cmd);
return ret;
return 0;
}
static void __t1xxp_set_clear(struct t1 *wc)
@@ -1639,6 +1648,7 @@ static inline unsigned char t1_vpm_out(struct t1 *wc, int unit, const unsigned i
static int t1_hardware_post_init(struct t1 *wc)
{
int res;
unsigned int reg;
int x;
@@ -1649,10 +1659,12 @@ static int t1_hardware_post_init(struct t1 *wc)
else
wc->spantype = TYPE_T1;
} else {
if (t1_getpins(wc,0) & 0x01) /* returns 1 for T1 mode */
wc->spantype = TYPE_T1;
else
wc->spantype = TYPE_E1;
u8 pins;
res = t1_getpins(wc, &pins);
if (res)
return res;
wc->spantype = (pins & 0x01) ? TYPE_T1 : TYPE_E1;
}
debug_printk(wc, 1, "spantype: %s\n", 1 == wc->spantype ? "T1" : "E1");
@@ -2327,7 +2339,13 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
free_wc(wc);
return -EIO;
}
t1_hardware_post_init(wc);
res = t1_hardware_post_init(wc);
if (res) {
voicebus_release(&wc->vb);
free_wc(wc);
return res;
}
for (x = 0; x < (wc->spantype == TYPE_E1 ? 31 : 24); x++) {
if (!(wc->chans[x] = kmalloc(sizeof(*wc->chans[x]), GFP_KERNEL))) {
@@ -2363,6 +2381,7 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
remove_sysfs_files(wc);
clear_bit(INITIALIZED, &wc->bit_flags);
smp_mb__after_clear_bit();
del_timer_sync(&wc->timer);
flush_workqueue(wc->wq);

View File

@@ -77,8 +77,6 @@
#define TYPE_T1 1
#define TYPE_E1 2
extern spinlock_t ifacelock;
struct command {
struct list_head node;
struct completion complete;

View File

@@ -399,7 +399,7 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
else
regular_channels = min(8, subunit_ports);
channels = regular_channels;
if(unit == 0)
if(unit == 0 && subtype != 4)
channels += 6; /* 2 DIGITAL OUTPUTS, 4 DIGITAL INPUTS */
xpd = xpd_alloc(xbus, unit, subunit, subtype, subunits, sizeof(struct FXS_priv_data), proto_table, channels);
if(!xpd)

View File

@@ -68,7 +68,7 @@ struct counter {
static xbus_t *global_xbus;
static bool tx_ready = 1;
static spinlock_t tx_ready_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(tx_ready_lock);
static struct xframe_queue txpool;
static unsigned int pcm_in_pool_count;
static bool disconnecting;

View File

@@ -36,7 +36,7 @@ static int parport_toggles[8]; /* 8 bit flip-flop */
void flip_parport_bit(unsigned char bitnum)
{
static unsigned char last_value;
spinlock_t lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(lock);
unsigned long flags;
unsigned char mask;
unsigned char value;

View File

@@ -78,7 +78,7 @@ static void transport_init(xbus_t *xbus, struct xbus_ops *ops, ushort max_send_s
static void transport_destroy(xbus_t *xbus);
/* Data structures */
static spinlock_t xbuses_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(xbuses_lock);
#ifdef CONFIG_PROC_FS
static struct proc_dir_entry *proc_xbuses = NULL;
#endif
@@ -104,7 +104,7 @@ int xbus_check_unique(xbus_t *xbus)
{
if (!xbus)
return -ENOENT;
if (xbus->label) {
if (xbus->label && *(xbus->label)) {
xbus_t *xbus_old;
XBUS_DBG(DEVICES, xbus, "Checking LABEL='%s'\n", xbus->label);
@@ -118,7 +118,7 @@ int xbus_check_unique(xbus_t *xbus)
return -EBUSY;
}
} else {
XBUS_NOTICE(xbus, "MISSING BOARD LABEL!!!\n");
XBUS_NOTICE(xbus, "Missing board label (old Astribank?)\n");
}
return 0;
}
@@ -405,7 +405,7 @@ xpacket_t *xframe_next_packet(xframe_t *frm, int len)
return (xpacket_t *)(frm->packets + newlen - len);
}
static spinlock_t serialize_dump_xframe = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(serialize_dump_xframe);
static void do_hexdump(const char msg[], byte *data, uint16_t len)
{

View File

@@ -55,8 +55,8 @@ static struct xpp_ticker dahdi_ticker;
* I.e: one of our AB or dahdi_ticker
*/
static struct xpp_ticker *ref_ticker = NULL;
static spinlock_t ref_ticker_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t elect_syncer_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(ref_ticker_lock);
static DEFINE_SPINLOCK(elect_syncer_lock);
static bool force_dahdi_sync = 0; /* from /sys/bus/astribanks/drivers/xppdrv/sync */
static xbus_t *global_ticker;
static struct xpp_ticker global_ticks_series;

View File

@@ -57,6 +57,7 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
/*
* FIXME: Kludge for 2.6.19
* bool is now defined as a proper boolean type (gcc _Bool)
@@ -66,6 +67,12 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
int name = init; \
module_param(name, bool, perm); \
MODULE_PARM_DESC(name, desc " [default " #init "]")
#else
#define DEF_PARM_BOOL(name, init, perm, desc) \
bool name = init; \
module_param(name, bool, perm); \
MODULE_PARM_DESC(name, desc " [default " #init "]")
#endif
#define DEF_PARM(type,name,init,perm,desc) \
type name = init; \

View File

@@ -242,7 +242,7 @@ struct xusb {
};
static spinlock_t xusb_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(xusb_lock);
static xusb_t *xusb_array[MAX_BUSES] = {};
static unsigned bus_count = 0;

View File

@@ -75,6 +75,12 @@ static const xproto_table_t *xproto_table(xpd_type_t cardtype)
return xprotocol_tables[cardtype];
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
#define MODULE_REFCOUNT_FORMAT "%s refcount was %d\n"
#else
#define MODULE_REFCOUNT_FORMAT "%s refcount was %lu\n"
#endif
const xproto_table_t *xproto_get(xpd_type_t cardtype)
{
const xproto_table_t *xtable;
@@ -94,7 +100,8 @@ const xproto_table_t *xproto_get(xpd_type_t cardtype)
if(xtable) {
BUG_ON(!xtable->owner);
#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
module_refcount(xtable->owner));
#endif
if(!try_module_get(xtable->owner)) {
ERR("%s: try_module_get for %s failed.\n", __FUNCTION__, xtable->name);
@@ -108,7 +115,8 @@ void xproto_put(const xproto_table_t *xtable)
{
BUG_ON(!xtable);
#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
module_refcount(xtable->owner));
BUG_ON(module_refcount(xtable->owner) <= 0);
#endif
module_put(xtable->owner);

View File

@@ -43,6 +43,7 @@
#endif
#include <linux/fs.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/ioctl.h>
#ifdef CONFIG_DAHDI_NET
@@ -69,6 +70,10 @@
#define DAHDI_IRQ_HANDLER(a) static irqreturn_t a(int irq, void *dev_id, struct pt_regs *regs)
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
#define HAVE_NET_DEVICE_OPS
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#define DAHDI_IRQ_SHARED IRQF_SHARED
#define DAHDI_IRQ_DISABLED IRQF_DISABLED
@@ -1285,6 +1290,10 @@ wait_for_completion_interruptible_timeout(struct completion *x,
const struct pci_device_id _x[] __devinitdata
#endif
#ifndef DEFINE_SPINLOCK
#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
#endif
#ifndef DMA_BIT_MASK
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
#endif