Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328560
b: refs/heads/master
c: 3806d08
h: refs/heads/master
v: v3
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Oct 1, 2012
1 parent b72c62b commit 92f829f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47605df953985c2b792ac9f3ddf70d270b89adb8
refs/heads/master: 3806d08cf6c42193c10c4963ca2d68f56a088668
3 changes: 3 additions & 0 deletions trunk/drivers/infiniband/hw/mlx4/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,9 @@ static int create_pv_resources(struct ib_device *ibdev, int slave, int port,
{
int ret, cq_size;

if (ctx->state != DEMUX_PV_STATE_DOWN)
return -EEXIST;

ctx->state = DEMUX_PV_STATE_STARTING;
/* have QP0 only on port owner, and only if link layer is IB */
if (ctx->slave == mlx4_master_func_num(to_mdev(ctx->ib_dev)->dev) &&
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ struct update_gid_work {
int port;
};

static void do_slave_init(struct mlx4_ib_dev *ibdev, int slave, int do_init);

static struct workqueue_struct *wq;

static void init_query_mad(struct ib_smp *mad)
Expand Down Expand Up @@ -1470,6 +1472,15 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
if (mlx4_is_mfunc(ibdev->dev))
init_pkeys(ibdev);

/* create paravirt contexts for any VFs which are active */
if (mlx4_is_master(ibdev->dev)) {
for (j = 0; j < MLX4_MFUNC_MAX; j++) {
if (j == mlx4_master_func_num(ibdev->dev))
continue;
if (mlx4_is_slave_active(ibdev->dev, j))
do_slave_init(ibdev, j, 1);
}
}
return ibdev;

err_notif:
Expand Down

0 comments on commit 92f829f

Please sign in to comment.