aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2005-11-09 14:30:14 -0500
committerRoland Dreier <rolandd@cisco.com>2005-11-10 13:22:50 -0500
commit62abb8416f1923f4cef50ce9ce841b919275e3fb (patch)
tree704990abeb22a51ed2722e92536d22135f60957f /drivers/infiniband/hw/mthca
parent77369ed31daac51f4827c50d30f233c45480235a (diff)
[IB] mthca: fix posting of atomic operations
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>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 7f39af44b274..190c1dc0ee27 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -1556,8 +1556,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1556 } 1556 }
1557 1557
1558 wqe += sizeof (struct mthca_atomic_seg); 1558 wqe += sizeof (struct mthca_atomic_seg);
1559 size += sizeof (struct mthca_raddr_seg) / 16 + 1559 size += (sizeof (struct mthca_raddr_seg) +
1560 sizeof (struct mthca_atomic_seg); 1560 sizeof (struct mthca_atomic_seg)) / 16;
1561 break; 1561 break;
1562 1562
1563 case IB_WR_RDMA_WRITE: 1563 case IB_WR_RDMA_WRITE:
@@ -1876,8 +1876,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1876 } 1876 }
1877 1877
1878 wqe += sizeof (struct mthca_atomic_seg); 1878 wqe += sizeof (struct mthca_atomic_seg);
1879 size += sizeof (struct mthca_raddr_seg) / 16 + 1879 size += (sizeof (struct mthca_raddr_seg) +
1880 sizeof (struct mthca_atomic_seg); 1880 sizeof (struct mthca_atomic_seg)) / 16;
1881 break; 1881 break;
1882 1882
1883 case IB_WR_RDMA_READ: 1883 case IB_WR_RDMA_READ: