diff options
author | Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> | 2016-08-29 08:29:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-31 21:03:46 -0700 |
commit | 5fe118c9fd6b8e129788c88a10ac0af82b255f81 (patch) | |
tree | 18e5901de87518f9d63e66c1832a26c6b1e4a3f0 /drivers/net/ethernet/qlogic/qed/qed_dcbx.c | |
parent | c0338aff2260ea6c092806312dbb154cec07a242 (diff) | |
download | talos-op-linux-5fe118c9fd6b8e129788c88a10ac0af82b255f81.tar.gz talos-op-linux-5fe118c9fd6b8e129788c88a10ac0af82b255f81.zip |
qed*: Disallow dcbx configuration for VF interfaces.
Dcbx configuration is not supported for VF interfaces. Hence don't populate
the callbacks for VFs and also fail the dcbx-query for VFs.
Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_dcbx.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c index 226cb08cc055..7ad1667ee354 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c @@ -19,6 +19,7 @@ #include "qed_dcbx.h" #include "qed_hsi.h" #include "qed_sp.h" +#include "qed_sriov.h" #ifdef CONFIG_DCB #include <linux/qed/qed_eth_if.h> #endif @@ -945,6 +946,9 @@ static int qed_dcbx_query_params(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt; int rc; + if (IS_VF(p_hwfn->cdev)) + return -EINVAL; + p_ptt = qed_ptt_acquire(p_hwfn); if (!p_ptt) return -EBUSY; |