Messages in this thread | | | Date | Wed, 2 Aug 2006 16:17:41 +0100 | From | Russell King <> | Subject | Re: [PATCH 2/3] at91_serial: Fix break handling |
| |
On Wed, Aug 02, 2006 at 04:51:47PM +0200, Haavard Skinnemoen wrote: > @@ -269,9 +271,14 @@ static void at91_rx_chars(struct uart_po > UART_PUT_CR(port, AT91_US_RSTSTA); /* clear error */ > if (status & AT91_US_RXBRK) { > status &= ~(AT91_US_PARE | AT91_US_FRAME); /* ignore side-effect */ > - port->icount.brk++; > - if (uart_handle_break(port)) > + if (at91_port->break_active) { > + at91_port->break_active = 0; > + } else { > + at91_port->break_active = 1; > + port->icount.brk++; > + uart_handle_break(port); > goto ignore_char; > + }
Two points here.
1. Effectively, this just ignores every second break status. We've no idea _which_ break interrupt is going to be ignored. 2. it breaks break handling. uart_handle_break returns a value for a reason. Use it - don't unconditionally ignore the received character.
-- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |