bnxt_en: don't fake firmware response success when PCI is disabled
authorEdwin Peer <edwin.peer@broadcom.com>
Mon, 22 Mar 2021 07:08:41 +0000 (03:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:07:28 +0000 (13:07 -0700)
commita2f3835cc68a2222d0ab97862187ed98e65fe682
treea43a84c4ded2a53c85d4e1ff6f07eb86f5f5b7b6
parent80a9641f09f890a27a57e8ad30472553e0f769a6
bnxt_en: don't fake firmware response success when PCI is disabled

The original intent here is to allow commands during reset to succeed
without error when the device is disabled, to ensure that cleanup
completes normally during NIC close, where firmware is not necessarily
expected to respond.

The problem with faking success during reset's PCI disablement is that
unrelated ULP commands will also see inadvertent success during reset
when failure would otherwise be appropriate. It is better to return
a different error result such that reset related code can detect
this unique condition and ignore as appropriate.

Note, the pci_disable_device() when firmware is fatally wounded in
bnxt_fw_reset_close() does not need to be addressed, as subsequent
commands are already expected to fail due to the BNXT_NO_FW_ACCESS()
check in bnxt_hwrm_do_send_msg().

Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Edwin Peer <edwin.peer@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