Commit 239c25b1 authored by Sonic Zhang's avatar Sonic Zhang Committed by Greg Kroah-Hartman

serial: bfin_uart: narrow the reboot condition in DMA tx interrupt

Check if xmit buffer pointers are set to zero.
Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b06d2f20
...@@ -532,7 +532,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id) ...@@ -532,7 +532,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
*/ */
UART_CLEAR_IER(uart, ETBEI); UART_CLEAR_IER(uart, ETBEI);
uart->port.icount.tx += uart->tx_count; uart->port.icount.tx += uart->tx_count;
if (!uart_circ_empty(xmit)) { if (!(xmit->tail == 0 && xmit->head == 0)) {
xmit->tail = (xmit->tail + uart->tx_count) & (UART_XMIT_SIZE - 1); xmit->tail = (xmit->tail + uart->tx_count) & (UART_XMIT_SIZE - 1);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
......
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