From: Michael Chan Date: Fri, 13 Jan 2017 06:32:04 +0000 (-0500) Subject: bnxt_en: Add the ulp_sriov_cfg hooks for bnxt_re RDMA driver. X-Git-Tag: v4.1.12-93~2^2~29 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7acad26bc13cbbba2ca0d7bab88b724112af57bb;p=users%2Fjedix%2Flinux-maple.git bnxt_en: Add the ulp_sriov_cfg hooks for bnxt_re RDMA driver. Orabug: 25645429 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: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit 2f5938467bd7f34e59a1d6d3809f5970f62e194b) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c index 3e49534c56ea0..df5e795b4fe96 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c @@ -15,6 +15,7 @@ #include #include "bnxt_hsi.h" #include "bnxt.h" +#include "bnxt_ulp.h" #include "bnxt_sriov.h" #include "bnxt_ethtool.h" @@ -551,6 +552,8 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs) if (rc) goto err_out2; + bnxt_ulp_sriov_cfg(bp, *num_vfs); + rc = pci_enable_sriov(bp->pdev, *num_vfs); if (rc) goto err_out2; @@ -592,6 +595,8 @@ void bnxt_sriov_disable(struct bnxt *bp) rtnl_lock(); bnxt_restore_pf_fw_resources(bp); rtnl_unlock(); + + bnxt_ulp_sriov_cfg(bp, 0); } int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs)