Skip to content

Commit 8c030d7

Browse files
gal-pressmanjgunthorpe
authored andcommitted
RDMA/efa: Remove .create_ah callback assignment
Drivers now expose two callbacks for address handle creation, one for uverbs and one for kverbs. EFA only supports uverbs so the .create_ah assignment can be removed. Fix the core code caller to check the proper function pointer. Link: https://lore.kernel.org/r/20201115103404.48829-3-galpress@amazon.com Signed-off-by: Gal Pressman <galpress@amazon.com> Acked-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 31e2daa commit 8c030d7

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/infiniband/core/verbs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static struct ib_ah *_rdma_create_ah(struct ib_pd *pd,
516516

517517
might_sleep_if(flags & RDMA_CREATE_AH_SLEEPABLE);
518518

519-
if (!device->ops.create_ah)
519+
if (!udata && !device->ops.create_ah)
520520
return ERR_PTR(-EOPNOTSUPP);
521521

522522
ah = rdma_zalloc_drv_obj_gfp(

‎drivers/infiniband/hw/efa/efa_main.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ static const struct ib_device_ops efa_dev_ops = {
245245
.alloc_hw_stats = efa_alloc_hw_stats,
246246
.alloc_pd = efa_alloc_pd,
247247
.alloc_ucontext = efa_alloc_ucontext,
248-
.create_ah = efa_create_ah,
249248
.create_cq = efa_create_cq,
250249
.create_qp = efa_create_qp,
251250
.create_user_ah = efa_create_ah,

0 commit comments

Comments
 (0)