bnxt_en: Increment rx_resets counter in bnxt_disable_napi()
authorMichael Chan <michael.chan@broadcom.com>
Thu, 17 Aug 2023 23:19:08 +0000 (16:19 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Aug 2023 02:13:58 +0000 (19:13 -0700)
commitd38c19b13b1087890973ac24ae2798797b8a411b
treee3c89846de86a76aa81661980ad2ddfbd2daee01
parent578fcfd26e2a1d0e687b347057959228567e2af8
bnxt_en: Increment rx_resets counter in bnxt_disable_napi()

If we are doing a complete reset with irq_re_init set to true in
bnxt_close_nic(), all the ring structures will be freed.  New
structures will be allocated in bnxt_open_nic().  The current code
increments rx_resets counter in bnxt_enable_napi() if bnapi->in_reset
is true.  In a complete reset, bnapi->in_reset will never be true
since the structure is just allocated.

Increment the rx_resets counter in bnxt_disable_napi() instead.  This
will allow us to save all the ring error counters including the
rx_resets counters in the next patch.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20230817231911.165035-4-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c