Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Peter Hurley and committed by
Greg Kroah-Hartman
e13cb72b d81e50f6

+9 -1
+9 -1
drivers/tty/serial/8250/8250_core.c
··· 2253 2253 is variable. So, let's just don't test if we receive 2254 2254 TX irq. This way, we'll never enable UART_BUG_TXEN. 2255 2255 */ 2256 - if (skip_txen_test || up->port.flags & UPF_NO_TXEN_TEST) 2256 + if (up->port.flags & UPF_NO_TXEN_TEST) 2257 2257 goto dont_test_tx_en; 2258 2258 2259 2259 /* ··· 3196 3196 3197 3197 up->port.dev = dev; 3198 3198 3199 + if (skip_txen_test) 3200 + up->port.flags |= UPF_NO_TXEN_TEST; 3201 + 3199 3202 if (up->port.flags & UPF_FIXED_TYPE) 3200 3203 serial8250_init_fixed_type_port(up, up->port.type); 3201 3204 ··· 3666 3663 if (up->port.dev) 3667 3664 uart->port.dev = up->port.dev; 3668 3665 3666 + if (skip_txen_test) 3667 + uart->port.flags |= UPF_NO_TXEN_TEST; 3668 + 3669 3669 if (up->port.flags & UPF_FIXED_TYPE) 3670 3670 serial8250_init_fixed_type_port(uart, up->port.type); 3671 3671 ··· 3734 3728 uart_remove_one_port(&serial8250_reg, &uart->port); 3735 3729 if (serial8250_isa_devs) { 3736 3730 uart->port.flags &= ~UPF_BOOT_AUTOCONF; 3731 + if (skip_txen_test) 3732 + uart->port.flags |= UPF_NO_TXEN_TEST; 3737 3733 uart->port.type = PORT_UNKNOWN; 3738 3734 uart->port.dev = &serial8250_isa_devs->dev; 3739 3735 uart->capabilities = 0;