Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:27:44 +0200
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:30:02 +0200
commitc3176cbf440e4ac9dd3e7482ff76951745d40c1c (patch)
treec86c9d488f88de4d953dc8853ed790e9ba3a30a1
parente21811ae4d30099d3b02f8fe131a8dc549a801f2 (diff)
RDMA/hns: Only assign the fields of the rq psn if IB_QP_RQ_PSN
is set (bsc#1104427 FATE#326416).
-rw-r--r--patches.drivers/RDMA-hns-Only-assign-the-fields-of-the-rq-psn-if-IB_.patch68
-rw-r--r--series.conf1
2 files changed, 69 insertions, 0 deletions
diff --git a/patches.drivers/RDMA-hns-Only-assign-the-fields-of-the-rq-psn-if-IB_.patch b/patches.drivers/RDMA-hns-Only-assign-the-fields-of-the-rq-psn-if-IB_.patch
new file mode 100644
index 0000000000..ae6f922422
--- /dev/null
+++ b/patches.drivers/RDMA-hns-Only-assign-the-fields-of-the-rq-psn-if-IB_.patch
@@ -0,0 +1,68 @@
+From: Lijun Ou <oulijun@huawei.com>
+Date: Sat, 23 Feb 2019 20:01:22 +0800
+Subject: RDMA/hns: Only assign the fields of the rq psn if IB_QP_RQ_PSN is set
+Patch-mainline: v5.2-rc1
+Git-commit: 601f3e6d067c4399953dc7ede8f4c5448f91b02a
+References: bsc#1104427 FATE#326416
+
+Only when the IB_QP_RQ_PSN flags of attr_mask is set is it valid to assign
+the relatived fields of rq'psn into the qp context when modified qp.
+
+Signed-off-by: Lijun Ou <oulijun@huawei.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 28 ++++++++++++++++------------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
++++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+@@ -3675,13 +3675,6 @@ static int modify_qp_init_to_rtr(struct
+ V2_QPC_BYTE_104_RQ_NXT_BLK_ADDR_M,
+ V2_QPC_BYTE_104_RQ_NXT_BLK_ADDR_S, 0);
+
+- roce_set_field(context->byte_108_rx_reqepsn,
+- V2_QPC_BYTE_108_RX_REQ_EPSN_M,
+- V2_QPC_BYTE_108_RX_REQ_EPSN_S, attr->rq_psn);
+- roce_set_field(qpc_mask->byte_108_rx_reqepsn,
+- V2_QPC_BYTE_108_RX_REQ_EPSN_M,
+- V2_QPC_BYTE_108_RX_REQ_EPSN_S, 0);
+-
+ roce_set_field(context->byte_132_trrl, V2_QPC_BYTE_132_TRRL_BA_M,
+ V2_QPC_BYTE_132_TRRL_BA_S, dma_handle_3 >> 4);
+ roce_set_field(qpc_mask->byte_132_trrl, V2_QPC_BYTE_132_TRRL_BA_M,
+@@ -3789,11 +3782,6 @@ static int modify_qp_init_to_rtr(struct
+ context->rq_rnr_timer = 0;
+ qpc_mask->rq_rnr_timer = 0;
+
+- roce_set_field(context->byte_152_raq, V2_QPC_BYTE_152_RAQ_PSN_M,
+- V2_QPC_BYTE_152_RAQ_PSN_S, attr->rq_psn - 1);
+- roce_set_field(qpc_mask->byte_152_raq, V2_QPC_BYTE_152_RAQ_PSN_M,
+- V2_QPC_BYTE_152_RAQ_PSN_S, 0);
+-
+ roce_set_field(qpc_mask->byte_132_trrl, V2_QPC_BYTE_132_TRRL_HEAD_MAX_M,
+ V2_QPC_BYTE_132_TRRL_HEAD_MAX_S, 0);
+ roce_set_field(qpc_mask->byte_132_trrl, V2_QPC_BYTE_132_TRRL_TAIL_MAX_M,
+@@ -4207,6 +4195,22 @@ static int hns_roce_v2_modify_qp(struct
+ if (attr_mask & (IB_QP_ACCESS_FLAGS | IB_QP_MAX_DEST_RD_ATOMIC))
+ set_access_flags(hr_qp, context, qpc_mask, attr, attr_mask);
+
++ /* RC&UC required attr */
++ if (attr_mask & IB_QP_RQ_PSN) {
++ roce_set_field(context->byte_108_rx_reqepsn,
++ V2_QPC_BYTE_108_RX_REQ_EPSN_M,
++ V2_QPC_BYTE_108_RX_REQ_EPSN_S, attr->rq_psn);
++ roce_set_field(qpc_mask->byte_108_rx_reqepsn,
++ V2_QPC_BYTE_108_RX_REQ_EPSN_M,
++ V2_QPC_BYTE_108_RX_REQ_EPSN_S, 0);
++
++ roce_set_field(context->byte_152_raq, V2_QPC_BYTE_152_RAQ_PSN_M,
++ V2_QPC_BYTE_152_RAQ_PSN_S, attr->rq_psn - 1);
++ roce_set_field(qpc_mask->byte_152_raq,
++ V2_QPC_BYTE_152_RAQ_PSN_M,
++ V2_QPC_BYTE_152_RAQ_PSN_S, 0);
++ }
++
+ roce_set_bit(context->byte_108_rx_reqepsn, V2_QPC_BYTE_108_INV_CREDIT_S,
+ ibqp->srq ? 1 : 0);
+ roce_set_bit(qpc_mask->byte_108_rx_reqepsn,
diff --git a/series.conf b/series.conf
index 5c17e62a9a..ee2aec31c5 100644
--- a/series.conf
+++ b/series.conf
@@ -46611,6 +46611,7 @@
patches.drivers/dmaengine-axi-dmac-Don-t-check-the-number-of-frames-.patch
patches.drivers/dmaengine-tegra210-dma-free-dma-controller-in-remove.patch
patches.drivers/RDMA-hns-Only-assign-the-relatived-fields-of-psn-if-.patch
+ patches.drivers/RDMA-hns-Only-assign-the-fields-of-the-rq-psn-if-IB_.patch
patches.drivers/RDMA-i40iw-Handle-workqueue-allocation-failure.patch
patches.fixes/overflow-Fix-Wtype-limits-compilation-warnings.patch
patches.drivers/IB-hfi1-Fix-two-format-strings.patch