summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
AgeCommit message (Collapse)Author
2011-12-02wctc4xxp: Replace 'ndo_set_multicast_list' with 'set_rx_mode'Shaun Ruffell
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> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10360 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-21dahdi: Move WARN_ON_ONCE from wctc4xxp driver to include/dahdi/kernel.hShaun Ruffell
I only generally test on RHEL 4 when testing against kernels older than 2.6.18. Apparently OpenSUSE 10.1 runs with 2.6.16 and doesn't have WARN_ON_ONCE backported. I took the patch Richard Miller originally attached to the issue and moved it to include/dahdi/kernel.h so it would be available for all the board drivers in the future. Internal-Issue-ID: DAHLIN-260 Reported-by: Richard Miller Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10252 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-30wctc4xxp: Allow G723 SID frames to pass to the hardware decoder.Shaun Ruffell
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-08-15wctc4xxp: Fix lock imbalance in wctc4xxp_watchdog.Shaun Ruffell
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-08wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIVShaun Ruffell
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-07-26wctc4xxp: Cleanup in-flight commands when halting due to hardware error.Shaun Ruffell
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-06-02Remove unused variables.Shaun Ruffell
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-04-04wctdm24xxp, wcte12xp, wct4xxp, wcb4xxp, wctdm: Do not support suspend.Shaun Ruffell
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-02-28wctc4xxp: Minor fixes for big endian host architectures.Shaun Ruffell
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-01-03"struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"Shaun Ruffell
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
2010-12-15wctc4xxp: Make the "mode" module parameter read-only in sysfs.Shaun Ruffell
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-11-04Remove mutex emulationShaun Ruffell
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-10-20wctc4xxp: Space required after ','.Shaun Ruffell
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-20wctc4xxp: Remove trailing whitespace.Shaun Ruffell
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-20wctc4xxp: Cannot print the encoder/decoder channels before we know them.Shaun Ruffell
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-20wctc4xxp: 'WARN_ON(1)' -> 'dev_info(...' on channel creation failure.Shaun Ruffell
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-20wctc4xxp: Drop 'DTE_PRINTK' macro in favor of standard 'dev_xxx'Shaun Ruffell
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-20wctc4xxp: Remove 'service_dte' function and a few inline keywords.Shaun Ruffell
'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-07-28wctc4xxp: Add compile-time option to always poll the interface.Shaun Ruffell
Added as a workaround for a system which was not routing interrupts properly and therefore is off by default. Candidate for reversion in a couple of years. DAHDI-627. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9037 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Move from I/O space to memory-mapped registers.Shaun Ruffell
Certain platforms have trouble with the registers mapped from I/O space. DAHDI-627. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9036 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Do not ACK response packets without a corresponding request.Shaun Ruffell
Closes a small window of opportunity where system conditions prevent the driver from servicing it's receive ring within the timeout period of a request, and then in the middle of retrying the request (after the request was already removed from the "waiting_for_response" list) the driver process the response, it's possible for the driver to ACK the response without ever pairing it up with the original request. The result being that the DTE will then ignore our attempts to retry the original request. DAHDI-430. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9035 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Allow read to return more than one packet of data.Shaun Ruffell
As of this writing codec_dahdi (Asterisk module) will not call 'read' on a transcoder channel more often than it calls 'write'. When a translation path is setup that will transcode from g723 to g729, write is called every 30ms and each 'read' returns only 20ms of data. The end result is audio that slowly becomes increasing delayed. Since codec_dahdi calls the system read function with a buffer large enough to hold more than one packet this can prevents packets from backing up on the channel. DAHDI-582 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9034 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-29wctc4xxp: Fix "operation on may be undefined" warning.Shaun Ruffell
gcc 4.5.0 was generating a warning on the changed line, and the discussion at http://gcc.gnu.org/ml/gcc/2004-10/msg00024.html explains why. Essentially, the only thing guaranteed with the preincrement operator is that the value will be incremented before the assignment. It's undefined where in the sequence the mask will be applied. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8831 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-10-09wctc4xxp: Remove custom memory debugging code that is no longer necessary.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-13wctc4xxp: Remove flag member that is not used.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6981 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-07-27Replace typos "recieved" with "received".David Brooks
(closes issue #15571) Reported by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6897 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-07-13wctc4xxp: Remove deprecated DMA_xxBIT_MASK usage.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6838 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-25wctc4xxp: Make the wctc4xxp_netdev_ops structure static.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6760 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-25wctc4xxp: Update to use struct net_device_ops.Shaun Ruffell
Accomodates a change in the linux kernel network device interface. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6717 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-01wctc4xxp: spin_trylock_irqsave is not defined on some kernels.Shaun Ruffell
DAHDI-253 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6551 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-01wctc4xxp: Defined gfp_t for earlier kernels.Shaun Ruffell
This definition was just copied from the xpp driver. DAHDI-253 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6550 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-01wctc4xxp: Fix inclusion of linux/io.h on 2.6.9 kernels.Shaun Ruffell
DAHDI-253 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6549 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-29wctc4xxp: Change netif_rx_xxx to napi_xxxShaun Ruffell
The netif_rx_xxx functions were dropped from the linux kernel source on 2009-01-21 in commit 288379f050284087578b77e04f040b57db3db3f8. (closes issue #14963) Reported by: tzafrir git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6526 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-24Eliminate unnecessary checks for NULL before freeing memory.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6246 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-24Do not allocate more memory than is needed when sending packets.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6245 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-24Block runt packets from the transcoder.Shaun Ruffell
Tested by: Walter Klomp git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6244 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-24Do not define the debug flags if CONFIG_SLUB is not set.Shaun Ruffell
Some versions of the kernel (2.6.18-92.1.22.el5) have patches in them to panic if a slab cache is created with unsupported flags. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6237 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Make some messages debug messages and minor formatting adjustment.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6228 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Verify checksum on the RTP IP header before queueing.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6227 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Poll the card in a kernel timer when several channels are open.Shaun Ruffell
Polling the driver increases overall system throughput when there are several transcoding channels open by reducing the number of interrupts the the TC400M generates. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6226 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Optionally show total number of packets dropped when channel is closed.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6225 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Do not handle duplicate reponses.Shaun Ruffell
It is possible for system activity to prevent the wctc4xxp driver from responding the the firmware on the TC400M for a period of time. If this occurs, the TC400M will resend a response to a command that we sent. This duplicate reponse will then sometimes confuse the driver. Normally this would manifest as an attempt to connect the same channel together in a transcoding session. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6224 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Create our own free list for commands instead of using kmem_cache.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6223 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Set TX_COMPLETE atomically with changes to the waiting_for_response_list.Shaun Ruffell
This change is to catch a condition where it is possible, for whatever reason, for a response to come in before the request is marked tx complete. If this happened, it was possible to leak the response packet and double complete the command. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6222 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23split send_trans_connect into a connect / disconnect pair.Shaun Ruffell
Trivial change that makes the code read more naturally. Also changes the order of members in the channel_pvt structure. For more natural alignment. Both non-functional changes. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6221 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23If the driver fails to register, make sure we cleanup the command cache.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6220 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Setup the TC400M to poll the own bit on the descriptor ring.Shaun Ruffell
On certain systems having the hardware poll the descriptor ring provides more reliable operation that strobbing the transmit demand poll and receive demand poll register. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6219 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Make sure that messages sitting in the outbound queue cause the timer toShaun Ruffell
reschedule. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6218 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-23Refactor channel command handling.Shaun Ruffell
Makes commands and reponses clearer and easier to trouble shoot, reduces pressure on the stack, and brings driver closer to kernel coding standards. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6217 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-06Workarounds for SLUB sysfs problems in kernel 2.6.22 with CONFIG_SLUB and ↵Wendell Thompson
CONFIG_SLUB_DEBUG, as in Fedora Core 6. Fixes kernel oops when loading/unloading dahdi modules. DAHDI-226 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6096 a0bf4364-ded3-4de4-8d8a-66a801d63aff