diff options
Diffstat (limited to 'drivers/tty/serial/sunsab.c')
| -rw-r--r-- | drivers/tty/serial/sunsab.c | 21 | 
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 5d6136b2a04..2f57df9a71d 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port)  	struct circ_buf *xmit = &up->port.state->xmit;  	int i; +	if (uart_circ_empty(xmit)) +		return; +  	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);  	writeb(up->interrupt_mask1, &up->regs->w.imr1); @@ -719,7 +722,7 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla  	if (iflag & INPCK)  		up->port.read_status_mask |= (SAB82532_ISR0_PERR |  					      SAB82532_ISR0_FERR); -	if (iflag & (BRKINT | PARMRK)) +	if (iflag & (IGNBRK | BRKINT | PARMRK))  		up->port.read_status_mask |= (SAB82532_ISR1_BRK << 8);  	/* @@ -844,20 +847,16 @@ static void sunsab_console_write(struct console *con, const char *s, unsigned n)  	unsigned long flags;  	int locked = 1; -	local_irq_save(flags); -	if (up->port.sysrq) { -		locked = 0; -	} else if (oops_in_progress) { -		locked = spin_trylock(&up->port.lock); -	} else -		spin_lock(&up->port.lock); +	if (up->port.sysrq || oops_in_progress) +		locked = spin_trylock_irqsave(&up->port.lock, flags); +	else +		spin_lock_irqsave(&up->port.lock, flags);  	uart_console_write(&up->port, s, n, sunsab_console_putchar);  	sunsab_tec_wait(up);  	if (locked) -		spin_unlock(&up->port.lock); -	local_irq_restore(flags); +		spin_unlock_irqrestore(&up->port.lock, flags);  }  static int sunsab_console_setup(struct console *con, char *options) @@ -894,7 +893,7 @@ static int sunsab_console_setup(struct console *con, char *options)  	case B115200: baud = 115200; break;  	case B230400: baud = 230400; break;  	case B460800: baud = 460800; break; -	}; +	}  	/*  	 * Temporary fix.  | 
