Age | Commit message (Collapse) | Author |
|
The Hx8 series cards do not need any idle buffers and idle_buffers complicate
processing when using the timing_cable. This change adds another mode of
operation for the voicebus layer for the Hx8 cards that operates without the
idle buffers.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8431 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
* If the receive packet isn't the correct size, we can't just drop it, we have
to resubmit it to the receive queue immediately so it will get cleaned up
properly.
* It isn't safe to leave the buffers on any lists while calling
the function to resubmit it to the descriptor ring, since it may be freed
which potentially results in a corrupted list.
* If the card is held up in a state where it is waiting for receive data, there
is a chance that when the transmit process is started up again it could DMA
data into a buffer that has already been freed. By using our own freelist,
there isn't a chance that the board will DMA data into memory that has been
recycled for another purpose.
* Disable the tasklet when processing hard underruns in order to not corrupt the
descriptor rings.
* Make sure voicebus_stop and voicebus_release aren't running at the same time
as the hard underrun handler. This too can result in corrupted descriptor
lists.
DAHDI-560.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8379 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Oddities in the receive processor state make this completion not so useful
anymore. It is more straightforward to simply poll the state on shutdown.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8378 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Since the locking will always take place in a bottom half now (either a timer or
tasklet), we do not need the special locking macros anymore.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8377 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Brings in any backward compatibility definitions.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8204 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Setting the maximum latency can be useful if you have a system event that
normally causes a latency increase, but you would rather have a break in the
audio or frame slip, then let the latency grow to the current default maximum
which is 25ms. DAHDI-278.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8198 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8189 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Since we're calling list_move_tail, we need to use the safe version.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8183 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Some systems do not like the port I/O and this change allows it to work.
DAHDI-515.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8176 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Needs work to make backward compatible with the range of supported kernels.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8141 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
The Hx8 series cards support BRI modules in addition to analog modules.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8123 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This description needs to be filled in more.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8121 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8119 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This interface is only used to facilitate debugging.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8118 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Request_module_nowait is only useful when asynchronous initialization is used
(committed to trunk in r8094), and that can only happen in kernel version after
2.6.30. Some earlier kernels do not have the request_module_nowait interface.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8111 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This patch moves the majority of the buffer processing for the voicebus based
cards out of the interrupt handler and into a tasklet. When multiple cards are
running on the same CPU, and there was a latency condition that would cause them
to get behind, this now allows the tasklet to limit how many buffers are
processed on each card before giving the other card a chance to start working on
it's backlog.
Additionally, when the card detects a hard under run, instead of trying to fix
it up in the handling routine, it will now reschedule a work item that will
completely reset the descriptor rings.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8095 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
The 2.6.30 kernel provides support for asynchronous initialization. If running
on a kernel that supports this feature, let's add an option to use it in order
to speed up driver load times. Keep it off by default.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8094 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
If the reset bit never clears, then just assume we cannot talk to the board and
error on the attach. DAHDI-515.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8080 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
When there is a hard underrun, or in other words interrupts are held off for so
long that the board completely runs out of transmit descriptors, it was too easy
for the driver to be in a 'confused' state about the descriptors. This change
has the driver cleanup and reset the descriptor ring in this case so that we're
not racing against the interface while we resume normal operation.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8026 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Another commit that has formatting problems (mainly lines over 80 characters)
that I will fix in a later commit.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8025 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
If a combination of softunderun results in descriptors that aren't owned being
skipped in the vb_recover_tx_descriptor_list, it's possible for processing to
stop on a descriptor that isn't owned.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8010 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8008 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
It is possible for poorly behaving hardware (and driver bugs) to lockup the
modprobe process by having it wait indefinitely for a command to complete that
never will. DAHDI-451.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8003 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Function is no longer needed since the 'struct voicebus' is now embedded in the
client contexts. This commit also contains a few trivial formatting changes for
sparse's sake.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8002 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
The drv_data attached to the pci_dev is no longer the 'struct voicebus' pointer,
but is instead the 'struct wctdm' (or 'struct t1'), so the clients need to
manage the sysfs files themselves.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7983 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Framesize is the same on all the clients, so it can be removed from the 'struct
voicebus' (and changed back again if needed). Since the framesize is the same,
each board doesn't need it's own buffer_cache, and cache_line is only used
during startup and can be read directly from pci configuration space, so we
don't need to keep it around in our context.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7779 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
In addition to making 'struct voicebus' embeddable, also add an
'voicebus_operations' structure. This was done so that a) remove the "context"
pointer from struct voicebus, and also to show that handle_recieve/transmit are
to be managed together.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7778 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
On 2.6.22, there is was a bug in the SLUB allocator that required defining
SLAB_STORE_USER, however this setting is only valid when CONFIG_SLUB is defined
and not when using the previous slab allocator. DAHDI-424.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7722 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7582 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
We also do not need the unused context member of the vpmadt032 structure.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7569 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7568 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7567 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This closes a race condition where it was possible for the driver to
believe it has enabled the VPMADT032 when in fact, it really has not.
This fixes a regression introduced in dahdi-linux 2.2.0.
(issue #15724)
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7524 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7523 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This is off by default since it hasn't been tested on a full range of kernels,
but can be useful for quickly seeing differences for latencies on different
cards installed in the system.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7522 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This can be handled just as well in process context and printing to a serial
console from the interrupt handler has the potential to cause long latencies.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7521 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Now that increases in the latency produce less undefined behavior on the SPI
busses, provide an interface for client drivers to inform the voicebus library
to not increase the latency if underruns are detected. This can speed up loads
of the driver since latency bumps do not trigger a restart of the driver
initialization. DAHDI-278.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7518 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Previously, when the host system fails to service the interrupt in a timely
fashion, the transmit descriptor ring for the voicebus card would "go empty"
since the interface wouldn't have another descriptor to read in. The driver
only knows that it went empty, not how far behind it actually was. Therefore,
the driver could just increase the latency by a millisecond and keep going
waiting for another bump.
Additionally, when the transmit descriptor actually goes empty, there are some
cases where an in process SPI transaction to one of the modules is interrupted,
which may result in corrupted module register writes on rare occassions.
This now makes it possible for the voicebus drivers to coexist with some devices
that periodically lock interrupts for longer than 25ms. Before this patch, the
latency would constantly increase until either the modules received a corrupted
frame.
This patch preconfigures all the receive descriptors to send an "idle" packet
that will be transmitted to the onboard modules when the host doesn't service
the interrupt within (latency - 2)ms. There are now two kinds of underruns,
softunderuns where the driver can detect that these idlebuffers have made it to
the TX FIFO, and the normal hard underrun where the part signals a transmit
descriptor unavailable interrupt. DAHDI-278.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7517 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7516 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7515 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
This is only used during startup so we don't need to carry it around in the
structure at all times.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Unnecessarily duplicates the dev_xxx macros. Also removes the need for the
board_name member from struct voicebus.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7513 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
Brings in the change from r7065 that was on the team/sruffell/dahdi-linux-vpm119
branch.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7480 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7309 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7284 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
On older kernels, it is possible to cause a kernel panic if the lenght of the
workqueue name is greater than 10. DAHDI-276.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6776 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6628 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|
|
I accidentally changed to print everytime. They should only be printed if
DEBUG_ECHOCAN is specified in the debug module parameter.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6625 a0bf4364-ded3-4de4-8d8a-66a801d63aff
|