| .. | .. |
|---|
| 275 | 275 | * Must disable interrupts or else we risk racing with the interrupt |
|---|
| 276 | 276 | * based handler. |
|---|
| 277 | 277 | */ |
|---|
| 278 | | - if (up->port.irq) |
|---|
| 279 | | - ier = serial8250_clear_IER(up); |
|---|
| 278 | + if (up->port.irq) { |
|---|
| 279 | + ier = serial_in(up, UART_IER); |
|---|
| 280 | + serial_out(up, UART_IER, 0); |
|---|
| 281 | + } |
|---|
| 280 | 282 | |
|---|
| 281 | 283 | iir = serial_in(up, UART_IIR); |
|---|
| 282 | 284 | |
|---|
| .. | .. |
|---|
| 299 | 301 | serial8250_tx_chars(up); |
|---|
| 300 | 302 | |
|---|
| 301 | 303 | if (up->port.irq) |
|---|
| 302 | | - serial8250_set_IER(up, ier); |
|---|
| 304 | + serial_out(up, UART_IER, ier); |
|---|
| 303 | 305 | |
|---|
| 304 | 306 | spin_unlock_irqrestore(&up->port.lock, flags); |
|---|
| 305 | 307 | |
|---|
| .. | .. |
|---|
| 582 | 584 | |
|---|
| 583 | 585 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
|---|
| 584 | 586 | |
|---|
| 585 | | -static void univ8250_console_write_atomic(struct console *co, const char *s, |
|---|
| 586 | | - unsigned int count) |
|---|
| 587 | | -{ |
|---|
| 588 | | - struct uart_8250_port *up = &serial8250_ports[co->index]; |
|---|
| 589 | | - |
|---|
| 590 | | - serial8250_console_write_atomic(up, s, count); |
|---|
| 591 | | -} |
|---|
| 592 | | - |
|---|
| 593 | 587 | static void univ8250_console_write(struct console *co, const char *s, |
|---|
| 594 | 588 | unsigned int count) |
|---|
| 595 | 589 | { |
|---|
| .. | .. |
|---|
| 683 | 677 | |
|---|
| 684 | 678 | static struct console univ8250_console = { |
|---|
| 685 | 679 | .name = "ttyS", |
|---|
| 686 | | - .write_atomic = univ8250_console_write_atomic, |
|---|
| 687 | 680 | .write = univ8250_console_write, |
|---|
| 688 | 681 | .device = uart_console_device, |
|---|
| 689 | 682 | .setup = univ8250_console_setup, |
|---|
| .. | .. |
|---|
| 1170 | 1163 | uart->port.type = PORT_UNKNOWN; |
|---|
| 1171 | 1164 | uart->port.dev = &serial8250_isa_devs->dev; |
|---|
| 1172 | 1165 | uart->capabilities = 0; |
|---|
| 1166 | + serial8250_init_port(uart); |
|---|
| 1173 | 1167 | serial8250_apply_quirks(uart); |
|---|
| 1174 | 1168 | uart_add_one_port(&serial8250_reg, &uart->port); |
|---|
| 1175 | 1169 | } else { |
|---|