bnxt_en: Restore the resets_reliable flag in bnxt_open()
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Sun, 20 Feb 2022 09:05:51 +0000 (04:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Feb 2022 13:47:15 +0000 (13:47 +0000)
commit0e0e3c5358470cbad10bd7ca29f84a44d179d286
tree2f3e1f2eb428c9ff8bb6e07c82614a4b3a1d6ed3
parent8cdb15924252e27af16c4a8fe0fc606ce5fd04dc
bnxt_en: Restore the resets_reliable flag in bnxt_open()

During ifdown, we call bnxt_inv_fw_health_reg() which will clear
both the status_reliable and resets_reliable flags if these
registers are mapped.  This is correct because a FW reset during
ifdown will clear these register mappings.  If we detect that FW
has gone through reset during the next ifup, we will remap these
registers.

But during normal ifup with no FW reset, we need to restore the
resets_reliable flag otherwise we will not show the reset counter
during devlink diagnose.

Fixes: 8cc95ceb7087 ("bnxt_en: improve fw diagnose devlink health messages")
Reviewed-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c