aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:05 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:05 -0400
commiteaf559bf566f76887533c077d425adce847f06c8 (patch)
tree3ebe7ff1b45cd648a2aa190d437ba923263455c9 /drivers/net
parent36ce10d3e849c2f9efa3fd647058de398ee276eb (diff)
mlx4_core: Don't free special QPs in QP number bitmap
Special QPs are not allocated using the regular QP number bitmap, so when they are destroyed, their QP number should not be freed in the bitmap. Found by Dotan Barak of Mellanox. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mlx4/qp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 19b48c71cf7f..278414b2d01c 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -240,7 +240,8 @@ void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp)
240 mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn); 240 mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn);
241 mlx4_table_put(dev, &qp_table->qp_table, qp->qpn); 241 mlx4_table_put(dev, &qp_table->qp_table, qp->qpn);
242 242
243 mlx4_bitmap_free(&qp_table->bitmap, qp->qpn); 243 if (qp->qpn < dev->caps.sqp_start + 8)
244 mlx4_bitmap_free(&qp_table->bitmap, qp->qpn);
244} 245}
245EXPORT_SYMBOL_GPL(mlx4_qp_free); 246EXPORT_SYMBOL_GPL(mlx4_qp_free);
246 247