summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/qcom_geni_serial.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-31 07:19:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-31 07:19:25 +0200
commit8f49a2fe8e6bccbd47555048def9cd08da220c74 (patch)
treee6ba7f2cc36b03503b6070668ee6720002111ca2 /drivers/tty/serial/qcom_geni_serial.c
parent04b6ff5f25dece9b0ee244aa768b251cfe855c85 (diff)
parentf75aef392f869018f78cfedf3c320a6b3fcfda6b (diff)
downloadlinux-stable-8f49a2fe8e6bccbd47555048def9cd08da220c74.tar.gz
linux-stable-8f49a2fe8e6bccbd47555048def9cd08da220c74.tar.bz2
linux-stable-8f49a2fe8e6bccbd47555048def9cd08da220c74.zip
Merge 5.9-rc3 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/qcom_geni_serial.c')
-rw-r--r--drivers/tty/serial/qcom_geni_serial.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 33f1af6c61d1..f0b1b47c3abc 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -361,11 +361,16 @@ static int qcom_geni_serial_get_char(struct uart_port *uport)
return NO_POLL_CHAR;
if (word_cnt == 1 && (status & RX_LAST))
+ /*
+ * NOTE: If RX_LAST_BYTE_VALID is 0 it needs to be
+ * treated as if it was BYTES_PER_FIFO_WORD.
+ */
private_data->poll_cached_bytes_cnt =
(status & RX_LAST_BYTE_VALID_MSK) >>
RX_LAST_BYTE_VALID_SHFT;
- else
- private_data->poll_cached_bytes_cnt = 4;
+
+ if (private_data->poll_cached_bytes_cnt == 0)
+ private_data->poll_cached_bytes_cnt = BYTES_PER_FIFO_WORD;
private_data->poll_cached_bytes =
readl(uport->membase + SE_GENI_RX_FIFOn);
@@ -1098,7 +1103,7 @@ static unsigned int qcom_geni_serial_tx_empty(struct uart_port *uport)
}
#ifdef CONFIG_SERIAL_QCOM_GENI_CONSOLE
-static int __init qcom_geni_console_setup(struct console *co, char *options)
+static int qcom_geni_console_setup(struct console *co, char *options)
{
struct uart_port *uport;
struct qcom_geni_serial_port *port;