Skip to content

Commit

Permalink
serial: 8250_mid: Read RX buffer on RX DMA timeout for DNV
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuah, Kim Tatt authored and Greg Kroah-Hartman committed Jun 25, 2016
1 parent fd9e516 commit 692aa19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/tty/serial/8250/8250_mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,18 @@ 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;
int err;

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)) {
Expand Down

0 comments on commit 692aa19

Please sign in to comment.