RDMA/bnxt_re: Fix the offset for GenP7 adapters for user applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>

commit 9248f363d0791a548a9c7711365b8be4c70bd375 upstream.

User Doorbell page indexes start at an offset for GenP7 adapters.
Fix the offset that will be used for user doorbell page indexes.

Fixes: a62d68581441 ("RDMA/bnxt_re: Update the BAR offsets")
Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/1702987900-5363-1-git-send-email-selvin.xavier@xxxxxxxxxxxx
Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/infiniband/hw/bnxt_re/main.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -107,12 +107,14 @@ static void bnxt_re_set_db_offset(struct
 		dev_info(rdev_to_dev(rdev),
 			 "Couldn't get DB bar size, Low latency framework is disabled\n");
 	/* set register offsets for both UC and WC */
-	if (bnxt_qplib_is_chip_gen_p7(cctx))
+	if (bnxt_qplib_is_chip_gen_p7(cctx)) {
 		res->dpi_tbl.ucreg.offset = offset;
-	else
+		res->dpi_tbl.wcreg.offset = en_dev->l2_db_size;
+	} else {
 		res->dpi_tbl.ucreg.offset = res->is_vf ? BNXT_QPLIB_DBR_VF_DB_OFFSET :
 							 BNXT_QPLIB_DBR_PF_DB_OFFSET;
-	res->dpi_tbl.wcreg.offset = res->dpi_tbl.ucreg.offset;
+		res->dpi_tbl.wcreg.offset = res->dpi_tbl.ucreg.offset;
+	}
 
 	/* If WC mapping is disabled by L2 driver then en_dev->l2_db_size
 	 * is equal to the DB-Bar actual size. This indicates that L2


Patches currently in stable-queue which might be from selvin.xavier@xxxxxxxxxxxx are

queue-6.6/rdma-bnxt_re-fix-the-offset-for-genp7-adapters-for-user-applications.patch
queue-6.6/rdma-bnxt_re-support-new-5760x-p7-devices.patch
queue-6.6/rdma-bnxt_re-fix-the-gid-table-length.patch
queue-6.6/rdma-bnxt_re-fix-a-possible-memory-leak.patch
queue-6.6/rdma-bnxt_re-fix-out-of-bound-check.patch
queue-6.6/rdma-bnxt_re-fix-the-max-cq-wqes-for-older-adapters.patch
queue-6.6/rdma-bnxt_re-return-more-meaningful-error.patch
queue-6.6/rdma-bnxt_re-fix-unconditional-fence-for-newer-adapters.patch
queue-6.6/rdma-bnxt_re-avoid-creating-fence-mr-for-newer-adapters.patch
queue-6.6/rdma-bnxt_re-fix-incorrect-avid-type-in-wqe-structur.patch
queue-6.6/rdma-bnxt_re-add-a-check-for-memory-allocation.patch
queue-6.6/rdma-bnxt_re-fix-a-bug-while-setting-up-level-2-pbl-.patch
queue-6.6/rdma-bnxt_re-update-the-bar-offsets.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux