Skip to content

Commit 9beb2c9

Browse files
Chengchang Tangjgunthorpe
authored andcommitted
RDMA/hns: Fix wrong maximum DMA segment size
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/[email protected] Signed-off-by: Chengchang Tang <[email protected]> Signed-off-by: Junxian Huang <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 1b2fe85 commit 9beb2c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
763763
if (ret)
764764
return ret;
765765
}
766-
dma_set_max_seg_size(dev, UINT_MAX);
766+
dma_set_max_seg_size(dev, SZ_2G);
767767
ret = ib_register_device(ib_dev, "hns_%d", dev);
768768
if (ret) {
769769
dev_err(dev, "ib_register_device failed!\n");

0 commit comments

Comments
 (0)