[openib-general] [PATCH] mthca: fix atomic operations
Michael S. Tsirkin
mst at mellanox.co.il
Wed Nov 9 04:14:22 PST 2005
Quoting r. Eitan Rabin <rabin at mellanox.com>:
> Subject: atomic operations
>
> Hi Michael,
> There is a bug in the atomic flow of gen2
> mthca_qp.c line 1488 should be also divided by 16.
> Once that is done atomics work.
Indeed.
---
Fix posting atomic work requests in mthca.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c (revision 3992)
+++ linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c (working copy)
@@ -1484,8 +1484,8 @@ int mthca_tavor_post_send(struct ib_qp *
}
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:
@@ -1804,8 +1804,8 @@ int mthca_arbel_post_send(struct ib_qp *
}
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:
More information about the general
mailing list