Commit 99dc8e40 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman

serial: sh-sci: Don't call sci_dma_rx_push() if no data has arrived

On receive DMA time-out, avoid calling sci_dma_rx_push() if no data was
transferred by the timed out DMA request.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8eadb56d
...@@ -1467,10 +1467,11 @@ static void work_fn_rx(struct work_struct *work) ...@@ -1467,10 +1467,11 @@ static void work_fn_rx(struct work_struct *work)
dev_dbg(port->dev, "Read %u bytes with cookie %d\n", read, dev_dbg(port->dev, "Read %u bytes with cookie %d\n", read,
s->active_rx); s->active_rx);
if (read) {
count = sci_dma_rx_push(s, s->rx_buf[new], read); count = sci_dma_rx_push(s, s->rx_buf[new], read);
if (count) if (count)
tty_flip_buffer_push(&port->state->port); tty_flip_buffer_push(&port->state->port);
}
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment