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:29:56 +0200
commite21811ae4d30099d3b02f8fe131a8dc549a801f2 (patch)
tree7e5c4209d189c23100b7d43d328257a28de99ace
parenta56599d33cb6e9c77d88f8f2fcd6ece520c691f3 (diff)
RDMA/hns: Only assign the relatived fields of psn if
IB_QP_SQ_PSN is set (bsc#1104427 FATE#326416).
-rw-r--r--patches.drivers/RDMA-hns-Only-assign-the-relatived-fields-of-psn-if-.patch133
-rw-r--r--series.conf1
2 files changed, 134 insertions, 0 deletions
diff --git a/patches.drivers/RDMA-hns-Only-assign-the-relatived-fields-of-psn-if-.patch b/patches.drivers/RDMA-hns-Only-assign-the-relatived-fields-of-psn-if-.patch
new file mode 100644
index 0000000000..3dfafb3c11
--- /dev/null
+++ b/patches.drivers/RDMA-hns-Only-assign-the-relatived-fields-of-psn-if-.patch
@@ -0,0 +1,133 @@
+From: Lijun Ou <oulijun@huawei.com>
+Date: Sat, 23 Feb 2019 20:01:21 +0800
+Subject: RDMA/hns: Only assign the relatived fields of psn if IB_QP_SQ_PSN is
+ set
+Patch-mainline: v5.2-rc1
+Git-commit: f04cc17878b47bfa47af2e50f481d7f6eaaf3ca7
+References: bsc#1104427 FATE#326416
+
+Only when the IB_QP_SQ_PSN flags of attr_mask is set is it valid to assign
+the relatived fields of 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 | 83 ++++++++++++++++-------------
+ 1 file changed, 46 insertions(+), 37 deletions(-)
+
+--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
++++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+@@ -3891,13 +3891,6 @@ static int modify_qp_rtr_to_rts(struct i
+ V2_QPC_BYTE_240_RX_ACK_MSN_M,
+ V2_QPC_BYTE_240_RX_ACK_MSN_S, 0);
+
+- roce_set_field(context->byte_244_rnr_rxack,
+- V2_QPC_BYTE_244_RX_ACK_EPSN_M,
+- V2_QPC_BYTE_244_RX_ACK_EPSN_S, attr->sq_psn);
+- roce_set_field(qpc_mask->byte_244_rnr_rxack,
+- V2_QPC_BYTE_244_RX_ACK_EPSN_M,
+- V2_QPC_BYTE_244_RX_ACK_EPSN_S, 0);
+-
+ roce_set_field(qpc_mask->byte_248_ack_psn,
+ V2_QPC_BYTE_248_ACK_LAST_OPTYPE_M,
+ V2_QPC_BYTE_248_ACK_LAST_OPTYPE_S, 0);
+@@ -3911,27 +3904,6 @@ static int modify_qp_rtr_to_rts(struct i
+ V2_QPC_BYTE_240_IRRL_TAIL_REAL_M,
+ V2_QPC_BYTE_240_IRRL_TAIL_REAL_S, 0);
+
+- roce_set_field(context->byte_220_retry_psn_msn,
+- V2_QPC_BYTE_220_RETRY_MSG_PSN_M,
+- V2_QPC_BYTE_220_RETRY_MSG_PSN_S, attr->sq_psn);
+- roce_set_field(qpc_mask->byte_220_retry_psn_msn,
+- V2_QPC_BYTE_220_RETRY_MSG_PSN_M,
+- V2_QPC_BYTE_220_RETRY_MSG_PSN_S, 0);
+-
+- roce_set_field(context->byte_224_retry_msg,
+- V2_QPC_BYTE_224_RETRY_MSG_PSN_M,
+- V2_QPC_BYTE_224_RETRY_MSG_PSN_S, attr->sq_psn >> 16);
+- roce_set_field(qpc_mask->byte_224_retry_msg,
+- V2_QPC_BYTE_224_RETRY_MSG_PSN_M,
+- V2_QPC_BYTE_224_RETRY_MSG_PSN_S, 0);
+-
+- roce_set_field(context->byte_224_retry_msg,
+- V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_M,
+- V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_S, attr->sq_psn);
+- roce_set_field(qpc_mask->byte_224_retry_msg,
+- V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_M,
+- V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_S, 0);
+-
+ roce_set_field(qpc_mask->byte_220_retry_psn_msn,
+ V2_QPC_BYTE_220_RETRY_MSG_MSN_M,
+ V2_QPC_BYTE_220_RETRY_MSG_MSN_S, 0);
+@@ -3982,17 +3954,8 @@ static int modify_qp_rtr_to_rts(struct i
+ }
+ }
+
+- roce_set_field(context->byte_172_sq_psn, V2_QPC_BYTE_172_SQ_CUR_PSN_M,
+- V2_QPC_BYTE_172_SQ_CUR_PSN_S, attr->sq_psn);
+- roce_set_field(qpc_mask->byte_172_sq_psn, V2_QPC_BYTE_172_SQ_CUR_PSN_M,
+- V2_QPC_BYTE_172_SQ_CUR_PSN_S, 0);
+-
+ roce_set_field(qpc_mask->byte_196_sq_psn, V2_QPC_BYTE_196_IRRL_HEAD_M,
+ V2_QPC_BYTE_196_IRRL_HEAD_S, 0);
+- roce_set_field(context->byte_196_sq_psn, V2_QPC_BYTE_196_SQ_MAX_PSN_M,
+- V2_QPC_BYTE_196_SQ_MAX_PSN_S, attr->sq_psn);
+- roce_set_field(qpc_mask->byte_196_sq_psn, V2_QPC_BYTE_196_SQ_MAX_PSN_M,
+- V2_QPC_BYTE_196_SQ_MAX_PSN_S, 0);
+
+ if ((attr_mask & IB_QP_MAX_QP_RD_ATOMIC) && attr->max_rd_atomic) {
+ roce_set_field(context->byte_208_irrl, V2_QPC_BYTE_208_SR_MAX_M,
+@@ -4195,6 +4158,52 @@ static int hns_roce_v2_modify_qp(struct
+ hr_qp->sl = rdma_ah_get_sl(&attr->ah_attr);
+ }
+
++ if (attr_mask & IB_QP_SQ_PSN) {
++ roce_set_field(context->byte_172_sq_psn,
++ V2_QPC_BYTE_172_SQ_CUR_PSN_M,
++ V2_QPC_BYTE_172_SQ_CUR_PSN_S, attr->sq_psn);
++ roce_set_field(qpc_mask->byte_172_sq_psn,
++ V2_QPC_BYTE_172_SQ_CUR_PSN_M,
++ V2_QPC_BYTE_172_SQ_CUR_PSN_S, 0);
++
++ roce_set_field(context->byte_196_sq_psn,
++ V2_QPC_BYTE_196_SQ_MAX_PSN_M,
++ V2_QPC_BYTE_196_SQ_MAX_PSN_S, attr->sq_psn);
++ roce_set_field(qpc_mask->byte_196_sq_psn,
++ V2_QPC_BYTE_196_SQ_MAX_PSN_M,
++ V2_QPC_BYTE_196_SQ_MAX_PSN_S, 0);
++
++ roce_set_field(context->byte_220_retry_psn_msn,
++ V2_QPC_BYTE_220_RETRY_MSG_PSN_M,
++ V2_QPC_BYTE_220_RETRY_MSG_PSN_S, attr->sq_psn);
++ roce_set_field(qpc_mask->byte_220_retry_psn_msn,
++ V2_QPC_BYTE_220_RETRY_MSG_PSN_M,
++ V2_QPC_BYTE_220_RETRY_MSG_PSN_S, 0);
++
++ roce_set_field(context->byte_224_retry_msg,
++ V2_QPC_BYTE_224_RETRY_MSG_PSN_M,
++ V2_QPC_BYTE_224_RETRY_MSG_PSN_S,
++ attr->sq_psn >> 16);
++ roce_set_field(qpc_mask->byte_224_retry_msg,
++ V2_QPC_BYTE_224_RETRY_MSG_PSN_M,
++ V2_QPC_BYTE_224_RETRY_MSG_PSN_S, 0);
++
++ roce_set_field(context->byte_224_retry_msg,
++ V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_M,
++ V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_S,
++ attr->sq_psn);
++ roce_set_field(qpc_mask->byte_224_retry_msg,
++ V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_M,
++ V2_QPC_BYTE_224_RETRY_MSG_FPKT_PSN_S, 0);
++
++ roce_set_field(context->byte_244_rnr_rxack,
++ V2_QPC_BYTE_244_RX_ACK_EPSN_M,
++ V2_QPC_BYTE_244_RX_ACK_EPSN_S, attr->sq_psn);
++ roce_set_field(qpc_mask->byte_244_rnr_rxack,
++ V2_QPC_BYTE_244_RX_ACK_EPSN_M,
++ V2_QPC_BYTE_244_RX_ACK_EPSN_S, 0);
++ }
++
+ if (attr_mask & (IB_QP_ACCESS_FLAGS | IB_QP_MAX_DEST_RD_ATOMIC))
+ set_access_flags(hr_qp, context, qpc_mask, attr, attr_mask);
+
diff --git a/series.conf b/series.conf
index b517913a42..5c17e62a9a 100644
--- a/series.conf
+++ b/series.conf
@@ -46610,6 +46610,7 @@
patches.drivers/ALSA-hda-realtek-Support-low-power-consumption-ALC256.patch
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-i40iw-Handle-workqueue-allocation-failure.patch
patches.fixes/overflow-Fix-Wtype-limits-compilation-warnings.patch
patches.drivers/IB-hfi1-Fix-two-format-strings.patch