[ofa-general] Re: [PATCH] mlx4: Do not invoke mlx4_bitmap_free for special QPs

Roland Dreier rdreier at cisco.com
Tue Aug 7 12:49:08 PDT 2007


 > mlx4_bitmap_free should not be called for special QPs.

I think I'd rather fix this problem like the patch below.  Does this
look OK to you?


diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 19b48c7..278414b 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)
 	mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn);
 	mlx4_table_put(dev, &qp_table->qp_table, qp->qpn);
 
-	mlx4_bitmap_free(&qp_table->bitmap, qp->qpn);
+	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