Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix.
@ 2020-11-27  9:08 Alok Prasad
  2020-11-27 13:06 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Alok Prasad @ 2020-11-27  9:08 UTC (permalink / raw)
  To: jgg, dledford
  Cc: michal.kalderon, ariel.elior, linux-rdma, Alok Prasad,
	Michal Kalderon, Igor Russkikh

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(+)

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,
-- 
2.27.0


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

* Re: [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix.
  2020-11-27  9:08 [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix Alok Prasad
@ 2020-11-27 13:06 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-11-27 13:06 UTC (permalink / raw)
  To: Alok Prasad
  Cc: dledford, michal.kalderon, ariel.elior, linux-rdma,
	Michal Kalderon, Igor Russkikh

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

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

end of thread, other threads:[~2020-11-27 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27  9:08 [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix Alok Prasad
2020-11-27 13:06 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox