From: Jack Morgenstein Date: Wed, 18 Jul 2007 01:37:38 +0000 (-0700) Subject: IB/mlx4: Fix flow label returned from query QP X-Git-Tag: v2.6.23-rc1~483^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=586bb586ae59c473393c09291e86042d263c3ddd;p=linux-2.6-omap-h63xx.git IB/mlx4: Fix flow label returned from query QP Correct the mask used to get the flow label, since the field is 20 bits, not 24 bits. Found by Dotan Barak and Yaron Gepstein of Mellanox. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 40042184ad5..2d00b4ee80c 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1515,7 +1515,7 @@ static void to_ib_ah_attr(struct mlx4_dev *dev, struct ib_ah_attr *ib_ah_attr, ib_ah_attr->grh.traffic_class = (be32_to_cpu(path->tclass_flowlabel) >> 20) & 0xff; ib_ah_attr->grh.flow_label = - be32_to_cpu(path->tclass_flowlabel) & 0xffffff; + be32_to_cpu(path->tclass_flowlabel) & 0xfffff; memcpy(ib_ah_attr->grh.dgid.raw, path->rgid, sizeof ib_ah_attr->grh.dgid.raw); }