Instead of hard code the gid_table_len value, use the value from the ib_query_port() attributes. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx> --- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index e8b170f0d997..5ae5dbcbc3a5 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3627,7 +3627,7 @@ static int irdma_iw_port_immutable(struct ib_device *ibdev, u32 port_num, err = ib_query_port(ibdev, port_num, &attr); if (err) return err; - immutable->gid_tbl_len = 1; + immutable->gid_tbl_len = attr.gid_tbl_len; return 0; } -- 2.31.1