| .. | .. |
|---|
| 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. */ |
|---|
| 33 | 3 | |
|---|
| 34 | 4 | /* |
|---|
| 35 | 5 | * nfp_main.h |
|---|
| .. | .. |
|---|
| 72 | 42 | */ |
|---|
| 73 | 43 | struct nfp_dumpspec { |
|---|
| 74 | 44 | u32 size; |
|---|
| 75 | | - u8 data[0]; |
|---|
| 45 | + u8 data[]; |
|---|
| 76 | 46 | }; |
|---|
| 77 | 47 | |
|---|
| 78 | 48 | /** |
|---|
| .. | .. |
|---|
| 94 | 64 | * @limit_vfs: Number of VFs supported by firmware (~0 for PCI limit) |
|---|
| 95 | 65 | * @num_vfs: Number of SR-IOV VFs enabled |
|---|
| 96 | 66 | * @fw_loaded: Is the firmware loaded? |
|---|
| 67 | + * @unload_fw_on_remove:Do we need to unload firmware on driver removal? |
|---|
| 97 | 68 | * @ctrl_vnic: Pointer to the control vNIC if available |
|---|
| 98 | 69 | * @mip: MIP handle |
|---|
| 99 | 70 | * @rtbl: RTsym table |
|---|
| .. | .. |
|---|
| 140 | 111 | unsigned int num_vfs; |
|---|
| 141 | 112 | |
|---|
| 142 | 113 | bool fw_loaded; |
|---|
| 114 | + bool unload_fw_on_remove; |
|---|
| 143 | 115 | |
|---|
| 144 | 116 | struct nfp_net *ctrl_vnic; |
|---|
| 145 | 117 | |
|---|
| .. | .. |
|---|
| 194 | 166 | unsigned int min_size, struct nfp_cpp_area **area); |
|---|
| 195 | 167 | int nfp_mbox_cmd(struct nfp_pf *pf, u32 cmd, void *in_data, u64 in_length, |
|---|
| 196 | 168 | 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); |
|---|
| 197 | 171 | |
|---|
| 198 | 172 | enum nfp_dump_diag { |
|---|
| 199 | 173 | NFP_DUMP_NSP_DIAG = 0, |
|---|
| .. | .. |
|---|
| 213 | 187 | int nfp_shared_buf_pool_set(struct nfp_pf *pf, unsigned int sb, |
|---|
| 214 | 188 | u16 pool_index, u32 size, |
|---|
| 215 | 189 | 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); |
|---|
| 216 | 193 | #endif /* NFP_MAIN_H */ |
|---|