Commit 2f593846 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Add the ulp_sriov_cfg hooks for bnxt_re RDMA driver.

Add the ulp_sriov_cfg callbacks when the number of VFs is changing.  This
allows the RDMA driver to provision RDMA resources for the VFs.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ad2cbee
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include "bnxt_hsi.h" #include "bnxt_hsi.h"
#include "bnxt.h" #include "bnxt.h"
#include "bnxt_ulp.h"
#include "bnxt_sriov.h" #include "bnxt_sriov.h"
#include "bnxt_ethtool.h" #include "bnxt_ethtool.h"
...@@ -555,6 +556,8 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs) ...@@ -555,6 +556,8 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
if (rc) if (rc)
goto err_out2; goto err_out2;
bnxt_ulp_sriov_cfg(bp, *num_vfs);
rc = pci_enable_sriov(bp->pdev, *num_vfs); rc = pci_enable_sriov(bp->pdev, *num_vfs);
if (rc) if (rc)
goto err_out2; goto err_out2;
...@@ -596,6 +599,8 @@ void bnxt_sriov_disable(struct bnxt *bp) ...@@ -596,6 +599,8 @@ void bnxt_sriov_disable(struct bnxt *bp)
rtnl_lock(); rtnl_lock();
bnxt_restore_pf_fw_resources(bp); bnxt_restore_pf_fw_resources(bp);
rtnl_unlock(); rtnl_unlock();
bnxt_ulp_sriov_cfg(bp, 0);
} }
int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs) int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment