blob: 37922b96079b54e4b202e42a6aec8d8ecf428e0f [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 Gudipatie3535462012-09-21 17:26:07 -0700144 IOCMD_DIAG_DPORT_ENABLE,
145 IOCMD_DIAG_DPORT_DISABLE,
146 IOCMD_DIAG_DPORT_GET_STATE,
Krishna Gudipati6894f012012-09-21 17:26:31 -0700147 IOCMD_QOS_SET_BW,
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700148 IOCMD_FCPIM_THROTTLE_QUERY,
149 IOCMD_FCPIM_THROTTLE_SET
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700150};
151
152struct bfa_bsg_gen_s {
153 bfa_status_t status;
154 u16 bfad_num;
155 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700156};
157
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700158struct bfa_bsg_portlogctl_s {
159 bfa_status_t status;
160 u16 bfad_num;
161 u16 rsvd;
162 bfa_boolean_t ctl;
163 int inst_no;
164};
165
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700166struct bfa_bsg_fcpim_profile_s {
167 bfa_status_t status;
168 u16 bfad_num;
169 u16 rsvd;
170};
171
172struct bfa_bsg_itnim_ioprofile_s {
173 bfa_status_t status;
174 u16 bfad_num;
175 u16 vf_id;
176 wwn_t lpwwn;
177 wwn_t rpwwn;
178 struct bfa_itnim_ioprofile_s ioprofile;
179};
180
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700181struct bfa_bsg_fcport_stats_s {
182 bfa_status_t status;
183 u16 bfad_num;
184 u16 rsvd;
185 union bfa_fcport_stats_u stats;
186};
187
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700188struct bfa_bsg_ioc_name_s {
189 bfa_status_t status;
190 u16 bfad_num;
191 u16 rsvd;
192 char name[BFA_ADAPTER_SYM_NAME_LEN];
193};
194
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700195struct bfa_bsg_ioc_info_s {
196 bfa_status_t status;
197 u16 bfad_num;
198 u16 rsvd;
199 char serialnum[64];
200 char hwpath[BFA_STRING_32];
201 char adapter_hwpath[BFA_STRING_32];
202 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
203 char name[BFA_ADAPTER_SYM_NAME_LEN];
204 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
205 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
206 wwn_t pwwn;
207 wwn_t nwwn;
208 wwn_t factorypwwn;
209 wwn_t factorynwwn;
210 mac_t mac;
211 mac_t factory_mac; /* Factory mac address */
212 mac_t current_mac; /* Currently assigned mac address */
213 enum bfa_ioc_type_e ioc_type;
214 u16 pvid; /* Port vlan id */
215 u16 rsvd1;
216 u32 host;
217 u32 bandwidth; /* For PF support */
218 u32 rsvd2;
219};
220
221struct bfa_bsg_ioc_attr_s {
222 bfa_status_t status;
223 u16 bfad_num;
224 u16 rsvd;
225 struct bfa_ioc_attr_s ioc_attr;
226};
227
Krishna Gudipati60138062011-06-24 20:25:15 -0700228struct bfa_bsg_ioc_stats_s {
229 bfa_status_t status;
230 u16 bfad_num;
231 u16 rsvd;
232 struct bfa_ioc_stats_s ioc_stats;
233};
234
235struct bfa_bsg_ioc_fwstats_s {
236 bfa_status_t status;
237 u16 bfad_num;
238 u16 rsvd;
239 u32 buf_size;
240 u32 rsvd1;
241 u64 buf_ptr;
242};
243
244struct bfa_bsg_iocfc_attr_s {
245 bfa_status_t status;
246 u16 bfad_num;
247 u16 rsvd;
248 struct bfa_iocfc_attr_s iocfc_attr;
249};
250
251struct bfa_bsg_iocfc_intr_s {
252 bfa_status_t status;
253 u16 bfad_num;
254 u16 rsvd;
255 struct bfa_iocfc_intr_attr_s attr;
256};
257
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700258struct bfa_bsg_port_attr_s {
259 bfa_status_t status;
260 u16 bfad_num;
261 u16 rsvd;
262 struct bfa_port_attr_s attr;
263};
264
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700265struct bfa_bsg_port_cfg_s {
266 bfa_status_t status;
267 u16 bfad_num;
268 u16 rsvd;
269 u32 param;
270 u32 rsvd1;
271};
272
273struct bfa_bsg_port_cfg_maxfrsize_s {
274 bfa_status_t status;
275 u16 bfad_num;
276 u16 maxfrsize;
277};
278
Krishna Gudipati60138062011-06-24 20:25:15 -0700279struct bfa_bsg_port_stats_s {
280 bfa_status_t status;
281 u16 bfad_num;
282 u16 rsvd;
283 u32 buf_size;
284 u32 rsvd1;
285 u64 buf_ptr;
286};
287
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700288struct bfa_bsg_lport_attr_s {
289 bfa_status_t status;
290 u16 bfad_num;
291 u16 vf_id;
292 wwn_t pwwn;
293 struct bfa_lport_attr_s port_attr;
294};
295
Krishna Gudipati60138062011-06-24 20:25:15 -0700296struct bfa_bsg_lport_stats_s {
297 bfa_status_t status;
298 u16 bfad_num;
299 u16 vf_id;
300 wwn_t pwwn;
301 struct bfa_lport_stats_s port_stats;
302};
303
304struct bfa_bsg_lport_iostats_s {
305 bfa_status_t status;
306 u16 bfad_num;
307 u16 vf_id;
308 wwn_t pwwn;
309 struct bfa_itnim_iostats_s iostats;
310};
311
312struct bfa_bsg_lport_get_rports_s {
313 bfa_status_t status;
314 u16 bfad_num;
315 u16 vf_id;
316 wwn_t pwwn;
317 u64 rbuf_ptr;
318 u32 nrports;
319 u32 rsvd;
320};
321
322struct bfa_bsg_rport_attr_s {
323 bfa_status_t status;
324 u16 bfad_num;
325 u16 vf_id;
326 wwn_t pwwn;
327 wwn_t rpwwn;
Krishna Gudipatiee1a4a42012-08-22 19:50:43 -0700328 u32 pid;
329 u32 rsvd;
Krishna Gudipati60138062011-06-24 20:25:15 -0700330 struct bfa_rport_attr_s attr;
331};
332
333struct bfa_bsg_rport_stats_s {
334 bfa_status_t status;
335 u16 bfad_num;
336 u16 vf_id;
337 wwn_t pwwn;
338 wwn_t rpwwn;
339 struct bfa_rport_stats_s stats;
340};
341
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700342struct bfa_bsg_rport_scsi_addr_s {
343 bfa_status_t status;
344 u16 bfad_num;
345 u16 vf_id;
346 wwn_t pwwn;
347 wwn_t rpwwn;
348 u32 host;
349 u32 bus;
350 u32 target;
351 u32 lun;
352};
353
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700354struct bfa_bsg_rport_reset_stats_s {
355 bfa_status_t status;
356 u16 bfad_num;
357 u16 vf_id;
358 wwn_t pwwn;
359 wwn_t rpwwn;
360};
361
362struct bfa_bsg_rport_set_speed_s {
363 bfa_status_t status;
364 u16 bfad_num;
365 u16 vf_id;
366 enum bfa_port_speed speed;
367 u32 rsvd;
368 wwn_t pwwn;
369 wwn_t rpwwn;
370};
371
372struct bfa_bsg_vport_attr_s {
373 bfa_status_t status;
374 u16 bfad_num;
375 u16 vf_id;
376 wwn_t vpwwn;
377 struct bfa_vport_attr_s vport_attr;
378};
379
380struct bfa_bsg_vport_stats_s {
381 bfa_status_t status;
382 u16 bfad_num;
383 u16 vf_id;
384 wwn_t vpwwn;
385 struct bfa_vport_stats_s vport_stats;
386};
387
388struct bfa_bsg_reset_stats_s {
389 bfa_status_t status;
390 u16 bfad_num;
391 u16 vf_id;
392 wwn_t vpwwn;
393};
394
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700395struct bfa_bsg_fabric_get_lports_s {
396 bfa_status_t status;
397 u16 bfad_num;
398 u16 vf_id;
399 u64 buf_ptr;
400 u32 nports;
401 u32 rsvd;
402};
403
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700404struct bfa_bsg_trl_speed_s {
405 bfa_status_t status;
406 u16 bfad_num;
407 u16 rsvd;
408 enum bfa_port_speed speed;
409};
410
411struct bfa_bsg_fcpim_s {
412 bfa_status_t status;
413 u16 bfad_num;
414 u16 param;
415};
416
Krishna Gudipati60138062011-06-24 20:25:15 -0700417struct bfa_bsg_fcpim_modstats_s {
418 bfa_status_t status;
419 u16 bfad_num;
420 struct bfa_itnim_iostats_s modstats;
421};
422
423struct bfa_bsg_fcpim_del_itn_stats_s {
424 bfa_status_t status;
425 u16 bfad_num;
426 struct bfa_fcpim_del_itn_stats_s modstats;
427};
428
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700429struct bfa_bsg_fcpim_modstatsclr_s {
430 bfa_status_t status;
431 u16 bfad_num;
432};
433
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700434struct bfa_bsg_itnim_attr_s {
435 bfa_status_t status;
436 u16 bfad_num;
437 u16 vf_id;
438 wwn_t lpwwn;
439 wwn_t rpwwn;
440 struct bfa_itnim_attr_s attr;
441};
442
Krishna Gudipati60138062011-06-24 20:25:15 -0700443struct bfa_bsg_itnim_iostats_s {
444 bfa_status_t status;
445 u16 bfad_num;
446 u16 vf_id;
447 wwn_t lpwwn;
448 wwn_t rpwwn;
449 struct bfa_itnim_iostats_s iostats;
450};
451
452struct bfa_bsg_itnim_itnstats_s {
453 bfa_status_t status;
454 u16 bfad_num;
455 u16 vf_id;
456 wwn_t lpwwn;
457 wwn_t rpwwn;
458 struct bfa_itnim_stats_s itnstats;
459};
460
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700461struct bfa_bsg_pcifn_cfg_s {
462 bfa_status_t status;
463 u16 bfad_num;
464 u16 rsvd;
465 struct bfa_ablk_cfg_s pcifn_cfg;
466};
467
468struct bfa_bsg_pcifn_s {
469 bfa_status_t status;
470 u16 bfad_num;
471 u16 pcifn_id;
472 u32 bandwidth;
473 u8 port;
474 enum bfi_pcifn_class pcifn_class;
475 u8 rsvd[1];
476};
477
478struct bfa_bsg_adapter_cfg_mode_s {
479 bfa_status_t status;
480 u16 bfad_num;
481 u16 rsvd;
482 struct bfa_adapter_cfg_mode_s cfg;
483};
484
485struct bfa_bsg_port_cfg_mode_s {
486 bfa_status_t status;
487 u16 bfad_num;
488 u16 instance;
489 struct bfa_port_cfg_mode_s cfg;
490};
491
Krishna Gudipatia7141342011-06-24 20:23:19 -0700492struct bfa_bsg_faa_attr_s {
493 bfa_status_t status;
494 u16 bfad_num;
495 u16 rsvd;
496 struct bfa_faa_attr_s faa_attr;
497};
498
Krishna Gudipati148d6102011-06-24 20:25:36 -0700499struct bfa_bsg_cee_attr_s {
500 bfa_status_t status;
501 u16 bfad_num;
502 u16 rsvd;
503 u32 buf_size;
504 u32 rsvd1;
505 u64 buf_ptr;
506};
507
508struct bfa_bsg_cee_stats_s {
509 bfa_status_t status;
510 u16 bfad_num;
511 u16 rsvd;
512 u32 buf_size;
513 u32 rsvd1;
514 u64 buf_ptr;
515};
516
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700517struct bfa_bsg_sfp_media_s {
518 bfa_status_t status;
519 u16 bfad_num;
520 u16 rsvd;
521 enum bfa_defs_sfp_media_e media;
522};
523
524struct bfa_bsg_sfp_speed_s {
525 bfa_status_t status;
526 u16 bfad_num;
527 u16 rsvd;
528 enum bfa_port_speed speed;
529};
530
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700531struct bfa_bsg_flash_attr_s {
532 bfa_status_t status;
533 u16 bfad_num;
534 u16 rsvd;
535 struct bfa_flash_attr_s attr;
536};
537
538struct bfa_bsg_flash_s {
539 bfa_status_t status;
540 u16 bfad_num;
541 u8 instance;
542 u8 rsvd;
543 enum bfa_flash_part_type type;
544 int bufsz;
545 u64 buf_ptr;
546};
547
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700548struct bfa_bsg_diag_get_temp_s {
549 bfa_status_t status;
550 u16 bfad_num;
551 u16 rsvd;
552 struct bfa_diag_results_tempsensor_s result;
553};
554
555struct bfa_bsg_diag_memtest_s {
556 bfa_status_t status;
557 u16 bfad_num;
558 u16 rsvd[3];
559 u32 pat;
560 struct bfa_diag_memtest_result result;
561 struct bfa_diag_memtest_s memtest;
562};
563
564struct bfa_bsg_diag_loopback_s {
565 bfa_status_t status;
566 u16 bfad_num;
567 u16 rsvd;
568 enum bfa_port_opmode opmode;
569 enum bfa_port_speed speed;
570 u32 lpcnt;
571 u32 pat;
572 struct bfa_diag_loopback_result_s result;
573};
574
575struct bfa_bsg_diag_fwping_s {
576 bfa_status_t status;
577 u16 bfad_num;
578 u16 rsvd;
579 u32 cnt;
580 u32 pattern;
581 struct bfa_diag_results_fwping result;
582};
583
584struct bfa_bsg_diag_qtest_s {
585 bfa_status_t status;
586 u16 bfad_num;
587 u16 rsvd;
588 u32 force;
589 u32 queue;
590 struct bfa_diag_qtest_result_s result;
591};
592
593struct bfa_bsg_sfp_show_s {
594 bfa_status_t status;
595 u16 bfad_num;
596 u16 rsvd;
597 struct sfp_mem_s sfp;
598};
599
600struct bfa_bsg_diag_led_s {
601 bfa_status_t status;
602 u16 bfad_num;
603 u16 rsvd;
604 struct bfa_diag_ledtest_s ledtest;
605};
606
607struct bfa_bsg_diag_beacon_s {
608 bfa_status_t status;
609 u16 bfad_num;
610 u16 rsvd;
611 bfa_boolean_t beacon;
612 bfa_boolean_t link_e2e_beacon;
613 u32 second;
614};
615
616struct bfa_bsg_diag_lb_stat_s {
617 bfa_status_t status;
618 u16 bfad_num;
619 u16 rsvd;
620};
621
Krishna Gudipatie3535462012-09-21 17:26:07 -0700622struct bfa_bsg_diag_dport_get_state_s {
623 bfa_status_t status;
624 u16 bfad_num;
625 u16 rsvd;
626 enum bfa_dport_state state;
627};
628
Krishna Gudipati3350d982011-06-24 20:28:37 -0700629struct bfa_bsg_phy_attr_s {
630 bfa_status_t status;
631 u16 bfad_num;
632 u16 instance;
633 struct bfa_phy_attr_s attr;
634};
635
636struct bfa_bsg_phy_s {
637 bfa_status_t status;
638 u16 bfad_num;
639 u16 instance;
640 u64 bufsz;
641 u64 buf_ptr;
642};
643
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700644struct bfa_bsg_debug_s {
645 bfa_status_t status;
646 u16 bfad_num;
647 u16 rsvd;
648 u32 bufsz;
649 int inst_no;
650 u64 buf_ptr;
651 u64 offset;
652};
653
Krishna Gudipati3350d982011-06-24 20:28:37 -0700654struct bfa_bsg_phy_stats_s {
655 bfa_status_t status;
656 u16 bfad_num;
657 u16 instance;
658 struct bfa_phy_stats_s stats;
659};
660
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700661struct bfa_bsg_vhba_attr_s {
662 bfa_status_t status;
663 u16 bfad_num;
664 u16 pcifn_id;
665 struct bfa_vhba_attr_s attr;
666};
667
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700668struct bfa_bsg_boot_s {
669 bfa_status_t status;
670 u16 bfad_num;
671 u16 rsvd;
672 struct bfa_boot_cfg_s cfg;
673};
674
675struct bfa_bsg_preboot_s {
676 bfa_status_t status;
677 u16 bfad_num;
678 u16 rsvd;
679 struct bfa_boot_pbc_s cfg;
680};
681
682struct bfa_bsg_ethboot_s {
683 bfa_status_t status;
684 u16 bfad_num;
685 u16 rsvd;
686 struct bfa_ethboot_cfg_s cfg;
687};
688
Krishna Gudipati45191232011-07-20 17:02:50 -0700689struct bfa_bsg_trunk_attr_s {
690 bfa_status_t status;
691 u16 bfad_num;
692 u16 rsvd;
693 struct bfa_trunk_attr_s attr;
694};
695
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700696struct bfa_bsg_qos_attr_s {
697 bfa_status_t status;
698 u16 bfad_num;
699 u16 rsvd;
700 struct bfa_qos_attr_s attr;
701};
702
703struct bfa_bsg_qos_vc_attr_s {
704 bfa_status_t status;
705 u16 bfad_num;
706 u16 rsvd;
707 struct bfa_qos_vc_attr_s attr;
708};
709
Krishna Gudipati6894f012012-09-21 17:26:31 -0700710struct bfa_bsg_qos_bw_s {
711 bfa_status_t status;
712 u16 bfad_num;
713 u16 rsvd;
714 struct bfa_qos_bw_s qos_bw;
715};
716
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700717struct bfa_bsg_vf_stats_s {
718 bfa_status_t status;
719 u16 bfad_num;
720 u16 vf_id;
721 struct bfa_vf_stats_s stats;
722};
723
724struct bfa_bsg_vf_reset_stats_s {
725 bfa_status_t status;
726 u16 bfad_num;
727 u16 vf_id;
728};
729
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700730struct bfa_bsg_fcpim_lunmask_query_s {
731 bfa_status_t status;
732 u16 bfad_num;
733 struct bfa_lunmask_cfg_s lun_mask;
734};
735
736struct bfa_bsg_fcpim_lunmask_s {
737 bfa_status_t status;
738 u16 bfad_num;
739 u16 vf_id;
740 wwn_t pwwn;
741 wwn_t rpwwn;
742 struct scsi_lun lun;
743};
744
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700745struct bfa_bsg_fcpim_throttle_s {
746 bfa_status_t status;
747 u16 bfad_num;
748 u16 vf_id;
749 struct bfa_defs_fcpim_throttle_s throttle;
750};
751
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700752struct bfa_bsg_fcpt_s {
753 bfa_status_t status;
754 u16 vf_id;
755 wwn_t lpwwn;
756 wwn_t dpwwn;
757 u32 tsecs;
758 int cts;
759 enum fc_cos cos;
760 struct fchs_s fchs;
761};
762#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
763
764struct bfa_bsg_data {
765 int payload_len;
766 void *payload;
767};
768
769#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
770 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
771 BFA_STATUS_FAILED : BFA_STATUS_OK)
772
773#endif /* BFAD_BSG_H */