Commit Graph

67 Commits

Author SHA1 Message Date
Shaun Ruffell
4edd8a1973 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>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10218 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-30 19:12:42 +00:00
Shaun Ruffell
eda8ceea1c wctc4xxp: Fix lock imbalance in wctc4xxp_watchdog.
r10082 "wctc4xxp: Cleanup in-flight commands when halting due to
hardware error." introduced a lock imblance on the error path where the
cmd_list_lock would be unlocked twice when the board is halted due to a
hardware error. Thanks sparse.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10138 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15 21:49:36 +00:00
Shaun Ruffell
d401ad4233 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>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10096 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-08 06:38:25 +00:00
Shaun Ruffell
9fd43e0139 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>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10082 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-26 20:19:30 +00:00
Shaun Ruffell
86519d1211 Remove unused variables.
gcc-4.6 now warns about variables that are set but never used. Clean up
unused variables everywhere except the oct612x subdirectory.

The oct612x should go in a separate patch in case that needs to be
pulled out into a separate project again.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02 20:00:36 +00:00
Shaun Ruffell
731388e275 wctdm24xxp, wcte12xp, wct4xxp, wcb4xxp, wctdm: Do not support suspend.
These drivers (all DAHDI drivers) should explicitly block suspend if they are
loaded.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Michael Spiceland <mspiceland@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04 16:25:09 +00:00
Shaun Ruffell
a0246fd0be wctc4xxp: Minor fixes for big endian host architectures.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9778 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28 14:19:14 +00:00
Shaun Ruffell
25a8bb1abe "struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"
2.6.25 added the DEFINE_PCI_DEVICE_TABLE macro to make sure that the
pci_device_id tables are put into the correct section in the binary.
Convert all the places where the tables were defined to use them.

This is linux-2.6 commit where the change went in along with the
rationale:  90a1ba0c5e39eeea278f263c28ae02166c5911c8

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9584 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03 18:26:24 +00:00
Shaun Ruffell
9292e6f0ad wctc4xxp: Make the "mode" module parameter read-only in sysfs.
The mode module parameter is only acted on during module initialization.
We shouldn't allow anyone to change it after the driver is already
loaded.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9537 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15 17:53:21 +00:00
Shaun Ruffell
37097411ea Remove mutex emulation
Using semaphores as mutexes was removed from the kernel in 4882720b267b.
Just use straight semaphores now.  'DECLARE_MUTEX()' -> 'DEFINE_SEMAPHORE()'
and 'init_MUTEX()' -> 'sema_init()'.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9464 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04 16:40:29 +00:00
Shaun Ruffell
141a61d64e wctc4xxp: Space required after ','.
Trivial formatting change.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9440 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:59 +00:00
Shaun Ruffell
9dc983cc0d wctc4xxp: Remove trailing whitespace.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9439 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:57 +00:00
Shaun Ruffell
615c6b6800 wctc4xxp: Cannot print the encoder/decoder channels before we know them.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9438 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:54 +00:00
Shaun Ruffell
8d29ecb783 wctc4xxp: 'WARN_ON(1)' -> 'dev_info(...' on channel creation failure.
If the DSP ever finds it's way into a bad state it can be possible for a
timeslot to get 'wedged'.  All attempts to create a channel in a wedged
timeslot will fail and the WARN_ON macro can quickly fill the logs.

This change adds some more debugging information (which timeslot is wedged)
along with the result code from the DSP and puts it all behind a
printk_ratelimit.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9437 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:52 +00:00
Shaun Ruffell
b4170d8f40 wctc4xxp: Drop 'DTE_PRINTK' macro in favor of standard 'dev_xxx'
Just use the standard way to print messages associated with a particular
device. Also dropped the "Attached to device at" message since that
information is now printed on every print.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9436 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:49 +00:00
Shaun Ruffell
8ac8b90bd4 wctc4xxp: Remove 'service_dte' function and a few inline keywords.
'service_dte' was only called in one place and is only two lines.  I do
not think it is adding much anymore. Also, let compiler should decide if
'service_rx_ring' and 'service_tx_ring' should be inlined.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9435 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20 12:22:47 +00:00
Shaun Ruffell
bf3fe05dfb wct4xxp: Moving the transmit short detection behind debug module param.
This needs some more testing before it's on by default.  If the card is
otherwise functioning, these messages may be confusing to the user.  If
the card is not functioning, the driver can be reloaded with debug to
check for this condition.

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-27 21:59:27 +00:00