RDMA/umem: Replace for_each_sg_dma_page with rdma_umem_for_each_dma_block
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Sep 2020 22:41:46 +0000 (19:41 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 9 Sep 2020 18:33:17 +0000 (15:33 -0300)
commit89603f7e7e5a6b719f1a163a05bd8a9231b58318
tree5b3a35c74fa3f9e60013e9871b7f0ce8346116a7
parentebc24096c4c40017d9f9b0fddc5d69b94ad10369
RDMA/umem: Replace for_each_sg_dma_page with rdma_umem_for_each_dma_block

Generally drivers should be using this core helper to split up the umem
into DMA pages.

These drivers are all probably wrong in some way to pass PAGE_SIZE in as
the HW page size. Either the driver doesn't support other page sizes and
it should use 4096, or the driver does support other page sizes and should
use ib_umem_find_best_pgsz() to select the best HW pages size of the HW
supported set.

The only case it could be correct is if the HW has a global setting for
PAGE_SIZE set at driver initialization time.

Link: https://lore.kernel.org/r/5-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/cxgb4/mem.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c