1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/infiniband/hw/hns
Jason Gunthorpe e0477b34d9 RDMA: Explicitly pass in the dma_device to ib_register_device
The code in setup_dma_device has become rather convoluted, move all of
this to the drivers. Drives now pass in a DMA capable struct device which
will be used to setup DMA, or drivers must fully configure the ibdev for
DMA and pass in NULL.

Other than setting the masks in rvt all drivers were doing this already
anyhow.

mthca, mlx4 and mlx5 were already setting up maximum DMA segment size for
DMA based on their hardweare limits in:
__mthca_init_one()
  dma_set_max_seg_size (1G)

__mlx4_init_one()
  dma_set_max_seg_size (1G)

mlx5_pci_init()
  set_dma_caps()
    dma_set_max_seg_size (2G)

Other non software drivers (except usnic) were extended to UINT_MAX [1, 2]
instead of 2G as was before.

[1] https://lore.kernel.org/linux-rdma/20200924114940.GE9475@nvidia.com/
[2] https://lore.kernel.org/linux-rdma/20200924114940.GE9475@nvidia.com/

Link: https://lore.kernel.org/r/20201008082752.275846-1-leon@kernel.org
Link: https://lore.kernel.org/r/6b2ed339933d066622d5715903870676d8cc523a.1602590106.git.mchehab+huawei@kernel.org
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-10-16 13:53:46 -03:00
..
hns_roce_ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
hns_roce_alloc.c RDMA/umem: Add rdma_umem_for_each_dma_block() 2020-09-09 15:33:17 -03:00
hns_roce_cmd.c RDMA/hns: Optimize cmd init and mode selection for hip08 2019-09-16 10:52:20 -03:00
hns_roce_cmd.h RDMA/hns: Rename the functions used inside creating cq 2019-11-25 10:31:48 -04:00
hns_roce_common.h RDMA/hns: Remove unused code about assert 2020-05-25 14:02:12 -03:00
hns_roce_cq.c RDMA/hns: Correct typo of hns_roce_create_cq() 2020-09-24 15:56:27 -03:00
hns_roce_db.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
hns_roce_device.h RDMA/hns: Remove unused variables and definitions 2020-09-29 14:01:20 -03:00
hns_roce_hem.c RDMA/hns: Add support for SCCC in size of 64 Bytes 2020-09-24 15:35:11 -03:00
hns_roce_hem.h RDMA/hns: Change all page_shift to unsigned 2020-05-25 14:02:12 -03:00
hns_roce_hw_v1.c RDMA/hns: Add support for QPC in size of 512 Bytes 2020-09-24 15:35:11 -03:00
hns_roce_hw_v1.h RDMA/hns: Add support for QPC in size of 512 Bytes 2020-09-24 15:35:11 -03:00
hns_roce_hw_v2.c RDMA/hns: Support inline data in extented sge space for RC 2020-09-24 16:06:57 -03:00
hns_roce_hw_v2.h RDMA/hns: Support inline data in extented sge space for RC 2020-09-24 16:06:57 -03:00
hns_roce_hw_v2_dfx.c RDMA/hns: Dump detailed driver-specific CQ 2019-04-08 13:05:25 -03:00
hns_roce_main.c RDMA: Explicitly pass in the dma_device to ib_register_device 2020-10-16 13:53:46 -03:00
hns_roce_mr.c RDMA: Clean MW allocation and free flows 2020-09-17 14:04:32 -03:00
hns_roce_pd.c RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
hns_roce_qp.c RDMA/hns: Remove unused variables and definitions 2020-09-29 14:01:20 -03:00
hns_roce_restrack.c RDMA: Add a dedicated CQ resource tracker function 2020-06-23 11:46:27 -03:00
hns_roce_srq.c RDMA: Restore ability to fail on SRQ destroy 2020-09-09 14:14:24 -03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile RDMA/hns: Fix build error again 2019-10-29 16:16:54 -03:00