bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 2 Feb 2020 07:41:36 +0000 (02:41 -0500)
committerJakub Kicinski <kuba@kernel.org>
Mon, 3 Feb 2020 23:06:45 +0000 (15:06 -0800)
commit12de2eadf87825c3990c1aa68b5e93101ca2f043
tree0aeae1a4308ec36d4618f21c5028c7131c8ba524
parentc16d4ee0e397163fe7ceac281eaa952e63fadec7
bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset.

bnxt_ulp_start() needs to be called before SRIOV is re-enabled after
firmware reset.  Re-enabling SRIOV may consume all the resources and
may cause the RDMA driver to fail to get MSIX and other resources.
Fix it by calling bnxt_ulp_start() first before calling
bnxt_reenable_sriov().

We re-arrange the logic so that we call bnxt_ulp_start() and
bnxt_reenable_sriov() in proper sequence in bnxt_fw_reset_task() and
bnxt_open().  The former is the normal coordinated firmware reset sequence
and the latter is firmware reset while the function is down.  This new
logic is now more straight forward and will now fix both scenarios.

Fixes: f3a6d206c25a ("bnxt_en: Call bnxt_ulp_stop()/bnxt_ulp_start() during error recovery.")
Reported-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