diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-08-03 04:40:58 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-09-30 23:33:44 -0400 |
commit | 3806d08cf6c42193c10c4963ca2d68f56a088668 (patch) | |
tree | e483b3f75cdad15363d932aef701ae3f17e81ffc /drivers/infiniband/hw/mlx4/mad.c | |
parent | 47605df953985c2b792ac9f3ddf70d270b89adb8 (diff) |
IB/mlx4: Create paravirt contexts for VFs when master IB driver initializes
When we have VFs and PFs on same host, the VFs are activated within
the mlx4_core module before the mlx4_ib kernel module is loaded.
When the mlx4_ib module initializes the PF (master), it now creates
MAD paravirtualization contexts for any VFs that already active.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mad.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/mad.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index 658a622791fb..21a794152d15 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) && |