Commit 5fca367b89 for qemu.org

commit 5fca367b89de2d11631cb27a90a8c5431d004f58
Author: Cédric Le Goater <clg@redhat.com>
Date:   Mon Mar 23 13:55:45 2026 +0100

    hw/i2c/aspeed_i2c: Remove assert

    According to the Aspeed datasheet, the RX_BUF_LEN_W1T and
    TX_BUF_LEN_W1T bits of the A_I2CS_DMA_LEN (0x2c) register allow
    firmware to program the TX and RX DMA length (TX_BUF_LEN and
    RX_BUF_LEN fields of the same register) separately without the need to
    read/modify/write the value.  If RX_BUF_LEN_W1T and TX_BUF_LEN_W1T
    bits are 0, then both TX and RX DMA length will be written.

    When setting the RX_BUF_LEN field, the TX_BUF_LEN field being set is
    not an invalid condition. Remove the assert.

    Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3315
    Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
    Link: https://lore.kernel.org/qemu-devel/20260323125545.577653-4-clg@redhat.com
    Signed-off-by: Cédric Le Goater <clg@redhat.com>

diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index ad6342bec0..5d18f8d49e 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -780,7 +780,6 @@ static void aspeed_i2c_bus_new_write(AspeedI2CBus *bus, hwaddr offset,
         bus->regs[R_I2CS_DMA_RX_ADDR] = value;
         break;
     case A_I2CS_DMA_LEN:
-        assert(FIELD_EX32(value, I2CS_DMA_LEN, TX_BUF_LEN) == 0);
         if (FIELD_EX32(value, I2CS_DMA_LEN, RX_BUF_LEN_W1T)) {
             ARRAY_FIELD_DP32(bus->regs, I2CS_DMA_LEN, RX_BUF_LEN,
                              FIELD_EX32(value, I2CS_DMA_LEN, RX_BUF_LEN));