OSDN Git Service

RDMA/core: Set DMA parameters correctly
authorBart Van Assche <bvanassche@acm.org>
Fri, 25 Oct 2019 22:58:30 +0000 (15:58 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 28 Oct 2019 17:52:04 +0000 (14:52 -0300)
commitc9121262d57b8a3be4f08073546436ba0128ca6a
tree4d06c1748604eeaedfa1ea7e34ca21b1b770befc
parenta401fb819cd6586c2c983dc199be4a9b44c30661
RDMA/core: Set DMA parameters correctly

The dma_set_max_seg_size() call in setup_dma_device() does not have any
effect since device->dev.dma_parms is NULL. Fix this by initializing
device->dev.dma_parms first.

Link: https://lore.kernel.org/r/20191025225830.257535-5-bvanassche@acm.org
Fixes: d10bcf947a3e ("RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c