[ofa-general] [PATCH] mlx4: fix thinko in qp destroy (incorrect bitmap_free)

Jack Morgenstein jackm at dev.mellanox.co.il
Wed Nov 14 06:33:27 PST 2007


mlx4: fix thinko in commit eaf559bf566f76887533c077d425adce847f06c8.

Need to call mlx4_bitmap_free if the qp is not a special QP,
not if it is a special QP.

Found by Dotan Barak of Mellanox.
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>

---

Roland,
This one needs to be applied immediately to the 2.6.24 tree -- bug fix.

diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index cc4b1be..42b4763 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -240,7 +240,7 @@ void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp)
 	mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn);
 	mlx4_table_put(dev, &qp_table->qp_table, qp->qpn);
 
-	if (qp->qpn < dev->caps.sqp_start + 8)
+	if (qp->qpn >= dev->caps.sqp_start + 8)
 		mlx4_bitmap_free(&qp_table->bitmap, qp->qpn);
 }
 EXPORT_SYMBOL_GPL(mlx4_qp_free);



More information about the general mailing list