@samitouri / QOSamiQemu / commits / 669683cf14

hw/ssi/xilinx_spips: Reset TX FIFO in reset

In xilinx_spips_reset() and xlnx_zynqmp_qspips_reset() a cut and paste error meant we reset the RX FIFO twice and the TX FIFO not at all. Correct this to reset both FIFOs. Cc: qemu-stable@nongnu.org Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260223095905.67709-1-cuiweixie@gmail.com [Rewrote commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Weixie Cui committed Feb 26, 2026 at 11:27 UTC 669683cf1414ce442d2faea160dbc69747aef007
1 file changed +2 -2
hw/ssi/xilinx_spips.c
+2 -2
@@ -369,7 +369,7 @@ static void xilinx_spips_reset(DeviceState *d)
369 memset(s->regs, 0, sizeof(s->regs));
370
371 fifo8_reset(&s->rx_fifo);
372 - fifo8_reset(&s->rx_fifo);
372 + fifo8_reset(&s->tx_fifo);
373 /* non zero resets */
374 s->regs[R_CONFIG] |= MODEFAIL_GEN_EN;
375 s->regs[R_SLAVE_IDLE_COUNT] = 0xFF;
@@ -397,7 +397,7 @@ static void xlnx_zynqmp_qspips_reset(DeviceState *d)
397 memset(s->regs, 0, sizeof(s->regs));
398
399 fifo8_reset(&s->rx_fifo_g);
400 - fifo8_reset(&s->rx_fifo_g);
400 + fifo8_reset(&s->tx_fifo_g);
401 fifo32_reset(&s->fifo_g);
402 s->regs[R_INTR_STATUS] = R_INTR_STATUS_RESET;
403 s->regs[R_GPIO] = 1;