aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/mlx4/mad.c3
-rw-r--r--drivers/infiniband/hw/mlx4/main.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index 658a622791f..21a794152d1 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -1652,6 +1652,9 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port,
1652{ 1652{
1653 int ret, cq_size; 1653 int ret, cq_size;
1654 1654
1655 if (ctx->state != DEMUX_PV_STATE_DOWN)
1656 return -EEXIST;
1657
1655 ctx->state = DEMUX_PV_STATE_STARTING; 1658 ctx->state = DEMUX_PV_STATE_STARTING;
1656 /* have QP0 only on port owner, and only if link layer is IB */ 1659 /* have QP0 only on port owner, and only if link layer is IB */
1657 if (ctx->slave == mlx4_master_func_num(to_mdev(ctx->ib_dev)->dev) && 1660 if (ctx->slave == mlx4_master_func_num(to_mdev(ctx->ib_dev)->dev) &&
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index e849347ef99..718ec6b2bad 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -74,6 +74,8 @@ struct update_gid_work {
74 int port; 74 int port;
75}; 75};
76 76
77static void do_slave_init(struct mlx4_ib_dev *ibdev, int slave, int do_init);
78
77static struct workqueue_struct *wq; 79static struct workqueue_struct *wq;
78 80
79static void init_query_mad(struct ib_smp *mad) 81static void init_query_mad(struct ib_smp *mad)
@@ -1470,6 +1472,15 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
1470 if (mlx4_is_mfunc(ibdev->dev)) 1472 if (mlx4_is_mfunc(ibdev->dev))
1471 init_pkeys(ibdev); 1473 init_pkeys(ibdev);
1472 1474
1475 /* create paravirt contexts for any VFs which are active */
1476 if (mlx4_is_master(ibdev->dev)) {
1477 for (j = 0; j < MLX4_MFUNC_MAX; j++) {
1478 if (j == mlx4_master_func_num(ibdev->dev))
1479 continue;
1480 if (mlx4_is_slave_active(ibdev->dev, j))
1481 do_slave_init(ibdev, j, 1);
1482 }
1483 }
1473 return ibdev; 1484 return ibdev;
1474 1485
1475err_notif: 1486err_notif: