On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote:
> @@ -1341,7 +1322,14 @@ int ib_register_device(struct ib_device *device, const 
> char *name,
>       if (ret)
>               return ret;
>  
> -     setup_dma_device(device, dma_device);
> +     /*
> +      * If the caller does not provide a DMA capable device then the IB core
> +      * will set up ib_sge and scatterlist structures that stash the kernel
> +      * virtual address into the address field.
> +      */
> +     device->dma_device = dma_device;
> +     WARN_ON(dma_device && !dma_device->dma_parms);

I noticed there were a couple of places expecting dma_device to be set
to !NULL:

drivers/infiniband/core/umem.c:                 
dma_get_max_seg_size(device->dma_device), sg, npages,
drivers/nvme/host/rdma.c:       ctrl->ctrl.numa_node = 
dev_to_node(ctrl->device->dev->dma_device);
net/rds/ib.c:                                              device->dma_device,

No sure what to do about RDS..

Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to