diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-03-22 09:20:59 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-03-22 09:20:59 +0000 |
commit | 50eaaa0d038aa6cc5e6d30c0547cafad13a390e7 (patch) | |
tree | d84e772902fa48fe628ef5d55542dbc2ec0bf268 /drivers/dahdi/voicebus/voicebus.h | |
parent | d010a28168a6883ef74e1f7c55c6576cf19bba4f (diff) |
wctdm24xxp, wcte12xp: Fix several problems with buffer processing.
* 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
Diffstat (limited to 'drivers/dahdi/voicebus/voicebus.h')
-rw-r--r-- | drivers/dahdi/voicebus/voicebus.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h index de565d9..5dea5b6 100644 --- a/drivers/dahdi/voicebus/voicebus.h +++ b/drivers/dahdi/voicebus/voicebus.h @@ -85,6 +85,7 @@ struct voicebus_descriptor_list { }; /* Bit definitions for struct voicebus.flags */ +#define VOICEBUS_SHUTDOWN 0 #define VOICEBUS_STOP 1 #define VOICEBUS_STOPPED 2 #define VOICEBUS_LATENCY_LOCKED 3 @@ -118,6 +119,7 @@ struct voicebus { unsigned int min_tx_buffer_count; unsigned int max_latency; struct list_head tx_complete; + struct list_head free_rx; #ifdef VOICEBUS_NET_DEBUG struct sk_buff_head captured_packets; @@ -141,7 +143,7 @@ int __voicebus_init(struct voicebus *vb, const char *board_name, int normal_mode); void voicebus_release(struct voicebus *vb); int voicebus_start(struct voicebus *vb); -int voicebus_stop(struct voicebus *vb); +void voicebus_stop(struct voicebus *vb); int voicebus_transmit(struct voicebus *vb, struct vbb *vbb); int voicebus_set_minlatency(struct voicebus *vb, unsigned int milliseconds); int voicebus_current_latency(struct voicebus *vb); |