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

tty: serial: qcom_geni_serial: Don't slow all ports just for kgdb

If you turn on CONFIG_KGDB then you'll get CONFIG_CONSOLE_POLL
selected.

If you have CONFIG_CONSOLE_POLL selected then the GENI serial driver
was setting RX_BYTES_PW to 1 for _all_ UART ports.

This doesn't seem like such a good idea. Let's only set RX_BYTES_PW
to 1 for the console port.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Douglas Anderson and committed by
Greg Kroah-Hartman
9f641df4 3957386a

+7 -5
+7 -5
drivers/tty/serial/qcom_geni_serial.c
··· 89 89 #define MAX_LOOPBACK_CFG 3 90 90 91 91 #ifdef CONFIG_CONSOLE_POLL 92 - #define RX_BYTES_PW 1 92 + #define CONSOLE_RX_BYTES_PW 1 93 93 #else 94 - #define RX_BYTES_PW 4 94 + #define CONSOLE_RX_BYTES_PW 4 95 95 #endif 96 96 97 97 struct qcom_geni_serial_port { ··· 853 853 unsigned int rxstale = DEFAULT_BITS_PER_CHAR * STALE_TIMEOUT; 854 854 u32 proto; 855 855 856 - if (uart_console(uport)) 856 + if (uart_console(uport)) { 857 857 port->tx_bytes_pw = 1; 858 - else 858 + port->rx_bytes_pw = CONSOLE_RX_BYTES_PW; 859 + } else { 859 860 port->tx_bytes_pw = 4; 860 - port->rx_bytes_pw = RX_BYTES_PW; 861 + port->rx_bytes_pw = 4; 862 + } 861 863 862 864 proto = geni_se_read_proto(&port->se); 863 865 if (proto != GENI_SE_UART) {