From 24cd73a3942f3df214d7953f0cfd65d5085fa583 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Richard=20R=C3=B6jfors?= Date: Tue, 27 Apr 2010 14:16:34 -0700 Subject: [PATCH] serial: timbuart: make sure last byte is sent when port is closed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix a problem in early versions of the FPGA IP. In certain situations the IP reports that the FIFO is empty, but a byte is still clocked out. If a flush is done at that point the currently clocked byte is canceled. This causes incompatibilities with the upper layers when a port is closed, it waits until the FIFO is empty and then closes the port. During close the FIFO is flushed -> the last byte is not sent properly. Now the FIFO is only flushed if it is reported to be non-empty. Which makes the currently clocked out byte to finish. [akpm@linux-foundation.org: fix build] Signed-off-by: Richard Röjfors Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed