]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/bnxt_re: Fix incorrect BAR check in bnxt_qplib_map_creq_db()
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Wed, 17 Dec 2025 10:01:41 +0000 (02:01 -0800)
committerLeon Romanovsky <leon@kernel.org>
Sun, 21 Dec 2025 09:32:47 +0000 (04:32 -0500)
commit145a417a39d7efbc881f52e829817376972b278c
tree77d30c3b6c6ed9bf7e89f98ec378f0fdf0db9b3c
parent8aaa848eaddd9ef8680fc6aafbd3a0646da5df40
RDMA/bnxt_re: Fix incorrect BAR check in bnxt_qplib_map_creq_db()

RCFW_COMM_CONS_PCI_BAR_REGION is defined as BAR 2, so checking
!creq_db->reg.bar_id is incorrect and always false.

pci_resource_start() returns the BAR base address, and a value of 0
indicates that the BAR is unassigned. Update the condition to test
bar_base == 0 instead.

This ensures the driver detects and logs an error for an unassigned
RCFW communication BAR.

Fixes: cee0c7bba486 ("RDMA/bnxt_re: Refactor command queue management code")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20251217100158.752504-1-alok.a.tiwari@oracle.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c