Skip to content

Commit

Permalink
[IB] mthca: fix posting of atomic operations
Browse files Browse the repository at this point in the history
The size of work requests for atomic operations was computed
incorrectly in mthca: all sizeofs need to be divided by 16.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Nov 10, 2005
1 parent 77369ed commit 62abb84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,8 +1556,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
}

wqe += sizeof (struct mthca_atomic_seg);
size += sizeof (struct mthca_raddr_seg) / 16 +
sizeof (struct mthca_atomic_seg);
size += (sizeof (struct mthca_raddr_seg) +
sizeof (struct mthca_atomic_seg)) / 16;
break;

case IB_WR_RDMA_WRITE:
Expand Down Expand Up @@ -1876,8 +1876,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
}

wqe += sizeof (struct mthca_atomic_seg);
size += sizeof (struct mthca_raddr_seg) / 16 +
sizeof (struct mthca_atomic_seg);
size += (sizeof (struct mthca_raddr_seg) +
sizeof (struct mthca_atomic_seg)) / 16;
break;

case IB_WR_RDMA_READ:
Expand Down

0 comments on commit 62abb84

Please sign in to comment.