From: Kamal Heib Date: Sun, 20 Jun 2021 20:15:03 +0000 (+0300) Subject: RDMA/irdma: Use the queried port attributes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=feda49a1a550d271593cbe9d198527cfd78dd8c4;p=linux.git RDMA/irdma: Use the queried port attributes 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") Link: https://lore.kernel.org/r/20210620201503.67055-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 1e48077f0af48..5bb46a4d26ffc 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3633,7 +3633,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; }