blob: 8d9619478807799ab9af73c5d5583828d6a263a7 [file] [log] [blame]
Dennis Dalessandrocf163352016-01-06 10:00:42 -08001/*
2 * Copyright(c) 2015 Intel Corporation.
3 *
4 * This file is provided under a dual BSD/GPLv2 license. When using or
5 * redistributing this file, you may do so under either license.
6 *
7 * GPL LICENSE SUMMARY
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * BSD LICENSE
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 *
24 * - Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * - Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in
28 * the documentation and/or other materials provided with the
29 * distribution.
30 * - Neither the name of Intel Corporation nor the names of its
31 * contributors may be used to endorse or promote products derived
32 * from this software without specific prior written permission.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
41 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
42 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 *
46 */
47
48#include "cq.h"
49
50/**
51 * rvt_create_cq - create a completion queue
52 * @ibdev: the device this completion queue is attached to
53 * @attr: creation attributes
54 * @context: unused by the QLogic_IB driver
55 * @udata: user data for libibverbs.so
56 *
57 * Returns a pointer to the completion queue or negative errno values
58 * for failure.
59 *
60 * Called by ib_create_cq() in the generic verbs code.
61 */
62struct ib_cq *rvt_create_cq(struct ib_device *ibdev,
63 const struct ib_cq_init_attr *attr,
64 struct ib_ucontext *context,
65 struct ib_udata *udata)
66{
67 return ERR_PTR(-EOPNOTSUPP);
68}
69
70/**
71 * rvt_destroy_cq - destroy a completion queue
72 * @ibcq: the completion queue to destroy.
73 *
74 * Returns 0 for success.
75 *
76 * Called by ib_destroy_cq() in the generic verbs code.
77 */
78int rvt_destroy_cq(struct ib_cq *ibcq)
79{
80 return -EOPNOTSUPP;
81}
82
83int rvt_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
84{
85 return -EOPNOTSUPP;
86}
87
88/**
89 * rvt_resize_cq - change the size of the CQ
90 * @ibcq: the completion queue
91 *
92 * Returns 0 for success.
93 */
94int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
95{
96 return -EOPNOTSUPP;
97}
98
99/**
100 * rvt_poll_cq - poll for work completion entries
101 * @ibcq: the completion queue to poll
102 * @num_entries: the maximum number of entries to return
103 * @entry: pointer to array where work completions are placed
104 *
105 * Returns the number of completion entries polled.
106 *
107 * This may be called from interrupt context. Also called by ib_poll_cq()
108 * in the generic verbs code.
109 */
110int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
111{
112 return -EOPNOTSUPP;
113}