bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 26 Oct 2020 04:18:21 +0000 (00:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Nov 2020 11:45:38 +0000 (12:45 +0100)
commitb334112f20b7f98252936cc89cebbeacbeb575db
tree20ee88f29439d2118bc9b23cd1fea512da64a283
parentf739fc7e10725363a5281e9d576647024e3d839e
bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally.

[ Upstream commit 825741b071722f1c8ad692cead562c4b5f5eaa93 ]

In the AER or firmware reset flow, if we are in fatal error state or
if pci_channel_offline() is true, we don't send any commands to the
firmware because the commands will likely not reach the firmware and
most commands don't matter much because the firmware is likely to be
reset imminently.

However, the HWRM_FUNC_RESET command is different and we should always
attempt to send it.  In the AER flow for example, the .slot_reset()
call will trigger this fw command and we need to try to send it to
effect the proper reset.

Fixes: b340dc680ed4 ("bnxt_en: Avoid sending firmware messages when AER error is detected.")
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c