]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit21b957c68911ce46dc6528b2b9a154d80bcb1da4
tree2f3e1f2eb428c9ff8bb6e07c82614a4b3a1d6ed3
parenta2b20de56c33b1395ab35d1c41186240144e2e80
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: 44ebeb20e86c ("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