diff mbox series

[for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix.

Message ID 20201127090832.11191-1-palok@marvell.com (mailing list archive)
State Superseded
Headers show
Series [for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix. | expand

Commit Message

Alok Prasad Nov. 27, 2020, 9:08 a.m. UTC
This patch fixes issue introduced by a previous commit
where iWARP doorbell address wasn't initialized, causing
call trace when any RDMA application wants to use this
interface.

Fixes: 06e8d1df46ed ("RDMA/qedr: Add support for user mode XRC-SRQ's")
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
---
 drivers/infiniband/hw/qedr/verbs.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Jason Gunthorpe Nov. 27, 2020, 1:06 p.m. UTC | #1
On Fri, Nov 27, 2020 at 09:08:32AM +0000, Alok Prasad wrote:
> This patch fixes issue introduced by a previous commit
> where iWARP doorbell address wasn't initialized, causing
> call trace when any RDMA application wants to use this
> interface.

Include the call trace in the commit message

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 019642ff24a7..511c95bb3d01 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1936,6 +1936,15 @@  static int qedr_create_user_qp(struct qedr_dev *dev,
 	}
 
 	if (rdma_protocol_iwarp(&dev->ibdev, 1)) {
+		qp->urq.db_rec_db2_addr = ctx->dpi_addr + uresp.rq_db2_offset;
+
+		/* calculate the db_rec_db2 data since it is constant so no
+		 * need to reflect from user
+		 */
+		qp->urq.db_rec_db2_data.data.icid = cpu_to_le16(qp->icid);
+		qp->urq.db_rec_db2_data.data.value =
+			cpu_to_le16(DQ_TCM_IWARP_POST_RQ_CF_CMD);
+
 		rc = qedr_db_recovery_add(dev, qp->urq.db_rec_db2_addr,
 					  &qp->urq.db_rec_db2_data,
 					  DB_REC_WIDTH_32B,