]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/i40iw: Use ib_umem_num_dma_pages()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Sep 2020 22:41:49 +0000 (19:41 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Sep 2020 13:24:53 +0000 (10:24 -0300)
commit1e1a70e3ec60145e4a687fe11be0076378056285
tree09a29eb70b7cb14013601f873aafbc2d04db5fba
parent373ced084c897809fe82fcd653593c2c2b9284c2
RDMA/i40iw: Use ib_umem_num_dma_pages()

If ib_umem_find_best_pgsz() returns > PAGE_SIZE then the equation here is
not correct. 'start' should be 'virt'. Change it to use the core code for
page_num and the canonical calculation of page_shift.

Fixes: 028d13ef4b53 ("RDMA/i40iw: Use core helpers to get aligned DMA address within a supported page size")
Link: https://lore.kernel.org/r/8-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c