]> git.wh0rd.org - patches.git/blob - bfin-new-serial-break.patch
initial import
[patches.git] / bfin-new-serial-break.patch
1 Index: bfin_5xx.c
2 ===================================================================
3 RCS file: /usr/local/src/blackfin/rsync/uclinux533/uClinux-dist/linux-2.6.x/drivers/serial/bfin_5xx.c,v
4 retrieving revision 1.20
5 diff -u -p -r1.20 bfin_5xx.c
6 --- bfin_5xx.c 14 Oct 2006 04:28:21 -0000 1.20
7 +++ bfin_5xx.c 14 Oct 2006 22:03:11 -0000
8 @@ -163,11 +163,29 @@ static void
9 bfin_serial_rx_chars(struct bfin_serial_port *uart, struct pt_regs *regs)
10 {
11 struct tty_struct *tty = uart->port.info->tty;
12 - unsigned int status=0, ch, flg;
13 + unsigned int status, ch, flg;
14 +
15 + status = UART_GET_LSR(uart);
16 + ch = UART_GET_CHAR(uart);
17 + uart->port.icount.rx++;
18 +
19 + if (status & BI) {
20 + if (uart_handle_break(&uart->port))
21 + goto ignore_char;
22 + flg = TTY_BREAK;
23 + uart->port.icount.brk++;
24 + } else if (status & PE) {
25 + flg = TTY_PARITY;
26 + uart->port.icount.parity++;
27 + } else if (status & OE) {
28 + flg = TTY_OVERRUN;
29 + uart->port.icount.overrun++;
30 + } else if (status & FE) {
31 + flg = TTY_FRAME;
32 + uart->port.icount.frame++;
33 + } else
34 + flg = TTY_NORMAL;
35
36 - ch = UART_GET_CHAR(uart);
37 - uart->port.icount.rx++;
38 - flg = TTY_NORMAL;
39 if (uart_handle_sysrq_char(&uart->port, ch, regs))
40 goto ignore_char;
41 uart_insert_char(&uart->port, status, 1, ch, flg);