1 /* |
1 /* |
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
3 */ |
3 */ |
4 |
4 |
5 /* |
5 /* |
6 * Redistribution and use in source and binary forms, with or without modification, |
6 * Redistribution and use in source and binary forms, with or without |
7 * are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright notice, |
9 * 1. Redistributions of source code must retain the above copyright notice, |
10 * this list of conditions and the following disclaimer. |
10 * this list of conditions and the following disclaimer. |
11 * |
11 * |
12 * 2. Redistributions in binary form must reproduce the above copyright notice, |
12 * 2. Redistributions in binary form must reproduce the above copyright notice, |
13 * this list of conditions and the following disclaimer in the documentation |
13 * this list of conditions and the following disclaimer in the documentation |
14 * and/or other materials provided with the distribution. |
14 * and/or other materials provided with the distribution. |
15 * |
15 * |
16 * 3. Neither the name of the copyright holder nor the names of its contributors |
16 * 3. Neither the name of the copyright holder nor the names of its contributors |
17 * may be used to endorse or promote products derived from this software without |
17 * may be used to endorse or promote products derived from this software |
18 * specific prior written permission. |
18 * without specific prior written permission. |
19 * |
19 * |
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
23 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
23 * ARE DISCLAIMED. |
24 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
24 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY |
25 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
28 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
29 * OF THE POSSIBILITY OF SUCH DAMAGE. |
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ |
31 */ |
31 |
32 |
32 #ifndef _PSIF_HW_DATA_H |
33 #ifndef _PSIF_HW_DATA_H |
33 #define _PSIF_HW_DATA_H |
34 #define _PSIF_HW_DATA_H |
34 |
35 |
45 #include "os_header.h" |
46 #include "os_header.h" |
46 #endif |
47 #endif |
47 |
48 |
48 /* Extent of all psif enums */ |
49 /* Extent of all psif enums */ |
49 enum psif_enum_extent { |
50 enum psif_enum_extent { |
50 PSIF_MMU_TRANSLATION_EXTENT = 0x8, |
51 PSIF_PORT_SPEED_EXTENT = 0x21u, |
51 PSIF_PAGE_SIZE_EXTENT = 0xf, |
52 PSIF_EPSC_DEGRADE_CAUSE_EXTENT = 0x7u, |
52 PSIF_WR_TYPE_EXTENT = 0x8f, |
53 PSIF_MMU_TRANSLATION_EXTENT = 0x8u, |
53 PSIF_PORT_EXTENT = 0x2, |
54 PSIF_PAGE_SIZE_EXTENT = 0xfu, |
54 PSIF_USE_AH_EXTENT = 0x2, |
55 PSIF_WR_TYPE_EXTENT = 0x8fu, |
55 PSIF_TSU_QOS_EXTENT = 0x2, |
56 PSIF_PORT_EXTENT = 0x2u, |
56 PSIF_WC_OPCODE_EXTENT = 0x83, |
57 PSIF_USE_AH_EXTENT = 0x2u, |
57 PSIF_WC_STATUS_EXTENT = 0x16, |
58 PSIF_TSU_QOS_EXTENT = 0x2u, |
58 PSIF_TSL_QP_WR_EXTENT = 0x10, |
59 PSIF_WC_OPCODE_EXTENT = 0x83u, |
59 PSIF_TABLE_LEVEL_EXTENT = 0x6, |
60 PSIF_WC_STATUS_EXTENT = 0x16u, |
60 IB_OPCODE_EXTENT = 0xca, |
61 PSIF_TSL_QP_WR_EXTENT = 0x10u, |
61 PSIF_RB_TYPE_EXTENT = 0x7, |
62 PSIF_TABLE_LEVEL_EXTENT = 0x6u, |
62 PSIF_EPS_A_CORE_EXTENT = 0x4, |
63 IB_OPCODE_EXTENT = 0xcau, |
63 PSIF_QP_STATE_EXTENT = 0x8, |
64 PSIF_RB_TYPE_EXTENT = 0x7u, |
64 PSIF_CMPL_OUTSTANDING_ERROR_EXTENT = 0xa, |
65 PSIF_EPS_A_CORE_EXTENT = 0x4u, |
65 PSIF_EXPECTED_OP_EXTENT = 0x4, |
66 PSIF_QP_STATE_EXTENT = 0x8u, |
66 PSIF_MIGRATION_EXTENT = 0x4, |
67 PSIF_CMPL_OUTSTANDING_ERROR_EXTENT = 0xau, |
67 PSIF_QP_TRANS_EXTENT = 0x8, |
68 PSIF_EXPECTED_OP_EXTENT = 0x4u, |
68 PSIF_BOOL_EXTENT = 0x2, |
69 PSIF_MIGRATION_EXTENT = 0x4u, |
69 PSIF_EOIB_TYPE_EXTENT = 0x4, |
70 PSIF_QP_TRANS_EXTENT = 0x8u, |
70 PSIF_COMM_LIVE_EXTENT = 0x2, |
71 PSIF_BOOL_EXTENT = 0x2u, |
71 PSIF_PATH_MTU_EXTENT = 0x8, |
72 PSIF_EOIB_TYPE_EXTENT = 0x4u, |
72 PSIF_USE_GRH_EXTENT = 0x2, |
73 PSIF_COMM_LIVE_EXTENT = 0x2u, |
73 PSIF_LOOPBACK_EXTENT = 0x2, |
74 PSIF_PATH_MTU_EXTENT = 0x8u, |
74 PSIF_PORT_SPEED_EXTENT = 0x21, |
75 PSIF_USE_GRH_EXTENT = 0x2u, |
75 PSIF_PCIE_WR_OFFS_EXTENT = 0x1000, |
76 PSIF_LOOPBACK_EXTENT = 0x2u, |
76 PSIF_QP_COMMAND_EXTENT = 0x4, |
77 PSIF_PCIE_WR_OFFS_EXTENT = 0x1000u, |
77 PSIF_SIBS_MBOX_TYPE_EXTENT = 0x2, |
78 PSIF_QP_COMMAND_EXTENT = 0x4u, |
78 PSIF_MBOX_TYPE_EXTENT = 0x6, |
79 PSIF_SIBS_MBOX_TYPE_EXTENT = 0x2u, |
79 PSIF_DMA_VT_KEY_STATES_EXTENT = 0x4, |
80 PSIF_MBOX_TYPE_EXTENT = 0x6u, |
80 PSIF_FLASH_IMAGE_TYPE_EXTENT = 0x5, |
81 PSIF_DMA_VT_KEY_STATES_EXTENT = 0x4u, |
81 PSIF_EVENT_EXTENT = 0x11, |
82 PSIF_FLASH_IMAGE_TYPE_EXTENT = 0x5u, |
82 PSIF_TSU_ERROR_TYPES_EXTENT = 0x8c, |
83 PSIF_EVENT_EXTENT = 0x13u, |
83 PSIF_EPS_CORE_ID_EXTENT = 0x5, |
84 PSIF_TSU_ERROR_TYPES_EXTENT = 0x8cu, |
84 PSIF_EPSC_LOG_MODE_EXTENT = 0x11, |
85 PSIF_EPS_CORE_ID_EXTENT = 0x5u, |
85 PSIF_EPSC_LOG_LEVEL_EXTENT = 0x8, |
86 PSIF_EPSC_QUERY_PERSISTENT_EXTENT = 0x3u, |
86 PSIF_EPSC_PORT_STATE_EXTENT = 0x6, |
87 PSIF_EPSC_QUERY_NUM_VFS_MODE_EXTENT = 0x3u, |
87 PSIF_EPSC_PATH_MTU_EXTENT = 0x8, |
88 PSIF_EPSC_PORT_STATE_EXTENT = 0x6u, |
88 PSIF_EPSC_MONITOR_EXTENT = 0x5, |
89 PSIF_EPSC_PATH_MTU_EXTENT = 0x8u, |
89 PSIF_EPSC_INTERRUPT_SOURCE_EXTENT = 0x15, |
90 PSIF_EPSC_MONITOR_EXTENT = 0x5u, |
90 PSIF_EPSC_INTERRUPT_PRI_EXTENT = 0x4, |
91 PSIF_EPSC_LOG_MODE_EXTENT = 0x11u, |
91 PSIF_EPSC_ATOMIC_CAP_EXTENT = 0x3, |
92 PSIF_EPSC_LOG_LEVEL_EXTENT = 0x8u, |
92 PSIF_EPSC_CSR_STATUS_EXTENT = 0x100, |
93 PSIF_EPSC_INTERRUPT_SOURCE_EXTENT = 0x15u, |
93 PSIF_EPSC_CSR_OPCODE_EXTENT = 0x4f, |
94 PSIF_EPSC_INTERRUPT_PRI_EXTENT = 0x4u, |
94 PSIF_EPSC_CSR_FLAGS_EXTENT = 0x5, |
95 PSIF_EPSC_ATOMIC_CAP_EXTENT = 0x3u, |
95 PSIF_VLINK_STATE_EXTENT = 0x11, |
96 PSIF_EPSC_CSR_STATUS_EXTENT = 0x100u, |
96 PSIF_EPSC_CSR_MODIFY_DEVICE_FLAGS_EXTENT = 0x3, |
97 PSIF_EPSC_CSR_OPCODE_EXTENT = 0x50u, |
97 PSIF_EPSC_CSR_MODIFY_PORT_FLAGS_EXTENT = 0x11, |
98 PSIF_EPSC_CSR_FLAGS_EXTENT = 0x5u, |
98 PSIF_EPSC_CSR_EPSA_COMMAND_EXTENT = 0x4, |
99 PSIF_VLINK_STATE_EXTENT = 0x11u, |
99 PSIF_EPSA_COMMAND_EXTENT = 0xb, |
100 PSIF_EPSC_CSR_MODIFY_DEVICE_FLAGS_EXTENT = 0x3u, |
100 PSIF_EPSC_QUERY_OP_EXTENT = 0x4b, |
101 PSIF_EPSC_CSR_MODIFY_PORT_FLAGS_EXTENT = 0x11u, |
101 PSIF_EPSC_CSR_UPDATE_OPCODE_EXTENT = 0x8, |
102 PSIF_EPSC_CSR_EPSA_COMMAND_EXTENT = 0x4u, |
102 PSIF_EPSC_FLASH_SLOT_EXTENT = 0x6, |
103 PSIF_EPSA_COMMAND_EXTENT = 0xcu, |
103 PSIF_EPSC_UPDATE_SET_EXTENT = 0x5, |
104 PSIF_EPSC_QUERY_OP_EXTENT = 0x55u, |
104 PSIF_EPSC_CSR_UF_CTRL_OPCODE_EXTENT = 0x9, |
105 PSIF_EPSC_CSR_UPDATE_OPCODE_EXTENT = 0x8u, |
105 PSIF_EPSC_VIMMA_CTRL_OPCODE_EXTENT = 0x8, |
106 PSIF_EPSC_FLASH_SLOT_EXTENT = 0x6u, |
106 PSIF_EPSC_VIMMA_ADMMODE_EXTENT = 0x2, |
107 PSIF_EPSC_UPDATE_SET_EXTENT = 0x5u, |
107 PSIF_EPSC_CSR_PMA_COUNTERS_ENUM_EXTENT = 0x17, |
108 PSIF_EPSC_CSR_UF_CTRL_OPCODE_EXTENT = 0x9u, |
108 PSIF_EPSC_CSR_ATOMIC_OP_EXTENT = 0x4, |
109 PSIF_EPSC_VIMMA_CTRL_OPCODE_EXTENT = 0x8u, |
109 PSIF_CQ_STATE_EXTENT = 0x4, |
110 PSIF_EPSC_VIMMA_ADMMODE_EXTENT = 0x2u, |
110 PSIF_RSS_HASH_SOURCE_EXTENT = 0x2 |
111 PSIF_EPSC_CSR_PMA_COUNTERS_ENUM_EXTENT = 0x17u, |
|
112 PSIF_EPSC_CSR_ATOMIC_OP_EXTENT = 0x4u, |
|
113 PSIF_EPSC_CSR_BER_COUNTERS_ENUM_EXTENT = 0x5u, |
|
114 PSIF_CQ_STATE_EXTENT = 0x4u, |
|
115 PSIF_RSS_HASH_SOURCE_EXTENT = 0x2u |
111 }; /* enum psif_enum_extent [16 bits] */ |
116 }; /* enum psif_enum_extent [16 bits] */ |
|
117 |
|
118 /* |
|
119 * Should match definitions in ib_verbs.h |
|
120 */ |
|
121 enum psif_port_speed { |
|
122 PSIF_SPEED_SDR = 0x1u, |
|
123 PSIF_SPEED_DDR = 0x2u, |
|
124 PSIF_SPEED_QDR = 0x4u, |
|
125 PSIF_SPEED_FDR10 = 0x8u, |
|
126 PSIF_SPEED_FDR = 0x10u, |
|
127 PSIF_SPEED_EDR = 0x20u, |
|
128 /* Padding out to required bits allocated */ |
|
129 PSIF_PORT_SPEED_FIELD_MAX = 0xffu |
|
130 }; /* enum psif_port_speed [ 8 bits] */ |
|
131 |
|
132 /** Bits describing the cause(s) for EPSC to have entered degraded mode |
|
133 * \par Used in |
|
134 * response to `EPSC_QUERY_DEGRADED_MODE` and `psif_eq_entry::event_data` |
|
135 * \par Classification |
|
136 * driver |
|
137 */ |
|
138 enum psif_epsc_degrade_cause { |
|
139 /**< degrade cause: no GUID programmed or not readable */ |
|
140 |
|
141 DEGRADE_CAUSE_FLAG_MISSING_GUID, |
|
142 /**< degrade cause: invalid function name in VPD */ |
|
143 |
|
144 DEGRADE_CAUSE_FLAG_VPD_INVALID_NAME, |
|
145 /**< degrade cause: HW not supported by FW */ |
|
146 |
|
147 DEGRADE_CAUSE_FLAG_HW_UNSUPPORTED, |
|
148 /**< degrade cause: failed MDIO access */ |
|
149 |
|
150 DEGRADE_CAUSE_FLAG_HW_MDIO_ERROR, |
|
151 /**< degrade cause: modify QP timeout */ |
|
152 |
|
153 DEGRADE_CAUSE_FLAG_MODIFY_QP_TIMEOUT, |
|
154 /**< degrade cause: Virtualization mode reconfigured, reset needed */ |
|
155 |
|
156 DEGRADE_CAUSE_FLAG_VIRTMODE_RECONF, |
|
157 /**< degrade cause: no credits for sending multicast packets */ |
|
158 |
|
159 DEGRADE_CAUSE_FLAG_MCAST_LACK_OF_CREDIT, |
|
160 /* Padding out to required bits allocated */ |
|
161 PSIF_EPSC_DEGRADE_CAUSE_FIELD_MAX = 0x1fu |
|
162 }; /* enum psif_epsc_degrade_cause [ 5 bits] */ |
112 |
163 |
113 /* MMU operation modes. */ |
164 /* MMU operation modes. */ |
114 enum psif_mmu_translation { |
165 enum psif_mmu_translation { |
115 MMU_PASS_THROUGH0, |
166 MMU_PASS_THROUGH0 = 0u, |
116 MMU_PASS_THROUGH_PAD, |
167 MMU_PASS_THROUGH_PAD, |
117 MMU_GVA2GPA_MODE, |
168 MMU_GVA2GPA_MODE, |
118 MMU_GVA2GPA_MODE_PAD, |
169 MMU_GVA2GPA_MODE_PAD, |
119 MMU_PRETRANSLATED, |
170 MMU_PRETRANSLATED, |
120 MMU_PRETRANSLATED_PAD, |
171 MMU_PRETRANSLATED_PAD, |
180 PSIF_WR_INVALIDATE_SGL_CACHE |
231 PSIF_WR_INVALIDATE_SGL_CACHE |
181 }; /* enum psif_wr_type [ 8 bits] */ |
232 }; /* enum psif_wr_type [ 8 bits] */ |
182 |
233 |
183 /* Port number the IB packet is transimitted on. */ |
234 /* Port number the IB packet is transimitted on. */ |
184 enum psif_port { |
235 enum psif_port { |
185 PORT_1 = 0, |
236 PORT_1 = 0u, |
186 PORT_2 = 0x1 |
237 PORT_2 = 0x1u |
187 }; /* enum psif_port [ 1 bits] */ |
238 }; /* enum psif_port [ 1 bits] */ |
188 |
239 |
189 /* |
240 /* |
190 * Enumeration for using AHA or not. When set, AHA should be used instead of |
241 * Enumeration for using AHA or not. When set, AHA should be used instead of |
191 * information from the QP state in appropriate places. |
242 * information from the QP state in appropriate places. |
192 */ |
243 */ |
193 enum psif_use_ah { |
244 enum psif_use_ah { |
194 NO_AHA = 0, |
245 NO_AHA = 0u, |
195 USE_AHA = 0x1 |
246 USE_AHA = 0x1u |
196 }; /* enum psif_use_ah [ 1 bits] */ |
247 }; /* enum psif_use_ah [ 1 bits] */ |
197 |
248 |
198 /* |
249 /* |
199 * Indicating if this QP is configured as a high bandwidth or a low latency |
250 * Indicating if this QP is configured as a high bandwidth or a low latency |
200 * QP. |
251 * QP. |
201 */ |
252 */ |
202 enum psif_tsu_qos { |
253 enum psif_tsu_qos { |
203 QOSL_HIGH_BANDWIDTH = 0, |
254 QOSL_HIGH_BANDWIDTH = 0u, |
204 QOSL_LOW_LATENCY = 0x1 |
255 QOSL_LOW_LATENCY = 0x1u |
205 }; /* enum psif_tsu_qos [ 1 bits] */ |
256 }; /* enum psif_tsu_qos [ 1 bits] */ |
206 |
257 |
207 /* |
258 /* |
208 * Completion entry opcode indicating what type of request this completion |
259 * Completion entry opcode indicating what type of request this completion |
209 * entry is completed. |
260 * entry is completed. |
210 */ |
261 */ |
211 enum psif_wc_opcode { |
262 enum psif_wc_opcode { |
212 PSIF_WC_OPCODE_SEND = 0, |
263 PSIF_WC_OPCODE_SEND = 0u, |
213 PSIF_WC_OPCODE_RDMA_WR = 0x1, |
264 PSIF_WC_OPCODE_RDMA_WR = 0x1u, |
214 PSIF_WC_OPCODE_RDMA_READ = 0x2, |
265 PSIF_WC_OPCODE_RDMA_READ = 0x2u, |
215 PSIF_WC_OPCODE_CMP_SWAP = 0x3, |
266 PSIF_WC_OPCODE_CMP_SWAP = 0x3u, |
216 PSIF_WC_OPCODE_FETCH_ADD = 0x4, |
267 PSIF_WC_OPCODE_FETCH_ADD = 0x4u, |
217 PSIF_WC_OPCODE_LSO = 0x6, |
268 PSIF_WC_OPCODE_LSO = 0x6u, |
218 PSIF_WC_OPCODE_MASKED_CMP_SWAP = 0x9, |
269 PSIF_WC_OPCODE_MASKED_CMP_SWAP = 0x9u, |
219 PSIF_WC_OPCODE_MASKED_FETCH_ADD, |
270 PSIF_WC_OPCODE_MASKED_FETCH_ADD, |
220 PSIF_WC_OPCODE_INVALIDATE_RKEY = 0x40, |
271 PSIF_WC_OPCODE_INVALIDATE_RKEY = 0x40u, |
221 PSIF_WC_OPCODE_INVALIDATE_LKEY, |
272 PSIF_WC_OPCODE_INVALIDATE_LKEY, |
222 PSIF_WC_OPCODE_INVALIDATE_BOTH_KEYS, |
273 PSIF_WC_OPCODE_INVALIDATE_BOTH_KEYS, |
223 PSIF_WC_OPCODE_INVALIDATE_TLB, |
274 PSIF_WC_OPCODE_INVALIDATE_TLB, |
224 PSIF_WC_OPCODE_RESIZE_CQ, |
275 PSIF_WC_OPCODE_RESIZE_CQ, |
225 PSIF_WC_OPCODE_SET_SRQ_LIM, |
276 PSIF_WC_OPCODE_SET_SRQ_LIM, |
261 PSIF_WC_STATUS_INV_EEC_STATE_ERR, |
312 PSIF_WC_STATUS_INV_EEC_STATE_ERR, |
262 PSIF_WC_STATUS_FATAL_ERR, |
313 PSIF_WC_STATUS_FATAL_ERR, |
263 PSIF_WC_STATUS_RESP_TIMEOUT_ERR, |
314 PSIF_WC_STATUS_RESP_TIMEOUT_ERR, |
264 PSIF_WC_STATUS_GENERAL_ERR, |
315 PSIF_WC_STATUS_GENERAL_ERR, |
265 /* Padding out to required bits allocated */ |
316 /* Padding out to required bits allocated */ |
266 PSIF_WC_STATUS_FIELD_MAX = 0xff |
317 PSIF_WC_STATUS_FIELD_MAX = 0xffu |
267 }; /* enum psif_wc_status [ 8 bits] */ |
318 }; /* enum psif_wc_status [ 8 bits] */ |
268 |
319 |
269 /* TSU Service level required in the QP and WR */ |
320 /* TSU Service level required in the QP and WR */ |
270 enum psif_tsl_qp_wr { |
321 enum psif_tsl_qp_wr { |
271 /* Dataplane traffic separated in 4 TSLs */ |
322 /* Dataplane traffic separated in 4 TSLs */ |
272 TSL_DATA, |
323 TSL_DATA = 0u, |
273 TSL_DATA_1, |
324 TSL_DATA_1, |
274 TSL_DATA_2, |
325 TSL_DATA_2, |
275 TSL_DATA_3, |
326 TSL_DATA_3, |
276 /* TSL for privelidge QP */ |
327 /* TSL for privelidge QP */ |
277 TSL_PRIV = 0xe, |
328 TSL_PRIV = 0xeu, |
278 /* Strapped down TSL for testing */ |
329 /* Strapped down TSL for testing */ |
279 TSL_JUNK = 0xf |
330 TSL_JUNK = 0xfu |
280 }; /* enum psif_tsl_qp_wr [ 4 bits] */ |
331 }; /* enum psif_tsl_qp_wr [ 4 bits] */ |
281 |
332 |
282 /* MMU table level definition |
333 /* MMU table level definition |
283 * If page level is not applicable it should be set to PAGE_LEVEL0 |
334 * If page level is not applicable it should be set to PAGE_LEVEL0 |
284 * Values beyond PAGE_LEVEL4 (5-7) are reserved by HW |
335 * Values beyond PAGE_LEVEL4 (5-7) are reserved by HW |
285 */ |
336 */ |
286 enum psif_table_level { |
337 enum psif_table_level { |
287 /* */ |
338 /* */ |
288 PAGE_LEVEL0 = 0, |
339 PAGE_LEVEL0 = 0u, |
289 PAGE_LEVEL1, |
340 PAGE_LEVEL1, |
290 PAGE_LEVEL2, |
341 PAGE_LEVEL2, |
291 PAGE_LEVEL3, |
342 PAGE_LEVEL3, |
292 /* PAGE_LEVEL4 is SPARC only ? */ |
343 /* PAGE_LEVEL4 is SPARC only ? */ |
293 PAGE_LEVEL4, |
344 PAGE_LEVEL4, |
294 PAGE_LEVEL_RESERVED |
345 PAGE_LEVEL_RESERVED |
295 }; /* enum psif_table_level [ 3 bits] */ |
346 }; /* enum psif_table_level [ 3 bits] */ |
296 |
347 |
297 |
348 |
298 enum ib_opcode { |
349 enum ib_opcode { |
299 RC_SEND_First = 0, |
350 RC_SEND_First = 0u, |
300 RC_SEND_Middle = 0x1, |
351 RC_SEND_Middle = 0x1u, |
301 RC_SEND_Last = 0x2, |
352 RC_SEND_Last = 0x2u, |
302 RC_SEND_Last_Imm = 0x3, |
353 RC_SEND_Last_Imm = 0x3u, |
303 RC_SEND_Only = 0x4, |
354 RC_SEND_Only = 0x4u, |
304 RC_SEND_Only_Imm = 0x5, |
355 RC_SEND_Only_Imm = 0x5u, |
305 RC_RDMA_WR_First = 0x6, |
356 RC_RDMA_WR_First = 0x6u, |
306 RC_RDMA_WR_Middle = 0x7, |
357 RC_RDMA_WR_Middle = 0x7u, |
307 RC_RDMA_WR_Last = 0x8, |
358 RC_RDMA_WR_Last = 0x8u, |
308 RC_RDMA_WR_Last_Imm = 0x9, |
359 RC_RDMA_WR_Last_Imm = 0x9u, |
309 RC_RDMA_WR_Only = 0xa, |
360 RC_RDMA_WR_Only = 0xau, |
310 RC_RDMA_WR_Only_Imm = 0xb, |
361 RC_RDMA_WR_Only_Imm = 0xbu, |
311 RC_RDMA_RD_Req = 0xc, |
362 RC_RDMA_RD_Req = 0xcu, |
312 RC_RDMA_RD_Resp_First = 0xd, |
363 RC_RDMA_RD_Resp_First = 0xdu, |
313 RC_RDMA_RD_Resp_Middle = 0xe, |
364 RC_RDMA_RD_Resp_Middle = 0xeu, |
314 RC_RDMA_RD_Resp_Last = 0xf, |
365 RC_RDMA_RD_Resp_Last = 0xfu, |
315 RC_RDMA_RD_Resp_Only = 0x10, |
366 RC_RDMA_RD_Resp_Only = 0x10u, |
316 RC_ACK = 0x11, |
367 RC_ACK = 0x11u, |
317 RC_Atomic_ACK = 0x12, |
368 RC_Atomic_ACK = 0x12u, |
318 RC_CmpSwap = 0x13, |
369 RC_CmpSwap = 0x13u, |
319 RC_FetchAdd = 0x14, |
370 RC_FetchAdd = 0x14u, |
320 RC_Reserved = 0x15, |
371 RC_Reserved = 0x15u, |
321 RC_SEND_Last_Invalid = 0x16, |
372 RC_SEND_Last_Invalid = 0x16u, |
322 RC_SEND_Only_Invalid = 0x17, |
373 RC_SEND_Only_Invalid = 0x17u, |
323 RC_MaskCmpSwap = 0x18, |
374 RC_MaskCmpSwap = 0x18u, |
324 RC_MaskFetchAdd = 0x19, |
375 RC_MaskFetchAdd = 0x19u, |
325 UC_SEND_First = 0x20, |
376 UC_SEND_First = 0x20u, |
326 UC_SEND_Middle = 0x21, |
377 UC_SEND_Middle = 0x21u, |
327 UC_SEND_Last = 0x22, |
378 UC_SEND_Last = 0x22u, |
328 UC_SEND_Last_Imm = 0x23, |
379 UC_SEND_Last_Imm = 0x23u, |
329 UC_SEND_Only = 0x24, |
380 UC_SEND_Only = 0x24u, |
330 UC_SEND_Only_Imm = 0x25, |
381 UC_SEND_Only_Imm = 0x25u, |
331 UC_RDMA_WR_First = 0x26, |
382 UC_RDMA_WR_First = 0x26u, |
332 UC_RDMA_WR_Middle = 0x27, |
383 UC_RDMA_WR_Middle = 0x27u, |
333 UC_RDMA_WR_Last = 0x28, |
384 UC_RDMA_WR_Last = 0x28u, |
334 UC_RDMA_WR_Last_Imm = 0x29, |
385 UC_RDMA_WR_Last_Imm = 0x29u, |
335 UC_RDMA_WR_Only = 0x2a, |
386 UC_RDMA_WR_Only = 0x2au, |
336 UC_RDMA_WR_Only_Imm = 0x2b, |
387 UC_RDMA_WR_Only_Imm = 0x2bu, |
337 RD_SEND_First = 0x40, |
388 RD_SEND_First = 0x40u, |
338 RD_SEND_Middle = 0x41, |
389 RD_SEND_Middle = 0x41u, |
339 RD_SEND_Last = 0x42, |
390 RD_SEND_Last = 0x42u, |
340 RD_SEND_Last_Imm = 0x43, |
391 RD_SEND_Last_Imm = 0x43u, |
341 RD_SEND_Only = 0x44, |
392 RD_SEND_Only = 0x44u, |
342 RD_SEND_Only_Imm = 0x45, |
393 RD_SEND_Only_Imm = 0x45u, |
343 RD_RDMA_WR_First = 0x46, |
394 RD_RDMA_WR_First = 0x46u, |
344 RD_RDMA_WR_Middle = 0x47, |
395 RD_RDMA_WR_Middle = 0x47u, |
345 RD_RDMA_WR_Last = 0x48, |
396 RD_RDMA_WR_Last = 0x48u, |
346 RD_RDMA_WR_Last_Imm = 0x49, |
397 RD_RDMA_WR_Last_Imm = 0x49u, |
347 RD_RDMA_WR_Only = 0x4a, |
398 RD_RDMA_WR_Only = 0x4au, |
348 RD_RDMA_WR_Only_Imm = 0x4b, |
399 RD_RDMA_WR_Only_Imm = 0x4bu, |
349 RD_RDMA_RD_Req = 0x4c, |
400 RD_RDMA_RD_Req = 0x4cu, |
350 RD_RDMA_RD_Resp_First = 0x4d, |
401 RD_RDMA_RD_Resp_First = 0x4du, |
351 RD_RDMA_RD_Resp_Middle = 0x4e, |
402 RD_RDMA_RD_Resp_Middle = 0x4eu, |
352 RD_RDMA_RD_Resp_Last = 0x4f, |
403 RD_RDMA_RD_Resp_Last = 0x4fu, |
353 RD_RDMA_RD_Resp_Only = 0x50, |
404 RD_RDMA_RD_Resp_Only = 0x50u, |
354 RD_ACK = 0x51, |
405 RD_ACK = 0x51u, |
355 RD_Atomic_ACK = 0x52, |
406 RD_Atomic_ACK = 0x52u, |
356 RD_CmpSwap = 0x53, |
407 RD_CmpSwap = 0x53u, |
357 RD_FetchAdd = 0x54, |
408 RD_FetchAdd = 0x54u, |
358 RD_RESYNC = 0x55, |
409 RD_RESYNC = 0x55u, |
359 UD_SEND_Only = 0x64, |
410 UD_SEND_Only = 0x64u, |
360 UD_SEND_Only_Imm = 0x65, |
411 UD_SEND_Only_Imm = 0x65u, |
361 CNP = 0x80, |
412 CNP = 0x80u, |
362 XRC_SEND_First = 0xa0, |
413 XRC_SEND_First = 0xa0u, |
363 XRC_SEND_Middle = 0xa1, |
414 XRC_SEND_Middle = 0xa1u, |
364 XRC_SEND_Last = 0xa2, |
415 XRC_SEND_Last = 0xa2u, |
365 XRC_SEND_Last_Imm = 0xa3, |
416 XRC_SEND_Last_Imm = 0xa3u, |
366 XRC_SEND_Only = 0xa4, |
417 XRC_SEND_Only = 0xa4u, |
367 XRC_SEND_Only_Imm = 0xa5, |
418 XRC_SEND_Only_Imm = 0xa5u, |
368 XRC_RDMA_WR_First = 0xa6, |
419 XRC_RDMA_WR_First = 0xa6u, |
369 XRC_RDMA_WR_Middle = 0xa7, |
420 XRC_RDMA_WR_Middle = 0xa7u, |
370 XRC_RDMA_WR_Last = 0xa8, |
421 XRC_RDMA_WR_Last = 0xa8u, |
371 XRC_RDMA_WR_Last_Imm = 0xa9, |
422 XRC_RDMA_WR_Last_Imm = 0xa9u, |
372 XRC_RDMA_WR_Only = 0xaa, |
423 XRC_RDMA_WR_Only = 0xaau, |
373 XRC_RDMA_WR_Only_Imm = 0xab, |
424 XRC_RDMA_WR_Only_Imm = 0xabu, |
374 XRC_RDMA_RD_Req = 0xac, |
425 XRC_RDMA_RD_Req = 0xacu, |
375 XRC_RDMA_RD_Resp_First = 0xad, |
426 XRC_RDMA_RD_Resp_First = 0xadu, |
376 XRC_RDMA_RD_Resp_Middle = 0xae, |
427 XRC_RDMA_RD_Resp_Middle = 0xaeu, |
377 XRC_RDMA_RD_Resp_Last = 0xaf, |
428 XRC_RDMA_RD_Resp_Last = 0xafu, |
378 XRC_RDMA_RD_Resp_Only = 0xb0, |
429 XRC_RDMA_RD_Resp_Only = 0xb0u, |
379 XRC_ACK = 0xb1, |
430 XRC_ACK = 0xb1u, |
380 XRC_Atomic_ACK = 0xb2, |
431 XRC_Atomic_ACK = 0xb2u, |
381 XRC_CmpSwap = 0xb3, |
432 XRC_CmpSwap = 0xb3u, |
382 XRC_FetchAdd = 0xb4, |
433 XRC_FetchAdd = 0xb4u, |
383 XRC_Reserved = 0xb5, |
434 XRC_Reserved = 0xb5u, |
384 XRC_SEND_Last_Invalid = 0xb6, |
435 XRC_SEND_Last_Invalid = 0xb6u, |
385 XRC_SEND_Only_Invalid = 0xb7, |
436 XRC_SEND_Only_Invalid = 0xb7u, |
386 XRC_MaskCmpSwap = 0xb8, |
437 XRC_MaskCmpSwap = 0xb8u, |
387 XRC_MaskFetchAdd = 0xb9, |
438 XRC_MaskFetchAdd = 0xb9u, |
388 MANSP1_INVALID = 0xc0, |
439 MANSP1_INVALID = 0xc0u, |
389 MANSP1_HOST_READ = 0xc1, |
440 MANSP1_HOST_READ = 0xc1u, |
390 MANSP1_HOST_WRITE = 0xc2, |
441 MANSP1_HOST_WRITE = 0xc2u, |
391 MANSP1_HOST_READ_NO_DMAVT = 0xc3, |
442 MANSP1_HOST_READ_NO_DMAVT = 0xc3u, |
392 MANSP1_HOST_WRITE_NO_DMAVT = 0xc4, |
443 MANSP1_HOST_WRITE_NO_DMAVT = 0xc4u, |
393 MANSP1_INTERNAL_TYPE = 0xc5, |
444 MANSP1_INTERNAL_TYPE = 0xc5u, |
394 MANSP1_INTERNAL_TYPE_MMU_BYPASS = 0xc6, |
445 MANSP1_INTERNAL_TYPE_MMU_BYPASS = 0xc6u, |
395 MANSP1_HOST_CMP_SWAP = 0xc7, |
446 MANSP1_HOST_CMP_SWAP = 0xc7u, |
396 MANSP1_DR_LOOPBACK = 0xc8, |
447 MANSP1_DR_LOOPBACK = 0xc8u, |
397 MANSP1_ARP_LOOPBACK = 0xc9 |
448 MANSP1_ARP_LOOPBACK = 0xc9u |
398 }; /* enum ib_opcode [ 8 bits] */ |
449 }; /* enum ib_opcode [ 8 bits] */ |
399 |
450 |
400 /* |
451 /* |
401 * This is a ring buffer type defining the type of transaction this |
452 * This is a ring buffer type defining the type of transaction this |
402 * represents. |
453 * represents. |
403 */ |
454 */ |
404 enum psif_rb_type { |
455 enum psif_rb_type { |
405 PSIF_RB_TYPE_INVALID, |
456 PSIF_RB_TYPE_INVALID = 0u, |
406 PSIF_RB_TYPE_DM_PUT, |
457 PSIF_RB_TYPE_DM_PUT, |
407 PSIF_RB_TYPE_DM_GET_RESP, |
458 PSIF_RB_TYPE_DM_GET_RESP, |
408 PSIF_RB_TYPE_RCV_PROXY_COMPLETION, |
459 PSIF_RB_TYPE_RCV_PROXY_COMPLETION, |
409 PSIF_RB_TYPE_RCV_PROXY_COMPLETION_AND_DATA, |
460 PSIF_RB_TYPE_RCV_PROXY_COMPLETION_AND_DATA, |
410 PSIF_RB_TYPE_SEND_PROXY_COMPLETION, |
461 PSIF_RB_TYPE_SEND_PROXY_COMPLETION, |
481 * Unreliable datagram. 0x4: RSVD1 0x5: XRC - Extended reliable connection. |
532 * Unreliable datagram. 0x4: RSVD1 0x5: XRC - Extended reliable connection. |
482 * 0x6: MANSP1 - manufacturer specific opcodes. 0x7: MANSP2 - manufacturer |
533 * 0x6: MANSP1 - manufacturer specific opcodes. 0x7: MANSP2 - manufacturer |
483 * specific opcodes. |
534 * specific opcodes. |
484 */ |
535 */ |
485 enum psif_qp_trans { |
536 enum psif_qp_trans { |
486 PSIF_QP_TRANSPORT_RC = 0, |
537 PSIF_QP_TRANSPORT_RC = 0u, |
487 PSIF_QP_TRANSPORT_UC = 0x1, |
538 PSIF_QP_TRANSPORT_UC = 0x1u, |
488 PSIF_QP_TRANSPORT_RD = 0x2, |
539 PSIF_QP_TRANSPORT_RD = 0x2u, |
489 PSIF_QP_TRANSPORT_UD = 0x3, |
540 PSIF_QP_TRANSPORT_UD = 0x3u, |
490 PSIF_QP_TRANSPORT_RSVD1 = 0x4, |
541 PSIF_QP_TRANSPORT_RSVD1 = 0x4u, |
491 PSIF_QP_TRANSPORT_XRC = 0x5, |
542 PSIF_QP_TRANSPORT_XRC = 0x5u, |
492 PSIF_QP_TRANSPORT_MANSP1 = 0x6, |
543 PSIF_QP_TRANSPORT_MANSP1 = 0x6u, |
493 PSIF_QP_TRANSPORT_MANSP2 = 0x7 |
544 PSIF_QP_TRANSPORT_MANSP2 = 0x7u |
494 }; /* enum psif_qp_trans [ 3 bits] */ |
545 }; /* enum psif_qp_trans [ 3 bits] */ |
495 |
546 |
496 |
547 |
497 enum psif_bool { |
548 enum psif_bool { |
498 FALSE = 0, |
549 FALSE = 0u, |
499 TRUE = 0x1 |
550 TRUE = 0x1u |
500 }; /* enum psif_bool [ 1 bits] */ |
551 }; /* enum psif_bool [ 1 bits] */ |
501 |
552 |
502 /* |
553 /* |
503 * EoIB types enumerated type having these enumerations: EOIB_FULL, |
554 * EoIB types enumerated type having these enumerations: EOIB_FULL, |
504 * EOIB_PARTIAL, EOIB_QKEY_ONLY, EOIB_NONE. |
555 * EOIB_PARTIAL, EOIB_QKEY_ONLY, EOIB_NONE. |
505 */ |
556 */ |
506 enum psif_eoib_type { |
557 enum psif_eoib_type { |
507 EOIB_FULL, |
558 EOIB_FULL = 0u, |
508 EOIB_PARTIAL, |
559 EOIB_PARTIAL, |
509 EOIB_QKEY_ONLY, |
560 EOIB_QKEY_ONLY, |
510 EOIB_NONE |
561 EOIB_NONE |
511 }; /* enum psif_eoib_type [ 2 bits] */ |
562 }; /* enum psif_eoib_type [ 2 bits] */ |
512 |
563 |
513 /* |
564 /* |
514 * Communication established state. This gets set when a packet is received |
565 * Communication established state. This gets set when a packet is received |
515 * error free when in RTR state. |
566 * error free when in RTR state. |
516 */ |
567 */ |
517 enum psif_comm_live { |
568 enum psif_comm_live { |
518 NO_COMM_ESTABLISHED = 0, |
569 NO_COMM_ESTABLISHED = 0u, |
519 COMM_ESTABLISHED = 0x1 |
570 COMM_ESTABLISHED = 0x1u |
520 }; /* enum psif_comm_live [ 1 bits] */ |
571 }; /* enum psif_comm_live [ 1 bits] */ |
521 |
572 |
522 /* Definitions for the different supported MTU sizes. */ |
573 /* Definitions for the different supported MTU sizes. */ |
523 enum psif_path_mtu { |
574 enum psif_path_mtu { |
524 MTU_INVALID = 0, |
575 MTU_INVALID = 0u, |
525 MTU_256B = 0x1, |
576 MTU_256B = 0x1u, |
526 MTU_512B = 0x2, |
577 MTU_512B = 0x2u, |
527 MTU_1024B = 0x3, |
578 MTU_1024B = 0x3u, |
528 MTU_2048B = 0x4, |
579 MTU_2048B = 0x4u, |
529 MTU_4096B = 0x5, |
580 MTU_4096B = 0x5u, |
530 MTU_10240B = 0x6, |
581 MTU_10240B = 0x6u, |
531 MTU_XXX = 0x7 |
582 MTU_XXX = 0x7u |
532 }; /* enum psif_path_mtu [ 3 bits] */ |
583 }; /* enum psif_path_mtu [ 3 bits] */ |
533 |
584 |
534 /* Enumeration for using GRH or not. When set GRH should be used. */ |
585 /* Enumeration for using GRH or not. When set GRH should be used. */ |
535 enum psif_use_grh { |
586 enum psif_use_grh { |
536 NO_GRH = 0, |
587 NO_GRH = 0u, |
537 USE_GRH = 0x1 |
588 USE_GRH = 0x1u |
538 }; /* enum psif_use_grh [ 1 bits] */ |
589 }; /* enum psif_use_grh [ 1 bits] */ |
539 |
590 |
540 /* Enumeration for loopback indication NO_LOOPBACK = 0 LOOPBACK = 1. */ |
591 /* Enumeration for loopback indication NO_LOOPBACK = 0 LOOPBACK = 1. */ |
541 enum psif_loopback { |
592 enum psif_loopback { |
542 NO_LOOPBACK = 0, |
593 NO_LOOPBACK = 0u, |
543 LOOPBACK = 0x1 |
594 LOOPBACK = 0x1u |
544 }; /* enum psif_loopback [ 1 bits] */ |
595 }; /* enum psif_loopback [ 1 bits] */ |
545 |
|
546 /* |
|
547 * Should match definitions in ib_verbs.h |
|
548 */ |
|
549 enum psif_port_speed { |
|
550 PSIF_SPEED_SDR = 0x1, |
|
551 PSIF_SPEED_DDR = 0x2, |
|
552 PSIF_SPEED_QDR = 0x4, |
|
553 PSIF_SPEED_FDR10 = 0x8, |
|
554 PSIF_SPEED_FDR = 0x10, |
|
555 PSIF_SPEED_EDR = 0x20, |
|
556 /* Padding out to required bits allocated */ |
|
557 PSIF_PORT_SPEED_FIELD_MAX = 0xff |
|
558 }; /* enum psif_port_speed [ 8 bits] */ |
|
559 |
596 |
560 /* Depricated data type... */ |
597 /* Depricated data type... */ |
561 enum psif_pcie_wr_offs { |
598 enum psif_pcie_wr_offs { |
562 WR_CB_START_OFFS = 0, |
599 WR_CB_START_OFFS = 0u, |
563 WR_CB_LAST_OFFS = 0x140, |
600 WR_CB_LAST_OFFS = 0x140u, |
564 WR_SQS_DOORBELL_OFFS = 0xfc0, |
601 WR_SQS_DOORBELL_OFFS = 0xfc0u, |
565 WR_CB_CLEAR_OFFS = 0xff8, |
602 WR_CB_CLEAR_OFFS = 0xff8u, |
566 WR_MAX_BAR_OFFS = 0xfff |
603 WR_MAX_BAR_OFFS = 0xfffu |
567 }; /* enum psif_pcie_wr_offs [12 bits] */ |
604 }; /* enum psif_pcie_wr_offs [12 bits] */ |
568 |
605 |
569 /* Commands used for modify/query QP. */ |
606 /* Commands used for modify/query QP. */ |
570 enum psif_qp_command { |
607 enum psif_qp_command { |
571 QP_CMD_INVALID = 0, |
608 QP_CMD_INVALID = 0u, |
572 QP_CMD_MODIFY = 0x1, |
609 QP_CMD_MODIFY = 0x1u, |
573 QP_CMD_QUERY = 0x2, |
610 QP_CMD_QUERY = 0x2u, |
574 QP_CMD_CHECK_TIMEOUT = 0x3 |
611 QP_CMD_CHECK_TIMEOUT = 0x3u |
575 }; /* enum psif_qp_command [ 2 bits] */ |
612 }; /* enum psif_qp_command [ 2 bits] */ |
576 |
613 |
577 |
614 |
578 enum psif_sibs_mbox_type { |
615 enum psif_sibs_mbox_type { |
579 SIBS_MBOX_EPSC, |
616 SIBS_MBOX_EPSC, |
580 SIBS_MBOX_EPS_MAX, |
617 SIBS_MBOX_EPS_MAX, |
581 /* Padding out to required bits allocated */ |
618 /* Padding out to required bits allocated */ |
582 PSIF_SIBS_MBOX_TYPE_FIELD_MAX = 0xff |
619 PSIF_SIBS_MBOX_TYPE_FIELD_MAX = 0xffu |
583 }; /* enum psif_sibs_mbox_type [ 8 bits] */ |
620 }; /* enum psif_sibs_mbox_type [ 8 bits] */ |
584 |
621 |
585 |
622 |
586 enum psif_mbox_type { |
623 enum psif_mbox_type { |
587 MBOX_EPSA0, |
624 MBOX_EPSA0, |
878 /* |
919 /* |
879 * Here are the different EPS core IDs: PSIF_EVENT_EPS_A_1 PSIF_EVENT_EPS_A_2 |
920 * Here are the different EPS core IDs: PSIF_EVENT_EPS_A_1 PSIF_EVENT_EPS_A_2 |
880 * PSIF_EVENT_EPS_A_3 PSIF_EVENT_EPS_A_4 PSIF_EVENT_EPS_C |
921 * PSIF_EVENT_EPS_A_3 PSIF_EVENT_EPS_A_4 PSIF_EVENT_EPS_C |
881 */ |
922 */ |
882 enum psif_eps_core_id { |
923 enum psif_eps_core_id { |
883 PSIF_EVENT_CORE_EPS_A_1, |
924 PSIF_EVENT_CORE_EPS_A_1 = 0u, |
884 PSIF_EVENT_CORE_EPS_A_2, |
925 PSIF_EVENT_CORE_EPS_A_2, |
885 PSIF_EVENT_CORE_EPS_A_3, |
926 PSIF_EVENT_CORE_EPS_A_3, |
886 PSIF_EVENT_CORE_EPS_A_4, |
927 PSIF_EVENT_CORE_EPS_A_4, |
887 PSIF_EVENT_CORE_EPS_C, |
928 PSIF_EVENT_CORE_EPS_C, |
888 /* Padding out to required bits allocated */ |
929 /* Padding out to required bits allocated */ |
889 PSIF_EPS_CORE_ID_FIELD_MAX = 0xf |
930 PSIF_EPS_CORE_ID_FIELD_MAX = 0xfu |
890 }; /* enum psif_eps_core_id [ 4 bits] */ |
931 }; /* enum psif_eps_core_id [ 4 bits] */ |
891 |
932 |
892 |
933 /** |
893 enum psif_epsc_log_mode { |
934 * \brief Discriminator for PSIF_QUERY of persistent values |
894 /* Logging completely disabled */ |
935 * \details |
895 |
936 * \par Width |
896 EPSC_LOG_MODE_OFF = 0, |
937 * 32 bit |
897 /* See epsfw/src/include/logging.h */ |
938 * \par Used in |
898 |
939 * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_NUM_VFS and EPS_QUERY_JUMBO - set in the index field |
899 EPSC_LOG_MODE_SCAT = 0x1, |
940 * \par Classification |
900 EPSC_LOG_MODE_MALLOC = 0x2, |
941 * driver |
901 EPSC_LOG_MODE_LOCAL = 0x3, |
942 */ |
902 /* Redirect logging to host (dma) */ |
943 enum psif_epsc_query_persistent { |
903 |
944 EPSC_QUERY_PERSISTENT_STORED, |
904 EPSC_LOG_MODE_HOST = 0x4, |
945 EPSC_QUERY_PERSISTENT_ACTIVE, |
905 /* Save the set log mode in the flash */ |
946 EPSC_QUERY_PERSISTENT_HW_CAP, |
906 |
947 /* Padding out to required bits allocated */ |
907 EPSC_LOG_MODE_SAVE = 0x10, |
948 PSIF_EPSC_QUERY_PERSISTENT_FIELD_MAX = 0x7fffffffu |
908 /* Padding out to required bits allocated */ |
949 }; /* enum psif_epsc_query_persistent [32 bits] */ |
909 PSIF_EPSC_LOG_MODE_FIELD_MAX = 0x7fffffff |
950 |
910 }; /* enum psif_epsc_log_mode [32 bits] */ |
951 /** |
911 |
952 * \brief Discriminator for the PSIF_QUER sub-operation EPSC_QUERY_NUM_VFS - obsolete interface |
912 /** |
953 * \details |
913 * EPSC_LOG_CTRL |
954 * \par Width |
914 */ |
955 * 32 bit |
915 enum psif_epsc_log_level { |
956 * \par Used in |
916 EPS_LOG_OFF = 0, |
957 * the parameter for the PSIF_QUERY sub-operation EPSC_QUERY_NUM_VFS - set in the index field |
917 EPS_LOG_FATAL = 0x1, |
958 * \par Classification |
918 EPS_LOG_ERROR = 0x2, |
959 * driver |
919 EPS_LOG_WARN = 0x3, |
960 */ |
920 EPS_LOG_INFO = 0x4, |
961 enum psif_epsc_query_num_vfs_mode { |
921 EPS_LOG_DEBUG = 0x5, |
962 EPSC_QUERY_NUM_VFS_MODE_PERSISTENT, |
922 EPS_LOG_TRACE = 0x6, |
963 EPSC_QUERY_NUM_VFS_MODE_CURRENT, |
923 EPS_LOG_ALL = 0x7, |
964 EPSC_QUERY_NUM_VFS_MODE_HW_CAP, |
924 /* Padding out to required bits allocated */ |
965 /* Padding out to required bits allocated */ |
925 PSIF_EPSC_LOG_LEVEL_FIELD_MAX = 0x7fffffff |
966 PSIF_EPSC_QUERY_NUM_VFS_MODE_FIELD_MAX = 0x7fffffffu |
926 }; /* enum psif_epsc_log_level [32 bits] */ |
967 }; /* enum psif_epsc_query_num_vfs_mode [32 bits] */ |
927 |
968 |
928 /** |
969 /** |
929 * \brief Port state |
970 * \brief Port state |
930 * \details |
971 * \details |
931 * This enum specifies the state of a UF port's port state machine. It |
972 * This enum specifies the state of a UF port's port state machine. It |
1141 * \par Classification |
1218 * \par Classification |
1142 * external, driver |
1219 * external, driver |
1143 */ |
1220 */ |
1144 enum psif_epsc_csr_status { |
1221 enum psif_epsc_csr_status { |
1145 /** Successful exit status. */ |
1222 /** Successful exit status. */ |
1146 EPSC_SUCCESS = 0, |
1223 EPSC_SUCCESS = 0u, |
1147 /** Key was rejected by service. */ |
1224 /** Key was rejected by service. */ |
1148 EPSC_EKEYREJECTED = 0x1, |
1225 EPSC_EKEYREJECTED = 0x1u, |
1149 /** Cannot assign requested address. */ |
1226 /** Cannot assign requested address. */ |
1150 EPSC_EADDRNOTAVAIL = 0x2, |
1227 EPSC_EADDRNOTAVAIL = 0x2u, |
1151 /** Operation not supported on transport endpoint. */ |
1228 /** Operation not supported on transport endpoint. */ |
1152 EPSC_EOPNOTSUPP = 0x3, |
1229 EPSC_EOPNOTSUPP = 0x3u, |
1153 /** Out of memory. */ |
1230 /** Out of memory. */ |
1154 EPSC_ENOMEM = 0x4, |
1231 EPSC_ENOMEM = 0x4u, |
1155 /** No data available. */ |
1232 /** No data available. */ |
1156 EPSC_ENODATA = 0x5, |
1233 EPSC_ENODATA = 0x5u, |
1157 /** Try again. */ |
1234 /** Try again. */ |
1158 EPSC_EAGAIN = 0x6, |
1235 EPSC_EAGAIN = 0x6u, |
1159 /** Operation canceled. */ |
1236 /** Operation canceled. */ |
1160 EPSC_ECANCELED = 0x7, |
1237 EPSC_ECANCELED = 0x7u, |
1161 /** Connection reset by peer. */ |
1238 /** Connection reset by peer. */ |
1162 EPSC_ECONNRESET = 0x8, |
1239 EPSC_ECONNRESET = 0x8u, |
1163 /** CSR operation failed. */ |
1240 /** CSR operation failed. */ |
1164 EPSC_ECSR = 0x9, |
1241 EPSC_ECSR = 0x9u, |
1165 /** Modify queue pair error: QP index out of range. */ |
1242 /** Modify queue pair error: QP index out of range. */ |
1166 EPSC_MODIFY_QP_OUT_OF_RANGE = 0xa, |
1243 EPSC_MODIFY_QP_OUT_OF_RANGE = 0xau, |
1167 /** Modify queue pair error: QP is invalid. */ |
1244 /** Modify queue pair error: QP is invalid. */ |
1168 EPSC_MODIFY_QP_INVALID = 0xb, |
1245 EPSC_MODIFY_QP_INVALID = 0xbu, |
1169 /** Modify queue pair error: failed to change QP attribute. */ |
1246 /** Modify queue pair error: failed to change QP attribute. */ |
1170 EPSC_MODIFY_CANNOT_CHANGE_QP_ATTR = 0xc, |
1247 EPSC_MODIFY_CANNOT_CHANGE_QP_ATTR = 0xcu, |
1171 /** Modify queue pair error: failed to change QP due to invalid or not matching state. */ |
1248 /** Modify queue pair error: failed to change QP due to invalid or not matching state. */ |
1172 EPSC_MODIFY_INVALID_QP_STATE = 0xd, |
1249 EPSC_MODIFY_INVALID_QP_STATE = 0xdu, |
1173 /** Modify queue pair error: failed to change QP due to invalid or not matching migration state. */ |
1250 /** Modify queue pair error: failed to change QP due to invalid or not matching migration state. */ |
1174 EPSC_MODIFY_INVALID_MIG_STATE = 0xe, |
1251 EPSC_MODIFY_INVALID_MIG_STATE = 0xeu, |
1175 /** Modify queue pair error: the operation timed out. */ |
1252 /** Modify queue pair error: the operation timed out. */ |
1176 EPSC_MODIFY_TIMEOUT = 0xf, |
1253 EPSC_MODIFY_TIMEOUT = 0xfu, |
1177 /** DMA test failure in HEAD. */ |
1254 /** DMA test failure in HEAD. */ |
1178 EPSC_ETEST_HEAD = 0x10, |
1255 EPSC_ETEST_HEAD = 0x10u, |
1179 /** DMA test failure in TAIL. */ |
1256 /** DMA test failure in TAIL. */ |
1180 EPSC_ETEST_TAIL = 0x11, |
1257 EPSC_ETEST_TAIL = 0x11u, |
1181 /** DMA test failure in PATTERN. */ |
1258 /** DMA test failure in PATTERN. */ |
1182 EPSC_ETEST_PATTERN = 0x12, |
1259 EPSC_ETEST_PATTERN = 0x12u, |
1183 /** Multicast address already exist. */ |
1260 /** Multicast address already exist. */ |
1184 EPSC_EADDRINUSE = 0x13, |
1261 EPSC_EADDRINUSE = 0x13u, |
1185 /** vHCA out of range */ |
1262 /** vHCA out of range */ |
1186 EPSC_EINVALID_VHCA = 0x14, |
1263 EPSC_EINVALID_VHCA = 0x14u, |
1187 /** Port out of range */ |
1264 /** Port out of range */ |
1188 EPSC_EINVALID_PORT = 0x15, |
1265 EPSC_EINVALID_PORT = 0x15u, |
1189 /** Address out of range */ |
1266 /** Address out of range */ |
1190 EPSC_EINVALID_ADDRESS = 0x16, |
1267 EPSC_EINVALID_ADDRESS = 0x16u, |
1191 /** Parameter out of range */ |
1268 /** Parameter out of range */ |
1192 EPSC_EINVALID_PARAMETER = 0x17, |
1269 EPSC_EINVALID_PARAMETER = 0x17u, |
1193 /** General failure. */ |
1270 /** General failure. */ |
1194 EPSC_FAIL = 0xff |
1271 EPSC_FAIL = 0xffu |
1195 }; /* enum psif_epsc_csr_status [ 8 bits] */ |
1272 }; /* enum psif_epsc_csr_status [ 8 bits] */ |
1196 |
1273 |
1197 /** |
1274 /** |
1198 * \brief Host to EPS operation codes |
1275 * \brief Host to EPS operation codes |
1199 * \details |
1276 * \details |
1387 * \par Restrictions |
1464 * \par Restrictions |
1388 * none (all UF) |
1465 * none (all UF) |
1389 * \par Classification |
1466 * \par Classification |
1390 * driver |
1467 * driver |
1391 */ |
1468 */ |
1392 EPSC_SET_BASEADDR_EQ = 0x6, |
1469 EPSC_SET_BASEADDR_EQ = 0x6u, |
1393 /* Set Local ID for UF (backdoor) */ |
1470 /* Set Local ID for UF (backdoor) */ |
1394 EPSC_SET_LID = 0x7, |
1471 EPSC_SET_LID = 0x7u, |
1395 OBSOLETE_1 = 0x8, |
1472 OBSOLETE_1 = 0x8u, |
1396 OBSOLETE_2 = 0x9, |
1473 OBSOLETE_2 = 0x9u, |
1397 /* Set Global ID for UF (backdoor) */ |
1474 /* Set Global ID for UF (backdoor) */ |
1398 EPSC_SET_GID = 0xa, |
1475 EPSC_SET_GID = 0xau, |
1399 /* Set EoIB MAC address (backdoor) */ |
1476 /* Set EoIB MAC address (backdoor) */ |
1400 EPSC_SET_EOIB_MAC = 0x40, |
1477 EPSC_SET_EOIB_MAC = 0x40u, |
1401 /* Set Vlink state */ |
1478 /* Set Vlink state */ |
1402 EPSC_SET_VLINK_STATE = 0xb, |
1479 EPSC_SET_VLINK_STATE = 0xbu, |
1403 /* Get Vlink state */ |
1480 /* Get Vlink state */ |
1404 EPSC_QUERY_VLINK_STATE = 0xc, |
1481 EPSC_QUERY_VLINK_STATE = 0xcu, |
1405 /* Reset UF at startup */ |
1482 /* Reset UF at startup */ |
1406 EPSC_UF_RESET = 0xd, |
1483 EPSC_UF_RESET = 0xdu, |
1407 /* Modify QP complete w/kick */ |
1484 /* Modify QP complete w/kick */ |
1408 EPSC_MODIFY_QP = 0xe, |
1485 EPSC_MODIFY_QP = 0xeu, |
1409 /* Get single 64bit register - depricated */ |
1486 /* Get single 64bit register - deprecated */ |
1410 EPSC_GET_SINGLE = 0xf, |
1487 EPSC_GET_SINGLE = 0xfu, |
1411 /* Get one 64bit register using CSR addr */ |
1488 /* Get one 64bit register using CSR addr */ |
1412 EPSC_GET_ONE_CSR = 0x10, |
1489 EPSC_GET_ONE_CSR = 0x10u, |
1413 /* Query QP sub-entry */ |
1490 /* Query QP sub-entry */ |
1414 EPSC_QUERY_QP = 0x11, |
1491 EPSC_QUERY_QP = 0x11u, |
1415 /** Query HW receive queue. */ |
1492 /** Query HW receive queue. */ |
1416 EPSC_QUERY_HW_RQ = 0x42, |
1493 EPSC_QUERY_HW_RQ = 0x42u, |
1417 /** Query HW SQ. */ |
1494 /** Query HW SQ. */ |
1418 EPSC_QUERY_HW_SQ = 0x43, |
1495 EPSC_QUERY_HW_SQ = 0x43u, |
1419 /* Non-MAD query device */ |
1496 /* Non-MAD query device */ |
1420 EPSC_QUERY_DEVICE = 0x12, |
1497 EPSC_QUERY_DEVICE = 0x12u, |
1421 /* Non-MAD query port */ |
1498 /* Non-MAD query port */ |
1422 EPSC_QUERY_PORT_1 = 0x13, |
1499 EPSC_QUERY_PORT_1 = 0x13u, |
1423 EPSC_QUERY_PORT_2 = 0x14, |
1500 EPSC_QUERY_PORT_2 = 0x14u, |
1424 /* Non-MAD SMA attribute query */ |
1501 /* Non-MAD SMA attribute query */ |
1425 EPSC_QUERY_PKEY = 0x15, |
1502 EPSC_QUERY_PKEY = 0x15u, |
1426 EPSC_QUERY_GID = 0x16, |
1503 EPSC_QUERY_GID = 0x16u, |
1427 /* Non-MAD SMA attribute setting */ |
1504 /* Non-MAD SMA attribute setting */ |
1428 EPSC_MODIFY_DEVICE = 0x17, |
1505 EPSC_MODIFY_DEVICE = 0x17u, |
1429 EPSC_MODIFY_PORT_1 = 0x18, |
1506 EPSC_MODIFY_PORT_1 = 0x18u, |
1430 EPSC_MODIFY_PORT_2 = 0x19, |
1507 EPSC_MODIFY_PORT_2 = 0x19u, |
1431 /* Local MC subscription handling */ |
1508 /* Local MC subscription handling */ |
1432 EPSC_MC_ATTACH = 0x1a, |
1509 EPSC_MC_ATTACH = 0x1au, |
1433 EPSC_MC_DETACH = 0x1b, |
1510 EPSC_MC_DETACH = 0x1bu, |
1434 EPSC_MC_QUERY = 0x1c, |
1511 EPSC_MC_QUERY = 0x1cu, |
1435 /* Handle asynchronous events */ |
1512 /* Handle asynchronous events */ |
1436 EPSC_EVENT_ACK = 0x1d, |
1513 EPSC_EVENT_ACK = 0x1du, |
1437 EPSC_EVENT_INDEX = 0x1e, |
1514 EPSC_EVENT_INDEX = 0x1eu, |
1438 /* Program flash content */ |
1515 /* Program flash content */ |
1439 EPSC_FLASH_START = 0x1f, |
1516 EPSC_FLASH_START = 0x1fu, |
1440 EPSC_FLASH_INFO = 0x20, |
1517 EPSC_FLASH_INFO = 0x20u, |
1441 EPSC_FLASH_ERASE_SECTOR = 0x21, |
1518 EPSC_FLASH_ERASE_SECTOR = 0x21u, |
1442 EPSC_FLASH_RD = 0x22, |
1519 EPSC_FLASH_RD = 0x22u, |
1443 EPSC_FLASH_WR = 0x23, |
1520 EPSC_FLASH_WR = 0x23u, |
1444 EPSC_FLASH_CHECK = 0x24, |
1521 EPSC_FLASH_CHECK = 0x24u, |
1445 EPSC_FLASH_SCAN = 0x25, |
1522 EPSC_FLASH_SCAN = 0x25u, |
1446 EPSC_FLASH_STOP = 0x26, |
1523 EPSC_FLASH_STOP = 0x26u, |
1447 /* new update handling */ |
1524 /* new update handling */ |
1448 EPSC_UPDATE = 0x47, |
1525 EPSC_UPDATE = 0x47u, |
1449 /* IB packet tracer */ |
1526 /* IB packet tracer */ |
1450 EPSC_TRACE_STATUS = 0x27, |
1527 EPSC_TRACE_STATUS = 0x27u, |
1451 EPSC_TRACE_SETUP = 0x28, |
1528 EPSC_TRACE_SETUP = 0x28u, |
1452 EPSC_TRACE_START = 0x29, |
1529 EPSC_TRACE_START = 0x29u, |
1453 EPSC_TRACE_STOP = 0x2a, |
1530 EPSC_TRACE_STOP = 0x2au, |
1454 EPSC_TRACE_ACQUIRE = 0x2b, |
1531 EPSC_TRACE_ACQUIRE = 0x2bu, |
1455 /* Test operations */ |
1532 /* Test operations */ |
1456 EPSC_TEST_HOST_RD = 0x2c, |
1533 EPSC_TEST_HOST_RD = 0x2cu, |
1457 EPSC_TEST_HOST_WR = 0x2d, |
1534 EPSC_TEST_HOST_WR = 0x2du, |
1458 /* Get EPS-C version details */ |
1535 /* Get EPS-C version details */ |
1459 EPSC_FW_VERSION = 0x2e, |
1536 EPSC_FW_VERSION = 0x2eu, |
1460 /* Redirection/configuration of EPSC's internal log subsystem */ |
1537 /* Redirection/configuration of EPSC's internal log subsystem */ |
1461 EPSC_LOG_CTRL = 0x2f, |
1538 EPSC_LOG_CTRL = 0x2fu, |
1462 EPSC_LOG_REQ_NOTIFY = 0x30, |
1539 EPSC_LOG_REQ_NOTIFY = 0x30u, |
1463 /* Force & read back link speed */ |
1540 /* Force & read back link speed */ |
1464 EPSC_LINK_CNTRL = 0x31, |
1541 EPSC_LINK_CNTRL = 0x31u, |
1465 /* EPS-A control & communication (to EPS-C) */ |
1542 /* EPS-A control & communication (to EPS-C) */ |
1466 EPSC_A_CONTROL = 0x33, |
1543 EPSC_A_CONTROL = 0x33u, |
1467 /* EPS-A targeted commands (to EPS-A) */ |
1544 /* EPS-A targeted commands (to EPS-A) */ |
1468 EPSC_A_COMMAND = 0x35, |
1545 EPSC_A_COMMAND = 0x35u, |
1469 /* Exercise mmu with access from epsc */ |
1546 /* Exercise mmu with access from epsc */ |
1470 EPSC_EXERCISE_MMU = 0x34, |
1547 EPSC_EXERCISE_MMU = 0x34u, |
1471 /* Access to EPS-C CLI */ |
1548 /* Access to EPS-C CLI */ |
1472 EPSC_CLI_ACCESS = 0x37, |
1549 EPSC_CLI_ACCESS = 0x37u, |
1473 /* IB packet proxy to/from host */ |
1550 /* IB packet proxy to/from host */ |
1474 EPSC_MAD_PROCESS = 0x38, |
1551 EPSC_MAD_PROCESS = 0x38u, |
1475 EPSC_MAD_SEND_WR = 0x39, |
1552 EPSC_MAD_SEND_WR = 0x39u, |
1476 /** Generic query epsc interface. */ |
1553 /** Generic query epsc interface. */ |
1477 EPSC_QUERY = 0x41, |
1554 EPSC_QUERY = 0x41u, |
1478 /* Setup interrupt coalescing etc. */ |
1555 /* Setup interrupt coalescing etc. */ |
1479 EPSC_HOST_INT_COMMON_CTRL = 0x44, |
1556 EPSC_HOST_INT_COMMON_CTRL = 0x44u, |
1480 EPSC_HOST_INT_CHANNEL_CTRL = 0x45, |
1557 EPSC_HOST_INT_CHANNEL_CTRL = 0x45u, |
1481 /** UF control depends on \ref psif_epsc_csr_uf_ctrl_t::opcode. */ |
1558 /** UF control depends on \ref psif_epsc_csr_uf_ctrl_t::opcode. */ |
1482 EPSC_UF_CTRL = 0x48, |
1559 EPSC_UF_CTRL = 0x48u, |
1483 /* Flush MMU and-or PTW Caches */ |
1560 /* Flush MMU and-or PTW Caches */ |
1484 EPSC_FLUSH_CACHES = 0x49, |
1561 EPSC_FLUSH_CACHES = 0x49u, |
1485 /* Query PMA counters - alternative path to sending MAD's */ |
1562 /* Query PMA counters - alternative path to sending MAD's */ |
1486 EPSC_PMA_COUNTERS = 0x4a, |
1563 EPSC_PMA_COUNTERS = 0x4au, |
1487 /** VIMMA operations depends on \ref psif_epsc_csr_vimma_ctrl_t::opcode. */ |
1564 /** VIMMA operations depends on \ref psif_epsc_csr_vimma_ctrl_t::opcode. */ |
1488 EPSC_VIMMA_CTRL = 0x4b, |
1565 EPSC_VIMMA_CTRL = 0x4bu, |
|
1566 /* EPSC BER (Bit Error Report) Data */ |
|
1567 EPSC_BER_DATA = 0x4eu, |
1489 /** EOF marker - must be last and highest in this enum type. */ |
1568 /** EOF marker - must be last and highest in this enum type. */ |
1490 EPSC_LAST_OP = 0x4e, |
1569 EPSC_LAST_OP = 0x4fu, |
1491 /* Padding out to required bits allocated */ |
1570 /* Padding out to required bits allocated */ |
1492 PSIF_EPSC_CSR_OPCODE_FIELD_MAX = 0xff |
1571 PSIF_EPSC_CSR_OPCODE_FIELD_MAX = 0xffu |
1493 }; /* enum psif_epsc_csr_opcode [ 8 bits] */ |
1572 }; /* enum psif_epsc_csr_opcode [ 8 bits] */ |
1494 |
1573 |
1495 /** |
1574 /** |
1496 * The eps-c fw csr flags |
1575 * The eps-c fw csr flags |
1497 */ |
1576 */ |
1498 enum psif_epsc_csr_flags { |
1577 enum psif_epsc_csr_flags { |
1499 EPSC_FL_NONE = 0, |
1578 EPSC_FL_NONE = 0u, |
1500 /* Request notification (interrupt) when completion is ready */ |
1579 /* Request notification (interrupt) when completion is ready */ |
1501 EPSC_FL_NOTIFY = 0x1, |
1580 EPSC_FL_NOTIFY = 0x1u, |
1502 /* Privileged QP indicator only valid for query and modify QP */ |
1581 /* Privileged QP indicator only valid for query and modify QP */ |
1503 EPSC_FL_PQP = 0x2, |
1582 EPSC_FL_PQP = 0x2u, |
1504 /* Allways report opertion success */ |
1583 /* Allways report opertion success */ |
1505 EPSC_FL_IGNORE_ERROR = 0x4, |
1584 EPSC_FL_IGNORE_ERROR = 0x4u, |
1506 /* Padding out to required bits allocated */ |
1585 /* Padding out to required bits allocated */ |
1507 PSIF_EPSC_CSR_FLAGS_FIELD_MAX = 0xff |
1586 PSIF_EPSC_CSR_FLAGS_FIELD_MAX = 0xffu |
1508 }; /* enum psif_epsc_csr_flags [ 8 bits] */ |
1587 }; /* enum psif_epsc_csr_flags [ 8 bits] */ |
1509 |
1588 |
1510 /* |
1589 /* |
1511 * Link states for the virtual HCA and switch. The following onehot encoded |
1590 * Link states for the virtual HCA and switch. The following onehot encoded |
1512 * states exist: PSIF_LINK_DISABLED = 1 PSIF_LINK_DOWN = 2 PSIF_LINK_INIT = 4 |
1591 * states exist: PSIF_LINK_DISABLED = 1 PSIF_LINK_DOWN = 2 PSIF_LINK_INIT = 4 |
1513 * PSIF_LINK_ARM = 8 PSIF_LINK_ACTIVE = 16 |
1592 * PSIF_LINK_ARM = 8 PSIF_LINK_ACTIVE = 16 |
1514 */ |
1593 */ |
1515 enum psif_vlink_state { |
1594 enum psif_vlink_state { |
1516 PSIF_LINK_DISABLED = 0x1, |
1595 PSIF_LINK_DISABLED = 0x1u, |
1517 PSIF_LINK_DOWN = 0x2, |
1596 PSIF_LINK_DOWN = 0x2u, |
1518 PSIF_LINK_INIT = 0x4, |
1597 PSIF_LINK_INIT = 0x4u, |
1519 PSIF_LINK_ARM = 0x8, |
1598 PSIF_LINK_ARM = 0x8u, |
1520 PSIF_LINK_ACTIVE = 0x10 |
1599 PSIF_LINK_ACTIVE = 0x10u |
1521 }; /* enum psif_vlink_state [ 5 bits] */ |
1600 }; /* enum psif_vlink_state [ 5 bits] */ |
1522 |
1601 |
1523 /** |
1602 /** |
1524 * EPSC_MODIFY_DEVICE operations |
1603 * EPSC_MODIFY_DEVICE operations |
1525 */ |
1604 */ |
1526 enum psif_epsc_csr_modify_device_flags { |
1605 enum psif_epsc_csr_modify_device_flags { |
1527 PSIF_DEVICE_MODIFY_SYS_IMAGE_GUID = 0x1, |
1606 PSIF_DEVICE_MODIFY_SYS_IMAGE_GUID = 0x1u, |
1528 PSIF_DEVICE_MODIFY_NODE_DESC = 0x2, |
1607 PSIF_DEVICE_MODIFY_NODE_DESC = 0x2u, |
1529 /* Padding out to required bits allocated */ |
1608 /* Padding out to required bits allocated */ |
1530 PSIF_EPSC_CSR_MODIFY_DEVICE_FLAGS_FIELD_MAX = 0xffff |
1609 PSIF_EPSC_CSR_MODIFY_DEVICE_FLAGS_FIELD_MAX = 0xffffu |
1531 }; /* enum psif_epsc_csr_modify_device_flags [16 bits] */ |
1610 }; /* enum psif_epsc_csr_modify_device_flags [16 bits] */ |
1532 |
1611 |
1533 /** |
1612 /** |
1534 * EPSC_MODIFY_PORT_{1,2} operations |
1613 * EPSC_MODIFY_PORT_{1,2} operations |
1535 */ |
1614 */ |
1536 enum psif_epsc_csr_modify_port_flags { |
1615 enum psif_epsc_csr_modify_port_flags { |
1537 PSIF_PORT_SHUTDOWN = 0x1, |
1616 PSIF_PORT_SHUTDOWN = 0x1u, |
1538 PSIF_PORT_INIT_TYPE = 0x4, |
1617 PSIF_PORT_INIT_TYPE = 0x4u, |
1539 PSIF_PORT_RESET_QKEY_CNTR = 0x8, |
1618 PSIF_PORT_RESET_QKEY_CNTR = 0x8u, |
1540 PSIF_PORT_RESET_PKEY_CNTR = 0x10, |
1619 PSIF_PORT_RESET_PKEY_CNTR = 0x10u, |
1541 /* Padding out to required bits allocated */ |
1620 /* Padding out to required bits allocated */ |
1542 PSIF_EPSC_CSR_MODIFY_PORT_FLAGS_FIELD_MAX = 0xffff |
1621 PSIF_EPSC_CSR_MODIFY_PORT_FLAGS_FIELD_MAX = 0xffffu |
1543 }; /* enum psif_epsc_csr_modify_port_flags [16 bits] */ |
1622 }; /* enum psif_epsc_csr_modify_port_flags [16 bits] */ |
1544 |
1623 |
1545 |
1624 |
1546 enum psif_epsc_csr_epsa_command { |
1625 enum psif_epsc_csr_epsa_command { |
1547 EPSC_A_LOAD, |
1626 EPSC_A_LOAD, |
1548 EPSC_A_START, |
1627 EPSC_A_START, |
1549 EPSC_A_STOP, |
1628 EPSC_A_STOP, |
1550 EPSC_A_STATUS, |
1629 EPSC_A_STATUS, |
1551 /* Padding out to required bits allocated */ |
1630 /* Padding out to required bits allocated */ |
1552 PSIF_EPSC_CSR_EPSA_COMMAND_FIELD_MAX = 0x7fffffff |
1631 PSIF_EPSC_CSR_EPSA_COMMAND_FIELD_MAX = 0x7fffffffu |
1553 }; /* enum psif_epsc_csr_epsa_command [32 bits] */ |
1632 }; /* enum psif_epsc_csr_epsa_command [32 bits] */ |
1554 |
1633 |
1555 /* |
1634 /* |
1556 */ |
1635 */ |
1557 enum psif_epsa_command { |
1636 enum psif_epsa_command { |
1579 * psif_epsc_query_req member `op` |
1659 * psif_epsc_query_req member `op` |
1580 * \par Classification |
1660 * \par Classification |
1581 * internal, development |
1661 * internal, development |
1582 */ |
1662 */ |
1583 enum psif_epsc_query_op { |
1663 enum psif_epsc_query_op { |
1584 /** If initiated from a EPSC_QUERY this operation code will always return zero and report success. |
1664 /** If initiated from a EPSC_QUERY this operation code will always return zero |
1585 * In case of a intended set request (EPSC_SET) this operation code ignore the request and return success. |
1665 * and report success. In case of a intended set request (EPSC_SET) this |
|
1666 * operation code ignore the request and return success. |
1586 */ |
1667 */ |
1587 EPSC_QUERY_BLANK = 0, |
1668 EPSC_QUERY_BLANK = 0u, |
1588 /* Obsolete - use EPSC_QUERY_CAP_VCB_{LO HI} */ |
1669 /* Obsolete - use EPSC_QUERY_CAP_VCB_{LO HI} */ |
1589 EPSC_QUERY_CAP_VCB = 0x1, |
1670 EPSC_QUERY_CAP_VCB = 0x1u, |
1590 /* Obsolete - use EPSC_QUERY_CAP_PCB_{LO HI} */ |
1671 /* Obsolete - use EPSC_QUERY_CAP_PCB_{LO HI} */ |
1591 EPSC_QUERY_CAP_PCB = 0x2, |
1672 EPSC_QUERY_CAP_PCB = 0x2u, |
1592 EPSC_QUERY_NUM_UF = 0x3, |
1673 EPSC_QUERY_NUM_UF = 0x3u, |
1593 EPSC_QUERY_GID_HI = 0x4, |
1674 EPSC_QUERY_GID_HI = 0x4u, |
1594 EPSC_QUERY_GID_LO = 0x5, |
1675 EPSC_QUERY_GID_LO = 0x5u, |
1595 EPSC_QUERY_P_KEY = 0x6, |
1676 EPSC_QUERY_P_KEY = 0x6u, |
1596 EPSC_QUERY_Q_KEY = 0x7, |
1677 EPSC_QUERY_Q_KEY = 0x7u, |
1597 EPSC_QUERY_UF = 0x8, |
1678 EPSC_QUERY_UF = 0x8u, |
1598 EPSC_QUERY_LINK_STATE = 0x9, |
1679 EPSC_QUERY_LINK_STATE = 0x9u, |
1599 EPSC_QUERY_VHCA_STATE = 0xa, |
1680 EPSC_QUERY_VHCA_STATE = 0xau, |
1600 /* Corresponds to register TSU_HOST_INT_CTRL_ADDR */ |
1681 /* Corresponds to register TSU_HOST_INT_CTRL_ADDR */ |
1601 EPSC_QUERY_INT_COMMON = 0xb, |
1682 EPSC_QUERY_INT_COMMON = 0xbu, |
1602 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_0 */ |
1683 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_0 */ |
1603 EPSC_QUERY_INT_CHAN_RATE = 0xc, |
1684 EPSC_QUERY_INT_CHAN_RATE = 0xcu, |
1604 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_1 */ |
1685 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_1 */ |
1605 EPSC_QUERY_INT_CHAN_AUSEC = 0xd, |
1686 EPSC_QUERY_INT_CHAN_AUSEC = 0xdu, |
1606 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_2 */ |
1687 /* Corresponds to register TSU_HOST_INT_CHAN_CTRL_2 */ |
1607 EPSC_QUERY_INT_CHAN_PUSEC = 0xe, |
1688 EPSC_QUERY_INT_CHAN_PUSEC = 0xeu, |
1608 /* Number of VCBs in PCI lo BAR */ |
1689 /* Number of VCBs in PCI lo BAR */ |
1609 EPSC_QUERY_CAP_VCB_LO = 0xf, |
1690 EPSC_QUERY_CAP_VCB_LO = 0xfu, |
1610 /* Number of VCBs in PCI hi BAR */ |
1691 /* Number of VCBs in PCI hi BAR */ |
1611 EPSC_QUERY_CAP_VCB_HI = 0x10, |
1692 EPSC_QUERY_CAP_VCB_HI = 0x10u, |
1612 /* Number of PCBs mapped to lo BAR VCBs */ |
1693 /* Number of PCBs mapped to lo BAR VCBs */ |
1613 EPSC_QUERY_CAP_PCB_LO = 0x11, |
1694 EPSC_QUERY_CAP_PCB_LO = 0x11u, |
1614 /* Number of PCBs mapped to hi BAR VCBs */ |
1695 /* Number of PCBs mapped to hi BAR VCBs */ |
1615 EPSC_QUERY_CAP_PCB_HI = 0x12, |
1696 EPSC_QUERY_CAP_PCB_HI = 0x12u, |
1616 /* psif_epsc_query_req.index = IB port number [1 2] */ |
1697 /* |
1617 EPSC_QUERY_PMA_REDIRECT_QP = 0x13, |
1698 * QP number for EPS-C to forward PMA responces to host |
|
1699 * psif_epsc_query_req.index = IB port number [1,2] |
|
1700 */ |
|
1701 EPSC_QUERY_PMA_REDIRECT_QP = 0x13u, |
1618 /* uptime in seconds */ |
1702 /* uptime in seconds */ |
1619 EPSC_QUERY_FW_UPTIME = 0x14, |
1703 EPSC_QUERY_FW_UPTIME = 0x14u, |
1620 /* date the firmware was programmed in epoch time */ |
1704 /* date the firmware was programmed in epoch time */ |
1621 EPSC_QUERY_FW_PROG_DATE = 0x15, |
1705 EPSC_QUERY_FW_PROG_DATE = 0x15u, |
1622 /* date the firmware was built in epoch time */ |
1706 /* date the firmware was built in epoch time */ |
1623 EPSC_QUERY_FW_BUILD_DATE = 0x16, |
1707 EPSC_QUERY_FW_BUILD_DATE = 0x16u, |
1624 /* current firmware image number (flash slot) */ |
1708 /* current firmware image number (flash slot) */ |
1625 EPSC_QUERY_FW_CURR_IMG = 0x17, |
1709 EPSC_QUERY_FW_CURR_IMG = 0x17u, |
1626 /* oneshot firmware image number (flash slot) */ |
1710 /* oneshot firmware image number (flash slot) */ |
1627 EPSC_QUERY_FW_ONESHOT_IMG = 0x18, |
1711 EPSC_QUERY_FW_ONESHOT_IMG = 0x18u, |
1628 /* autostart firmware image number (flash slot) */ |
1712 /* autostart firmware image number (flash slot) */ |
1629 EPSC_QUERY_FW_AUTOSTART_IMG = 0x19, |
1713 EPSC_QUERY_FW_AUTOSTART_IMG = 0x19u, |
1630 /* bit field encoding why the FW image was booted */ |
1714 /* bit field encoding why the FW image was booted */ |
1631 EPSC_QUERY_FW_START_CAUSE = 0x1a, |
1715 EPSC_QUERY_FW_START_CAUSE = 0x1au, |
1632 /* firmware version */ |
1716 /* firmware version */ |
1633 EPSC_QUERY_FW_VERSION = 0x1b, |
1717 EPSC_QUERY_FW_VERSION = 0x1bu, |
1634 /* Requester - number of bad response errors. */ |
1718 /* Requester - number of bad response errors. */ |
1635 EPSC_QUERY_SQ_NUM_BRE = 0x1c, |
1719 EPSC_QUERY_SQ_NUM_BRE = 0x1cu, |
1636 /* Requester - number of bad response errors. */ |
1720 /* Requester - number of bad response errors. */ |
1637 EPSC_QUERY_NUM_CQOVF = 0x1d, |
1721 EPSC_QUERY_NUM_CQOVF = 0x1du, |
1638 /* Requester - number of CQEs with status flushed in error. */ |
1722 /* Requester - number of CQEs with status flushed in error. */ |
1639 EPSC_QUERY_SQ_NUM_WRFE = 0x1e, |
1723 EPSC_QUERY_SQ_NUM_WRFE = 0x1eu, |
1640 /* Responder - number of CQEs with status flushed in error. */ |
1724 /* Responder - number of CQEs with status flushed in error. */ |
1641 EPSC_QUERY_RQ_NUM_WRFE = 0x1f, |
1725 EPSC_QUERY_RQ_NUM_WRFE = 0x1fu, |
1642 /* Responder - number of local access errors. */ |
1726 /* Responder - number of local access errors. */ |
1643 EPSC_QUERY_RQ_NUM_LAE = 0x20, |
1727 EPSC_QUERY_RQ_NUM_LAE = 0x20u, |
1644 /* Responder - number of local protection errors. */ |
1728 /* Responder - number of local protection errors. */ |
1645 EPSC_QUERY_RQ_NUM_LPE = 0x21, |
1729 EPSC_QUERY_RQ_NUM_LPE = 0x21u, |
1646 /* Requester - number of local length errors. */ |
1730 /* Requester - number of local length errors. */ |
1647 EPSC_QUERY_SQ_NUM_LLE = 0x22, |
1731 EPSC_QUERY_SQ_NUM_LLE = 0x22u, |
1648 /* Responder - number of local length errors. */ |
1732 /* Responder - number of local length errors. */ |
1649 EPSC_QUERY_RQ_NUM_LLE = 0x23, |
1733 EPSC_QUERY_RQ_NUM_LLE = 0x23u, |
1650 /* Requester - number local QP operation error. */ |
1734 /* Requester - number local QP operation error. */ |
1651 EPSC_QUERY_SQ_NUM_LQPOE = 0x24, |
1735 EPSC_QUERY_SQ_NUM_LQPOE = 0x24u, |
1652 /* Responder - number local QP operation error. */ |
1736 /* Responder - number local QP operation error. */ |
1653 EPSC_QUERY_RQ_NUM_LQPOE = 0x25, |
1737 EPSC_QUERY_RQ_NUM_LQPOE = 0x25u, |
1654 /* Requester - number of NAK-Sequence Error received. */ |
1738 /* Requester - number of NAK-Sequence Error received. */ |
1655 EPSC_QUERY_SQ_NUM_OOS = 0x26, |
1739 EPSC_QUERY_SQ_NUM_OOS = 0x26u, |
1656 /* Responder - number of NAK-Sequence Error sent. */ |
1740 /* Responder - number of NAK-Sequence Error sent. */ |
1657 EPSC_QUERY_RQ_NUM_OOS = 0x27, |
1741 EPSC_QUERY_RQ_NUM_OOS = 0x27u, |
1658 /* Requester - number of RNR nak retries exceeded errors. */ |
1742 /* Requester - number of RNR nak retries exceeded errors. */ |
1659 EPSC_QUERY_SQ_NUM_RREE = 0x28, |
1743 EPSC_QUERY_SQ_NUM_RREE = 0x28u, |
1660 /* Requester - number of transport retries exceeded errors. */ |
1744 /* Requester - number of transport retries exceeded errors. */ |
1661 EPSC_QUERY_SQ_NUM_TREE = 0x29, |
1745 EPSC_QUERY_SQ_NUM_TREE = 0x29u, |
1662 /* Requester - number of NAK-Remote Access Error received. */ |
1746 /* Requester - number of NAK-Remote Access Error received. */ |
1663 EPSC_QUERY_SQ_NUM_ROE = 0x2a, |
1747 EPSC_QUERY_SQ_NUM_ROE = 0x2au, |
1664 /* |
1748 /* |
1665 * Responder - number of NAK-Remote Access Error sent. NAK-Remote Operation |
1749 * Responder - number of NAK-Remote Access Error sent. NAK-Remote Operation |
1666 * Error on: 1. Malformed WQE: Responder detected a malformed Receive Queue |
1750 * Error on: 1. Malformed WQE: Responder detected a malformed Receive Queue |
1667 * WQE while processing the packet. 2. Remote Operation Error: Responder |
1751 * WQE while processing the packet. 2. Remote Operation Error: Responder |
1668 * encountered an error, (local to the responder), which prevented it from |
1752 * encountered an error, (local to the responder), which prevented it from |
1669 * completing the request. |
1753 * completing the request. |
1670 */ |
1754 */ |
1671 EPSC_QUERY_RQ_NUM_ROE = 0x2b, |
1755 EPSC_QUERY_RQ_NUM_ROE = 0x2bu, |
1672 /* |
1756 /* |
1673 * Requester - number of NAK-Remote Access Error received. R_Key Violation: |
1757 * Requester - number of NAK-Remote Access Error received. R_Key Violation: |
1674 * Responder detected an invalid R_Key while executing an RDMA Request. |
1758 * Responder detected an invalid R_Key while executing an RDMA Request. |
1675 */ |
1759 */ |
1676 EPSC_QUERY_SQ_NUM_RAE = 0x2c, |
1760 EPSC_QUERY_SQ_NUM_RAE = 0x2cu, |
1677 /* |
1761 /* |
1678 * Responder - number of NAK-Remote Access Error sent. R_Key Violation |
1762 * Responder - number of NAK-Remote Access Error sent. R_Key Violation |
1679 * Responder detected an R_Key violation while executing an RDMA request. |
1763 * Responder detected an R_Key violation while executing an RDMA request. |
1680 */ |
1764 */ |
1681 EPSC_QUERY_RQ_NUM_RAE = 0x2d, |
1765 EPSC_QUERY_RQ_NUM_RAE = 0x2du, |
1682 /* |
1766 /* |
1683 * The number of UD packets silently discarded on the receive queue due to |
1767 * The number of UD packets silently discarded on the receive queue due to |
1684 * lack of receive descriptor. |
1768 * lack of receive descriptor. |
1685 */ |
1769 */ |
1686 EPSC_QUERY_RQ_NUM_UDSDPRD = 0x2e, |
1770 EPSC_QUERY_RQ_NUM_UDSDPRD = 0x2eu, |
1687 /* |
1771 /* |
1688 * The number of UC packets silently discarded on the receive queue due to |
1772 * The number of UC packets silently discarded on the receive queue due to |
1689 * lack of receive descriptor. |
1773 * lack of receive descriptor. |
1690 */ |
1774 */ |
1691 EPSC_QUERY_RQ_NUM_UCSDPRD = 0x2f, |
1775 EPSC_QUERY_RQ_NUM_UCSDPRD = 0x2fu, |
1692 /* |
1776 /* |
1693 * Requester - number of remote invalid request errors NAK-Invalid Request |
1777 * Requester - number of remote invalid request errors NAK-Invalid Request |
1694 * on: 1. Unsupported OpCode: Responder detected an unsupported OpCode. 2. |
1778 * on: 1. Unsupported OpCode: Responder detected an unsupported OpCode. 2. |
1695 * Unexpected OpCode: Responder detected an error in the sequence of OpCodes, |
1779 * Unexpected OpCode: Responder detected an error in the sequence of OpCodes, |
1696 * such as a missing Last packet. |
1780 * such as a missing Last packet. |
1697 */ |
1781 */ |
1698 EPSC_QUERY_SQ_NUM_RIRE = 0x30, |
1782 EPSC_QUERY_SQ_NUM_RIRE = 0x30u, |
1699 /* |
1783 /* |
1700 * Responder - number of remote invalid request errors. NAK may or may not be |
1784 * Responder - number of remote invalid request errors. NAK may or may not be |
1701 * sent. 1. QP Async Affiliated Error: Unsupported or Reserved OpCode (RC,RD |
1785 * sent. 1. QP Async Affiliated Error: Unsupported or Reserved OpCode (RC,RD |
1702 * only): Inbound request OpCode was either reserved, or was for a function |
1786 * only): Inbound request OpCode was either reserved, or was for a function |
1703 * not supported by thisQP. (E.g. RDMA or ATOMIC on QP not set up for this). |
1787 * not supported by thisQP. (E.g. RDMA or ATOMIC on QP not set up for this). |
1715 * was not consistent with the opcode: a: only is between 0 and PMTU bytes b: |
1799 * was not consistent with the opcode: a: only is between 0 and PMTU bytes b: |
1716 * (first or middle) equals PMTU bytes c: last is between 1 byte and PMTU |
1800 * (first or middle) equals PMTU bytes c: last is between 1 byte and PMTU |
1717 * bytes 9. Length error: Inbound message exceeded the size supported by the |
1801 * bytes 9. Length error: Inbound message exceeded the size supported by the |
1718 * CA port. |
1802 * CA port. |
1719 */ |
1803 */ |
1720 EPSC_QUERY_RQ_NUM_RIRE = 0x31, |
1804 EPSC_QUERY_RQ_NUM_RIRE = 0x31u, |
1721 /* Requester - the number of RNR Naks received. */ |
1805 /* Requester - the number of RNR Naks received. */ |
1722 EPSC_QUERY_SQ_NUM_RNR = 0x32, |
1806 EPSC_QUERY_SQ_NUM_RNR = 0x32u, |
1723 /* Responder - the number of RNR Naks sent. */ |
1807 /* Responder - the number of RNR Naks sent. */ |
1724 EPSC_QUERY_RQ_NUM_RNR = 0x33, |
1808 EPSC_QUERY_RQ_NUM_RNR = 0x33u, |
1725 /* twoshot firmware image number (flash slot) */ |
1809 /* twoshot firmware image number (flash slot) */ |
1726 EPSC_QUERY_FW_TWOSHOT_IMG = 0x34, |
1810 EPSC_QUERY_FW_TWOSHOT_IMG = 0x34u, |
1727 /* firmware type */ |
1811 /* firmware type */ |
1728 EPSC_QUERY_FW_TYPE = 0x35, |
1812 EPSC_QUERY_FW_TYPE = 0x35u, |
1729 /* firmware size */ |
1813 /* firmware size */ |
1730 EPSC_QUERY_FW_SIZE = 0x36, |
1814 EPSC_QUERY_FW_SIZE = 0x36u, |
1731 /* firmware slot size (available space for an image) */ |
1815 /* firmware slot size (available space for an image) */ |
1732 EPSC_QUERY_FW_SLOT_SIZE = 0x37, |
1816 EPSC_QUERY_FW_SLOT_SIZE = 0x37u, |
1733 /* version of boot loader that has started the application */ |
1817 /* version of boot loader that has started the application */ |
1734 EPSC_QUERY_BL_VERSION = 0x38, |
1818 EPSC_QUERY_BL_VERSION = 0x38u, |
1735 /* boot loader build date in epoch time format */ |
1819 /* boot loader build date in epoch time format */ |
1736 EPSC_QUERY_BL_BUILD_DATE = 0x39, |
1820 EPSC_QUERY_BL_BUILD_DATE = 0x39u, |
1737 /* only used by EPSC_SET mark a PQP CQ ID as clean (WA bug 3769) */ |
1821 /* only used by EPSC_SET mark a PQP CQ ID as clean (WA bug 3769) */ |
1738 EPSC_QUERY_CLEAN_CQ_ID = 0x3a, |
1822 EPSC_QUERY_CLEAN_CQ_ID = 0x3au, |
1739 /* Number of TSL supported by FW */ |
1823 /* Number of TSL supported by FW */ |
1740 EPSC_QUERY_CAP_TSL_TX = 0x3b, |
1824 EPSC_QUERY_CAP_TSL_TX = 0x3bu, |
1741 EPSC_QUERY_CAP_TSL_RX = 0x3c, |
1825 EPSC_QUERY_CAP_TSL_RX = 0x3cu, |
1742 /* Reset CBLD Diag counters. Only used by EPSC_SET */ |
1826 /* Reset CBLD Diag counters. Only used by EPSC_SET */ |
1743 EPSC_QUERY_RESET_CBLD_DIAG_COUNTERS = 0x3d, |
1827 EPSC_QUERY_RESET_CBLD_DIAG_COUNTERS = 0x3du, |
1744 /* Max QP index used since power-on or host reset - to optimize WA for HW bug 3251 */ |
1828 /* Max QP index used since power-on or host reset - to optimize WA for HW bug 3251 */ |
1745 EPSC_QUERY_MAX_QP_USED = 0x3e, |
1829 EPSC_QUERY_MAX_QP_USED = 0x3eu, |
1746 /** the UF and QP where modify QP timed out ((uf << 32) | (qp)) */ |
1830 /** the UF and QP where modify QP timed out ((uf << 32) | (qp)) */ |
1747 EPSC_QUERY_MODQP_TO_SOURCE = 0x3f, |
1831 EPSC_QUERY_MODQP_TO_SOURCE = 0x3fu, |
1748 /** the debug register when modify QP timed out */ |
1832 /** the debug register when modify QP timed out */ |
1749 EPSC_QUERY_MODQP_TO_DEBUG = 0x40, |
1833 EPSC_QUERY_MODQP_TO_DEBUG = 0x40u, |
1750 /** the bit vector containing the reasons for entering degraded mode */ |
1834 /** the bit vector containing the reasons for entering degraded mode */ |
1751 EPSC_QUERY_DEGRADED_CAUSE = 0x41, |
1835 EPSC_QUERY_DEGRADED_CAUSE = 0x41u, |
1752 /** CMPL spin set mode (safe = 1 fast = 0) */ |
1836 /** CMPL spin set mode (safe = 1 fast = 0) */ |
1753 EPSC_QUERY_SPIN_SET_CONTROL = 0x42, |
1837 EPSC_QUERY_SPIN_SET_CONTROL = 0x42u, |
1754 /** VPD MAC address */ |
1838 /** VPD MAC address */ |
1755 EPSC_QUERY_VPD_MAC = 0x43, |
1839 EPSC_QUERY_VPD_MAC = 0x43u, |
1756 /** VPD part number */ |
1840 /** VPD part number */ |
1757 EPSC_QUERY_VPD_PART_NUMBER = 0x44, |
1841 EPSC_QUERY_VPD_PART_NUMBER = 0x44u, |
1758 /** VPD revision */ |
1842 /** VPD revision */ |
1759 EPSC_QUERY_VPD_REVISION = 0x45, |
1843 EPSC_QUERY_VPD_REVISION = 0x45u, |
1760 /** VPD serial number (big endian sub-string) - 8 byte offset in query index */ |
1844 /** VPD serial number (big endian sub-string) - 8 byte offset in query index */ |
1761 EPSC_QUERY_VPD_SERIAL_NUMBER = 0x46, |
1845 EPSC_QUERY_VPD_SERIAL_NUMBER = 0x46u, |
1762 /** VPD manufacturer = = Oracle Corporation - 8 byte offset in query index */ |
1846 /** VPD manufacturer = = Oracle Corporation - 8 byte offset in query index */ |
1763 EPSC_QUERY_VPD_MANUFACTURER = 0x47, |
1847 EPSC_QUERY_VPD_MANUFACTURER = 0x47u, |
|
1848 /** VPD product name (big endian sub-string) - 8 byte offset in query index */ |
|
1849 EPSC_QUERY_VPD_PRODUCT_NAME = 0x4bu, |
|
1850 /** VPD Base GUID */ |
|
1851 EPSC_QUERY_VPD_BASE_GUID = 0x4eu, |
|
1852 /** PSIF TSU SL and QoS mapping for for QP 0 - port number in query index */ |
|
1853 EPSC_QUERY_MAP_QP0_TO_TSL = 0x52u, |
1764 /** PSIF TSU SL and QoS mapping for priv QP - port number in query index */ |
1854 /** PSIF TSU SL and QoS mapping for priv QP - port number in query index */ |
1765 EPSC_QUERY_MAP_PQP_TO_TSL = 0x48, |
1855 EPSC_QUERY_MAP_PQP_TO_TSL = 0x48u, |
1766 /** PSIF TSU SL and QoS mapping for IB SL 0-7 - port number in query index */ |
1856 /** PSIF TSU SL and QoS mapping for IB SL 0-7 - port number in query index */ |
1767 EPSC_QUERY_MAP_SL_TO_TSL_LO = 0x49, |
1857 EPSC_QUERY_MAP_SL_TO_TSL_LO = 0x49u, |
1768 /** PSIF TSU SL and QoS mapping for IB SL 8-15 - port number in query index */ |
1858 /** PSIF TSU SL and QoS mapping for IB SL 8-15 - port number in query index */ |
1769 EPSC_QUERY_MAP_SL_TO_TSL_HI = 0x4a, |
1859 EPSC_QUERY_MAP_SL_TO_TSL_HI = 0x4au, |
1770 /** VPD Product Name - 8 byte offset in query index */ |
1860 /** MMU static configuration of TA_UPPER_TWELVE bits (SPARC only) */ |
1771 EPSC_QUERY_VPD_PRODUCT_NAME = 0x4b, |
1861 EPSC_QUERY_TA_UPPER_TWELVE = 0x4cu, |
1772 /* Padding out to required bits allocated */ |
1862 /** MMU static configuration of PA_UPPER_TWELVE bits (SPARC only) */ |
1773 PSIF_EPSC_QUERY_OP_FIELD_MAX = 0x7fffffff |
1863 EPSC_QUERY_PA_UPPER_TWELVE = 0x4du, |
|
1864 /** Number of VFs configured - valid values limited to power-of-two. |
|
1865 * For BARE_METAL mode, number of VFs is -1 i.e. not applicable. |
|
1866 * PSIF_QUERY index as defined in psif_epsc_query_num_vfs_mode |
|
1867 * PSIF_SET index = #VFs for next restart |
|
1868 */ |
|
1869 EPSC_QUERY_NUM_VFS = 0x4fu, |
|
1870 /** Development debug only operation: SET and QUERY the TSU credit |
|
1871 * mode setup as defined by epsc_cli: cfg tsu_credit |
|
1872 */ |
|
1873 EPSC_QUERY_CREDIT_MODE = 0x50u, |
|
1874 /** Query version on onboard CPLD (Titan only Other platforms will return EPSC_ENODATA) */ |
|
1875 EPSC_QUERY_CPLD_VERSION = 0x51u, |
|
1876 /** Query portinfo on exernal port (defined in psif_epsc_query_external_port_info_t) */ |
|
1877 EPSC_QUERY_EXTERNAL_PORT_INFO = 0x53u, |
|
1878 /* EOF marker - must be last and highest in this enum type. */ |
|
1879 EPSC_QUERY_LAST = 0x54u, |
|
1880 /* Padding out to required bits allocated */ |
|
1881 PSIF_EPSC_QUERY_OP_FIELD_MAX = 0x7fffffffu |
1774 }; /* enum psif_epsc_query_op [32 bits] */ |
1882 }; /* enum psif_epsc_query_op [32 bits] */ |
1775 |
1883 |
1776 /** |
1884 /** |
1777 * Valid values for struct psif_epsc_csr_update::opcode |
1885 * Valid values for struct psif_epsc_csr_update::opcode |
1778 */ |
1886 */ |
1779 enum psif_epsc_csr_update_opcode { |
1887 enum psif_epsc_csr_update_opcode { |
1780 EPSC_UPDATE_OP_POLL = 0, |
1888 EPSC_UPDATE_OP_POLL = 0u, |
1781 EPSC_UPDATE_OP_START, |
1889 EPSC_UPDATE_OP_START, |
1782 EPSC_UPDATE_OP_ERASE, |
1890 EPSC_UPDATE_OP_ERASE, |
1783 EPSC_UPDATE_OP_WRITE, |
1891 EPSC_UPDATE_OP_WRITE, |
1784 EPSC_UPDATE_OP_READ, |
1892 EPSC_UPDATE_OP_READ, |
1785 EPSC_UPDATE_OP_STOP, |
1893 EPSC_UPDATE_OP_STOP, |
1786 EPSC_UPDATE_OP_SET, |
1894 EPSC_UPDATE_OP_SET, |
1787 EPSC_UPDATE_OP_MAX, |
1895 EPSC_UPDATE_OP_MAX, |
1788 /* Padding out to required bits allocated */ |
1896 /* Padding out to required bits allocated */ |
1789 PSIF_EPSC_CSR_UPDATE_OPCODE_FIELD_MAX = 0xffff |
1897 PSIF_EPSC_CSR_UPDATE_OPCODE_FIELD_MAX = 0xffffu |
1790 }; /* enum psif_epsc_csr_update_opcode [16 bits] */ |
1898 }; /* enum psif_epsc_csr_update_opcode [16 bits] */ |
1791 |
1899 |
1792 /** |
1900 /** |
1793 * Flash slot numbers used by e.g. EPSC_QUERY::EPSC_QUERY_FW_CURR_IMG |
1901 * Flash slot numbers used by e.g. EPSC_QUERY::EPSC_QUERY_FW_CURR_IMG |
1794 */ |
1902 */ |
1812 EPSC_UPDATE_SET_AUTOSTART_IMG, |
1920 EPSC_UPDATE_SET_AUTOSTART_IMG, |
1813 EPSC_UPDATE_SET_ONESHOT_IMG, |
1921 EPSC_UPDATE_SET_ONESHOT_IMG, |
1814 EPSC_UPDATE_SET_TWOSHOT_IMG, |
1922 EPSC_UPDATE_SET_TWOSHOT_IMG, |
1815 EPSC_UPDATE_SET_IMG_VALID, |
1923 EPSC_UPDATE_SET_IMG_VALID, |
1816 /* Padding out to required bits allocated */ |
1924 /* Padding out to required bits allocated */ |
1817 PSIF_EPSC_UPDATE_SET_FIELD_MAX = 0x7fffffff |
1925 PSIF_EPSC_UPDATE_SET_FIELD_MAX = 0x7fffffffu |
1818 }; /* enum psif_epsc_update_set [32 bits] */ |
1926 }; /* enum psif_epsc_update_set [32 bits] */ |
1819 |
1927 |
1820 /** |
1928 /** |
1821 * Opcodes for psif_epsc_csr_uf_ctrl_t::opcode |
1929 * Opcodes for psif_epsc_csr_uf_ctrl_t::opcode |
1822 */ |
1930 */ |
1823 enum psif_epsc_csr_uf_ctrl_opcode { |
1931 enum psif_epsc_csr_uf_ctrl_opcode { |
1824 EPSC_UF_CTRL_MMU_FLUSH, |
1932 EPSC_UF_CTRL_MMU_FLUSH, |
1825 EPSC_UF_CTRL_GET_UF_USED_QP, |
1933 EPSC_UF_CTRL_GET_UF_USED_QP, |
1826 EPSC_UF_CTRL_CLEAR_UF_USED_QP, |
1934 EPSC_UF_CTRL_CLEAR_UF_USED_QP, |
1827 /** For SMP {en dis}able is the flag param a bitvector for which ports to update 0x6 hence indicate P1 and P2. */ |
1935 /** For SMP {en dis}able is the flag param a bitvector for which ports |
|
1936 * to update, 0x6 hence indicate P1 and P2. |
|
1937 */ |
1828 EPSC_UF_CTRL_SMP_ENABLE, |
1938 EPSC_UF_CTRL_SMP_ENABLE, |
1829 EPSC_UF_CTRL_SMP_DISABLE, |
1939 EPSC_UF_CTRL_SMP_DISABLE, |
1830 /** For Vlink {dis }connect is the flag param a bitvector for which ports to update 0x6 hence indicate P1 and P2. */ |
1940 /** For Vlink {dis }connect is the flag param a bitvector for which ports |
|
1941 * to update, 0x6 hence indicate P1 and P2. |
|
1942 */ |
1831 EPSC_UF_CTRL_VLINK_CONNECT, |
1943 EPSC_UF_CTRL_VLINK_CONNECT, |
1832 EPSC_UF_CTRL_VLINK_DISCONNECT, |
1944 EPSC_UF_CTRL_VLINK_DISCONNECT, |
1833 /** Retrieve the highest QP number used by the given UF */ |
1945 /** Retrieve the highest QP number used by the given UF */ |
1834 EPSC_UF_CTRL_GET_HIGHEST_QP_IDX, |
1946 EPSC_UF_CTRL_GET_HIGHEST_QP_IDX, |
1835 /** Reset the highest QP number cache for the given UF */ |
1947 /** Reset the highest QP number cache for the given UF */ |
1836 EPSC_UF_CTRL_RESET_HIGHEST_QP_IDX, |
1948 EPSC_UF_CTRL_RESET_HIGHEST_QP_IDX, |
1837 /* Padding out to required bits allocated */ |
1949 /* Padding out to required bits allocated */ |
1838 PSIF_EPSC_CSR_UF_CTRL_OPCODE_FIELD_MAX = 0x7fffffff |
1950 PSIF_EPSC_CSR_UF_CTRL_OPCODE_FIELD_MAX = 0x7fffffffu |
1839 }; /* enum psif_epsc_csr_uf_ctrl_opcode [32 bits] */ |
1951 }; /* enum psif_epsc_csr_uf_ctrl_opcode [32 bits] */ |
1840 |
1952 |
1841 /** |
1953 /** |
1842 * \brief Host to VIMMA operation codes |
1954 * \brief Host to VIMMA operation codes |
1843 * \details |
1955 * \details |