aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/agent.c
diff options
context:
space:
mode:
authorGal Pressman <galpress@amazon.com>2018-12-12 11:09:06 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-12-19 16:28:03 -0700
commit2553ba217eea37dc6291635ecddb883fb5c36a8b (patch)
tree601a970ef10dbdd2aeafd40d71233d3aa5f68cdd /drivers/infiniband/core/agent.c
parentRDMA: Mark if create address handle is in a sleepable context (diff)
downloadlinux-dev-2553ba217eea37dc6291635ecddb883fb5c36a8b.tar.xz
linux-dev-2553ba217eea37dc6291635ecddb883fb5c36a8b.zip
RDMA: Mark if destroy address handle is in a sleepable context
Introduce a 'flags' field to destroy address handle callback and add a flag that marks whether the callback is executed in an atomic context or not. This will allow drivers to wait for completion instead of polling for it when it is allowed. Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/agent.c')
-rw-r--r--drivers/infiniband/core/agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c
index 324ef85a13b6..f82b4260de42 100644
--- a/drivers/infiniband/core/agent.c
+++ b/drivers/infiniband/core/agent.c
@@ -137,13 +137,13 @@ void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *
err2:
ib_free_send_mad(send_buf);
err1:
- rdma_destroy_ah(ah);
+ rdma_destroy_ah(ah, RDMA_DESTROY_AH_SLEEPABLE);
}
static void agent_send_handler(struct ib_mad_agent *mad_agent,
struct ib_mad_send_wc *mad_send_wc)
{
- rdma_destroy_ah(mad_send_wc->send_buf->ah);
+ rdma_destroy_ah(mad_send_wc->send_buf->ah, RDMA_DESTROY_AH_SLEEPABLE);
ib_free_send_mad(mad_send_wc->send_buf);
}