]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/net: fsl_etsec: Tx padding length should exclude CRC
authorBin Meng <bmeng.cn@gmail.com>
Tue, 16 Mar 2021 08:15:05 +0000 (16:15 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 31 Mar 2021 00:10:50 +0000 (11:10 +1100)
As the comment of tx_padding_and_crc() says: "Never add CRC in QEMU",
min_frame_len should excluce CRC, so it should be 60 instead of 64.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210316081505.72898-1-bmeng.cn@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/net/fsl_etsec/rings.c

index d6be0d7d18dfb612521a768d7895c8399d3fe25c..8f084464155d8781e6ed9d2d07fdc4eacc1a2171 100644 (file)
@@ -259,7 +259,7 @@ static void process_tx_bd(eTSEC         *etsec,
                 || etsec->regs[MACCFG2].value & MACCFG2_PADCRC) {
 
                 /* Padding and CRC (Padding implies CRC) */
-                tx_padding_and_crc(etsec, 64);
+                tx_padding_and_crc(etsec, 60);
 
             } else if (etsec->first_bd.flags & BD_TX_TC
                        || etsec->regs[MACCFG2].value & MACCFG2_CRC_EN) {