OSDN Git Service

bnxt_en: Restore MSIX after disabling SRIOV.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 17 Jan 2018 08:21:05 +0000 (03:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jan 2018 19:48:25 +0000 (14:48 -0500)
commit80fcaf46c09262a71f32bb577c976814c922f864
tree67e70abbb61b0d903f4cc121ce60c2d3b5549fdf
parent86e953db0114f396f916344395160aa267bf2627
bnxt_en: Restore MSIX after disabling SRIOV.

After SRIOV has been enabled and disabled, the MSIX vectors assigned to
the VFs have to be re-initialized.  Otherwise they cannot be re-used by
the PF.  For example, increasing the number of PF rings after disabling
SRIOV may fail if the PF uses MSIX vectors previously assigned to the VFs.

To fix this, we add logic in bnxt_restore_pf_fw_resources() to close the
NIC, clear and re-init MSIX, and re-open the NIC.

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
drivers/net/ethernet/broadcom/bnxt/bnxt.h