]>
Commit | Line | Data |
---|---|---|
b85daafe KG |
1 | /* |
2 | * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. | |
3 | * All rights reserved | |
4 | * www.brocade.com | |
5 | * | |
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | |
10 | * published by the Free Software Foundation | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, but | |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | */ | |
17 | #ifndef BFAD_BSG_H | |
18 | #define BFAD_BSG_H | |
19 | ||
20 | #include "bfa_defs.h" | |
21 | #include "bfa_defs_fcs.h" | |
22 | ||
23 | /* Definitions of vendor unique structures and command codes passed in | |
24 | * using FC_BSG_HST_VENDOR message code. | |
25 | */ | |
26 | enum { | |
60138066 KG |
27 | IOCMD_IOC_ENABLE = 0x1, |
28 | IOCMD_IOC_DISABLE, | |
29 | IOCMD_IOC_GET_ATTR, | |
b85daafe | 30 | IOCMD_IOC_GET_INFO, |
60138066 KG |
31 | IOCMD_IOC_GET_STATS, |
32 | IOCMD_IOC_GET_FWSTATS, | |
f2ee7601 KG |
33 | IOCMD_IOC_RESET_STATS, |
34 | IOCMD_IOC_RESET_FWSTATS, | |
35 | IOCMD_IOC_SET_ADAPTER_NAME, | |
36 | IOCMD_IOC_SET_PORT_NAME, | |
60138066 KG |
37 | IOCMD_IOCFC_GET_ATTR, |
38 | IOCMD_IOCFC_SET_INTR, | |
39 | IOCMD_PORT_ENABLE, | |
40 | IOCMD_PORT_DISABLE, | |
b85daafe | 41 | IOCMD_PORT_GET_ATTR, |
60138066 | 42 | IOCMD_PORT_GET_STATS, |
f2ee7601 KG |
43 | IOCMD_PORT_RESET_STATS, |
44 | IOCMD_PORT_CFG_TOPO, | |
45 | IOCMD_PORT_CFG_SPEED, | |
46 | IOCMD_PORT_CFG_ALPA, | |
47 | IOCMD_PORT_CFG_MAXFRSZ, | |
48 | IOCMD_PORT_CLR_ALPA, | |
49 | IOCMD_PORT_BBSC_ENABLE, | |
50 | IOCMD_PORT_BBSC_DISABLE, | |
b85daafe | 51 | IOCMD_LPORT_GET_ATTR, |
60138066 KG |
52 | IOCMD_LPORT_GET_RPORTS, |
53 | IOCMD_LPORT_GET_STATS, | |
f2ee7601 | 54 | IOCMD_LPORT_RESET_STATS, |
60138066 KG |
55 | IOCMD_LPORT_GET_IOSTATS, |
56 | IOCMD_RPORT_GET_ATTR, | |
b85daafe | 57 | IOCMD_RPORT_GET_ADDR, |
60138066 | 58 | IOCMD_RPORT_GET_STATS, |
f2ee7601 KG |
59 | IOCMD_RPORT_RESET_STATS, |
60 | IOCMD_RPORT_SET_SPEED, | |
61 | IOCMD_VPORT_GET_ATTR, | |
62 | IOCMD_VPORT_GET_STATS, | |
63 | IOCMD_VPORT_RESET_STATS, | |
b85daafe | 64 | IOCMD_FABRIC_GET_LPORTS, |
f2ee7601 KG |
65 | IOCMD_RATELIM_ENABLE, |
66 | IOCMD_RATELIM_DISABLE, | |
67 | IOCMD_RATELIM_DEF_SPEED, | |
68 | IOCMD_FCPIM_FAILOVER, | |
60138066 | 69 | IOCMD_FCPIM_MODSTATS, |
f2ee7601 | 70 | IOCMD_FCPIM_MODSTATSCLR, |
60138066 | 71 | IOCMD_FCPIM_DEL_ITN_STATS, |
b85daafe | 72 | IOCMD_ITNIM_GET_ATTR, |
60138066 | 73 | IOCMD_ITNIM_GET_IOSTATS, |
f2ee7601 | 74 | IOCMD_ITNIM_RESET_STATS, |
60138066 | 75 | IOCMD_ITNIM_GET_ITNSTATS, |
1a4d8e1b | 76 | IOCMD_IOC_PCIFN_CFG, |
60138066 KG |
77 | IOCMD_FCPORT_ENABLE, |
78 | IOCMD_FCPORT_DISABLE, | |
1a4d8e1b KG |
79 | IOCMD_PCIFN_CREATE, |
80 | IOCMD_PCIFN_DELETE, | |
81 | IOCMD_PCIFN_BW, | |
82 | IOCMD_ADAPTER_CFG_MODE, | |
83 | IOCMD_PORT_CFG_MODE, | |
84 | IOCMD_FLASH_ENABLE_OPTROM, | |
85 | IOCMD_FLASH_DISABLE_OPTROM, | |
a714134a KG |
86 | IOCMD_FAA_ENABLE, |
87 | IOCMD_FAA_DISABLE, | |
88 | IOCMD_FAA_QUERY, | |
148d6103 KG |
89 | IOCMD_CEE_GET_ATTR, |
90 | IOCMD_CEE_GET_STATS, | |
91 | IOCMD_CEE_RESET_STATS, | |
51e569aa KG |
92 | IOCMD_SFP_MEDIA, |
93 | IOCMD_SFP_SPEED, | |
5a54b1d5 KG |
94 | IOCMD_FLASH_GET_ATTR, |
95 | IOCMD_FLASH_ERASE_PART, | |
96 | IOCMD_FLASH_UPDATE_PART, | |
97 | IOCMD_FLASH_READ_PART, | |
3d7fc66d KG |
98 | IOCMD_DIAG_TEMP, |
99 | IOCMD_DIAG_MEMTEST, | |
100 | IOCMD_DIAG_LOOPBACK, | |
101 | IOCMD_DIAG_FWPING, | |
102 | IOCMD_DIAG_QUEUETEST, | |
103 | IOCMD_DIAG_SFP, | |
104 | IOCMD_DIAG_LED, | |
105 | IOCMD_DIAG_BEACON_LPORT, | |
106 | IOCMD_DIAG_LB_STAT, | |
3350d98d KG |
107 | IOCMD_PHY_GET_ATTR, |
108 | IOCMD_PHY_GET_STATS, | |
109 | IOCMD_PHY_UPDATE_FW, | |
110 | IOCMD_PHY_READ_FW, | |
61e62e21 KG |
111 | IOCMD_VHBA_QUERY, |
112 | IOCMD_DEBUG_PORTLOG, | |
f2ee7601 KG |
113 | IOCMD_DEBUG_FW_CORE, |
114 | IOCMD_DEBUG_FW_STATE_CLR, | |
115 | IOCMD_DEBUG_PORTLOG_CLR, | |
116 | IOCMD_DEBUG_START_DTRC, | |
117 | IOCMD_DEBUG_STOP_DTRC, | |
118 | IOCMD_DEBUG_PORTLOG_CTL, | |
42a8e6e2 KG |
119 | IOCMD_FCPIM_PROFILE_ON, |
120 | IOCMD_FCPIM_PROFILE_OFF, | |
121 | IOCMD_ITNIM_GET_IOPROFILE, | |
37ea0558 KG |
122 | IOCMD_FCPORT_GET_STATS, |
123 | IOCMD_FCPORT_RESET_STATS, | |
1a4d8e1b KG |
124 | }; |
125 | ||
126 | struct bfa_bsg_gen_s { | |
127 | bfa_status_t status; | |
128 | u16 bfad_num; | |
129 | u16 rsvd; | |
b85daafe KG |
130 | }; |
131 | ||
f2ee7601 KG |
132 | struct bfa_bsg_portlogctl_s { |
133 | bfa_status_t status; | |
134 | u16 bfad_num; | |
135 | u16 rsvd; | |
136 | bfa_boolean_t ctl; | |
137 | int inst_no; | |
138 | }; | |
139 | ||
42a8e6e2 KG |
140 | struct bfa_bsg_fcpim_profile_s { |
141 | bfa_status_t status; | |
142 | u16 bfad_num; | |
143 | u16 rsvd; | |
144 | }; | |
145 | ||
146 | struct bfa_bsg_itnim_ioprofile_s { | |
147 | bfa_status_t status; | |
148 | u16 bfad_num; | |
149 | u16 vf_id; | |
150 | wwn_t lpwwn; | |
151 | wwn_t rpwwn; | |
152 | struct bfa_itnim_ioprofile_s ioprofile; | |
153 | }; | |
154 | ||
37ea0558 KG |
155 | struct bfa_bsg_fcport_stats_s { |
156 | bfa_status_t status; | |
157 | u16 bfad_num; | |
158 | u16 rsvd; | |
159 | union bfa_fcport_stats_u stats; | |
160 | }; | |
161 | ||
f2ee7601 KG |
162 | struct bfa_bsg_ioc_name_s { |
163 | bfa_status_t status; | |
164 | u16 bfad_num; | |
165 | u16 rsvd; | |
166 | char name[BFA_ADAPTER_SYM_NAME_LEN]; | |
167 | }; | |
168 | ||
b85daafe KG |
169 | struct bfa_bsg_ioc_info_s { |
170 | bfa_status_t status; | |
171 | u16 bfad_num; | |
172 | u16 rsvd; | |
173 | char serialnum[64]; | |
174 | char hwpath[BFA_STRING_32]; | |
175 | char adapter_hwpath[BFA_STRING_32]; | |
176 | char guid[BFA_ADAPTER_SYM_NAME_LEN*2]; | |
177 | char name[BFA_ADAPTER_SYM_NAME_LEN]; | |
178 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; | |
179 | char eth_name[BFA_ADAPTER_SYM_NAME_LEN]; | |
180 | wwn_t pwwn; | |
181 | wwn_t nwwn; | |
182 | wwn_t factorypwwn; | |
183 | wwn_t factorynwwn; | |
184 | mac_t mac; | |
185 | mac_t factory_mac; /* Factory mac address */ | |
186 | mac_t current_mac; /* Currently assigned mac address */ | |
187 | enum bfa_ioc_type_e ioc_type; | |
188 | u16 pvid; /* Port vlan id */ | |
189 | u16 rsvd1; | |
190 | u32 host; | |
191 | u32 bandwidth; /* For PF support */ | |
192 | u32 rsvd2; | |
193 | }; | |
194 | ||
195 | struct bfa_bsg_ioc_attr_s { | |
196 | bfa_status_t status; | |
197 | u16 bfad_num; | |
198 | u16 rsvd; | |
199 | struct bfa_ioc_attr_s ioc_attr; | |
200 | }; | |
201 | ||
60138066 KG |
202 | struct bfa_bsg_ioc_stats_s { |
203 | bfa_status_t status; | |
204 | u16 bfad_num; | |
205 | u16 rsvd; | |
206 | struct bfa_ioc_stats_s ioc_stats; | |
207 | }; | |
208 | ||
209 | struct bfa_bsg_ioc_fwstats_s { | |
210 | bfa_status_t status; | |
211 | u16 bfad_num; | |
212 | u16 rsvd; | |
213 | u32 buf_size; | |
214 | u32 rsvd1; | |
215 | u64 buf_ptr; | |
216 | }; | |
217 | ||
218 | struct bfa_bsg_iocfc_attr_s { | |
219 | bfa_status_t status; | |
220 | u16 bfad_num; | |
221 | u16 rsvd; | |
222 | struct bfa_iocfc_attr_s iocfc_attr; | |
223 | }; | |
224 | ||
225 | struct bfa_bsg_iocfc_intr_s { | |
226 | bfa_status_t status; | |
227 | u16 bfad_num; | |
228 | u16 rsvd; | |
229 | struct bfa_iocfc_intr_attr_s attr; | |
230 | }; | |
231 | ||
b85daafe KG |
232 | struct bfa_bsg_port_attr_s { |
233 | bfa_status_t status; | |
234 | u16 bfad_num; | |
235 | u16 rsvd; | |
236 | struct bfa_port_attr_s attr; | |
237 | }; | |
238 | ||
f2ee7601 KG |
239 | struct bfa_bsg_port_cfg_s { |
240 | bfa_status_t status; | |
241 | u16 bfad_num; | |
242 | u16 rsvd; | |
243 | u32 param; | |
244 | u32 rsvd1; | |
245 | }; | |
246 | ||
247 | struct bfa_bsg_port_cfg_maxfrsize_s { | |
248 | bfa_status_t status; | |
249 | u16 bfad_num; | |
250 | u16 maxfrsize; | |
251 | }; | |
252 | ||
60138066 KG |
253 | struct bfa_bsg_port_stats_s { |
254 | bfa_status_t status; | |
255 | u16 bfad_num; | |
256 | u16 rsvd; | |
257 | u32 buf_size; | |
258 | u32 rsvd1; | |
259 | u64 buf_ptr; | |
260 | }; | |
261 | ||
b85daafe KG |
262 | struct bfa_bsg_lport_attr_s { |
263 | bfa_status_t status; | |
264 | u16 bfad_num; | |
265 | u16 vf_id; | |
266 | wwn_t pwwn; | |
267 | struct bfa_lport_attr_s port_attr; | |
268 | }; | |
269 | ||
60138066 KG |
270 | struct bfa_bsg_lport_stats_s { |
271 | bfa_status_t status; | |
272 | u16 bfad_num; | |
273 | u16 vf_id; | |
274 | wwn_t pwwn; | |
275 | struct bfa_lport_stats_s port_stats; | |
276 | }; | |
277 | ||
278 | struct bfa_bsg_lport_iostats_s { | |
279 | bfa_status_t status; | |
280 | u16 bfad_num; | |
281 | u16 vf_id; | |
282 | wwn_t pwwn; | |
283 | struct bfa_itnim_iostats_s iostats; | |
284 | }; | |
285 | ||
286 | struct bfa_bsg_lport_get_rports_s { | |
287 | bfa_status_t status; | |
288 | u16 bfad_num; | |
289 | u16 vf_id; | |
290 | wwn_t pwwn; | |
291 | u64 rbuf_ptr; | |
292 | u32 nrports; | |
293 | u32 rsvd; | |
294 | }; | |
295 | ||
296 | struct bfa_bsg_rport_attr_s { | |
297 | bfa_status_t status; | |
298 | u16 bfad_num; | |
299 | u16 vf_id; | |
300 | wwn_t pwwn; | |
301 | wwn_t rpwwn; | |
302 | struct bfa_rport_attr_s attr; | |
303 | }; | |
304 | ||
305 | struct bfa_bsg_rport_stats_s { | |
306 | bfa_status_t status; | |
307 | u16 bfad_num; | |
308 | u16 vf_id; | |
309 | wwn_t pwwn; | |
310 | wwn_t rpwwn; | |
311 | struct bfa_rport_stats_s stats; | |
312 | }; | |
313 | ||
b85daafe KG |
314 | struct bfa_bsg_rport_scsi_addr_s { |
315 | bfa_status_t status; | |
316 | u16 bfad_num; | |
317 | u16 vf_id; | |
318 | wwn_t pwwn; | |
319 | wwn_t rpwwn; | |
320 | u32 host; | |
321 | u32 bus; | |
322 | u32 target; | |
323 | u32 lun; | |
324 | }; | |
325 | ||
f2ee7601 KG |
326 | struct bfa_bsg_rport_reset_stats_s { |
327 | bfa_status_t status; | |
328 | u16 bfad_num; | |
329 | u16 vf_id; | |
330 | wwn_t pwwn; | |
331 | wwn_t rpwwn; | |
332 | }; | |
333 | ||
334 | struct bfa_bsg_rport_set_speed_s { | |
335 | bfa_status_t status; | |
336 | u16 bfad_num; | |
337 | u16 vf_id; | |
338 | enum bfa_port_speed speed; | |
339 | u32 rsvd; | |
340 | wwn_t pwwn; | |
341 | wwn_t rpwwn; | |
342 | }; | |
343 | ||
344 | struct bfa_bsg_vport_attr_s { | |
345 | bfa_status_t status; | |
346 | u16 bfad_num; | |
347 | u16 vf_id; | |
348 | wwn_t vpwwn; | |
349 | struct bfa_vport_attr_s vport_attr; | |
350 | }; | |
351 | ||
352 | struct bfa_bsg_vport_stats_s { | |
353 | bfa_status_t status; | |
354 | u16 bfad_num; | |
355 | u16 vf_id; | |
356 | wwn_t vpwwn; | |
357 | struct bfa_vport_stats_s vport_stats; | |
358 | }; | |
359 | ||
360 | struct bfa_bsg_reset_stats_s { | |
361 | bfa_status_t status; | |
362 | u16 bfad_num; | |
363 | u16 vf_id; | |
364 | wwn_t vpwwn; | |
365 | }; | |
366 | ||
b85daafe KG |
367 | struct bfa_bsg_fabric_get_lports_s { |
368 | bfa_status_t status; | |
369 | u16 bfad_num; | |
370 | u16 vf_id; | |
371 | u64 buf_ptr; | |
372 | u32 nports; | |
373 | u32 rsvd; | |
374 | }; | |
375 | ||
f2ee7601 KG |
376 | struct bfa_bsg_trl_speed_s { |
377 | bfa_status_t status; | |
378 | u16 bfad_num; | |
379 | u16 rsvd; | |
380 | enum bfa_port_speed speed; | |
381 | }; | |
382 | ||
383 | struct bfa_bsg_fcpim_s { | |
384 | bfa_status_t status; | |
385 | u16 bfad_num; | |
386 | u16 param; | |
387 | }; | |
388 | ||
60138066 KG |
389 | struct bfa_bsg_fcpim_modstats_s { |
390 | bfa_status_t status; | |
391 | u16 bfad_num; | |
392 | struct bfa_itnim_iostats_s modstats; | |
393 | }; | |
394 | ||
395 | struct bfa_bsg_fcpim_del_itn_stats_s { | |
396 | bfa_status_t status; | |
397 | u16 bfad_num; | |
398 | struct bfa_fcpim_del_itn_stats_s modstats; | |
399 | }; | |
400 | ||
f2ee7601 KG |
401 | struct bfa_bsg_fcpim_modstatsclr_s { |
402 | bfa_status_t status; | |
403 | u16 bfad_num; | |
404 | }; | |
405 | ||
b85daafe KG |
406 | struct bfa_bsg_itnim_attr_s { |
407 | bfa_status_t status; | |
408 | u16 bfad_num; | |
409 | u16 vf_id; | |
410 | wwn_t lpwwn; | |
411 | wwn_t rpwwn; | |
412 | struct bfa_itnim_attr_s attr; | |
413 | }; | |
414 | ||
60138066 KG |
415 | struct bfa_bsg_itnim_iostats_s { |
416 | bfa_status_t status; | |
417 | u16 bfad_num; | |
418 | u16 vf_id; | |
419 | wwn_t lpwwn; | |
420 | wwn_t rpwwn; | |
421 | struct bfa_itnim_iostats_s iostats; | |
422 | }; | |
423 | ||
424 | struct bfa_bsg_itnim_itnstats_s { | |
425 | bfa_status_t status; | |
426 | u16 bfad_num; | |
427 | u16 vf_id; | |
428 | wwn_t lpwwn; | |
429 | wwn_t rpwwn; | |
430 | struct bfa_itnim_stats_s itnstats; | |
431 | }; | |
432 | ||
1a4d8e1b KG |
433 | struct bfa_bsg_pcifn_cfg_s { |
434 | bfa_status_t status; | |
435 | u16 bfad_num; | |
436 | u16 rsvd; | |
437 | struct bfa_ablk_cfg_s pcifn_cfg; | |
438 | }; | |
439 | ||
440 | struct bfa_bsg_pcifn_s { | |
441 | bfa_status_t status; | |
442 | u16 bfad_num; | |
443 | u16 pcifn_id; | |
444 | u32 bandwidth; | |
445 | u8 port; | |
446 | enum bfi_pcifn_class pcifn_class; | |
447 | u8 rsvd[1]; | |
448 | }; | |
449 | ||
450 | struct bfa_bsg_adapter_cfg_mode_s { | |
451 | bfa_status_t status; | |
452 | u16 bfad_num; | |
453 | u16 rsvd; | |
454 | struct bfa_adapter_cfg_mode_s cfg; | |
455 | }; | |
456 | ||
457 | struct bfa_bsg_port_cfg_mode_s { | |
458 | bfa_status_t status; | |
459 | u16 bfad_num; | |
460 | u16 instance; | |
461 | struct bfa_port_cfg_mode_s cfg; | |
462 | }; | |
463 | ||
a714134a KG |
464 | struct bfa_bsg_faa_attr_s { |
465 | bfa_status_t status; | |
466 | u16 bfad_num; | |
467 | u16 rsvd; | |
468 | struct bfa_faa_attr_s faa_attr; | |
469 | }; | |
470 | ||
148d6103 KG |
471 | struct bfa_bsg_cee_attr_s { |
472 | bfa_status_t status; | |
473 | u16 bfad_num; | |
474 | u16 rsvd; | |
475 | u32 buf_size; | |
476 | u32 rsvd1; | |
477 | u64 buf_ptr; | |
478 | }; | |
479 | ||
480 | struct bfa_bsg_cee_stats_s { | |
481 | bfa_status_t status; | |
482 | u16 bfad_num; | |
483 | u16 rsvd; | |
484 | u32 buf_size; | |
485 | u32 rsvd1; | |
486 | u64 buf_ptr; | |
487 | }; | |
488 | ||
51e569aa KG |
489 | struct bfa_bsg_sfp_media_s { |
490 | bfa_status_t status; | |
491 | u16 bfad_num; | |
492 | u16 rsvd; | |
493 | enum bfa_defs_sfp_media_e media; | |
494 | }; | |
495 | ||
496 | struct bfa_bsg_sfp_speed_s { | |
497 | bfa_status_t status; | |
498 | u16 bfad_num; | |
499 | u16 rsvd; | |
500 | enum bfa_port_speed speed; | |
501 | }; | |
502 | ||
5a54b1d5 KG |
503 | struct bfa_bsg_flash_attr_s { |
504 | bfa_status_t status; | |
505 | u16 bfad_num; | |
506 | u16 rsvd; | |
507 | struct bfa_flash_attr_s attr; | |
508 | }; | |
509 | ||
510 | struct bfa_bsg_flash_s { | |
511 | bfa_status_t status; | |
512 | u16 bfad_num; | |
513 | u8 instance; | |
514 | u8 rsvd; | |
515 | enum bfa_flash_part_type type; | |
516 | int bufsz; | |
517 | u64 buf_ptr; | |
518 | }; | |
519 | ||
3d7fc66d KG |
520 | struct bfa_bsg_diag_get_temp_s { |
521 | bfa_status_t status; | |
522 | u16 bfad_num; | |
523 | u16 rsvd; | |
524 | struct bfa_diag_results_tempsensor_s result; | |
525 | }; | |
526 | ||
527 | struct bfa_bsg_diag_memtest_s { | |
528 | bfa_status_t status; | |
529 | u16 bfad_num; | |
530 | u16 rsvd[3]; | |
531 | u32 pat; | |
532 | struct bfa_diag_memtest_result result; | |
533 | struct bfa_diag_memtest_s memtest; | |
534 | }; | |
535 | ||
536 | struct bfa_bsg_diag_loopback_s { | |
537 | bfa_status_t status; | |
538 | u16 bfad_num; | |
539 | u16 rsvd; | |
540 | enum bfa_port_opmode opmode; | |
541 | enum bfa_port_speed speed; | |
542 | u32 lpcnt; | |
543 | u32 pat; | |
544 | struct bfa_diag_loopback_result_s result; | |
545 | }; | |
546 | ||
547 | struct bfa_bsg_diag_fwping_s { | |
548 | bfa_status_t status; | |
549 | u16 bfad_num; | |
550 | u16 rsvd; | |
551 | u32 cnt; | |
552 | u32 pattern; | |
553 | struct bfa_diag_results_fwping result; | |
554 | }; | |
555 | ||
556 | struct bfa_bsg_diag_qtest_s { | |
557 | bfa_status_t status; | |
558 | u16 bfad_num; | |
559 | u16 rsvd; | |
560 | u32 force; | |
561 | u32 queue; | |
562 | struct bfa_diag_qtest_result_s result; | |
563 | }; | |
564 | ||
565 | struct bfa_bsg_sfp_show_s { | |
566 | bfa_status_t status; | |
567 | u16 bfad_num; | |
568 | u16 rsvd; | |
569 | struct sfp_mem_s sfp; | |
570 | }; | |
571 | ||
572 | struct bfa_bsg_diag_led_s { | |
573 | bfa_status_t status; | |
574 | u16 bfad_num; | |
575 | u16 rsvd; | |
576 | struct bfa_diag_ledtest_s ledtest; | |
577 | }; | |
578 | ||
579 | struct bfa_bsg_diag_beacon_s { | |
580 | bfa_status_t status; | |
581 | u16 bfad_num; | |
582 | u16 rsvd; | |
583 | bfa_boolean_t beacon; | |
584 | bfa_boolean_t link_e2e_beacon; | |
585 | u32 second; | |
586 | }; | |
587 | ||
588 | struct bfa_bsg_diag_lb_stat_s { | |
589 | bfa_status_t status; | |
590 | u16 bfad_num; | |
591 | u16 rsvd; | |
592 | }; | |
593 | ||
3350d98d KG |
594 | struct bfa_bsg_phy_attr_s { |
595 | bfa_status_t status; | |
596 | u16 bfad_num; | |
597 | u16 instance; | |
598 | struct bfa_phy_attr_s attr; | |
599 | }; | |
600 | ||
601 | struct bfa_bsg_phy_s { | |
602 | bfa_status_t status; | |
603 | u16 bfad_num; | |
604 | u16 instance; | |
605 | u64 bufsz; | |
606 | u64 buf_ptr; | |
607 | }; | |
608 | ||
61e62e21 KG |
609 | struct bfa_bsg_debug_s { |
610 | bfa_status_t status; | |
611 | u16 bfad_num; | |
612 | u16 rsvd; | |
613 | u32 bufsz; | |
614 | int inst_no; | |
615 | u64 buf_ptr; | |
616 | u64 offset; | |
617 | }; | |
618 | ||
3350d98d KG |
619 | struct bfa_bsg_phy_stats_s { |
620 | bfa_status_t status; | |
621 | u16 bfad_num; | |
622 | u16 instance; | |
623 | struct bfa_phy_stats_s stats; | |
624 | }; | |
625 | ||
61e62e21 KG |
626 | struct bfa_bsg_vhba_attr_s { |
627 | bfa_status_t status; | |
628 | u16 bfad_num; | |
629 | u16 pcifn_id; | |
630 | struct bfa_vhba_attr_s attr; | |
631 | }; | |
632 | ||
b85daafe KG |
633 | struct bfa_bsg_fcpt_s { |
634 | bfa_status_t status; | |
635 | u16 vf_id; | |
636 | wwn_t lpwwn; | |
637 | wwn_t dpwwn; | |
638 | u32 tsecs; | |
639 | int cts; | |
640 | enum fc_cos cos; | |
641 | struct fchs_s fchs; | |
642 | }; | |
643 | #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s | |
644 | ||
645 | struct bfa_bsg_data { | |
646 | int payload_len; | |
647 | void *payload; | |
648 | }; | |
649 | ||
650 | #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ | |
651 | (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ | |
652 | BFA_STATUS_FAILED : BFA_STATUS_OK) | |
653 | ||
654 | #endif /* BFAD_BSG_H */ |