aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-07-16 16:52:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:12:34 -0400
commit6bb0e3a59a089e23eecc0af3b6f6012b2a9affba (patch)
tree06790c1e5a3505b9d790506710d59d88c780f819 /include
parent15648f154a8faea97cbe931e189cf0a57fd066f4 (diff)
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 <haavard.skinnemoen@atmel.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index d8f31de632c5..1d2faa6592ae 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -190,6 +190,7 @@ struct uart_ops {
190 void (*break_ctl)(struct uart_port *, int ctl); 190 void (*break_ctl)(struct uart_port *, int ctl);
191 int (*startup)(struct uart_port *); 191 int (*startup)(struct uart_port *);
192 void (*shutdown)(struct uart_port *); 192 void (*shutdown)(struct uart_port *);
193 void (*flush_buffer)(struct uart_port *);
193 void (*set_termios)(struct uart_port *, struct ktermios *new, 194 void (*set_termios)(struct uart_port *, struct ktermios *new,
194 struct ktermios *old); 195 struct ktermios *old);
195 void (*set_ldisc)(struct uart_port *); 196 void (*set_ldisc)(struct uart_port *);