diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-02-24 20:25:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 16:14:27 +0100 |
commit | e13cb72beeada6f6ac12058b9129334e3bb5ce85 (patch) | |
tree | b3332425f6e55dc4427f2e7f920f3391175cfa1e /drivers/tty | |
parent | serial: 8250: Move ns16550a_goto_hispeed() to local header (diff) | |
download | linux-e13cb72beeada6f6ac12058b9129334e3bb5ce85.tar.xz linux-e13cb72beeada6f6ac12058b9129334e3bb5ce85.zip |
serial: 8250: Decouple core from skip_txen_test module param
Prepare for 8250 split; initialize the port flags based on the
"skip_txen_test" module param to use the existing flag test.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 0cf9b85901dc..bd06ab790c64 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -2253,7 +2253,7 @@ int serial8250_do_startup(struct uart_port *port) is variable. So, let's just don't test if we receive TX irq. This way, we'll never enable UART_BUG_TXEN. */ - if (skip_txen_test || up->port.flags & UPF_NO_TXEN_TEST) + if (up->port.flags & UPF_NO_TXEN_TEST) goto dont_test_tx_en; /* @@ -3196,6 +3196,9 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) up->port.dev = dev; + if (skip_txen_test) + up->port.flags |= UPF_NO_TXEN_TEST; + if (up->port.flags & UPF_FIXED_TYPE) serial8250_init_fixed_type_port(up, up->port.type); @@ -3663,6 +3666,9 @@ int serial8250_register_8250_port(struct uart_8250_port *up) if (up->port.dev) uart->port.dev = up->port.dev; + if (skip_txen_test) + uart->port.flags |= UPF_NO_TXEN_TEST; + if (up->port.flags & UPF_FIXED_TYPE) serial8250_init_fixed_type_port(uart, up->port.type); @@ -3728,6 +3734,8 @@ void serial8250_unregister_port(int line) uart_remove_one_port(&serial8250_reg, &uart->port); if (serial8250_isa_devs) { uart->port.flags &= ~UPF_BOOT_AUTOCONF; + if (skip_txen_test) + uart->port.flags |= UPF_NO_TXEN_TEST; uart->port.type = PORT_UNKNOWN; uart->port.dev = &serial8250_isa_devs->dev; uart->capabilities = 0; |