forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/qlogic/qed/qed_int.h
....@@ -1,33 +1,7 @@
1
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
12 /* QLogic qed NIC Driver
23 * Copyright (c) 2015-2017 QLogic Corporation
3
- *
4
- * This software is available to you under a choice of one of two
5
- * licenses. You may choose to be licensed under the terms of the GNU
6
- * General Public License (GPL) Version 2, available from the file
7
- * COPYING in the main directory of this source tree, or the
8
- * OpenIB.org BSD license below:
9
- *
10
- * Redistribution and use in source and binary forms, with or
11
- * without modification, are permitted provided that the following
12
- * conditions are met:
13
- *
14
- * - Redistributions of source code must retain the above
15
- * copyright notice, this list of conditions and the following
16
- * disclaimer.
17
- *
18
- * - Redistributions in binary form must reproduce the above
19
- * copyright notice, this list of conditions and the following
20
- * disclaimer in the documentation and /or other materials
21
- * provided with the distribution.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
4
+ * Copyright (c) 2019-2020 Marvell International Ltd.
315 */
326
337 #ifndef _QED_INT_H
....@@ -37,14 +11,14 @@
3711 #include <linux/slab.h>
3812 #include "qed.h"
3913
40
-/* Fields of IGU PF CONFIGRATION REGISTER */
14
+/* Fields of IGU PF CONFIGURATION REGISTER */
4115 #define IGU_PF_CONF_FUNC_EN (0x1 << 0) /* function enable */
4216 #define IGU_PF_CONF_MSI_MSIX_EN (0x1 << 1) /* MSI/MSIX enable */
4317 #define IGU_PF_CONF_INT_LINE_EN (0x1 << 2) /* INT enable */
4418 #define IGU_PF_CONF_ATTN_BIT_EN (0x1 << 3) /* attention enable */
4519 #define IGU_PF_CONF_SINGLE_ISR_EN (0x1 << 4) /* single ISR mode enable */
4620 #define IGU_PF_CONF_SIMD_MODE (0x1 << 5) /* simd all ones mode */
47
-/* Fields of IGU VF CONFIGRATION REGISTER */
21
+/* Fields of IGU VF CONFIGURATION REGISTER */
4822 #define IGU_VF_CONF_FUNC_EN (0x1 << 0) /* function enable */
4923 #define IGU_VF_CONF_MSI_MSIX_EN (0x1 << 1) /* MSI/MSIX enable */
5024 #define IGU_VF_CONF_SINGLE_ISR_EN (0x1 << 4) /* single ISR mode enable */
....@@ -166,7 +140,7 @@
166140 * @param p_hwfn - pointer to hwfn
167141 *
168142 */
169
-void qed_int_sp_dpc(unsigned long hwfn_cookie);
143
+void qed_int_sp_dpc(struct tasklet_struct *t);
170144
171145 /**
172146 * @brief qed_int_get_num_sbs - get the number of status
....@@ -189,6 +163,27 @@
189163 *
190164 */
191165 void qed_int_disable_post_isr_release(struct qed_dev *cdev);
166
+
167
+/**
168
+ * @brief qed_int_attn_clr_enable - sets whether the general behavior is
169
+ * preventing attentions from being reasserted, or following the
170
+ * attributes of the specific attention.
171
+ *
172
+ * @param cdev
173
+ * @param clr_enable
174
+ *
175
+ */
176
+void qed_int_attn_clr_enable(struct qed_dev *cdev, bool clr_enable);
177
+
178
+/**
179
+ * @brief - Doorbell Recovery handler.
180
+ * Run doorbell recovery in case of PF overflow (and flush DORQ if
181
+ * needed).
182
+ *
183
+ * @param p_hwfn
184
+ * @param p_ptt
185
+ */
186
+int qed_db_rec_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
192187
193188 #define QED_CAU_DEF_RX_TIMER_RES 0
194189 #define QED_CAU_DEF_TX_TIMER_RES 0
....@@ -421,4 +416,7 @@
421416
422417 #define QED_MAPPING_MEMORY_SIZE(dev) (NUM_OF_SBS(dev))
423418
419
+int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
420
+ bool hw_init);
421
+
424422 #endif