linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next 0/7] RDMA/hns: Updates for 5.15
@ 2021-08-26 13:37 Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn Wenpeng Liang
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

As usual, this series collects some miscellaneous fixes and cleanups at the
end of 5.15 for the hns driver:

* #1 ~ #2 are fixes.
* #3 ~ #7 are some small cleanups.

Weihang Li (1):
  RDMA/hns: Remove RST2RST error prints for hw v1

Wenpeng Liang (4):
  RDMA/hns: Fix query destination qpn
  RDMA/hns: Fix QP's resp incomplete assignment
  RDMA/hns: Remove dqpn filling when modify qp from Init to Init
  RDMA/hns: Adjust the order in which irq are requested and enabled

Xinhao Liu (1):
  RDMA/hns: Delete unnecessary blank lines.

Yixing Liu (1):
  RDMA/hns: Encapsulate the qp db as a function

 drivers/infiniband/hw/hns/hns_roce_hw_v2.c |  40 +++-----
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h |   1 -
 drivers/infiniband/hw/hns/hns_roce_qp.c    | 150 ++++++++++++++++-------------
 3 files changed, 98 insertions(+), 93 deletions(-)

--
2.8.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 2/7] RDMA/hns: Fix QP's resp incomplete assignment Wenpeng Liang
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

The bit width of dqpn is 24 bits, using u8 will cause truncation error.

Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC")
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 50a6f91..752bad5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5130,7 +5130,7 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
 
 	qp_attr->rq_psn = hr_reg_read(&context, QPC_RX_REQ_EPSN);
 	qp_attr->sq_psn = (u32)hr_reg_read(&context, QPC_SQ_CUR_PSN);
-	qp_attr->dest_qp_num = (u8)hr_reg_read(&context, QPC_DQPN);
+	qp_attr->dest_qp_num = hr_reg_read(&context, QPC_DQPN);
 	qp_attr->qp_access_flags =
 		((hr_reg_read(&context, QPC_RRE)) << V2_QP_RRE_S) |
 		((hr_reg_read(&context, QPC_RWE)) << V2_QP_RWE_S) |
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 2/7] RDMA/hns: Fix QP's resp incomplete assignment
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 3/7] RDMA/hns: Remove dqpn filling when modify qp from Init to Init Wenpeng Liang
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

The resp passed to the user space represents the enable flag of qp,
incomplete assignment will cause some features of the user space to be
disabled.

Fixes: 90ae0b57e4a5 ("RDMA/hns: Combine enable flags of qp")
Fixes: aba457ca890c ("RDMA/hns: Support owner mode doorbell")
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_qp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index 0d0d5aa..bddc952 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -848,7 +848,6 @@ static int alloc_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
 				goto err_out;
 			}
 			hr_qp->en_flags |= HNS_ROCE_QP_CAP_SQ_RECORD_DB;
-			resp->cap_flags |= HNS_ROCE_QP_CAP_SQ_RECORD_DB;
 		}
 
 		if (user_qp_has_rdb(hr_dev, init_attr, udata, resp)) {
@@ -861,7 +860,6 @@ static int alloc_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
 				goto err_sdb;
 			}
 			hr_qp->en_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
-			resp->cap_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
 		}
 	} else {
 		if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09)
@@ -1071,6 +1069,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,
 	}
 
 	if (udata) {
+		resp.cap_flags = hr_qp->en_flags;
 		ret = ib_copy_to_udata(udata, &resp,
 				       min(udata->outlen, sizeof(resp)));
 		if (ret) {
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 3/7] RDMA/hns: Remove dqpn filling when modify qp from Init to Init
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 2/7] RDMA/hns: Fix QP's resp incomplete assignment Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 4/7] RDMA/hns: Remove RST2RST error prints for hw v1 Wenpeng Liang
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

According to the IB specification, the destination qpn is allowed to be
filled into the qpc only when the qp transitions from Init to RTR, so
this code is unused.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 752bad5..85ad937 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4143,8 +4143,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp,
 				   struct hns_roce_v2_qp_context *context,
 				   struct hns_roce_v2_qp_context *qpc_mask)
 {
-	struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
-
 	/*
 	 * In v2 engine, software pass context and context mask to hardware
 	 * when modifying qp. If software need modify some fields in context,
@@ -4169,11 +4167,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp,
 		hr_reg_write(context, QPC_SRQN, to_hr_srq(ibqp->srq)->srqn);
 		hr_reg_clear(qpc_mask, QPC_SRQN);
 	}
-
-	if (attr_mask & IB_QP_DEST_QPN) {
-		hr_reg_write(context, QPC_DQPN, hr_qp->qpn);
-		hr_reg_clear(qpc_mask, QPC_DQPN);
-	}
 }
 
 static int config_qp_rq_buf(struct hns_roce_dev *hr_dev,
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 4/7] RDMA/hns: Remove RST2RST error prints for hw v1
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
                   ` (2 preceding siblings ...)
  2021-08-26 13:37 ` [PATCH for-next 3/7] RDMA/hns: Remove dqpn filling when modify qp from Init to Init Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 5/7] RDMA/hns: Adjust the order in which irq are requested and enabled Wenpeng Liang
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

From: Weihang Li <liweihang@huawei.com>

There is no need to prints error for hw_v1.

Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_qp.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index bddc952..d45beed 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -1302,17 +1302,8 @@ int hns_roce_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 	if (ret)
 		goto out;
 
-	if (cur_state == new_state && cur_state == IB_QPS_RESET) {
-		if (hr_dev->hw_rev == HNS_ROCE_HW_VER1) {
-			ret = -EPERM;
-			ibdev_err(&hr_dev->ib_dev,
-				  "RST2RST state is not supported\n");
-		} else {
-			ret = 0;
-		}
-
+	if (cur_state == new_state && cur_state == IB_QPS_RESET)
 		goto out;
-	}
 
 	ret = hr_dev->hw->modify_qp(ibqp, attr, attr_mask, cur_state,
 				    new_state);
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 5/7] RDMA/hns: Adjust the order in which irq are requested and enabled
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
                   ` (3 preceding siblings ...)
  2021-08-26 13:37 ` [PATCH for-next 4/7] RDMA/hns: Remove RST2RST error prints for hw v1 Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 6/7] RDMA/hns: Encapsulate the qp db as a function Wenpeng Liang
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

It should first alloc workqueue and request irq, and finally enable irq.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 85ad937..c27dc68 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -6114,35 +6114,32 @@ static int hns_roce_v2_init_eq_table(struct hns_roce_dev *hr_dev)
 
 		ret = hns_roce_v2_create_eq(hr_dev, eq, eq_cmd);
 		if (ret) {
-			dev_err(dev, "eq create failed.\n");
+			dev_err(dev, "failed to create eq.\n");
 			goto err_create_eq_fail;
 		}
 	}
 
-	/* enable irq */
-	hns_roce_v2_int_mask_enable(hr_dev, eq_num, EQ_ENABLE);
+	hr_dev->irq_workq = alloc_ordered_workqueue("hns_roce_irq_workq", 0);
+	if (!hr_dev->irq_workq) {
+		dev_err(dev, "failed to create irq workqueue.\n");
+		ret = -ENOMEM;
+		goto err_create_eq_fail;
+	}
 
-	ret = __hns_roce_request_irq(hr_dev, irq_num, comp_num,
-				     aeq_num, other_num);
+	ret = __hns_roce_request_irq(hr_dev, irq_num, comp_num, aeq_num,
+				     other_num);
 	if (ret) {
-		dev_err(dev, "Request irq failed.\n");
+		dev_err(dev, "failed to request irq.\n");
 		goto err_request_irq_fail;
 	}
 
-	hr_dev->irq_workq = alloc_ordered_workqueue("hns_roce_irq_workq", 0);
-	if (!hr_dev->irq_workq) {
-		dev_err(dev, "Create irq workqueue failed!\n");
-		ret = -ENOMEM;
-		goto err_create_wq_fail;
-	}
+	/* enable irq */
+	hns_roce_v2_int_mask_enable(hr_dev, eq_num, EQ_ENABLE);
 
 	return 0;
 
-err_create_wq_fail:
-	__hns_roce_free_irq(hr_dev);
-
 err_request_irq_fail:
-	hns_roce_v2_int_mask_enable(hr_dev, eq_num, EQ_DISABLE);
+	destroy_workqueue(hr_dev->irq_workq);
 
 err_create_eq_fail:
 	for (i -= 1; i >= 0; i--)
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 6/7] RDMA/hns: Encapsulate the qp db as a function
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
                   ` (4 preceding siblings ...)
  2021-08-26 13:37 ` [PATCH for-next 5/7] RDMA/hns: Adjust the order in which irq are requested and enabled Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 13:37 ` [PATCH for-next 7/7] RDMA/hns: Delete unnecessary blank lines Wenpeng Liang
  2021-08-26 15:33 ` [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Jason Gunthorpe
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

From: Yixing Liu <liuyixing1@huawei.com>

Encapsulate qp db into two functions: user and kernel.

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_qp.c | 135 +++++++++++++++++++-------------
 1 file changed, 82 insertions(+), 53 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index d45beed..74c9101 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -823,75 +823,104 @@ static inline bool kernel_qp_has_rdb(struct hns_roce_dev *hr_dev,
 		hns_roce_qp_has_rq(init_attr));
 }
 
+static int alloc_user_qp_db(struct hns_roce_dev *hr_dev,
+			    struct hns_roce_qp *hr_qp,
+			    struct ib_qp_init_attr *init_attr,
+			    struct ib_udata *udata,
+			    struct hns_roce_ib_create_qp *ucmd,
+			    struct hns_roce_ib_create_qp_resp *resp)
+{
+	struct hns_roce_ucontext *uctx = rdma_udata_to_drv_context(udata,
+		struct hns_roce_ucontext, ibucontext);
+	struct ib_device *ibdev = &hr_dev->ib_dev;
+	int ret;
+
+	if (user_qp_has_sdb(hr_dev, init_attr, udata, resp, ucmd)) {
+		ret = hns_roce_db_map_user(uctx, ucmd->sdb_addr, &hr_qp->sdb);
+		if (ret) {
+			ibdev_err(ibdev,
+				  "failed to map user SQ doorbell, ret = %d.\n",
+				  ret);
+			goto err_out;
+		}
+		hr_qp->en_flags |= HNS_ROCE_QP_CAP_SQ_RECORD_DB;
+	}
+
+	if (user_qp_has_rdb(hr_dev, init_attr, udata, resp)) {
+		ret = hns_roce_db_map_user(uctx, ucmd->db_addr, &hr_qp->rdb);
+		if (ret) {
+			ibdev_err(ibdev,
+				  "failed to map user RQ doorbell, ret = %d.\n",
+				  ret);
+			goto err_sdb;
+		}
+		hr_qp->en_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
+	}
+
+	return 0;
+
+err_sdb:
+	if (hr_qp->en_flags & HNS_ROCE_QP_CAP_SQ_RECORD_DB)
+		hns_roce_db_unmap_user(uctx, &hr_qp->sdb);
+err_out:
+	return ret;
+}
+
+static int alloc_kernel_qp_db(struct hns_roce_dev *hr_dev,
+			      struct hns_roce_qp *hr_qp,
+			      struct ib_qp_init_attr *init_attr)
+{
+	struct ib_device *ibdev = &hr_dev->ib_dev;
+	int ret;
+
+	if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09)
+		hr_qp->sq.db_reg = hr_dev->mem_base +
+				   HNS_ROCE_DWQE_SIZE * hr_qp->qpn;
+	else
+		hr_qp->sq.db_reg = hr_dev->reg_base + hr_dev->sdb_offset +
+				   DB_REG_OFFSET * hr_dev->priv_uar.index;
+
+	hr_qp->rq.db_reg = hr_dev->reg_base + hr_dev->odb_offset +
+			   DB_REG_OFFSET * hr_dev->priv_uar.index;
+
+	if (kernel_qp_has_rdb(hr_dev, init_attr)) {
+		ret = hns_roce_alloc_db(hr_dev, &hr_qp->rdb, 0);
+		if (ret) {
+			ibdev_err(ibdev,
+				  "failed to alloc kernel RQ doorbell, ret = %d.\n",
+				  ret);
+			return ret;
+		}
+		*hr_qp->rdb.db_record = 0;
+		hr_qp->en_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
+	}
+
+	return 0;
+}
+
 static int alloc_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
 		       struct ib_qp_init_attr *init_attr,
 		       struct ib_udata *udata,
 		       struct hns_roce_ib_create_qp *ucmd,
 		       struct hns_roce_ib_create_qp_resp *resp)
 {
-	struct hns_roce_ucontext *uctx = rdma_udata_to_drv_context(
-		udata, struct hns_roce_ucontext, ibucontext);
-	struct ib_device *ibdev = &hr_dev->ib_dev;
 	int ret;
 
 	if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SDI_MODE)
 		hr_qp->en_flags |= HNS_ROCE_QP_CAP_OWNER_DB;
 
 	if (udata) {
-		if (user_qp_has_sdb(hr_dev, init_attr, udata, resp, ucmd)) {
-			ret = hns_roce_db_map_user(uctx, ucmd->sdb_addr,
-						   &hr_qp->sdb);
-			if (ret) {
-				ibdev_err(ibdev,
-					  "failed to map user SQ doorbell, ret = %d.\n",
-					  ret);
-				goto err_out;
-			}
-			hr_qp->en_flags |= HNS_ROCE_QP_CAP_SQ_RECORD_DB;
-		}
-
-		if (user_qp_has_rdb(hr_dev, init_attr, udata, resp)) {
-			ret = hns_roce_db_map_user(uctx, ucmd->db_addr,
-						   &hr_qp->rdb);
-			if (ret) {
-				ibdev_err(ibdev,
-					  "failed to map user RQ doorbell, ret = %d.\n",
-					  ret);
-				goto err_sdb;
-			}
-			hr_qp->en_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
-		}
+		ret = alloc_user_qp_db(hr_dev, hr_qp, init_attr, udata, ucmd,
+				       resp);
+		if (ret)
+			return ret;
 	} else {
-		if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09)
-			hr_qp->sq.db_reg = hr_dev->mem_base +
-					   HNS_ROCE_DWQE_SIZE * hr_qp->qpn;
-		else
-			hr_qp->sq.db_reg =
-				hr_dev->reg_base + hr_dev->sdb_offset +
-				DB_REG_OFFSET * hr_dev->priv_uar.index;
-
-		hr_qp->rq.db_reg = hr_dev->reg_base + hr_dev->odb_offset +
-				   DB_REG_OFFSET * hr_dev->priv_uar.index;
-
-		if (kernel_qp_has_rdb(hr_dev, init_attr)) {
-			ret = hns_roce_alloc_db(hr_dev, &hr_qp->rdb, 0);
-			if (ret) {
-				ibdev_err(ibdev,
-					  "failed to alloc kernel RQ doorbell, ret = %d.\n",
-					  ret);
-				goto err_out;
-			}
-			*hr_qp->rdb.db_record = 0;
-			hr_qp->en_flags |= HNS_ROCE_QP_CAP_RQ_RECORD_DB;
-		}
+		ret = alloc_kernel_qp_db(hr_dev, hr_qp, init_attr);
+		if (ret)
+			return ret;
 	}
 
 	return 0;
