summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
AgeCommit message (Collapse)Author
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
2009-02-11Use the proper pci_device when handling dma buffers.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6005 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-28Allow EXTRA_CFLAGS to propagate to builds in the subfolders for wct4xxp,Shaun Ruffell
wctdm24xxp, wctc4xxp, wcb4xxp, and wcte12xp. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5856 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27And once again I'm reminded why I should always compile before committing.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5850 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27Small tweak to the alloc_netdev call again to use a less error-prone method ofShaun Ruffell
getting the size. Thanks kpfleming. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5849 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27Passed wrong size to alloc_netdev.Shaun Ruffell
Related to issue #14285 . git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5848 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27Updated wctc4xxp for kernel version 2.6.29.Shaun Ruffell
Closes issue #14285 . Reported by: tzafrir git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5842 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27- When tearing down channels, use the channel's timeslot as the index into theShaun Ruffell
encoder and decoder arrays, and not the channel which is returned from the DTE. Issue: DAHDI-231. - Instead of completely servicing the receive descriptor ring in the workqueue, have the interrupt handler queue them up for the workqueue. - No need to interrupt on both transmit and receive since we expect a response to every packet we send. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5835 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-05Even on older kernels, do not redefine WARN_ON_ONCE if it is already defined.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5636 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-05Print more information to the kernel log when the transcoder sends us aShaun Ruffell
diagnostic message. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5627 a0bf4364-ded3-4de4-8d8a-66a801d63aff