diff options
Diffstat (limited to 'drivers/tty/serial/bcm63xx_uart.c')
-rw-r--r-- | drivers/tty/serial/bcm63xx_uart.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index a1a0e55d0807..c0b68b9cad91 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c | |||
@@ -250,6 +250,20 @@ static void bcm_uart_do_rx(struct uart_port *port) | |||
250 | /* get overrun/fifo empty information from ier | 250 | /* get overrun/fifo empty information from ier |
251 | * register */ | 251 | * register */ |
252 | iestat = bcm_uart_readl(port, UART_IR_REG); | 252 | iestat = bcm_uart_readl(port, UART_IR_REG); |
253 | |||
254 | if (unlikely(iestat & UART_IR_STAT(UART_IR_RXOVER))) { | ||
255 | unsigned int val; | ||
256 | |||
257 | /* fifo reset is required to clear | ||
258 | * interrupt */ | ||
259 | val = bcm_uart_readl(port, UART_CTL_REG); | ||
260 | val |= UART_CTL_RSTRXFIFO_MASK; | ||
261 | bcm_uart_writel(port, val, UART_CTL_REG); | ||
262 | |||
263 | port->icount.overrun++; | ||
264 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
265 | } | ||
266 | |||
253 | if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY))) | 267 | if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY))) |
254 | break; | 268 | break; |
255 | 269 | ||
@@ -284,10 +298,6 @@ static void bcm_uart_do_rx(struct uart_port *port) | |||
284 | if (uart_handle_sysrq_char(port, c)) | 298 | if (uart_handle_sysrq_char(port, c)) |
285 | continue; | 299 | continue; |
286 | 300 | ||
287 | if (unlikely(iestat & UART_IR_STAT(UART_IR_RXOVER))) { | ||
288 | port->icount.overrun++; | ||
289 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
290 | } | ||
291 | 301 | ||
292 | if ((cstat & port->ignore_status_mask) == 0) | 302 | if ((cstat & port->ignore_status_mask) == 0) |
293 | tty_insert_flip_char(tty, c, flag); | 303 | tty_insert_flip_char(tty, c, flag); |