aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2014-03-12 06:00:43 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-12 15:57:16 -0400
commitaa9a2d51a3e70b15a898bec7dde3ce5726fec641 (patch)
tree3225c2a7a5c9ddc64991be14c94a06e63a34794a /drivers
parentceb5433b3a54979216d794e45147d25c24c94999 (diff)
mlx4: Activate RoCE/SRIOV
To activate RoCE/SRIOV, need to remove the following: 1. In mlx4_ib_add, need to remove the error return preventing initialization of a RoCE port under SRIOV. 2. In update_vport_qp_params (in resource_tracker.c) need to remove the error return when a RoCE RC or UD qp is detected. This error return causes the INIT-to-RTR qp transition to fail in the wrapper function under RoCE/SRIOV. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx4/main.c8
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c7
2 files changed, 0 insertions, 15 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index f9c12e92fdd6..1d1750ef000a 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -1888,14 +1888,6 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
1888 1888
1889 pr_info_once("%s", mlx4_ib_version); 1889 pr_info_once("%s", mlx4_ib_version);
1890 1890
1891 mlx4_foreach_non_ib_transport_port(i, dev)
1892 num_ports++;
1893
1894 if (mlx4_is_mfunc(dev) && num_ports) {
1895 dev_err(&dev->pdev->dev, "RoCE is not supported over SRIOV as yet\n");
1896 return NULL;
1897 }
1898
1899 num_ports = 0; 1891 num_ports = 0;
1900 mlx4_foreach_ib_transport_port(i, dev) 1892 mlx4_foreach_ib_transport_port(i, dev)
1901 num_ports++; 1893 num_ports++;
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 706a6d2b538c..74e490d70184 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -645,7 +645,6 @@ static int update_vport_qp_param(struct mlx4_dev *dev,
645 struct mlx4_qp_context *qpc = inbox->buf + 8; 645 struct mlx4_qp_context *qpc = inbox->buf + 8;
646 struct mlx4_vport_oper_state *vp_oper; 646 struct mlx4_vport_oper_state *vp_oper;
647 struct mlx4_priv *priv; 647 struct mlx4_priv *priv;
648 u32 qp_type;
649 int port; 648 int port;
650 649
651 port = (qpc->pri_path.sched_queue & 0x40) ? 2 : 1; 650 port = (qpc->pri_path.sched_queue & 0x40) ? 2 : 1;
@@ -653,12 +652,6 @@ static int update_vport_qp_param(struct mlx4_dev *dev,
653 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; 652 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
654 653
655 if (MLX4_VGT != vp_oper->state.default_vlan) { 654 if (MLX4_VGT != vp_oper->state.default_vlan) {
656 qp_type = (be32_to_cpu(qpc->flags) >> 16) & 0xff;
657 if (MLX4_QP_ST_RC == qp_type ||
658 (MLX4_QP_ST_UD == qp_type &&
659 !mlx4_is_qp_reserved(dev, qpn)))
660 return -EINVAL;
661
662 /* the reserved QPs (special, proxy, tunnel) 655 /* the reserved QPs (special, proxy, tunnel)
663 * do not operate over vlans 656 * do not operate over vlans
664 */ 657 */