mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
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>
This commit is contained in:
parent
d81e50f616
commit
e13cb72bee
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user