Commit 75a9f4c5 authored by Biju Das's avatar Biju Das Committed by Greg Kroah-Hartman
Browse files

serial: sh-sci: Fix deadlock during RSCI FIFO overrun error



On RSCI IP, a deadlock occurs during a FIFO overrun error, as it uses a
different register to clear the FIFO overrun error status.

Cc: stable@kernel.org
Fixes: 0666e3fe ("serial: sh-sci: Add support for RZ/T2H SCI")
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251114101350.106699-3-biju.das.jz@bp.renesas.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6cdfd69
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1198,8 +1198,16 @@ static int sci_handle_fifo_overrun(struct uart_port *port)

	status = s->ops->read_reg(port, s->params->overrun_reg);
	if (status & s->params->overrun_mask) {
		if (s->type == SCI_PORT_RSCI) {
			/*
			 * All of the CFCLR_*C clearing bits match the corresponding
			 * CSR_*status bits. So, reuse the overrun mask for clearing.
			 */
			s->ops->clear_SCxSR(port, s->params->overrun_mask);
		} else {
			status &= ~s->params->overrun_mask;
			s->ops->write_reg(port, s->params->overrun_reg, status);
		}

		port->icount.overrun++;