aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-08-10 13:46:56 -0400
committerRoland Dreier <rolandd@cisco.com>2006-08-10 13:50:52 -0400
commite54b82d739d4a2ef992976c8c0692cdf89286420 (patch)
treec05b596945f17de89505f092ad870aef365b674f /drivers
parent9f737633e6ee54fc174282d49b2559bd2208391d (diff)
IB/mthca: Make fence flag work for send work requests
The fence bit needs to be set in the doorbell too, not just the WQE. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index cd8b6721ac9c..157b4f8ac407 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -99,6 +99,10 @@ enum {
99 MTHCA_QP_BIT_RSC = 1 << 3 99 MTHCA_QP_BIT_RSC = 1 << 3
100}; 100};
101 101
102enum {
103 MTHCA_SEND_DOORBELL_FENCE = 1 << 5
104};
105
102struct mthca_qp_path { 106struct mthca_qp_path {
103 __be32 port_pkey; 107 __be32 port_pkey;
104 u8 rnr_retry; 108 u8 rnr_retry;
@@ -1502,7 +1506,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1502 int i; 1506 int i;
1503 int size; 1507 int size;
1504 int size0 = 0; 1508 int size0 = 0;
1505 u32 f0 = 0; 1509 u32 f0;
1506 int ind; 1510 int ind;
1507 u8 op0 = 0; 1511 u8 op0 = 0;
1508 1512
@@ -1686,6 +1690,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1686 if (!size0) { 1690 if (!size0) {
1687 size0 = size; 1691 size0 = size;
1688 op0 = mthca_opcode[wr->opcode]; 1692 op0 = mthca_opcode[wr->opcode];
1693 f0 = wr->send_flags & IB_SEND_FENCE ?
1694 MTHCA_SEND_DOORBELL_FENCE : 0;
1689 } 1695 }
1690 1696
1691 ++ind; 1697 ++ind;
@@ -1843,7 +1849,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1843 int i; 1849 int i;
1844 int size; 1850 int size;
1845 int size0 = 0; 1851 int size0 = 0;
1846 u32 f0 = 0; 1852 u32 f0;
1847 int ind; 1853 int ind;
1848 u8 op0 = 0; 1854 u8 op0 = 0;
1849 1855
@@ -2051,6 +2057,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
2051 if (!size0) { 2057 if (!size0) {
2052 size0 = size; 2058 size0 = size;
2053 op0 = mthca_opcode[wr->opcode]; 2059 op0 = mthca_opcode[wr->opcode];
2060 f0 = wr->send_flags & IB_SEND_FENCE ?
2061 MTHCA_SEND_DOORBELL_FENCE : 0;
2054 } 2062 }
2055 2063
2056 ++ind; 2064 ++ind;