forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/netronome/nfp/nfp_main.h
....@@ -1,35 +1,5 @@
1
-/*
2
- * Copyright (C) 2015-2017 Netronome Systems, Inc.
3
- *
4
- * This software is dual licensed under the GNU General License Version 2,
5
- * June 1991 as shown in the file COPYING in the top-level directory of this
6
- * source tree or the BSD 2-Clause License provided below. You have the
7
- * option to license this software under the complete terms of either license.
8
- *
9
- * The BSD 2-Clause License:
10
- *
11
- * Redistribution and use in source and binary forms, with or
12
- * without modification, are permitted provided that the following
13
- * conditions are met:
14
- *
15
- * 1. Redistributions of source code must retain the above
16
- * copyright notice, this list of conditions and the following
17
- * disclaimer.
18
- *
19
- * 2. Redistributions in binary form must reproduce the above
20
- * copyright notice, this list of conditions and the following
21
- * disclaimer in the documentation and/or other materials
22
- * provided with the distribution.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- */
1
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2
+/* Copyright (C) 2015-2018 Netronome Systems, Inc. */
333
344 /*
355 * nfp_main.h
....@@ -72,7 +42,7 @@
7242 */
7343 struct nfp_dumpspec {
7444 u32 size;
75
- u8 data[0];
45
+ u8 data[];
7646 };
7747
7848 /**
....@@ -94,6 +64,7 @@
9464 * @limit_vfs: Number of VFs supported by firmware (~0 for PCI limit)
9565 * @num_vfs: Number of SR-IOV VFs enabled
9666 * @fw_loaded: Is the firmware loaded?
67
+ * @unload_fw_on_remove:Do we need to unload firmware on driver removal?
9768 * @ctrl_vnic: Pointer to the control vNIC if available
9869 * @mip: MIP handle
9970 * @rtbl: RTsym table
....@@ -140,6 +111,7 @@
140111 unsigned int num_vfs;
141112
142113 bool fw_loaded;
114
+ bool unload_fw_on_remove;
143115
144116 struct nfp_net *ctrl_vnic;
145117
....@@ -194,6 +166,8 @@
194166 unsigned int min_size, struct nfp_cpp_area **area);
195167 int nfp_mbox_cmd(struct nfp_pf *pf, u32 cmd, void *in_data, u64 in_length,
196168 void *out_data, u64 out_length);
169
+int nfp_flash_update_common(struct nfp_pf *pf, const char *path,
170
+ struct netlink_ext_ack *extack);
197171
198172 enum nfp_dump_diag {
199173 NFP_DUMP_NSP_DIAG = 0,
....@@ -213,4 +187,7 @@
213187 int nfp_shared_buf_pool_set(struct nfp_pf *pf, unsigned int sb,
214188 u16 pool_index, u32 size,
215189 enum devlink_sb_threshold_type threshold_type);
190
+
191
+int nfp_devlink_params_register(struct nfp_pf *pf);
192
+void nfp_devlink_params_unregister(struct nfp_pf *pf);
216193 #endif /* NFP_MAIN_H */