aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/cq.c
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-02-14 12:10:29 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:38:08 -0500
commit90793f7179478df19ac4b2244cfd9764b28e4b38 (patch)
treecdbad7af7b4899bade80236891d381e8fd310c47 /drivers/infiniband/sw/rdmavt/cq.c
parentstaging/rdma/hfi1: Put QPs into error state after SL->SC table changes (diff)
downloadlinux-dev-90793f7179478df19ac4b2244cfd9764b28e4b38.tar.xz
linux-dev-90793f7179478df19ac4b2244cfd9764b28e4b38.zip
IB/rdmavt: Clean up comments and add more documentation
Add, remove, and otherwise clean up existing comments that are leftover from the initial code postings of rdmavt. Many of the comments were added to provide an idea on the direction we were thinking of going. Now that the design is solidified make a pass over and clean everything up. Also add details where lacking. Ensure all non static functions have nano comments. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/cq.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/cq.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/infiniband/sw/rdmavt/cq.c b/drivers/infiniband/sw/rdmavt/cq.c
index 0e6dbe5904ff..c69c0709696a 100644
--- a/drivers/infiniband/sw/rdmavt/cq.c
+++ b/drivers/infiniband/sw/rdmavt/cq.c
@@ -173,10 +173,10 @@ static void send_complete(struct kthread_work *work)
* @context: unused by the QLogic_IB driver
* @udata: user data for libibverbs.so
*
- * Returns a pointer to the completion queue or negative errno values
- * for failure.
- *
* Called by ib_create_cq() in the generic verbs code.
+ *
+ * Return: pointer to the completion queue or negative errno values
+ * for failure.
*/
struct ib_cq *rvt_create_cq(struct ib_device *ibdev,
const struct ib_cq_init_attr *attr,
@@ -286,9 +286,9 @@ done:
* rvt_destroy_cq - destroy a completion queue
* @ibcq: the completion queue to destroy.
*
- * Returns 0 for success.
- *
* Called by ib_destroy_cq() in the generic verbs code.
+ *
+ * Return: always 0
*/
int rvt_destroy_cq(struct ib_cq *ibcq)
{
@@ -313,10 +313,10 @@ int rvt_destroy_cq(struct ib_cq *ibcq)
* @ibcq: the completion queue
* @notify_flags: the type of notification to request
*
- * Returns 0 for success.
- *
* This may be called from interrupt context. Also called by
* ib_req_notify_cq() in the generic verbs code.
+ *
+ * Return: 0 for success.
*/
int rvt_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
{
@@ -345,7 +345,7 @@ int rvt_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
* rvt_resize_cq - change the size of the CQ
* @ibcq: the completion queue
*
- * Returns 0 for success.
+ * Return: 0 for success.
*/
int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
{
@@ -456,10 +456,10 @@ bail_free:
* @num_entries: the maximum number of entries to return
* @entry: pointer to array where work completions are placed
*
- * Returns the number of completion entries polled.
- *
* This may be called from interrupt context. Also called by ib_poll_cq()
* in the generic verbs code.
+ *
+ * Return: the number of completion entries polled.
*/
int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
{
@@ -496,6 +496,12 @@ int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
return npolled;
}
+/**
+ * rvt_driver_cq_init - Init cq resources on behalf of driver
+ * @rdi: rvt dev structure
+ *
+ * Return: 0 on success
+ */
int rvt_driver_cq_init(struct rvt_dev_info *rdi)
{
int ret = 0;
@@ -530,6 +536,10 @@ int rvt_driver_cq_init(struct rvt_dev_info *rdi)
return ret;
}
+/**
+ * rvt_cq_exit - tear down cq reources
+ * @rdi: rvt dev structure
+ */
void rvt_cq_exit(struct rvt_dev_info *rdi)
{
struct kthread_worker *worker;