summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorChuah, Kim Tatt <kim.tatt.chuah@intel.com>2016-06-15 13:44:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-25 14:30:42 -0700
commit692aa1905679bd72f84115986235d214f6096a98 (patch)
treea5e42c05e35d27bed55353c9624492dca6d97ddd /drivers/tty
parentfd9e516d83108ad82d2c0c30097a6143c779f9c0 (diff)
downloadblackbird-op-linux-692aa1905679bd72f84115986235d214f6096a98.tar.gz
blackbird-op-linux-692aa1905679bd72f84115986235d214f6096a98.zip
serial: 8250_mid: Read RX buffer on RX DMA timeout for DNV
In DNV, when RX DMA is used and number of bytes received is less than transfer size, only RX DMA timeout interrupt is sent. When this happens, read the RX buffer. Signed-off-by: Chuah, Kim Tatt <kim.tatt.chuah@intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_mid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
index b218ff528df7..339de9cd0866 100644
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -96,6 +96,7 @@ static int tng_setup(struct mid8250 *mid, struct uart_port *p)
static int dnv_handle_irq(struct uart_port *p)
{
struct mid8250 *mid = p->private_data;
+ struct uart_8250_port *up = up_to_u8250p(p);
unsigned int fisr = serial_port_in(p, INTEL_MID_UART_DNV_FISR);
u32 status;
int ret = IRQ_NONE;
@@ -103,9 +104,10 @@ static int dnv_handle_irq(struct uart_port *p)
if (fisr & BIT(2)) {
err = hsu_dma_get_status(&mid->dma_chip, 1, &status);
- if (err > 0)
+ if (err > 0) {
+ serial8250_rx_dma_flush(up);
ret |= IRQ_HANDLED;
- else if (err == 0)
+ } else if (err == 0)
ret |= hsu_dma_do_irq(&mid->dma_chip, 1, status);
}
if (fisr & BIT(1)) {
OpenPOWER on IntegriCloud