Skip to content

Commit

Permalink
serial: bfin_uart: narrow the reboot condition in DMA tx interrupt
Browse files Browse the repository at this point in the history
Check if xmit buffer pointers are set to zero.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sonic Zhang authored and Greg Kroah-Hartman committed May 17, 2012
1 parent b06d2f2 commit 239c25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/bfin_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
*/
UART_CLEAR_IER(uart, ETBEI);
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);

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
Expand Down

0 comments on commit 239c25b

Please sign in to comment.