The TX FIFO overflow path was raising UART_INTR_ROVR (RX overflow)
instead of UART_INTR_TOVR (TX overflow).

Fixes: 86baecc3e435 ("char/cadence_uart: Use the TX fifo for transmission")
Reported-by: Pavee Hui <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
---
 hw/char/cadence_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c
index ae11caa11b82..c790372e98fb 100644
--- a/hw/char/cadence_uart.c
+++ b/hw/char/cadence_uart.c
@@ -351,7 +351,7 @@ static void uart_write_tx_fifo(CadenceUARTState *s, const 
uint8_t *buf,
          * us to here.
          */
         qemu_log_mask(LOG_GUEST_ERROR, "cadence_uart: TxFIFO overflow");
-        s->r[R_CISR] |= UART_INTR_ROVR;
+        s->r[R_CISR] |= UART_INTR_TOVR;
     }
 
     memcpy(s->tx_fifo + s->tx_count, buf, size);

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to