]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/hns: Fix wrong value of max_sge_rd
authorJunxian Huang <huangjunxian6@hisilicon.com>
Tue, 11 Mar 2025 08:48:57 +0000 (16:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:30:52 +0000 (14:30 +0200)
[ Upstream commit 6b5e41a8b51fce520bb09bd651a29ef495e990de ]

There is no difference between the sge of READ and non-READ
operations in hns RoCE. Set max_sge_rd to the same value as
max_send_sge.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250311084857.3803665-8-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_main.c

index a0f243ffa5b54d8663bc2d18e0a1fb2c42bd98da..f520e43e4e14633a287fb95d8a0576bbe3111ca5 100644 (file)
@@ -199,7 +199,7 @@ static int hns_roce_query_device(struct ib_device *ib_dev,
                                  IB_DEVICE_RC_RNR_NAK_GEN;
        props->max_send_sge = hr_dev->caps.max_sq_sg;
        props->max_recv_sge = hr_dev->caps.max_rq_sg;
-       props->max_sge_rd = 1;
+       props->max_sge_rd = hr_dev->caps.max_sq_sg;
        props->max_cq = hr_dev->caps.num_cqs;
        props->max_cqe = hr_dev->caps.max_cqes;
        props->max_mr = hr_dev->caps.num_mtpts;