Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Alok Prasad <palok@marvell.com>
To: <jgg@ziepe.ca>, <dledford@redhat.com>
Cc: <michal.kalderon@marvell.com>, <ariel.elior@marvell.com>,
	<linux-rdma@vger.kernel.org>, Alok Prasad <palok@marvell.com>,
	"Michal Kalderon" <mkalderon@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>
Subject: [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix.
Date: Fri, 27 Nov 2020 09:08:32 +0000	[thread overview]
Message-ID: <20201127090832.11191-1-palok@marvell.com> (raw)

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


             reply	other threads:[~2020-11-27  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  9:08 Alok Prasad [this message]
2020-11-27 13:06 ` [PATCH for-rc] RDMA/qedr: iWARP invalid(zero) doorbell address fix Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201127090832.11191-1-palok@marvell.com \
    --to=palok@marvell.com \
    --cc=ariel.elior@marvell.com \
    --cc=dledford@redhat.com \
    --cc=irusskikh@marvell.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michal.kalderon@marvell.com \
    --cc=mkalderon@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox