aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-08 14:10:25 -0500
committerRoland Dreier <rolandd@cisco.com>2005-11-10 13:22:50 -0500
commit40de2e548c225e3ef859e3c60de9785e37e1b5b1 (patch)
treee7b9ffe6fca9246f29a0a3cdf6417770f5821cef
parent0b4ff2c0e624089ad87dc1604e239b7c3201c53f (diff)
[IB] Have cq_resize() method take an int, not int*
Change the struct ib_device.resize_cq() method to take a plain integer that holds the new CQ size, rather than a pointer to an integer that it uses to return the new size. This makes the interface match the exported ib_resize_cq() signature, and allows the low-level driver to update the CQ size with proper locking if necessary. No in-tree drivers are exporting this method yet. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/core/verbs.c12
-rw-r--r--include/rdma/ib_verbs.h2
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 72d3ef786db5..4f51d797f84a 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -324,16 +324,8 @@ EXPORT_SYMBOL(ib_destroy_cq);
324int ib_resize_cq(struct ib_cq *cq, 324int ib_resize_cq(struct ib_cq *cq,
325 int cqe) 325 int cqe)
326{ 326{
327 int ret; 327 return cq->device->resize_cq ?
328 328 cq->device->resize_cq(cq, cqe) : -ENOSYS;
329 if (!cq->device->resize_cq)
330 return -ENOSYS;
331
332 ret = cq->device->resize_cq(cq, &cqe);
333 if (!ret)
334 cq->cqe = cqe;
335
336 return ret;
337} 329}
338EXPORT_SYMBOL(ib_resize_cq); 330EXPORT_SYMBOL(ib_resize_cq);
339 331
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index f72d46d54e0a..a7f4c355a91f 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -881,7 +881,7 @@ struct ib_device {
881 struct ib_ucontext *context, 881 struct ib_ucontext *context,
882 struct ib_udata *udata); 882 struct ib_udata *udata);
883 int (*destroy_cq)(struct ib_cq *cq); 883 int (*destroy_cq)(struct ib_cq *cq);
884 int (*resize_cq)(struct ib_cq *cq, int *cqe); 884 int (*resize_cq)(struct ib_cq *cq, int cqe);
885 int (*poll_cq)(struct ib_cq *cq, int num_entries, 885 int (*poll_cq)(struct ib_cq *cq, int num_entries,
886 struct ib_wc *wc); 886 struct ib_wc *wc);
887 int (*peek_cq)(struct ib_cq *cq, int wc_cnt); 887 int (*peek_cq)(struct ib_cq *cq, int wc_cnt);