|author||Haavard Skinnemoen <email@example.com>||2008-07-16 21:52:36 +0100|
|committer||Linus Torvalds <firstname.lastname@example.org>||2008-07-20 17:12:34 -0700|
Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops
Serial drivers using DMA (like the atmel_serial driver) tend to get very confused when the xmit buffer is flushed and nobody told them. They also tend to spew a lot of garbage since the DMA engine keeps running after the buffer is flushed and possibly refilled with unrelated data. This patch adds a new flush_buffer operation to the uart_ops struct, along with a call to it from uart_flush_buffer() right after the xmit buffer has been cleared. The driver can implement this in order to syncronize its internal DMA state with the xmit buffer when the buffer is flushed. Signed-off-by: Haavard Skinnemoen <email@example.com> Acked-by: Alan Cox <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Diffstat (limited to 'Documentation/serial')
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index 88ad615dd33..77ba0afbe4d 100644
@@ -186,6 +186,17 @@ hardware.
Locking: port_sem taken.
Interrupts: caller dependent.
+ Flush any write buffers, reset any DMA state and stop any
+ ongoing DMA transfers.
+ This will be called whenever the port->info->xmit circular
+ buffer is cleared.
+ Locking: port->lock taken.
+ Interrupts: locally disabled.
+ This call must not sleep
Change the port parameters, including word length, parity, stop
bits. Update read_status_mask and ignore_status_mask to indicate