Skip to content

Commit 2ac3397

Browse files
jhovoldgregkh
authored andcommitted
serial: qcom-geni: do not kill the machine on fifo underrun
The Qualcomm GENI serial driver did not handle buffer flushing and used to print discarded characters when the circular buffer was cleared. Since commit 1788cf6 ("tty: serial: switch from circ_buf to kfifo") this instead resulted in a hard lockup due to qcom_geni_serial_send_chunk_fifo() spinning indefinitely in the interrupt handler. The underlying bugs have now been fixed, but make sure to output NUL characters instead of killing the machine if a similar driver bug is ever reintroduced. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 507786c commit 2ac3397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/qcom_geni_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ static void qcom_geni_serial_send_chunk_fifo(struct uart_port *uport,
878878
memset(buf, 0, sizeof(buf));
879879
tx_bytes = min(remaining, BYTES_PER_FIFO_WORD);
880880

881-
tx_bytes = uart_fifo_out(uport, buf, tx_bytes);
881+
uart_fifo_out(uport, buf, tx_bytes);
882882

883883
iowrite32_rep(uport->membase + SE_GENI_TX_FIFOn, buf, 1);
884884

0 commit comments

Comments
 (0)