hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h
....@@ -1,16 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Huawei HiNIC PCI Express Linux driver
34 * Copyright(c) 2017 Huawei Technologies Co., Ltd
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms and conditions of the GNU General Public License,
7
- * version 2, as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- * for more details.
13
- *
145 */
156
167 #ifndef HINIC_HW_EQS_H
....@@ -152,8 +143,9 @@
152143 };
153144
154145 enum hinic_aeq_type {
146
+ HINIC_MBX_FROM_FUNC = 1,
155147 HINIC_MSG_FROM_MGMT_CPU = 2,
156
-
148
+ HINIC_MBX_SEND_RSLT = 5,
157149 HINIC_MAX_AEQ_EVENTS,
158150 };
159151
....@@ -170,7 +162,7 @@
170162
171163 struct hinic_aeq_elem {
172164 u8 data[HINIC_AEQE_DATA_SIZE];
173
- u32 desc;
165
+ __be32 desc;
174166 };
175167
176168 struct hinic_eq_work {
....@@ -180,7 +172,7 @@
180172
181173 struct hinic_eq {
182174 struct hinic_hwif *hwif;
183
-
175
+ struct hinic_hwdev *hwdev;
184176 enum hinic_eq_type type;
185177 int q_id;
186178 u32 q_len;
....@@ -194,6 +186,7 @@
194186 int num_elem_in_pg;
195187
196188 struct msix_entry msix_entry;
189
+ char irq_name[64];
197190
198191 dma_addr_t *dma_addr;
199192 void **virt_addr;
....@@ -228,7 +221,7 @@
228221
229222 struct hinic_ceqs {
230223 struct hinic_hwif *hwif;
231
-
224
+ struct hinic_hwdev *hwdev;
232225 struct hinic_eq ceq[HINIC_MAX_CEQS];
233226 int num_ceqs;
234227
....@@ -262,4 +255,8 @@
262255
263256 void hinic_ceqs_free(struct hinic_ceqs *ceqs);
264257
258
+void hinic_dump_ceq_info(struct hinic_hwdev *hwdev);
259
+
260
+void hinic_dump_aeq_info(struct hinic_hwdev *hwdev);
261
+
265262 #endif