Re: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops

From: Alan Cox
Date: Mon Jun 30 2008 - 06:31:49 EST


On Mon, 30 Jun 2008 12:24:20 +0200
Haavard Skinnemoen <haavard.skinnemoen@xxxxxxxxx> wrote:

> 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@xxxxxxxxx>

Acked-by: Alan Cox <alan@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/