Skip to content

Commit eba93de

Browse files
Michael Chankuba-moo
authored andcommitted
bnxt_en: Free port stats during firmware reset.
Firmware is unable to retain the port counters during any kind of fatal or non-fatal resets, so we must clear the port counters to avoid false detection of port counter overflow. Fixes: fea6b33 ("bnxt_en: Accumulate all counters.") Reviewed-by: Edwin Peer <edwin.peer@broadcom.com> Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 4260330 commit eba93de

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/ethernet/broadcom/bnxt

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4099,7 +4099,8 @@ static void bnxt_free_mem(struct bnxt *bp, bool irq_re_init)
40994099
bnxt_free_ntp_fltrs(bp, irq_re_init);
41004100
if (irq_re_init) {
41014101
bnxt_free_ring_stats(bp);
4102-
if (!(bp->fw_cap & BNXT_FW_CAP_PORT_STATS_NO_RESET))
4102+
if (!(bp->fw_cap & BNXT_FW_CAP_PORT_STATS_NO_RESET) ||
4103+
test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
41034104
bnxt_free_port_stats(bp);
41044105
bnxt_free_ring_grps(bp);
41054106
bnxt_free_vnics(bp);

0 commit comments

Comments
 (0)