From: Sonic Zhang <sonic.adi@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <linux-serial@vger.kernel.org> Cc: LKML <linux-kernel@vger.kernel.org>, <uclinux-dist-devel@blackfin.uclinux.org>, Sonic Zhang <sonic.zhang@analog.com> Subject: [PATCH 2/4] serial: bfin_uart: narrow the reboot condition in DMA tx interrupt Date: Wed, 16 May 2012 14:22:24 +0800 [thread overview] Message-ID: <1337149346-5277-2-git-send-email-sonic.adi@gmail.com> (raw) In-Reply-To: <1337149346-5277-1-git-send-email-sonic.adi@gmail.com> From: Sonic Zhang <sonic.zhang@analog.com> Check if xmit buffer pointers are set to zero. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> --- drivers/tty/serial/bfin_uart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index 9acab11..56b95b0 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c @@ -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) -- 1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Sonic Zhang <sonic.adi@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-serial@vger.kernel.org Cc: LKML <linux-kernel@vger.kernel.org>, uclinux-dist-devel@blackfin.uclinux.org, Sonic Zhang <sonic.zhang@analog.com> Subject: [PATCH 2/4] serial: bfin_uart: narrow the reboot condition in DMA tx interrupt Date: Wed, 16 May 2012 14:22:24 +0800 [thread overview] Message-ID: <1337149346-5277-2-git-send-email-sonic.adi@gmail.com> (raw) In-Reply-To: <1337149346-5277-1-git-send-email-sonic.adi@gmail.com> From: Sonic Zhang <sonic.zhang@analog.com> Check if xmit buffer pointers are set to zero. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> --- drivers/tty/serial/bfin_uart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index 9acab11..56b95b0 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c @@ -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) -- 1.7.0.4
next prev parent reply other threads:[~2012-05-16 6:33 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-16 6:22 [PATCH 1/4] serial:bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller Sonic Zhang 2012-05-16 6:22 ` Sonic Zhang 2012-05-16 6:22 ` Sonic Zhang [this message] 2012-05-16 6:22 ` [PATCH 2/4] serial: bfin_uart: narrow the reboot condition in DMA tx interrupt Sonic Zhang 2012-05-16 6:22 ` [PATCH 3/4] serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width Sonic Zhang 2012-05-16 6:22 ` Sonic Zhang 2012-05-16 6:22 ` [PATCH 4/4] serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller Sonic Zhang 2012-05-16 6:22 ` Sonic Zhang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1337149346-5277-2-git-send-email-sonic.adi@gmail.com \ --to=sonic.adi@gmail.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=sonic.zhang@analog.com \ --cc=uclinux-dist-devel@blackfin.uclinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.