diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-03-30 19:30:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-31 05:52:18 -0400 |
commit | c37947459172a02691ccd48cb967e8b605d38c56 (patch) | |
tree | b3f52f4e13d4fe95ffe4024cb09571f0c0791110 /drivers/net/mlx4/eq.c | |
parent | 53020092bd89b0d4ccc5368a3956f43cb43e5665 (diff) |
mlx4: Fixing bad size of event queue buffer
We should reduce the number of reserved completion queues from the total
number of entries. Since the queue size is power of two, not reducing the
reserved entries, caused a double queue size, which may lead to allocation
failures in some cases.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/eq.c')
-rw-r--r-- | drivers/net/mlx4/eq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c index 506cfd0372ec..1ad1f6029af8 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/net/mlx4/eq.c | |||
@@ -603,7 +603,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) | |||
603 | } | 603 | } |
604 | 604 | ||
605 | for (i = 0; i < dev->caps.num_comp_vectors; ++i) { | 605 | for (i = 0; i < dev->caps.num_comp_vectors; ++i) { |
606 | err = mlx4_create_eq(dev, dev->caps.num_cqs + MLX4_NUM_SPARE_EQE, | 606 | err = mlx4_create_eq(dev, dev->caps.num_cqs - |
607 | dev->caps.reserved_cqs + | ||
608 | MLX4_NUM_SPARE_EQE, | ||
607 | (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, | 609 | (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, |
608 | &priv->eq_table.eq[i]); | 610 | &priv->eq_table.eq[i]); |
609 | if (err) { | 611 | if (err) { |