Automatic merge of master.kernel.org:/home/rmk/linux-2.6-serial.git

+41 -110
+2 -12
drivers/serial/21285.c
··· 126 flag = TTY_FRAME; 127 } 128 129 - if ((rxs & port->ignore_status_mask) == 0) { 130 - tty_insert_flip_char(tty, ch, flag); 131 - } 132 - if ((rxs & RXSTAT_OVERRUN) && 133 - tty->flip.count < TTY_FLIPBUF_SIZE) { 134 - /* 135 - * Overrun is special, since it's reported 136 - * immediately, and doesn't affect the current 137 - * character. 138 - */ 139 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 140 - } 141 status = *CSR_UARTFLG; 142 } 143 tty_flip_buffer_push(tty);
··· 126 flag = TTY_FRAME; 127 } 128 129 + uart_insert_char(port, rxs, RXSTAT_OVERRUN, ch, flag); 130 + 131 status = *CSR_UARTFLG; 132 } 133 tty_flip_buffer_push(tty);
+3 -12
drivers/serial/8250.c
··· 1122 } 1123 if (uart_handle_sysrq_char(&up->port, ch, regs)) 1124 goto ignore_char; 1125 - if ((lsr & up->port.ignore_status_mask) == 0) { 1126 - tty_insert_flip_char(tty, ch, flag); 1127 - } 1128 - if ((lsr & UART_LSR_OE) && 1129 - tty->flip.count < TTY_FLIPBUF_SIZE) { 1130 - /* 1131 - * Overrun is special, since it's reported 1132 - * immediately, and doesn't affect the current 1133 - * character. 1134 - */ 1135 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 1136 - } 1137 ignore_char: 1138 lsr = serial_inp(up, UART_LSR); 1139 } while ((lsr & UART_LSR_DR) && (max_count-- > 0));
··· 1122 } 1123 if (uart_handle_sysrq_char(&up->port, ch, regs)) 1124 goto ignore_char; 1125 + 1126 + uart_insert_char(&up->port, lsr, UART_LSR_OE, ch, flag); 1127 + 1128 ignore_char: 1129 lsr = serial_inp(up, UART_LSR); 1130 } while ((lsr & UART_LSR_DR) && (max_count-- > 0));
+2 -12
drivers/serial/amba-pl010.c
··· 198 if (uart_handle_sysrq_char(port, ch, regs)) 199 goto ignore_char; 200 201 - if ((rsr & port->ignore_status_mask) == 0) { 202 - tty_insert_flip_char(tty, ch, flag); 203 - } 204 - if ((rsr & UART01x_RSR_OE) && 205 - tty->flip.count < TTY_FLIPBUF_SIZE) { 206 - /* 207 - * Overrun is special, since it's reported 208 - * immediately, and doesn't affect the current 209 - * character 210 - */ 211 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 212 - } 213 ignore_char: 214 status = UART_GET_FR(port); 215 }
··· 198 if (uart_handle_sysrq_char(port, ch, regs)) 199 goto ignore_char; 200 201 + uart_insert_char(port, rsr, UART01x_RSR_OE, ch, flag); 202 + 203 ignore_char: 204 status = UART_GET_FR(port); 205 }
+2 -12
drivers/serial/amba-pl011.c
··· 163 if (uart_handle_sysrq_char(&uap->port, ch, regs)) 164 goto ignore_char; 165 166 - if ((rsr & uap->port.ignore_status_mask) == 0) { 167 - tty_insert_flip_char(tty, ch, flag); 168 - } 169 - if ((rsr & UART01x_RSR_OE) && 170 - tty->flip.count < TTY_FLIPBUF_SIZE) { 171 - /* 172 - * Overrun is special, since it's reported 173 - * immediately, and doesn't affect the current 174 - * character 175 - */ 176 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 177 - } 178 ignore_char: 179 status = readw(uap->port.membase + UART01x_FR); 180 }
··· 163 if (uart_handle_sysrq_char(&uap->port, ch, regs)) 164 goto ignore_char; 165 166 + uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag); 167 + 168 ignore_char: 169 status = readw(uap->port.membase + UART01x_FR); 170 }
+1 -4
drivers/serial/clps711x.c
··· 143 * CHECK: does overrun affect the current character? 144 * ASSUMPTION: it does not. 145 */ 146 - if ((ch & port->ignore_status_mask & ~RXSTAT_OVERRUN) == 0) 147 - tty_insert_flip_char(tty, ch, flg); 148 - if ((ch & ~port->ignore_status_mask & RXSTAT_OVERRUN) == 0) 149 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 150 151 ignore_char: 152 status = clps_readl(SYSFLG(port));
··· 143 * CHECK: does overrun affect the current character? 144 * ASSUMPTION: it does not. 145 */ 146 + uart_insert_char(port, ch, UARTDR_OVERR, ch, flg); 147 148 ignore_char: 149 status = clps_readl(SYSFLG(port));
+4 -12
drivers/serial/pxa.c
··· 161 else if (*status & UART_LSR_FE) 162 flag = TTY_FRAME; 163 } 164 if (uart_handle_sysrq_char(&up->port, ch, regs)) 165 goto ignore_char; 166 - if ((*status & up->port.ignore_status_mask) == 0) { 167 - tty_insert_flip_char(tty, ch, flag); 168 - } 169 - if ((*status & UART_LSR_OE) && 170 - tty->flip.count < TTY_FLIPBUF_SIZE) { 171 - /* 172 - * Overrun is special, since it's reported 173 - * immediately, and doesn't affect the current 174 - * character. 175 - */ 176 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 177 - } 178 ignore_char: 179 *status = serial_in(up, UART_LSR); 180 } while ((*status & UART_LSR_DR) && (max_count-- > 0));
··· 161 else if (*status & UART_LSR_FE) 162 flag = TTY_FRAME; 163 } 164 + 165 if (uart_handle_sysrq_char(&up->port, ch, regs)) 166 goto ignore_char; 167 + 168 + uart_insert_char(&up->port, *status, UART_LSR_OE, ch, flag); 169 + 170 ignore_char: 171 *status = serial_in(up, UART_LSR); 172 } while ((*status & UART_LSR_DR) && (max_count-- > 0));
+1 -14
drivers/serial/s3c2410.c
··· 394 if (uart_handle_sysrq_char(port, ch, regs)) 395 goto ignore_char; 396 397 - if ((uerstat & port->ignore_status_mask) == 0) { 398 - tty_insert_flip_char(tty, ch, flag); 399 - } 400 - 401 - if ((uerstat & S3C2410_UERSTAT_OVERRUN) && 402 - tty->flip.count < TTY_FLIPBUF_SIZE) { 403 - /* 404 - * Overrun is special, since it's reported 405 - * immediately, and doesn't affect the current 406 - * character. 407 - */ 408 - 409 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 410 - } 411 412 ignore_char: 413 continue;
··· 394 if (uart_handle_sysrq_char(port, ch, regs)) 395 goto ignore_char; 396 397 + uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, ch, flag); 398 399 ignore_char: 400 continue;
+1 -4
drivers/serial/sa1100.c
··· 237 if (uart_handle_sysrq_char(&sport->port, ch, regs)) 238 goto ignore_char; 239 240 - if ((status & port->ignore_status_mask & ~UTSR1_TO_SM(UTSR1_ROR)) == 0) 241 - tty_insert_flip_char(tty, ch, flg); 242 - if (status & ~port->ignore_status_mask & UTSR1_TO_SM(UTSR1_ROR)) 243 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 244 245 ignore_char: 246 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
··· 237 if (uart_handle_sysrq_char(&sport->port, ch, regs)) 238 goto ignore_char; 239 240 + uart_insert_char(&sport->port, status, UTSR1_TO_SM(UTSR1_ROR), ch, flg); 241 242 ignore_char: 243 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
+1 -12
drivers/serial/serial_lh7a40x.c
··· 190 if (uart_handle_sysrq_char (port, (unsigned char) data, regs)) 191 continue; 192 193 - if ((data & port->ignore_status_mask) == 0) { 194 - tty_insert_flip_char(tty, data, flag); 195 - } 196 - if ((data & RxOverrunError) 197 - && tty->flip.count < TTY_FLIPBUF_SIZE) { 198 - /* 199 - * Overrun is special, since it's reported 200 - * immediately, and doesn't affect the current 201 - * character 202 - */ 203 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 204 - } 205 } 206 tty_flip_buffer_push (tty); 207 return;
··· 190 if (uart_handle_sysrq_char (port, (unsigned char) data, regs)) 191 continue; 192 193 + uart_insert_char(port, data, RxOverrunError, data, flag); 194 } 195 tty_flip_buffer_push (tty); 196 return;
+3 -12
drivers/serial/serial_txx9.c
··· 350 } 351 if (uart_handle_sysrq_char(&up->port, ch, regs)) 352 goto ignore_char; 353 - if ((disr & up->port.ignore_status_mask) == 0) { 354 - tty_insert_flip_char(tty, ch, flag); 355 - } 356 - if ((disr & TXX9_SIDISR_UOER) && 357 - tty->flip.count < TTY_FLIPBUF_SIZE) { 358 - /* 359 - * Overrun is special, since it's reported 360 - * immediately, and doesn't affect the current 361 - * character. 362 - */ 363 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 364 - } 365 ignore_char: 366 disr = sio_in(up, TXX9_SIDISR); 367 } while (!(disr & TXX9_SIDISR_UVALID) && (max_count-- > 0));
··· 350 } 351 if (uart_handle_sysrq_char(&up->port, ch, regs)) 352 goto ignore_char; 353 + 354 + uart_insert_char(&up->port, disr, TXX9_SIDISR_UOER, ch, flag); 355 + 356 ignore_char: 357 disr = sio_in(up, TXX9_SIDISR); 358 } while (!(disr & TXX9_SIDISR_UVALID) && (max_count-- > 0));
+2 -4
drivers/serial/vr41xx_siu.c
··· 412 413 if (uart_handle_sysrq_char(port, ch, regs)) 414 goto ignore_char; 415 - if ((lsr & port->ignore_status_mask) == 0) 416 - tty_insert_flip_char(tty, ch, flag); 417 - if ((lsr & UART_LSR_OE) && (tty->flip.count < TTY_FLIPBUF_SIZE)) 418 - tty_insert_flip_char(tty, 0, TTY_OVERRUN); 419 420 ignore_char: 421 lsr = siu_read(port, UART_LSR);
··· 412 413 if (uart_handle_sysrq_char(port, ch, regs)) 414 goto ignore_char; 415 + 416 + uart_insert_char(port, lsr, UART_LSR_OE, ch, flag); 417 418 ignore_char: 419 lsr = siu_read(port, UART_LSR);
+19
include/linux/serial_core.h
··· 479 } 480 } 481 482 /* 483 * UART_ENABLE_MS - determine if port should enable modem status irqs 484 */
··· 479 } 480 } 481 482 + #include <linux/tty_flip.h> 483 + 484 + static inline void 485 + uart_insert_char(struct uart_port *port, unsigned int status, 486 + unsigned int overrun, unsigned int ch, unsigned int flag) 487 + { 488 + struct tty_struct *tty = port->info->tty; 489 + 490 + if ((status & port->ignore_status_mask & ~overrun) == 0) 491 + tty_insert_flip_char(tty, ch, flag); 492 + 493 + /* 494 + * Overrun is special. Since it's reported immediately, 495 + * it doesn't affect the current character. 496 + */ 497 + if (status & ~port->ignore_status_mask & overrun) 498 + tty_insert_flip_char(tty, 0, TTY_OVERRUN); 499 + } 500 + 501 /* 502 * UART_ENABLE_MS - determine if port should enable modem status irqs 503 */