summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/bnxt_re/qplib_res.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2020-09-29 21:24:35 -0300
committerJason Gunthorpe <jgg@nvidia.com>2020-10-06 16:45:53 -0300
commit6ef999f500213284bb038f1ff0c402791c60e380 (patch)
treedcc4d686b70a9053804bf5e52d6c37f6ef52ac7d /drivers/infiniband/hw/bnxt_re/qplib_res.h
parent5ce2dced8e95e76ff7439863a118a053a7fc6f91 (diff)
downloadlinux-stable-6ef999f500213284bb038f1ff0c402791c60e380.tar.gz
linux-stable-6ef999f500213284bb038f1ff0c402791c60e380.tar.bz2
linux-stable-6ef999f500213284bb038f1ff0c402791c60e380.zip
RDMA/bnxt_re: Use rdma_umem_for_each_dma_block()
This driver is taking the SGL out of the umem and passing it through a struct bnxt_qplib_sg_info. Instead of passing the SGL pass the umem and then use rdma_umem_for_each_dma_block() directly. Move the calls of ib_umem_num_dma_blocks() closer to their actual point of use, npages is only set for non-umem pbl flows. Link: https://lore.kernel.org/r/0-v1-b37437a73f35+49c-bnxt_re_dma_block_jgg@nvidia.com Acked-by: Selvin Xavier <selvin.xavier@broadcom.com> Tested-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_res.h')
-rw-r--r--drivers/infiniband/hw/bnxt_re/qplib_res.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h
index 9da470d1e4a3..7a1ab38b95da 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h
@@ -126,8 +126,7 @@ struct bnxt_qplib_pbl {
};
struct bnxt_qplib_sg_info {
- struct scatterlist *sghead;
- u32 nmap;
+ struct ib_umem *umem;
u32 npages;
u32 pgshft;
u32 pgsize;