diff options
author | Eli Cohen <eli@mellanox.co.il> | 2007-05-17 09:32:39 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-19 11:51:56 -0400 |
commit | 1f8f7b7a7b885a0041a21b3d93c507269baf57c8 (patch) | |
tree | afa4c7061dc9f4cde6885831d8d9dce604dcd8a0 /drivers/infiniband | |
parent | de57c9f102ad7bdc8afa5a1560748cf4f1c18b8e (diff) |
IB/mlx4: Fix check of max_qp_dest_rdma in modify QP
max_qp_dest_rdma is already in natural units - no need to shift. This
was discovered by a test that deliberately requests more outstanding
atomic operation than the device supports.
Found by Sagi Rotem at Mellanox.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 5cd706908450..9c362fa71465 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -694,7 +694,7 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
694 | } | 694 | } |
695 | 695 | ||
696 | if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC && | 696 | if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC && |
697 | attr->max_dest_rd_atomic > 1 << dev->dev->caps.max_qp_dest_rdma) { | 697 | attr->max_dest_rd_atomic > dev->dev->caps.max_qp_dest_rdma) { |
698 | goto out; | 698 | goto out; |
699 | } | 699 | } |
700 | 700 | ||