RDMA/hns: Fix page size cap from firmware
authorChengchang Tang <tangchengchang@huawei.com>
Sat, 26 Nov 2022 10:29:09 +0000 (18:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:26 +0000 (13:14 +0100)
commitb06bb747ce1ff1840009e721238806ce42d5a762
treefcc41642a1ff95e2120e717c23de7949c2617950
parent4c05c7cf25813a415001f8b9d07c1dcb10abfa03
RDMA/hns: Fix page size cap from firmware

[ Upstream commit 99dc5a0712883d5d13b620d25b3759d429577bc8 ]

Add verification to make sure the roce page size cap is supported by the
system page size.

Fixes: ba6bb7e97421 ("RDMA/hns: Add interfaces to get pf capabilities from firmware")
Link: https://lore.kernel.org/r/20221126102911.2921820-5-xuhaoyue1@hisilicon.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c