blob: 1e02652019b37ead06f63642ed1b723b37f59985 [file] [log] [blame]
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07001/*
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 */
26enum {
Krishna Gudipati60138062011-06-24 20:25:15 -070027 IOCMD_IOC_ENABLE = 0x1,
28 IOCMD_IOC_DISABLE,
29 IOCMD_IOC_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070030 IOCMD_IOC_GET_INFO,
Krishna Gudipati60138062011-06-24 20:25:15 -070031 IOCMD_IOC_GET_STATS,
32 IOCMD_IOC_GET_FWSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070033 IOCMD_IOC_RESET_STATS,
34 IOCMD_IOC_RESET_FWSTATS,
35 IOCMD_IOC_SET_ADAPTER_NAME,
36 IOCMD_IOC_SET_PORT_NAME,
Krishna Gudipati60138062011-06-24 20:25:15 -070037 IOCMD_IOCFC_GET_ATTR,
38 IOCMD_IOCFC_SET_INTR,
39 IOCMD_PORT_ENABLE,
40 IOCMD_PORT_DISABLE,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070041 IOCMD_PORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070042 IOCMD_PORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070043 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,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070051 IOCMD_LPORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070052 IOCMD_LPORT_GET_RPORTS,
53 IOCMD_LPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070054 IOCMD_LPORT_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070055 IOCMD_LPORT_GET_IOSTATS,
56 IOCMD_RPORT_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070057 IOCMD_RPORT_GET_ADDR,
Krishna Gudipati60138062011-06-24 20:25:15 -070058 IOCMD_RPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070059 IOCMD_RPORT_RESET_STATS,
60 IOCMD_RPORT_SET_SPEED,
61 IOCMD_VPORT_GET_ATTR,
62 IOCMD_VPORT_GET_STATS,
63 IOCMD_VPORT_RESET_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070064 IOCMD_FABRIC_GET_LPORTS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070065 IOCMD_RATELIM_ENABLE,
66 IOCMD_RATELIM_DISABLE,
67 IOCMD_RATELIM_DEF_SPEED,
68 IOCMD_FCPIM_FAILOVER,
Krishna Gudipati60138062011-06-24 20:25:15 -070069 IOCMD_FCPIM_MODSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070070 IOCMD_FCPIM_MODSTATSCLR,
Krishna Gudipati60138062011-06-24 20:25:15 -070071 IOCMD_FCPIM_DEL_ITN_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070072 IOCMD_ITNIM_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070073 IOCMD_ITNIM_GET_IOSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070074 IOCMD_ITNIM_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070075 IOCMD_ITNIM_GET_ITNSTATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070076 IOCMD_IOC_PCIFN_CFG,
Krishna Gudipati60138062011-06-24 20:25:15 -070077 IOCMD_FCPORT_ENABLE,
78 IOCMD_FCPORT_DISABLE,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070079 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,
Krishna Gudipatia7141342011-06-24 20:23:19 -070086 IOCMD_FAA_ENABLE,
87 IOCMD_FAA_DISABLE,
88 IOCMD_FAA_QUERY,
Krishna Gudipati148d6102011-06-24 20:25:36 -070089 IOCMD_CEE_GET_ATTR,
90 IOCMD_CEE_GET_STATS,
91 IOCMD_CEE_RESET_STATS,
Krishna Gudipati51e569a2011-06-24 20:26:25 -070092 IOCMD_SFP_MEDIA,
93 IOCMD_SFP_SPEED,
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -070094 IOCMD_FLASH_GET_ATTR,
95 IOCMD_FLASH_ERASE_PART,
96 IOCMD_FLASH_UPDATE_PART,
97 IOCMD_FLASH_READ_PART,
Krishna Gudipati3d7fc662011-06-24 20:28:17 -070098 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,
Krishna Gudipati3350d982011-06-24 20:28:37 -0700107 IOCMD_PHY_GET_ATTR,
108 IOCMD_PHY_GET_STATS,
109 IOCMD_PHY_UPDATE_FW,
110 IOCMD_PHY_READ_FW,
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700111 IOCMD_VHBA_QUERY,
112 IOCMD_DEBUG_PORTLOG,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700113 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,
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700119 IOCMD_FCPIM_PROFILE_ON,
120 IOCMD_FCPIM_PROFILE_OFF,
121 IOCMD_ITNIM_GET_IOPROFILE,
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700122 IOCMD_FCPORT_GET_STATS,
123 IOCMD_FCPORT_RESET_STATS,
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700124 IOCMD_BOOT_CFG,
125 IOCMD_BOOT_QUERY,
126 IOCMD_PREBOOT_QUERY,
127 IOCMD_ETHBOOT_CFG,
128 IOCMD_ETHBOOT_QUERY,
Krishna Gudipati45191232011-07-20 17:02:50 -0700129 IOCMD_TRUNK_ENABLE,
130 IOCMD_TRUNK_DISABLE,
131 IOCMD_TRUNK_GET_ATTR,
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700132 IOCMD_QOS_ENABLE,
133 IOCMD_QOS_DISABLE,
134 IOCMD_QOS_GET_ATTR,
135 IOCMD_QOS_GET_VC_ATTR,
136 IOCMD_QOS_GET_STATS,
137 IOCMD_QOS_RESET_STATS,
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700138 IOCMD_VF_GET_STATS,
139 IOCMD_VF_RESET_STATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700140};
141
142struct bfa_bsg_gen_s {
143 bfa_status_t status;
144 u16 bfad_num;
145 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700146};
147
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700148struct bfa_bsg_portlogctl_s {
149 bfa_status_t status;
150 u16 bfad_num;
151 u16 rsvd;
152 bfa_boolean_t ctl;
153 int inst_no;
154};
155
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700156struct bfa_bsg_fcpim_profile_s {
157 bfa_status_t status;
158 u16 bfad_num;
159 u16 rsvd;
160};
161
162struct bfa_bsg_itnim_ioprofile_s {
163 bfa_status_t status;
164 u16 bfad_num;
165 u16 vf_id;
166 wwn_t lpwwn;
167 wwn_t rpwwn;
168 struct bfa_itnim_ioprofile_s ioprofile;
169};
170
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700171struct bfa_bsg_fcport_stats_s {
172 bfa_status_t status;
173 u16 bfad_num;
174 u16 rsvd;
175 union bfa_fcport_stats_u stats;
176};
177
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700178struct bfa_bsg_ioc_name_s {
179 bfa_status_t status;
180 u16 bfad_num;
181 u16 rsvd;
182 char name[BFA_ADAPTER_SYM_NAME_LEN];
183};
184
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700185struct bfa_bsg_ioc_info_s {
186 bfa_status_t status;
187 u16 bfad_num;
188 u16 rsvd;
189 char serialnum[64];
190 char hwpath[BFA_STRING_32];
191 char adapter_hwpath[BFA_STRING_32];
192 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
193 char name[BFA_ADAPTER_SYM_NAME_LEN];
194 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
195 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
196 wwn_t pwwn;
197 wwn_t nwwn;
198 wwn_t factorypwwn;
199 wwn_t factorynwwn;
200 mac_t mac;
201 mac_t factory_mac; /* Factory mac address */
202 mac_t current_mac; /* Currently assigned mac address */
203 enum bfa_ioc_type_e ioc_type;
204 u16 pvid; /* Port vlan id */
205 u16 rsvd1;
206 u32 host;
207 u32 bandwidth; /* For PF support */
208 u32 rsvd2;
209};
210
211struct bfa_bsg_ioc_attr_s {
212 bfa_status_t status;
213 u16 bfad_num;
214 u16 rsvd;
215 struct bfa_ioc_attr_s ioc_attr;
216};
217
Krishna Gudipati60138062011-06-24 20:25:15 -0700218struct bfa_bsg_ioc_stats_s {
219 bfa_status_t status;
220 u16 bfad_num;
221 u16 rsvd;
222 struct bfa_ioc_stats_s ioc_stats;
223};
224
225struct bfa_bsg_ioc_fwstats_s {
226 bfa_status_t status;
227 u16 bfad_num;
228 u16 rsvd;
229 u32 buf_size;
230 u32 rsvd1;
231 u64 buf_ptr;
232};
233
234struct bfa_bsg_iocfc_attr_s {
235 bfa_status_t status;
236 u16 bfad_num;
237 u16 rsvd;
238 struct bfa_iocfc_attr_s iocfc_attr;
239};
240
241struct bfa_bsg_iocfc_intr_s {
242 bfa_status_t status;
243 u16 bfad_num;
244 u16 rsvd;
245 struct bfa_iocfc_intr_attr_s attr;
246};
247
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700248struct bfa_bsg_port_attr_s {
249 bfa_status_t status;
250 u16 bfad_num;
251 u16 rsvd;
252 struct bfa_port_attr_s attr;
253};
254
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700255struct bfa_bsg_port_cfg_s {
256 bfa_status_t status;
257 u16 bfad_num;
258 u16 rsvd;
259 u32 param;
260 u32 rsvd1;
261};
262
263struct bfa_bsg_port_cfg_maxfrsize_s {
264 bfa_status_t status;
265 u16 bfad_num;
266 u16 maxfrsize;
267};
268
Krishna Gudipati60138062011-06-24 20:25:15 -0700269struct bfa_bsg_port_stats_s {
270 bfa_status_t status;
271 u16 bfad_num;
272 u16 rsvd;
273 u32 buf_size;
274 u32 rsvd1;
275 u64 buf_ptr;
276};
277
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700278struct bfa_bsg_lport_attr_s {
279 bfa_status_t status;
280 u16 bfad_num;
281 u16 vf_id;
282 wwn_t pwwn;
283 struct bfa_lport_attr_s port_attr;
284};
285
Krishna Gudipati60138062011-06-24 20:25:15 -0700286struct bfa_bsg_lport_stats_s {
287 bfa_status_t status;
288 u16 bfad_num;
289 u16 vf_id;
290 wwn_t pwwn;
291 struct bfa_lport_stats_s port_stats;
292};
293
294struct bfa_bsg_lport_iostats_s {
295 bfa_status_t status;
296 u16 bfad_num;
297 u16 vf_id;
298 wwn_t pwwn;
299 struct bfa_itnim_iostats_s iostats;
300};
301
302struct bfa_bsg_lport_get_rports_s {
303 bfa_status_t status;
304 u16 bfad_num;
305 u16 vf_id;
306 wwn_t pwwn;
307 u64 rbuf_ptr;
308 u32 nrports;
309 u32 rsvd;
310};
311
312struct bfa_bsg_rport_attr_s {
313 bfa_status_t status;
314 u16 bfad_num;
315 u16 vf_id;
316 wwn_t pwwn;
317 wwn_t rpwwn;
318 struct bfa_rport_attr_s attr;
319};
320
321struct bfa_bsg_rport_stats_s {
322 bfa_status_t status;
323 u16 bfad_num;
324 u16 vf_id;
325 wwn_t pwwn;
326 wwn_t rpwwn;
327 struct bfa_rport_stats_s stats;
328};
329
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700330struct bfa_bsg_rport_scsi_addr_s {
331 bfa_status_t status;
332 u16 bfad_num;
333 u16 vf_id;
334 wwn_t pwwn;
335 wwn_t rpwwn;
336 u32 host;
337 u32 bus;
338 u32 target;
339 u32 lun;
340};
341
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700342struct bfa_bsg_rport_reset_stats_s {
343 bfa_status_t status;
344 u16 bfad_num;
345 u16 vf_id;
346 wwn_t pwwn;
347 wwn_t rpwwn;
348};
349
350struct bfa_bsg_rport_set_speed_s {
351 bfa_status_t status;
352 u16 bfad_num;
353 u16 vf_id;
354 enum bfa_port_speed speed;
355 u32 rsvd;
356 wwn_t pwwn;
357 wwn_t rpwwn;
358};
359
360struct bfa_bsg_vport_attr_s {
361 bfa_status_t status;
362 u16 bfad_num;
363 u16 vf_id;
364 wwn_t vpwwn;
365 struct bfa_vport_attr_s vport_attr;
366};
367
368struct bfa_bsg_vport_stats_s {
369 bfa_status_t status;
370 u16 bfad_num;
371 u16 vf_id;
372 wwn_t vpwwn;
373 struct bfa_vport_stats_s vport_stats;
374};
375
376struct bfa_bsg_reset_stats_s {
377 bfa_status_t status;
378 u16 bfad_num;
379 u16 vf_id;
380 wwn_t vpwwn;
381};
382
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700383struct bfa_bsg_fabric_get_lports_s {
384 bfa_status_t status;
385 u16 bfad_num;
386 u16 vf_id;
387 u64 buf_ptr;
388 u32 nports;
389 u32 rsvd;
390};
391
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700392struct bfa_bsg_trl_speed_s {
393 bfa_status_t status;
394 u16 bfad_num;
395 u16 rsvd;
396 enum bfa_port_speed speed;
397};
398
399struct bfa_bsg_fcpim_s {
400 bfa_status_t status;
401 u16 bfad_num;
402 u16 param;
403};
404
Krishna Gudipati60138062011-06-24 20:25:15 -0700405struct bfa_bsg_fcpim_modstats_s {
406 bfa_status_t status;
407 u16 bfad_num;
408 struct bfa_itnim_iostats_s modstats;
409};
410
411struct bfa_bsg_fcpim_del_itn_stats_s {
412 bfa_status_t status;
413 u16 bfad_num;
414 struct bfa_fcpim_del_itn_stats_s modstats;
415};
416
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700417struct bfa_bsg_fcpim_modstatsclr_s {
418 bfa_status_t status;
419 u16 bfad_num;
420};
421
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700422struct bfa_bsg_itnim_attr_s {
423 bfa_status_t status;
424 u16 bfad_num;
425 u16 vf_id;
426 wwn_t lpwwn;
427 wwn_t rpwwn;
428 struct bfa_itnim_attr_s attr;
429};
430
Krishna Gudipati60138062011-06-24 20:25:15 -0700431struct bfa_bsg_itnim_iostats_s {
432 bfa_status_t status;
433 u16 bfad_num;
434 u16 vf_id;
435 wwn_t lpwwn;
436 wwn_t rpwwn;
437 struct bfa_itnim_iostats_s iostats;
438};
439
440struct bfa_bsg_itnim_itnstats_s {
441 bfa_status_t status;
442 u16 bfad_num;
443 u16 vf_id;
444 wwn_t lpwwn;
445 wwn_t rpwwn;
446 struct bfa_itnim_stats_s itnstats;
447};
448
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700449struct bfa_bsg_pcifn_cfg_s {
450 bfa_status_t status;
451 u16 bfad_num;
452 u16 rsvd;
453 struct bfa_ablk_cfg_s pcifn_cfg;
454};
455
456struct bfa_bsg_pcifn_s {
457 bfa_status_t status;
458 u16 bfad_num;
459 u16 pcifn_id;
460 u32 bandwidth;
461 u8 port;
462 enum bfi_pcifn_class pcifn_class;
463 u8 rsvd[1];
464};
465
466struct bfa_bsg_adapter_cfg_mode_s {
467 bfa_status_t status;
468 u16 bfad_num;
469 u16 rsvd;
470 struct bfa_adapter_cfg_mode_s cfg;
471};
472
473struct bfa_bsg_port_cfg_mode_s {
474 bfa_status_t status;
475 u16 bfad_num;
476 u16 instance;
477 struct bfa_port_cfg_mode_s cfg;
478};
479
Krishna Gudipatia7141342011-06-24 20:23:19 -0700480struct bfa_bsg_faa_attr_s {
481 bfa_status_t status;
482 u16 bfad_num;
483 u16 rsvd;
484 struct bfa_faa_attr_s faa_attr;
485};
486
Krishna Gudipati148d6102011-06-24 20:25:36 -0700487struct bfa_bsg_cee_attr_s {
488 bfa_status_t status;
489 u16 bfad_num;
490 u16 rsvd;
491 u32 buf_size;
492 u32 rsvd1;
493 u64 buf_ptr;
494};
495
496struct bfa_bsg_cee_stats_s {
497 bfa_status_t status;
498 u16 bfad_num;
499 u16 rsvd;
500 u32 buf_size;
501 u32 rsvd1;
502 u64 buf_ptr;
503};
504
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700505struct bfa_bsg_sfp_media_s {
506 bfa_status_t status;
507 u16 bfad_num;
508 u16 rsvd;
509 enum bfa_defs_sfp_media_e media;
510};
511
512struct bfa_bsg_sfp_speed_s {
513 bfa_status_t status;
514 u16 bfad_num;
515 u16 rsvd;
516 enum bfa_port_speed speed;
517};
518
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700519struct bfa_bsg_flash_attr_s {
520 bfa_status_t status;
521 u16 bfad_num;
522 u16 rsvd;
523 struct bfa_flash_attr_s attr;
524};
525
526struct bfa_bsg_flash_s {
527 bfa_status_t status;
528 u16 bfad_num;
529 u8 instance;
530 u8 rsvd;
531 enum bfa_flash_part_type type;
532 int bufsz;
533 u64 buf_ptr;
534};
535
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700536struct bfa_bsg_diag_get_temp_s {
537 bfa_status_t status;
538 u16 bfad_num;
539 u16 rsvd;
540 struct bfa_diag_results_tempsensor_s result;
541};
542
543struct bfa_bsg_diag_memtest_s {
544 bfa_status_t status;
545 u16 bfad_num;
546 u16 rsvd[3];
547 u32 pat;
548 struct bfa_diag_memtest_result result;
549 struct bfa_diag_memtest_s memtest;
550};
551
552struct bfa_bsg_diag_loopback_s {
553 bfa_status_t status;
554 u16 bfad_num;
555 u16 rsvd;
556 enum bfa_port_opmode opmode;
557 enum bfa_port_speed speed;
558 u32 lpcnt;
559 u32 pat;
560 struct bfa_diag_loopback_result_s result;
561};
562
563struct bfa_bsg_diag_fwping_s {
564 bfa_status_t status;
565 u16 bfad_num;
566 u16 rsvd;
567 u32 cnt;
568 u32 pattern;
569 struct bfa_diag_results_fwping result;
570};
571
572struct bfa_bsg_diag_qtest_s {
573 bfa_status_t status;
574 u16 bfad_num;
575 u16 rsvd;
576 u32 force;
577 u32 queue;
578 struct bfa_diag_qtest_result_s result;
579};
580
581struct bfa_bsg_sfp_show_s {
582 bfa_status_t status;
583 u16 bfad_num;
584 u16 rsvd;
585 struct sfp_mem_s sfp;
586};
587
588struct bfa_bsg_diag_led_s {
589 bfa_status_t status;
590 u16 bfad_num;
591 u16 rsvd;
592 struct bfa_diag_ledtest_s ledtest;
593};
594
595struct bfa_bsg_diag_beacon_s {
596 bfa_status_t status;
597 u16 bfad_num;
598 u16 rsvd;
599 bfa_boolean_t beacon;
600 bfa_boolean_t link_e2e_beacon;
601 u32 second;
602};
603
604struct bfa_bsg_diag_lb_stat_s {
605 bfa_status_t status;
606 u16 bfad_num;
607 u16 rsvd;
608};
609
Krishna Gudipati3350d982011-06-24 20:28:37 -0700610struct bfa_bsg_phy_attr_s {
611 bfa_status_t status;
612 u16 bfad_num;
613 u16 instance;
614 struct bfa_phy_attr_s attr;
615};
616
617struct bfa_bsg_phy_s {
618 bfa_status_t status;
619 u16 bfad_num;
620 u16 instance;
621 u64 bufsz;
622 u64 buf_ptr;
623};
624
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700625struct bfa_bsg_debug_s {
626 bfa_status_t status;
627 u16 bfad_num;
628 u16 rsvd;
629 u32 bufsz;
630 int inst_no;
631 u64 buf_ptr;
632 u64 offset;
633};
634
Krishna Gudipati3350d982011-06-24 20:28:37 -0700635struct bfa_bsg_phy_stats_s {
636 bfa_status_t status;
637 u16 bfad_num;
638 u16 instance;
639 struct bfa_phy_stats_s stats;
640};
641
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700642struct bfa_bsg_vhba_attr_s {
643 bfa_status_t status;
644 u16 bfad_num;
645 u16 pcifn_id;
646 struct bfa_vhba_attr_s attr;
647};
648
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700649struct bfa_bsg_boot_s {
650 bfa_status_t status;
651 u16 bfad_num;
652 u16 rsvd;
653 struct bfa_boot_cfg_s cfg;
654};
655
656struct bfa_bsg_preboot_s {
657 bfa_status_t status;
658 u16 bfad_num;
659 u16 rsvd;
660 struct bfa_boot_pbc_s cfg;
661};
662
663struct bfa_bsg_ethboot_s {
664 bfa_status_t status;
665 u16 bfad_num;
666 u16 rsvd;
667 struct bfa_ethboot_cfg_s cfg;
668};
669
Krishna Gudipati45191232011-07-20 17:02:50 -0700670struct bfa_bsg_trunk_attr_s {
671 bfa_status_t status;
672 u16 bfad_num;
673 u16 rsvd;
674 struct bfa_trunk_attr_s attr;
675};
676
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700677struct bfa_bsg_qos_attr_s {
678 bfa_status_t status;
679 u16 bfad_num;
680 u16 rsvd;
681 struct bfa_qos_attr_s attr;
682};
683
684struct bfa_bsg_qos_vc_attr_s {
685 bfa_status_t status;
686 u16 bfad_num;
687 u16 rsvd;
688 struct bfa_qos_vc_attr_s attr;
689};
690
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700691struct bfa_bsg_vf_stats_s {
692 bfa_status_t status;
693 u16 bfad_num;
694 u16 vf_id;
695 struct bfa_vf_stats_s stats;
696};
697
698struct bfa_bsg_vf_reset_stats_s {
699 bfa_status_t status;
700 u16 bfad_num;
701 u16 vf_id;
702};
703
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700704struct bfa_bsg_fcpt_s {
705 bfa_status_t status;
706 u16 vf_id;
707 wwn_t lpwwn;
708 wwn_t dpwwn;
709 u32 tsecs;
710 int cts;
711 enum fc_cos cos;
712 struct fchs_s fchs;
713};
714#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
715
716struct bfa_bsg_data {
717 int payload_len;
718 void *payload;
719};
720
721#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
722 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
723 BFA_STATUS_FAILED : BFA_STATUS_OK)
724
725#endif /* BFAD_BSG_H */