-err_sdb:
-	if (udata && hr_qp->en_flags & HNS_ROCE_QP_CAP_SQ_RECORD_DB)
-		hns_roce_db_unmap_user(uctx, &hr_qp->sdb);
-err_out:
-	return ret;
 }
 
 static void free_qp_db(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH for-next 7/7] RDMA/hns: Delete unnecessary blank lines.
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
                   ` (5 preceding siblings ...)
  2021-08-26 13:37 ` [PATCH for-next 6/7] RDMA/hns: Encapsulate the qp db as a function Wenpeng Liang
@ 2021-08-26 13:37 ` Wenpeng Liang
  2021-08-26 15:33 ` [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Jason Gunthorpe
  7 siblings, 0 replies; 9+ messages in thread
From: Wenpeng Liang @ 2021-08-26 13:37 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, linuxarm, liangwenpeng

From: Xinhao Liu <liuxinhao5@hisilicon.com>

Just delete unnecessary blank lines.

Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 -
 drivers/infiniband/hw/hns/hns_roce_qp.c    | 1 -
 3 files changed, 4 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index c27dc68..5b99531 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5220,7 +5220,6 @@ static int hns_roce_v2_destroy_qp_common(struct hns_roce_dev *hr_dev,
 
 		if (send_cq && send_cq != recv_cq)
 			__hns_roce_v2_cq_clean(send_cq, hr_qp->qpn, NULL);
-
 	}
 
 	hns_roce_qp_remove(hr_dev, hr_qp);
@@ -6360,7 +6359,6 @@ static int hns_roce_hw_v2_init_instance(struct hnae3_handle *handle)
 
 	handle->rinfo.instance_state = HNS_ROCE_STATE_INITED;
 
-
 	return 0;
 
 reset_chk_err:
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 0b91a1a..4d904d5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -1407,7 +1407,6 @@ struct hns_roce_cmq_desc {
 			__le32 rsv[4];
 		} func_info;
 	};
