Skip to content

Commit

Permalink
RDMA/hns: Fix wrong maximum DMA segment size
Browse files Browse the repository at this point in the history
Set maximum DMA segment size to 2G instead of UINT_MAX due to HW limit.

Fixes: e0477b3 ("RDMA: Explicitly pass in the dma_device to ib_register_device")
Link: https://patch.msgid.link/r/20250327114724.3454268-3-huangjunxian6@hisilicon.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
  • Loading branch information
Chengchang Tang authored and Jason Gunthorpe committed Apr 7, 2025
1 parent 1b2fe85 commit 9beb2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/hns/hns_roce_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
if (ret)
return ret;
}
dma_set_max_seg_size(dev, UINT_MAX);
dma_set_max_seg_size(dev, SZ_2G);
ret = ib_register_device(ib_dev, "hns_%d", dev);
if (ret) {
dev_err(dev, "ib_register_device failed!\n");
Expand Down

0 comments on commit 9beb2c9

Please sign in to comment.