summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/mr.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-11-04 16:20:33 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-04 16:20:33 -0500
commit5a6e55c461db3364aa5be919101db972bc859133 (patch)
treee43baf0db805f6f49f0c335fd5e868d7afc3946d /drivers/net/ethernet/mellanox/mlx4/mr.c
parent3b4c5cbf42bda976ab70354e7786a0808265d9d5 (diff)
parent146f3ef4a193f2e8cc826bed01a635861287df63 (diff)
Merge branch 'mlx4'
Or Gerlitz says: ==================== Mellanox driver updates This patch set from Jack Morgenstein does the following: 1. Fix MAC/VLAN SRIOV implementation, and add wrapper functions for VLAN allocation and de-allocation (patches 1-6). 2. Implements resource quotas when running under SRIOV (patches 7-10). Patch 7 is a small bug fix, and patches 8-10 implement the quotas. Quotas are implemented per resource type for VFs and the PF, to prevent any entity from simply grabbing all the resources for itself and leaving the other entities unable to obtain such resources. The series is against net-next commit ba48650 "ipv6: remove the unnecessary statement in find_match()" changes from V0: - dropped the 1st patch which needs to go to -stable and hence through net, not net-next ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mr.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
index f91719a08cba..63391a1a7f8c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
@@ -755,14 +755,14 @@ int mlx4_init_mr_table(struct mlx4_dev *dev)
struct mlx4_mr_table *mr_table = &priv->mr_table;
int err;
- if (!is_power_of_2(dev->caps.num_mpts))
- return -EINVAL;
-
/* Nothing to do for slaves - all MR handling is forwarded
* to the master */
if (mlx4_is_slave(dev))
return 0;
+ if (!is_power_of_2(dev->caps.num_mpts))
+ return -EINVAL;
+
err = mlx4_bitmap_init(&mr_table->mpt_bitmap, dev->caps.num_mpts,
~0, dev->caps.reserved_mrws, 0);
if (err)