bnxt_en: Avoid sending firmware messages when AER error is detected.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Sun, 6 Sep 2020 02:55:36 +0000 (22:55 -0400)
committerJakub Kicinski <kuba@kernel.org>
Mon, 7 Sep 2020 17:08:18 +0000 (10:08 -0700)
commitb340dc680ed48dcc05b56e1ebe1b9535813c3ee0
treec39fafb409e05581369812e87228bbd083a67c80
parent4ddcaf1ebb5e4e99240f29d531ee69d4244fe416
bnxt_en: Avoid sending firmware messages when AER error is detected.

When the driver goes through PCIe AER reset in error state, all
firmware messages will timeout because the PCIe bus is no longer
accessible.  This can lead to AER reset taking many minutes to
complete as each firmware command takes time to timeout.

Define a new macro BNXT_NO_FW_ACCESS() to skip these firmware messages
when either firmware is in fatal error state or when
pci_channel_offline() is true.  It now takes a more reasonable 20 to
30 seconds to complete AER recovery.

Fixes: b4fff2079d10 ("bnxt_en: Do not send firmware messages if firmware is in error state.")
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h