-
 };
 
 struct hns_roce_v2_cmq_ring {
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
index 74c9101..9af4509 100644
--- a/drivers/infiniband/hw/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
@@ -715,7 +715,6 @@ static int alloc_rq_inline_buf(struct hns_roce_qp *hr_qp,
 	/* allocate recv inline buf */
 	wqe_list = kcalloc(wqe_cnt, sizeof(struct hns_roce_rinl_wqe),
 			   GFP_KERNEL);
-
 	if (!wqe_list)
 		goto err;
 
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH for-next 0/7] RDMA/hns: Updates for 5.15
  2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
                   ` (6 preceding siblings ...)
  2021-08-26 13:37 ` [PATCH for-next 7/7] RDMA/hns: Delete unnecessary blank lines Wenpeng Liang
@ 2021-08-26 15:33 ` Jason Gunthorpe
  7 siblings, 0 replies; 9+ messages in thread
From: Jason Gunthorpe @ 2021-08-26 15:33 UTC (permalink / raw)
  To: Wenpeng Liang; +Cc: dledford, linux-rdma, linuxarm

On Thu, Aug 26, 2021 at 09:37:29PM +0800, Wenpeng Liang wrote:
> As usual, this series collects some miscellaneous fixes and cleanups at the
> end of 5.15 for the hns driver:
> 
> * #1 ~ #2 are fixes.
> * #3 ~ #7 are some small cleanups.
> 
> Weihang Li (1):
>   RDMA/hns: Remove RST2RST error prints for hw v1
> 
> Wenpeng Liang (4):
>   RDMA/hns: Fix query destination qpn
>   RDMA/hns: Fix QP's resp incomplete assignment
>   RDMA/hns: Remove dqpn filling when modify qp from Init to Init
>   RDMA/hns: Adjust the order in which irq are requested and enabled
> 
> Xinhao Liu (1):
>   RDMA/hns: Delete unnecessary blank lines.
> 
> Yixing Liu (1):
>   RDMA/hns: Encapsulate the qp db as a function

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-26 15:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 2/7] RDMA/hns: Fix QP's resp incomplete assignment Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 3/7] RDMA/hns: Remove dqpn filling when modify qp from Init to Init Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 4/7] RDMA/hns: Remove RST2RST error prints for hw v1 Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 5/7] RDMA/hns: Adjust the order in which irq are requested and enabled Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 6/7] RDMA/hns: Encapsulate the qp db as a function Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 7/7] RDMA/hns: Delete unnecessary blank lines Wenpeng Liang
2021-08-26 15:33 ` [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).