]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bnxt_en: Disable EOP for TPA on all chips to prevent data corruption
authorMichael Chan <michael.chan@broadcom.com>
Fri, 31 Jul 2026 19:09:36 +0000 (12:09 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Aug 2026 02:54:33 +0000 (19:54 -0700)
EOP (End of frame padding) on the AGG ring may cause overlapping of
zero padding at the end of one segment with the next segment's data.
If Relaxed Ordering (RO) is enabled, the zero padding may overwrite
valid data in the next segment and corrupt the data.  Older chips
(P5 and older) do not automatically disable RO when EOP is enabled.
On some ARM systems, data corruption was reported on 57508 (P5)
chips with RO enabled.

Always disable EOP on all chips on the AGG rings when TPA is enabled
to fix the data corruption.

Fixes: bfcd8d791ec1 ("bnxt_en: Add fast path logic for TPA on 57500 chips.")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260731190937.807270-5-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 6deb8f348d07b4e24e83bb28c5bc41eeae9c7d7c..25099077fe4f68a3efe0abaf2b3674ae7a64c115 100644 (file)
@@ -4611,11 +4611,14 @@ static void bnxt_init_one_rx_agg_ring_rxbd(struct bnxt *bp,
                type = ((u32)rxr->rx_page_size << RX_BD_LEN_SHIFT) |
                        RX_BD_TYPE_RX_AGG_BD;
 
-               /* On P7, setting EOP will cause the chip to disable
-                * Relaxed Ordering (RO) for TPA data.  Disable EOP for
-                * potentially higher performance with RO.
+               /* Disable EOP if TPA is enabled to prevent overlapping zero
+                * padding with the next segment's data.  On P7_PLUS, EOP will
+                * automatically disable Relaxed Ordering (RO) to prevent
+                * potential data corruption (and may degrade performance).  On
+                * older chips, RO will not be automatically disabled and may
+                * cause corruption.
                 */
-               if (BNXT_CHIP_P5_AND_MINUS(bp) || !(bp->flags & BNXT_FLAG_TPA))
+               if (!(bp->flags & BNXT_FLAG_TPA))
                        type |= RX_BD_FLAGS_AGG_EOP;
 
                bnxt_init_rxbd_pages(ring, type);