blob: 17ad67283130d1f1528ade5e97893766e6534eac [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_QUERY,
Krishna Gudipati148d6102011-06-24 20:25:36 -070087 IOCMD_CEE_GET_ATTR,
88 IOCMD_CEE_GET_STATS,
89 IOCMD_CEE_RESET_STATS,
Krishna Gudipati51e569a2011-06-24 20:26:25 -070090 IOCMD_SFP_MEDIA,
91 IOCMD_SFP_SPEED,
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -070092 IOCMD_FLASH_GET_ATTR,
93 IOCMD_FLASH_ERASE_PART,
94 IOCMD_FLASH_UPDATE_PART,
95 IOCMD_FLASH_READ_PART,
Krishna Gudipati3d7fc662011-06-24 20:28:17 -070096 IOCMD_DIAG_TEMP,
97 IOCMD_DIAG_MEMTEST,
98 IOCMD_DIAG_LOOPBACK,
99 IOCMD_DIAG_FWPING,
100 IOCMD_DIAG_QUEUETEST,
101 IOCMD_DIAG_SFP,
102 IOCMD_DIAG_LED,
103 IOCMD_DIAG_BEACON_LPORT,
104 IOCMD_DIAG_LB_STAT,
Krishna Gudipati3350d982011-06-24 20:28:37 -0700105 IOCMD_PHY_GET_ATTR,
106 IOCMD_PHY_GET_STATS,
107 IOCMD_PHY_UPDATE_FW,
108 IOCMD_PHY_READ_FW,
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700109 IOCMD_VHBA_QUERY,
110 IOCMD_DEBUG_PORTLOG,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700111 IOCMD_DEBUG_FW_CORE,
112 IOCMD_DEBUG_FW_STATE_CLR,
113 IOCMD_DEBUG_PORTLOG_CLR,
114 IOCMD_DEBUG_START_DTRC,
115 IOCMD_DEBUG_STOP_DTRC,
116 IOCMD_DEBUG_PORTLOG_CTL,
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700117 IOCMD_FCPIM_PROFILE_ON,
118 IOCMD_FCPIM_PROFILE_OFF,
119 IOCMD_ITNIM_GET_IOPROFILE,
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700120 IOCMD_FCPORT_GET_STATS,
121 IOCMD_FCPORT_RESET_STATS,
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700122 IOCMD_BOOT_CFG,
123 IOCMD_BOOT_QUERY,
124 IOCMD_PREBOOT_QUERY,
125 IOCMD_ETHBOOT_CFG,
126 IOCMD_ETHBOOT_QUERY,
Krishna Gudipati45191232011-07-20 17:02:50 -0700127 IOCMD_TRUNK_ENABLE,
128 IOCMD_TRUNK_DISABLE,
129 IOCMD_TRUNK_GET_ATTR,
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700130 IOCMD_QOS_ENABLE,
131 IOCMD_QOS_DISABLE,
132 IOCMD_QOS_GET_ATTR,
133 IOCMD_QOS_GET_VC_ATTR,
134 IOCMD_QOS_GET_STATS,
135 IOCMD_QOS_RESET_STATS,
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700136 IOCMD_VF_GET_STATS,
137 IOCMD_VF_RESET_STATS,
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700138 IOCMD_FCPIM_LUNMASK_ENABLE,
139 IOCMD_FCPIM_LUNMASK_DISABLE,
140 IOCMD_FCPIM_LUNMASK_CLEAR,
141 IOCMD_FCPIM_LUNMASK_QUERY,
142 IOCMD_FCPIM_LUNMASK_ADD,
143 IOCMD_FCPIM_LUNMASK_DELETE,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700144};
145
146struct bfa_bsg_gen_s {
147 bfa_status_t status;
148 u16 bfad_num;
149 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700150};
151
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700152struct bfa_bsg_portlogctl_s {
153 bfa_status_t status;
154 u16 bfad_num;
155 u16 rsvd;
156 bfa_boolean_t ctl;
157 int inst_no;
158};
159
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700160struct bfa_bsg_fcpim_profile_s {
161 bfa_status_t status;
162 u16 bfad_num;
163 u16 rsvd;
164};
165
166struct bfa_bsg_itnim_ioprofile_s {
167 bfa_status_t status;
168 u16 bfad_num;
169 u16 vf_id;
170 wwn_t lpwwn;
171 wwn_t rpwwn;
172 struct bfa_itnim_ioprofile_s ioprofile;
173};
174
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700175struct bfa_bsg_fcport_stats_s {
176 bfa_status_t status;
177 u16 bfad_num;
178 u16 rsvd;
179 union bfa_fcport_stats_u stats;
180};
181
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700182struct bfa_bsg_ioc_name_s {
183 bfa_status_t status;
184 u16 bfad_num;
185 u16 rsvd;
186 char name[BFA_ADAPTER_SYM_NAME_LEN];
187};
188
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700189struct bfa_bsg_ioc_info_s {
190 bfa_status_t status;
191 u16 bfad_num;
192 u16 rsvd;
193 char serialnum[64];
194 char hwpath[BFA_STRING_32];
195 char adapter_hwpath[BFA_STRING_32];
196 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
197 char name[BFA_ADAPTER_SYM_NAME_LEN];
198 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
199 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
200 wwn_t pwwn;
201 wwn_t nwwn;
202 wwn_t factorypwwn;
203 wwn_t factorynwwn;
204 mac_t mac;
205 mac_t factory_mac; /* Factory mac address */
206 mac_t current_mac; /* Currently assigned mac address */
207 enum bfa_ioc_type_e ioc_type;
208 u16 pvid; /* Port vlan id */
209 u16 rsvd1;
210 u32 host;
211 u32 bandwidth; /* For PF support */
212 u32 rsvd2;
213};
214
215struct bfa_bsg_ioc_attr_s {
216 bfa_status_t status;
217 u16 bfad_num;
218 u16 rsvd;
219 struct bfa_ioc_attr_s ioc_attr;
220};
221
Krishna Gudipati60138062011-06-24 20:25:15 -0700222struct bfa_bsg_ioc_stats_s {
223 bfa_status_t status;
224 u16 bfad_num;
225 u16 rsvd;
226 struct bfa_ioc_stats_s ioc_stats;
227};
228
229struct bfa_bsg_ioc_fwstats_s {
230 bfa_status_t status;
231 u16 bfad_num;
232 u16 rsvd;
233 u32 buf_size;
234 u32 rsvd1;
235 u64 buf_ptr;
236};
237
238struct bfa_bsg_iocfc_attr_s {
239 bfa_status_t status;
240 u16 bfad_num;
241 u16 rsvd;
242 struct bfa_iocfc_attr_s iocfc_attr;
243};
244
245struct bfa_bsg_iocfc_intr_s {
246 bfa_status_t status;
247 u16 bfad_num;
248 u16 rsvd;
249 struct bfa_iocfc_intr_attr_s attr;
250};
251
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700252struct bfa_bsg_port_attr_s {
253 bfa_status_t status;
254 u16 bfad_num;
255 u16 rsvd;
256 struct bfa_port_attr_s attr;
257};
258
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700259struct bfa_bsg_port_cfg_s {
260 bfa_status_t status;
261 u16 bfad_num;
262 u16 rsvd;
263 u32 param;
264 u32 rsvd1;
265};
266
267struct bfa_bsg_port_cfg_maxfrsize_s {
268 bfa_status_t status;
269 u16 bfad_num;
270 u16 maxfrsize;
271};
272
Krishna Gudipati60138062011-06-24 20:25:15 -0700273struct bfa_bsg_port_stats_s {
274 bfa_status_t status;
275 u16 bfad_num;
276 u16 rsvd;
277 u32 buf_size;
278 u32 rsvd1;
279 u64 buf_ptr;
280};
281
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700282struct bfa_bsg_lport_attr_s {
283 bfa_status_t status;
284 u16 bfad_num;
285 u16 vf_id;
286 wwn_t pwwn;
287 struct bfa_lport_attr_s port_attr;
288};
289
Krishna Gudipati60138062011-06-24 20:25:15 -0700290struct bfa_bsg_lport_stats_s {
291 bfa_status_t status;
292 u16 bfad_num;
293 u16 vf_id;
294 wwn_t pwwn;
295 struct bfa_lport_stats_s port_stats;
296};
297
298struct bfa_bsg_lport_iostats_s {
299 bfa_status_t status;
300 u16 bfad_num;
301 u16 vf_id;
302 wwn_t pwwn;
303 struct bfa_itnim_iostats_s iostats;
304};
305
306struct bfa_bsg_lport_get_rports_s {
307 bfa_status_t status;
308 u16 bfad_num;
309 u16 vf_id;
310 wwn_t pwwn;
311 u64 rbuf_ptr;
312 u32 nrports;
313 u32 rsvd;
314};
315
316struct bfa_bsg_rport_attr_s {
317 bfa_status_t status;
318 u16 bfad_num;
319 u16 vf_id;
320 wwn_t pwwn;
321 wwn_t rpwwn;
322 struct bfa_rport_attr_s attr;
323};
324
325struct bfa_bsg_rport_stats_s {
326 bfa_status_t status;
327 u16 bfad_num;
328 u16 vf_id;
329 wwn_t pwwn;
330 wwn_t rpwwn;
331 struct bfa_rport_stats_s stats;
332};
333
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700334struct bfa_bsg_rport_scsi_addr_s {
335 bfa_status_t status;
336 u16 bfad_num;
337 u16 vf_id;
338 wwn_t pwwn;
339 wwn_t rpwwn;
340 u32 host;
341 u32 bus;
342 u32 target;
343 u32 lun;
344};
345
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700346struct bfa_bsg_rport_reset_stats_s {
347 bfa_status_t status;
348 u16 bfad_num;
349 u16 vf_id;
350 wwn_t pwwn;
351 wwn_t rpwwn;
352};
353
354struct bfa_bsg_rport_set_speed_s {
355 bfa_status_t status;
356 u16 bfad_num;
357 u16 vf_id;
358 enum bfa_port_speed speed;
359 u32 rsvd;
360 wwn_t pwwn;
361 wwn_t rpwwn;
362};
363
364struct bfa_bsg_vport_attr_s {
365 bfa_status_t status;
366 u16 bfad_num;
367 u16 vf_id;
368 wwn_t vpwwn;
369 struct bfa_vport_attr_s vport_attr;
370};
371
372struct bfa_bsg_vport_stats_s {
373 bfa_status_t status;
374 u16 bfad_num;
375 u16 vf_id;
376 wwn_t vpwwn;
377 struct bfa_vport_stats_s vport_stats;
378};
379
380struct bfa_bsg_reset_stats_s {
381 bfa_status_t status;
382 u16 bfad_num;
383 u16 vf_id;
384 wwn_t vpwwn;
385};
386
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700387struct bfa_bsg_fabric_get_lports_s {
388 bfa_status_t status;
389 u16 bfad_num;
390 u16 vf_id;
391 u64 buf_ptr;
392 u32 nports;
393 u32 rsvd;
394};
395
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700396struct bfa_bsg_trl_speed_s {
397 bfa_status_t status;
398 u16 bfad_num;
399 u16 rsvd;
400 enum bfa_port_speed speed;
401};
402
403struct bfa_bsg_fcpim_s {
404 bfa_status_t status;
405 u16 bfad_num;
406 u16 param;
407};
408
Krishna Gudipati60138062011-06-24 20:25:15 -0700409struct bfa_bsg_fcpim_modstats_s {
410 bfa_status_t status;
411 u16 bfad_num;
412 struct bfa_itnim_iostats_s modstats;
413};
414
415struct bfa_bsg_fcpim_del_itn_stats_s {
416 bfa_status_t status;
417 u16 bfad_num;
418 struct bfa_fcpim_del_itn_stats_s modstats;
419};
420
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700421struct bfa_bsg_fcpim_modstatsclr_s {
422 bfa_status_t status;
423 u16 bfad_num;
424};
425
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700426struct bfa_bsg_itnim_attr_s {
427 bfa_status_t status;
428 u16 bfad_num;
429 u16 vf_id;
430 wwn_t lpwwn;
431 wwn_t rpwwn;
432 struct bfa_itnim_attr_s attr;
433};
434
Krishna Gudipati60138062011-06-24 20:25:15 -0700435struct bfa_bsg_itnim_iostats_s {
436 bfa_status_t status;
437 u16 bfad_num;
438 u16 vf_id;
439 wwn_t lpwwn;
440 wwn_t rpwwn;
441 struct bfa_itnim_iostats_s iostats;
442};
443
444struct bfa_bsg_itnim_itnstats_s {
445 bfa_status_t status;
446 u16 bfad_num;
447 u16 vf_id;
448 wwn_t lpwwn;
449 wwn_t rpwwn;
450 struct bfa_itnim_stats_s itnstats;
451};
452
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700453struct bfa_bsg_pcifn_cfg_s {
454 bfa_status_t status;
455 u16 bfad_num;
456 u16 rsvd;
457 struct bfa_ablk_cfg_s pcifn_cfg;
458};
459
460struct bfa_bsg_pcifn_s {
461 bfa_status_t status;
462 u16 bfad_num;
463 u16 pcifn_id;
464 u32 bandwidth;
465 u8 port;
466 enum bfi_pcifn_class pcifn_class;
467 u8 rsvd[1];
468};
469
470struct bfa_bsg_adapter_cfg_mode_s {
471 bfa_status_t status;
472 u16 bfad_num;
473 u16 rsvd;
474 struct bfa_adapter_cfg_mode_s cfg;
475};
476
477struct bfa_bsg_port_cfg_mode_s {
478 bfa_status_t status;
479 u16 bfad_num;
480 u16 instance;
481 struct bfa_port_cfg_mode_s cfg;
482};
483
Krishna Gudipatia7141342011-06-24 20:23:19 -0700484struct bfa_bsg_faa_attr_s {
485 bfa_status_t status;
486 u16 bfad_num;
487 u16 rsvd;
488 struct bfa_faa_attr_s faa_attr;
489};
490
Krishna Gudipati148d6102011-06-24 20:25:36 -0700491struct bfa_bsg_cee_attr_s {
492 bfa_status_t status;
493 u16 bfad_num;
494 u16 rsvd;
495 u32 buf_size;
496 u32 rsvd1;
497 u64 buf_ptr;
498};
499
500struct bfa_bsg_cee_stats_s {
501 bfa_status_t status;
502 u16 bfad_num;
503 u16 rsvd;
504 u32 buf_size;
505 u32 rsvd1;
506 u64 buf_ptr;
507};
508
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700509struct bfa_bsg_sfp_media_s {
510 bfa_status_t status;
511 u16 bfad_num;
512 u16 rsvd;
513 enum bfa_defs_sfp_media_e media;
514};
515
516struct bfa_bsg_sfp_speed_s {
517 bfa_status_t status;
518 u16 bfad_num;
519 u16 rsvd;
520 enum bfa_port_speed speed;
521};
522
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700523struct bfa_bsg_flash_attr_s {
524 bfa_status_t status;
525 u16 bfad_num;
526 u16 rsvd;
527 struct bfa_flash_attr_s attr;
528};
529
530struct bfa_bsg_flash_s {
531 bfa_status_t status;
532 u16 bfad_num;
533 u8 instance;
534 u8 rsvd;
535 enum bfa_flash_part_type type;
536 int bufsz;
537 u64 buf_ptr;
538};
539
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700540struct bfa_bsg_diag_get_temp_s {
541 bfa_status_t status;
542 u16 bfad_num;
543 u16 rsvd;
544 struct bfa_diag_results_tempsensor_s result;
545};
546
547struct bfa_bsg_diag_memtest_s {
548 bfa_status_t status;
549 u16 bfad_num;
550 u16 rsvd[3];
551 u32 pat;
552 struct bfa_diag_memtest_result result;
553 struct bfa_diag_memtest_s memtest;
554};
555
556struct bfa_bsg_diag_loopback_s {
557 bfa_status_t status;
558 u16 bfad_num;
559 u16 rsvd;
560 enum bfa_port_opmode opmode;
561 enum bfa_port_speed speed;
562 u32 lpcnt;
563 u32 pat;
564 struct bfa_diag_loopback_result_s result;
565};
566
567struct bfa_bsg_diag_fwping_s {
568 bfa_status_t status;
569 u16 bfad_num;
570 u16 rsvd;
571 u32 cnt;
572 u32 pattern;
573 struct bfa_diag_results_fwping result;
574};
575
576struct bfa_bsg_diag_qtest_s {
577 bfa_status_t status;
578 u16 bfad_num;
579 u16 rsvd;
580 u32 force;
581 u32 queue;
582 struct bfa_diag_qtest_result_s result;
583};
584
585struct bfa_bsg_sfp_show_s {
586 bfa_status_t status;
587 u16 bfad_num;
588 u16 rsvd;
589 struct sfp_mem_s sfp;
590};
591
592struct bfa_bsg_diag_led_s {
593 bfa_status_t status;
594 u16 bfad_num;
595 u16 rsvd;
596 struct bfa_diag_ledtest_s ledtest;
597};
598
599struct bfa_bsg_diag_beacon_s {
600 bfa_status_t status;
601 u16 bfad_num;
602 u16 rsvd;
603 bfa_boolean_t beacon;
604 bfa_boolean_t link_e2e_beacon;
605 u32 second;
606};
607
608struct bfa_bsg_diag_lb_stat_s {
609 bfa_status_t status;
610 u16 bfad_num;
611 u16 rsvd;
612};
613
Krishna Gudipati3350d982011-06-24 20:28:37 -0700614struct bfa_bsg_phy_attr_s {
615 bfa_status_t status;
616 u16 bfad_num;
617 u16 instance;
618 struct bfa_phy_attr_s attr;
619};
620
621struct bfa_bsg_phy_s {
622 bfa_status_t status;
623 u16 bfad_num;
624 u16 instance;
625 u64 bufsz;
626 u64 buf_ptr;
627};
628
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700629struct bfa_bsg_debug_s {
630 bfa_status_t status;
631 u16 bfad_num;
632 u16 rsvd;
633 u32 bufsz;
634 int inst_no;
635 u64 buf_ptr;
636 u64 offset;
637};
638
Krishna Gudipati3350d982011-06-24 20:28:37 -0700639struct bfa_bsg_phy_stats_s {
640 bfa_status_t status;
641 u16 bfad_num;
642 u16 instance;
643 struct bfa_phy_stats_s stats;
644};
645
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700646struct bfa_bsg_vhba_attr_s {
647 bfa_status_t status;
648 u16 bfad_num;
649 u16 pcifn_id;
650 struct bfa_vhba_attr_s attr;
651};
652
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700653struct bfa_bsg_boot_s {
654 bfa_status_t status;
655 u16 bfad_num;
656 u16 rsvd;
657 struct bfa_boot_cfg_s cfg;
658};
659
660struct bfa_bsg_preboot_s {
661 bfa_status_t status;
662 u16 bfad_num;
663 u16 rsvd;
664 struct bfa_boot_pbc_s cfg;
665};
666
667struct bfa_bsg_ethboot_s {
668 bfa_status_t status;
669 u16 bfad_num;
670 u16 rsvd;
671 struct bfa_ethboot_cfg_s cfg;
672};
673
Krishna Gudipati45191232011-07-20 17:02:50 -0700674struct bfa_bsg_trunk_attr_s {
675 bfa_status_t status;
676 u16 bfad_num;
677 u16 rsvd;
678 struct bfa_trunk_attr_s attr;
679};
680
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700681struct bfa_bsg_qos_attr_s {
682 bfa_status_t status;
683 u16 bfad_num;
684 u16 rsvd;
685 struct bfa_qos_attr_s attr;
686};
687
688struct bfa_bsg_qos_vc_attr_s {
689 bfa_status_t status;
690 u16 bfad_num;
691 u16 rsvd;
692 struct bfa_qos_vc_attr_s attr;
693};
694
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700695struct bfa_bsg_vf_stats_s {
696 bfa_status_t status;
697 u16 bfad_num;
698 u16 vf_id;
699 struct bfa_vf_stats_s stats;
700};
701
702struct bfa_bsg_vf_reset_stats_s {
703 bfa_status_t status;
704 u16 bfad_num;
705 u16 vf_id;
706};
707
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700708struct bfa_bsg_fcpim_lunmask_query_s {
709 bfa_status_t status;
710 u16 bfad_num;
711 struct bfa_lunmask_cfg_s lun_mask;
712};
713
714struct bfa_bsg_fcpim_lunmask_s {
715 bfa_status_t status;
716 u16 bfad_num;
717 u16 vf_id;
718 wwn_t pwwn;
719 wwn_t rpwwn;
720 struct scsi_lun lun;
721};
722
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700723struct bfa_bsg_fcpt_s {
724 bfa_status_t status;
725 u16 vf_id;
726 wwn_t lpwwn;
727 wwn_t dpwwn;
728 u32 tsecs;
729 int cts;
730 enum fc_cos cos;
731 struct fchs_s fchs;
732};
733#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
734
735struct bfa_bsg_data {
736 int payload_len;
737 void *payload;
738};
739
740#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
741 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
742 BFA_STATUS_FAILED : BFA_STATUS_OK)
743
744#endif /* BFAD_BSG_H */