diff options
Diffstat (limited to 'drivers/tty/serial/st-asc.c')
| -rw-r--r-- | drivers/tty/serial/st-asc.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 21e6e84c0df..f48b1cc07ee 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -194,9 +194,9 @@ static inline u32 asc_txfifo_is_empty(struct uart_port *port)  	return asc_in(port, ASC_STA) & ASC_STA_TE;  } -static inline int asc_txfifo_is_full(struct uart_port *port) +static inline u32 asc_txfifo_is_half_empty(struct uart_port *port)  { -	return asc_in(port, ASC_STA) & ASC_STA_TF; +	return asc_in(port, ASC_STA) & ASC_STA_THE;  }  static inline const char *asc_port_name(struct uart_port *port) @@ -295,7 +295,7 @@ static void asc_receive_chars(struct uart_port *port)  			status & ASC_STA_OE) {  			if (c & ASC_RXBUF_FE) { -				if (c == ASC_RXBUF_FE) { +				if (c == (ASC_RXBUF_FE | ASC_RXBUF_DUMMY_RX)) {  					port->icount.brk++;  					if (uart_handle_break(port))  						continue; @@ -325,7 +325,7 @@ static void asc_receive_chars(struct uart_port *port)  				flag = TTY_FRAME;  		} -		if (uart_handle_sysrq_char(port, c)) +		if (uart_handle_sysrq_char(port, c & 0xff))  			continue;  		uart_insert_char(port, c, ASC_RXBUF_DUMMY_OE, c & 0xff, flag); @@ -547,7 +547,7 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,  	ascport->port.read_status_mask = ASC_RXBUF_DUMMY_OE;  	if (termios->c_iflag & INPCK)  		ascport->port.read_status_mask |= ASC_RXBUF_FE | ASC_RXBUF_PE; -	if (termios->c_iflag & (BRKINT | PARMRK)) +	if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))  		ascport->port.read_status_mask |= ASC_RXBUF_DUMMY_BE;  	/* @@ -628,7 +628,7 @@ static int asc_get_poll_char(struct uart_port *port)  static void asc_put_poll_char(struct uart_port *port, unsigned char c)  { -	while (asc_txfifo_is_full(port)) +	while (!asc_txfifo_is_half_empty(port))  		cpu_relax();  	asc_out(port, ASC_TXBUF, c);  } @@ -783,7 +783,7 @@ static void asc_console_putchar(struct uart_port *port, int ch)  	unsigned int timeout = 1000000;  	/* Wait for upto 1 second in case flow control is stopping us. */ -	while (--timeout && asc_txfifo_is_full(port)) +	while (--timeout && !asc_txfifo_is_half_empty(port))  		udelay(1);  	asc_out(port, ASC_TXBUF, ch);  | 
