Skip to content

Commit

Permalink
hw/net: fsl_etsec: Tx padding length should exclude CRC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lbmeng authored and dgibson committed Mar 31, 2021
1 parent a40888b commit 611ac0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/net/fsl_etsec/rings.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 611ac0a

Please sign in to comment.