Re: [PATCH 2/3] at91_serial: Fix break handling

From: Russell King
Date: Wed Aug 02 2006 - 12:18:59 EST

On Wed, Aug 02, 2006 at 06:14:03PM +0200, Haavard Skinnemoen wrote:
> On Wed, 2 Aug 2006 16:17:41 +0100
> Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
> > 2. it breaks break handling. uart_handle_break returns a value for a
> > reason. Use it - don't unconditionally ignore the received
> > character.
> Ok, I'll fix it.
> Out of curiosity, why does it return a value? ;)

Because you may or may not need to ignore the received character!

When a break condition occurs which is not ignored by the termios
settings, you need to insert a TTY_BREAK indicator into the tty
received queue, so that the tty layers and userspace can do the
right thing. There is the requirement for errors to be passed to
userspace if userspace has requested that behaviour.

However, if this is the serial console with sysrq support, then break
is masked by that and needs to be ignored.

Russell King
Linux kernel 2.6 ARM Linux -
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@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at