aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns/hns_roce_cq.c
diff options
context:
space:
mode:
authoroulijun <oulijun@huawei.com>2017-11-10 16:55:53 +0800
committerDoug Ledford <dledford@redhat.com>2017-11-10 12:32:43 -0500
commit26beb85f4168dba76a197883065398a55ce11cf4 (patch)
tree4698ae9976d10886a61cc40b5ddd8dbec863a14d /drivers/infiniband/hw/hns/hns_roce_cq.c
parentRDMA/hns: Unify the calculation for hem index in hip08 (diff)
downloadlinux-dev-26beb85f4168dba76a197883065398a55ce11cf4.tar.xz
linux-dev-26beb85f4168dba76a197883065398a55ce11cf4.zip
RDMA/hns: Modify the usage of cmd_sn in hip08
The cmd_sn field of CQ doorbell inits for 0. It should be increment on each first db rung after a completion Event. if the cmd_sn of notify doorbell Adjacent two times is the same, the hardware will distinguish it for the same notify request and update its type according to the priority level of next event and solicited event. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_cq.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_cq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c
index f558f95d8827..2111b57a3489 100644
--- a/drivers/infiniband/hw/hns/hns_roce_cq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_cq.c
@@ -156,6 +156,7 @@ static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent,
}
hr_cq->cons_index = 0;
+ hr_cq->arm_sn = 1;
hr_cq->uar = hr_uar;
atomic_set(&hr_cq->refcount, 1);
@@ -456,6 +457,7 @@ void hns_roce_cq_completion(struct hns_roce_dev *hr_dev, u32 cqn)
return;
}
+ ++cq->arm_sn;
cq->comp(cq);
}