forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/net/9p/trans_rdma.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/fs/9p/trans_rdma.c
34 *
....@@ -8,22 +9,6 @@
89 * Copyright (C) 2004-2005 by Latchesar Ionkov <lucho@ionkov.net>
910 * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
1011 * Copyright (C) 1997-2002 by Ron Minnich <rminnich@sarnoff.com>
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2
14
- * as published by the Free Software Foundation.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to:
23
- * Free Software Foundation
24
- * 51 Franklin Street, Fifth Floor
25
- * Boston, MA 02111-1301 USA
26
- *
2712 */
2813
2914 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -109,14 +94,15 @@
10994 struct completion cm_done;
11095 };
11196
97
+struct p9_rdma_req;
98
+
11299 /**
113
- * p9_rdma_context - Keeps track of in-process WR
100
+ * struct p9_rdma_context - Keeps track of in-process WR
114101 *
115102 * @busa: Bus address to unmap when the WR completes
116103 * @req: Keeps track of requests (send)
117104 * @rc: Keepts track of replies (receive)
118105 */
119
-struct p9_rdma_req;
120106 struct p9_rdma_context {
121107 struct ib_cqe cqe;
122108 dma_addr_t busa;
....@@ -127,7 +113,7 @@
127113 };
128114
129115 /**
130
- * p9_rdma_opts - Collection of mount options
116
+ * struct p9_rdma_opts - Collection of mount options
131117 * @port: port of connection
132118 * @sq_depth: The requested depth of the SQ. This really doesn't need
133119 * to be any deeper than the number of threads used in the client
....@@ -700,9 +686,9 @@
700686 goto error;
701687
702688 /* Create the Completion Queue */
703
- rdma->cq = ib_alloc_cq(rdma->cm_id->device, client,
704
- opts.sq_depth + opts.rq_depth + 1,
705
- 0, IB_POLL_SOFTIRQ);
689
+ rdma->cq = ib_alloc_cq_any(rdma->cm_id->device, client,
690
+ opts.sq_depth + opts.rq_depth + 1,
691
+ IB_POLL_SOFTIRQ);
706692 if (IS_ERR(rdma->cq))
707693 goto error;
708694