On Tuesday 07 August 2007 22:49, Roland Dreier wrote: > > 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? > Yes, it does. The same calculation (dev->caps.sqp_start + 8) is used when creating the bitmap, for the reserved values, so your version is actually more correct (i.e., don't free reserved values).
Also, obviously, no prototype changes are needed. - Jack > > 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); > > _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
