On Mon, Oct 21, 2019 at 11:10:12AM -0700, Bart Van Assche wrote: > > device->dma_device could be pointing to parent if the caller > > did not provide dma_ops. So wont this update the parent device > > dma params? > > That's correct, this will update the parent device DMA parameters. > > > Also do we want to ensure all callers device max_seg_sz > > params >= threshold (=2G)? If so, perhaps we can do something > > similar to vb2_dma_contig_set_max_seg_size() > > > > https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/media/common/videobuf2/videobuf2-dma-contig.c#L734 > > It depends on what PCIe RDMA adapters support. If all PCIe RDMA adapters > supported by the Linux kernel support max_segment_size >= 2G the above code > is probably the easiest approach. All drivers chop the sgls up into whatever size they support, unlike block we don't need the dma mapper to produce sgls in specific formats. Jason