if ((lsr & up->port.ignore_status_mask) == 0) { tty_insert_flip_char(tty, ch, flag); } if ((lsr & UART_LSR_OE) && tty->flip.count < TTY_FLIPBUF_SIZE) { /* * Overrun is special, since it's reported * immediately, and doesn't affect the current * character. */ tty_insert_flip_char(tty, 0, TTY_OVERRUN); } 
 uart_insert_char(&up->port, lsr, UART_LSR_OE, ch, flag);  
receive_chars(struct uart_8250_port *up, int *status, struct pt_regs *regs){	struct tty_struct *tty = up->port.info->tty;	unsigned char ch, lsr = *status;	int max_count = 256;	char flag;	do {		/* The following is not allowed by the tty layer and		   unsafe. It should be fixed ASAP */		if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) {			if (tty->low_latency) {				spin_unlock(&up->port.lock);				tty_flip_buffer_push(tty);				spin_lock(&up->port.lock);			}			/*			 * If this failed then we will throw away the			 * bytes but must do so to clear interrupts			 */		}		ch = serial_inp(up, UART_RX);		flag = TTY_NORMAL;		up->port.icount.rx++;#ifdef CONFIG_SERIAL_8250_CONSOLE		/*		 * Recover the break flag from console xmit		 */		if (up->port.line == up->port.cons->index) {			lsr |= up->lsr_break_flag;			up->lsr_break_flag = 0;		}#endif		if (unlikely(lsr & (UART_LSR_BI | UART_LSR_PE |				    UART_LSR_FE | UART_LSR_OE))) {			/*			 * For statistics only			 */			if (lsr & UART_LSR_BI) {				lsr &= ~(UART_LSR_FE | UART_LSR_PE);				up->port.icount.brk++;				/*				 * We do the SysRQ and SAK checking				 * here because otherwise the break				 * may get masked by ignore_status_mask				 * or read_status_mask.				 */				if (uart_handle_break(&up->port))					goto ignore_char;			} else if (lsr & UART_LSR_PE)				up->port.icount.parity++;			else if (lsr & UART_LSR_FE)				up->port.icount.frame++;			if (lsr & UART_LSR_OE)				up->port.icount.overrun++;			/*			 * Mask off conditions which should be ignored.			 */			lsr &= up->port.read_status_mask;			if (lsr & UART_LSR_BI) {				DEBUG_INTR("handling break....");				flag = TTY_BREAK;			} else if (lsr & UART_LSR_PE)				flag = TTY_PARITY;			else if (lsr & UART_LSR_FE)				flag = TTY_FRAME;		}		if (uart_handle_sysrq_char(&up->port, ch, regs))			goto ignore_char;		if ((lsr & up->port.ignore_status_mask) == 0) {			tty_insert_flip_char(tty, ch, flag);		}		if ((lsr & UART_LSR_OE) &&		    tty->flip.count < TTY_FLIPBUF_SIZE) {			/*			 * Overrun is special, since it's reported			 * immediately, and doesn't affect the current			 * character.			 */			tty_insert_flip_char(tty, 0, TTY_OVERRUN);		}	ignore_char:		lsr = serial_inp(up, UART_LSR);	} while ((lsr & UART_LSR_DR) && (max_count-- > 0));	spin_unlock(&up->port.lock);	tty_flip_buffer_push(tty);	spin_lock(&up->port.lock);	*status = lsr;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05ab3014636ff60a319d37cdf37dca594b015eec/8250.c/buggy/drivers/serial/8250.c