diff mbox series

[for-rc,5/5] RDMA/bnxt_re: Fix reporting hw_ver in query_device

Message ID 20241211083931.968831-6-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted
Headers show
Series bnxt_re Bug fixes | expand

Commit Message

Kalesh AP Dec. 11, 2024, 8:39 a.m. UTC
Driver currently populates subsystem_device id in the
"hw_ver" field of ib_attr structure in query_device.

Updated to populate PCI revision ID.

Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Reviewed-by: Preethi G <preethi.gurusiddalingeswaraswamy@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Dec. 16, 2024, 1:32 p.m. UTC | #1
On Wed, Dec 11, 2024 at 02:09:31PM +0530, Kalesh AP wrote:
> Driver currently populates subsystem_device id in the
> "hw_ver" field of ib_attr structure in query_device.

I applied this patch, but it is not currently, it was the case for last
7 years and it has chances to break your customers.

Thanks

> 
> Updated to populate PCI revision ID.
> 
> Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
> Reviewed-by: Preethi G <preethi.gurusiddalingeswaraswamy@broadcom.com>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index bcb7cfc63d09..e3d26bd6de05 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -199,7 +199,7 @@ int bnxt_re_query_device(struct ib_device *ibdev,
>  
>  	ib_attr->vendor_id = rdev->en_dev->pdev->vendor;
>  	ib_attr->vendor_part_id = rdev->en_dev->pdev->device;
> -	ib_attr->hw_ver = rdev->en_dev->pdev->subsystem_device;
> +	ib_attr->hw_ver = rdev->en_dev->pdev->revision;
>  	ib_attr->max_qp = dev_attr->max_qp;
>  	ib_attr->max_qp_wr = dev_attr->max_qp_wqes;
>  	ib_attr->device_cap_flags =
> -- 
> 2.43.5
>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index bcb7cfc63d09..e3d26bd6de05 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -199,7 +199,7 @@  int bnxt_re_query_device(struct ib_device *ibdev,
 
 	ib_attr->vendor_id = rdev->en_dev->pdev->vendor;
 	ib_attr->vendor_part_id = rdev->en_dev->pdev->device;
-	ib_attr->hw_ver = rdev->en_dev->pdev->subsystem_device;
+	ib_attr->hw_ver = rdev->en_dev->pdev->revision;
 	ib_attr->max_qp = dev_attr->max_qp;
 	ib_attr->max_qp_wr = dev_attr->max_qp_wqes;
 	ib_attr->device_cap_flags =