From 4315abf583088ca48e2ce412bee6717934b48671 Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Wed, 24 Aug 2011 17:41:47 +0800 Subject: [PATCH] --- yaml --- r: 267309 b: refs/heads/master c: 019dc9ea8d528eb3640bbba604e1e5a2f6994b1f h: refs/heads/master i: 267307: b618df9ad45ed033b45780dc0a096a7964d893a7 v: v3 --- [refs] | 2 +- trunk/drivers/tty/serial/imx.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 7f6a806ba8d8..eab75fb22d0e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a234349de01de3437784c0ef03d95353f055fae +refs/heads/master: 019dc9ea8d528eb3640bbba604e1e5a2f6994b1f diff --git a/trunk/drivers/tty/serial/imx.c b/trunk/drivers/tty/serial/imx.c index 7e91b3d368cd..54ffdc6243f9 100644 --- a/trunk/drivers/tty/serial/imx.c +++ b/trunk/drivers/tty/serial/imx.c @@ -508,8 +508,10 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) continue; - if (rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR) ) { - if (rx & URXD_PRERR) + if (unlikely(rx & URXD_ERR)) { + if (rx & URXD_BRK) + sport->port.icount.brk++; + else if (rx & URXD_PRERR) sport->port.icount.parity++; else if (rx & URXD_FRMERR) sport->port.icount.frame++; @@ -524,7 +526,9 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) rx &= sport->port.read_status_mask; - if (rx & URXD_PRERR) + if (rx & URXD_BRK) + flg = TTY_BREAK; + else if (rx & URXD_PRERR) flg = TTY_PARITY; else if (rx & URXD_FRMERR) flg = TTY_FRAME;