]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/siw: Increase DMA max_segment_size parameter
authorBart Van Assche <bvanassche@acm.org>
Fri, 25 Oct 2019 22:58:29 +0000 (15:58 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 28 Oct 2019 17:52:04 +0000 (14:52 -0300)
Increase the DMA max_segment_size parameter from 64 KB to 2 GB.

Link: https://lore.kernel.org/r/20191025225830.257535-4-bvanassche@acm.org
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/sw/siw/siw.h
drivers/infiniband/sw/siw/siw_main.c

index dba4535494abdc28a5317e1b96ea3cb3b8e7a852..1ea3ed249e7be9325119d3b118ca0f4a62253c90 100644 (file)
@@ -70,6 +70,7 @@ struct siw_pd {
 
 struct siw_device {
        struct ib_device base_dev;
+       struct device_dma_parameters dma_parms;
        struct net_device *netdev;
        struct siw_dev_cap attrs;
 
index b8fe43074ad6ae47a852ccf718f262873fdd8840..48e45a852b51ee3fc25c80f7b8759356b671d5fd 100644 (file)
@@ -382,6 +382,9 @@ static struct siw_device *siw_device_create(struct net_device *netdev)
        base_dev->phys_port_cnt = 1;
        base_dev->dev.parent = parent;
        base_dev->dev.dma_ops = &dma_virt_ops;
+       base_dev->dev.dma_parms = &sdev->dma_parms;
+       sdev->dma_parms = (struct device_dma_parameters)
+               { .max_segment_size = SZ_2G };
        base_dev->num_comp_vectors = num_possible_cpus();
 
        ib_set_device_ops(base_dev, &siw_device_ops);