diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-30 09:49:59 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-30 09:49:59 -0300 |
commit | 6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac (patch) | |
tree | c82270181daeb43eb9984b586784b70f13ef1df4 /drivers/infiniband/hw/qedr | |
parent | 65f90c8e38c9900692338864156e7824cf8a6501 (diff) | |
parent | 79fbd3e1241cea83dded06db2b8bcd5893d877d7 (diff) | |
download | linux-6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac.tar.bz2 |
Merge branch 'sg_nents' into rdma.git for-next
From Maor Gottlieb
====================
Fix the use of nents and orig_nents in the sg table append helpers. The
nents should be used by the DMA layer to store the number of DMA mapped
sges, the orig_nents is the number of CPU sges.
Since the sg append logic doesn't always create a SGL with exactly
orig_nents entries store a total_nents as well to allow the table to be
properly free'd and reorganize the freeing logic to share across all the
use cases.
====================
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
* 'sg_nents':
RDMA: Use the sg_table directly and remove the opencoded version from umem
lib/scatterlist: Fix wrong update of orig_nents
lib/scatterlist: Provide a dedicated function to support table append
Diffstat (limited to 'drivers/infiniband/hw/qedr')
-rw-r--r-- | drivers/infiniband/hw/qedr/verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 18caf2ab0cc1..3fbf172dbbef 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -1495,7 +1495,7 @@ static int qedr_init_srq_user_params(struct ib_udata *udata, return PTR_ERR(srq->prod_umem); } - sg = srq->prod_umem->sg_head.sgl; + sg = srq->prod_umem->sgt_append.sgt.sgl; srq->hw_srq.phy_prod_pair_addr = sg_dma_address(sg); return 0; |