blob: b0b5ac7a75ff22dae57a3b656ad25767116e8380 [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,
Vijaya Mohan Guvvabbe37a62013-05-13 02:33:19 -070049 IOCMD_PORT_BBCR_ENABLE,
50 IOCMD_PORT_BBCR_DISABLE,
51 IOCMD_PORT_BBCR_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070052 IOCMD_LPORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070053 IOCMD_LPORT_GET_RPORTS,
54 IOCMD_LPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070055 IOCMD_LPORT_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070056 IOCMD_LPORT_GET_IOSTATS,
57 IOCMD_RPORT_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070058 IOCMD_RPORT_GET_ADDR,
Krishna Gudipati60138062011-06-24 20:25:15 -070059 IOCMD_RPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070060 IOCMD_RPORT_RESET_STATS,
61 IOCMD_RPORT_SET_SPEED,
62 IOCMD_VPORT_GET_ATTR,
63 IOCMD_VPORT_GET_STATS,
64 IOCMD_VPORT_RESET_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070065 IOCMD_FABRIC_GET_LPORTS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070066 IOCMD_RATELIM_ENABLE,
67 IOCMD_RATELIM_DISABLE,
68 IOCMD_RATELIM_DEF_SPEED,
69 IOCMD_FCPIM_FAILOVER,
Krishna Gudipati60138062011-06-24 20:25:15 -070070 IOCMD_FCPIM_MODSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070071 IOCMD_FCPIM_MODSTATSCLR,
Krishna Gudipati60138062011-06-24 20:25:15 -070072 IOCMD_FCPIM_DEL_ITN_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070073 IOCMD_ITNIM_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070074 IOCMD_ITNIM_GET_IOSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070075 IOCMD_ITNIM_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070076 IOCMD_ITNIM_GET_ITNSTATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070077 IOCMD_IOC_PCIFN_CFG,
Krishna Gudipati60138062011-06-24 20:25:15 -070078 IOCMD_FCPORT_ENABLE,
79 IOCMD_FCPORT_DISABLE,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070080 IOCMD_PCIFN_CREATE,
81 IOCMD_PCIFN_DELETE,
82 IOCMD_PCIFN_BW,
83 IOCMD_ADAPTER_CFG_MODE,
84 IOCMD_PORT_CFG_MODE,
85 IOCMD_FLASH_ENABLE_OPTROM,
86 IOCMD_FLASH_DISABLE_OPTROM,
Krishna Gudipatia7141342011-06-24 20:23:19 -070087 IOCMD_FAA_QUERY,
Krishna Gudipati148d6102011-06-24 20:25:36 -070088 IOCMD_CEE_GET_ATTR,
89 IOCMD_CEE_GET_STATS,
90 IOCMD_CEE_RESET_STATS,
Krishna Gudipati51e569a2011-06-24 20:26:25 -070091 IOCMD_SFP_MEDIA,
92 IOCMD_SFP_SPEED,
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -070093 IOCMD_FLASH_GET_ATTR,
94 IOCMD_FLASH_ERASE_PART,
95 IOCMD_FLASH_UPDATE_PART,
96 IOCMD_FLASH_READ_PART,
Krishna Gudipati3d7fc662011-06-24 20:28:17 -070097 IOCMD_DIAG_TEMP,
98 IOCMD_DIAG_MEMTEST,
99 IOCMD_DIAG_LOOPBACK,
100 IOCMD_DIAG_FWPING,
101 IOCMD_DIAG_QUEUETEST,
102 IOCMD_DIAG_SFP,
103 IOCMD_DIAG_LED,
104 IOCMD_DIAG_BEACON_LPORT,
105 IOCMD_DIAG_LB_STAT,
Krishna Gudipati3350d982011-06-24 20:28:37 -0700106 IOCMD_PHY_GET_ATTR,
107 IOCMD_PHY_GET_STATS,
108 IOCMD_PHY_UPDATE_FW,
109 IOCMD_PHY_READ_FW,
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700110 IOCMD_VHBA_QUERY,
111 IOCMD_DEBUG_PORTLOG,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700112 IOCMD_DEBUG_FW_CORE,
113 IOCMD_DEBUG_FW_STATE_CLR,
114 IOCMD_DEBUG_PORTLOG_CLR,
115 IOCMD_DEBUG_START_DTRC,
116 IOCMD_DEBUG_STOP_DTRC,
117 IOCMD_DEBUG_PORTLOG_CTL,
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700118 IOCMD_FCPIM_PROFILE_ON,
119 IOCMD_FCPIM_PROFILE_OFF,
120 IOCMD_ITNIM_GET_IOPROFILE,
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700121 IOCMD_FCPORT_GET_STATS,
122 IOCMD_FCPORT_RESET_STATS,
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700123 IOCMD_BOOT_CFG,
124 IOCMD_BOOT_QUERY,
125 IOCMD_PREBOOT_QUERY,
126 IOCMD_ETHBOOT_CFG,
127 IOCMD_ETHBOOT_QUERY,
Krishna Gudipati45191232011-07-20 17:02:50 -0700128 IOCMD_TRUNK_ENABLE,
129 IOCMD_TRUNK_DISABLE,
130 IOCMD_TRUNK_GET_ATTR,
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700131 IOCMD_QOS_ENABLE,
132 IOCMD_QOS_DISABLE,
133 IOCMD_QOS_GET_ATTR,
134 IOCMD_QOS_GET_VC_ATTR,
135 IOCMD_QOS_GET_STATS,
136 IOCMD_QOS_RESET_STATS,
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700137 IOCMD_VF_GET_STATS,
138 IOCMD_VF_RESET_STATS,
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700139 IOCMD_FCPIM_LUNMASK_ENABLE,
140 IOCMD_FCPIM_LUNMASK_DISABLE,
141 IOCMD_FCPIM_LUNMASK_CLEAR,
142 IOCMD_FCPIM_LUNMASK_QUERY,
143 IOCMD_FCPIM_LUNMASK_ADD,
144 IOCMD_FCPIM_LUNMASK_DELETE,
Krishna Gudipatie3535462012-09-21 17:26:07 -0700145 IOCMD_DIAG_DPORT_ENABLE,
146 IOCMD_DIAG_DPORT_DISABLE,
Krishna Gudipati6894f012012-09-21 17:26:31 -0700147 IOCMD_QOS_SET_BW,
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700148 IOCMD_FCPIM_THROTTLE_QUERY,
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700149 IOCMD_FCPIM_THROTTLE_SET,
150 IOCMD_TFRU_READ,
151 IOCMD_TFRU_WRITE,
152 IOCMD_FRUVPD_READ,
153 IOCMD_FRUVPD_UPDATE,
154 IOCMD_FRUVPD_GET_MAX_SIZE,
Vijaya Mohan Guvva1a898a72013-05-13 02:33:21 -0700155 IOCMD_DIAG_DPORT_SHOW,
156 IOCMD_DIAG_DPORT_START,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700157};
158
159struct bfa_bsg_gen_s {
160 bfa_status_t status;
161 u16 bfad_num;
162 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700163};
164
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700165struct bfa_bsg_portlogctl_s {
166 bfa_status_t status;
167 u16 bfad_num;
168 u16 rsvd;
169 bfa_boolean_t ctl;
170 int inst_no;
171};
172
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700173struct bfa_bsg_fcpim_profile_s {
174 bfa_status_t status;
175 u16 bfad_num;
176 u16 rsvd;
177};
178
179struct bfa_bsg_itnim_ioprofile_s {
180 bfa_status_t status;
181 u16 bfad_num;
182 u16 vf_id;
183 wwn_t lpwwn;
184 wwn_t rpwwn;
185 struct bfa_itnim_ioprofile_s ioprofile;
186};
187
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700188struct bfa_bsg_fcport_stats_s {
189 bfa_status_t status;
190 u16 bfad_num;
191 u16 rsvd;
192 union bfa_fcport_stats_u stats;
193};
194
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700195struct bfa_bsg_ioc_name_s {
196 bfa_status_t status;
197 u16 bfad_num;
198 u16 rsvd;
199 char name[BFA_ADAPTER_SYM_NAME_LEN];
200};
201
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700202struct bfa_bsg_ioc_info_s {
203 bfa_status_t status;
204 u16 bfad_num;
205 u16 rsvd;
206 char serialnum[64];
207 char hwpath[BFA_STRING_32];
208 char adapter_hwpath[BFA_STRING_32];
209 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
210 char name[BFA_ADAPTER_SYM_NAME_LEN];
211 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
212 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
213 wwn_t pwwn;
214 wwn_t nwwn;
215 wwn_t factorypwwn;
216 wwn_t factorynwwn;
217 mac_t mac;
218 mac_t factory_mac; /* Factory mac address */
219 mac_t current_mac; /* Currently assigned mac address */
220 enum bfa_ioc_type_e ioc_type;
221 u16 pvid; /* Port vlan id */
222 u16 rsvd1;
223 u32 host;
224 u32 bandwidth; /* For PF support */
225 u32 rsvd2;
226};
227
228struct bfa_bsg_ioc_attr_s {
229 bfa_status_t status;
230 u16 bfad_num;
231 u16 rsvd;
232 struct bfa_ioc_attr_s ioc_attr;
233};
234
Krishna Gudipati60138062011-06-24 20:25:15 -0700235struct bfa_bsg_ioc_stats_s {
236 bfa_status_t status;
237 u16 bfad_num;
238 u16 rsvd;
239 struct bfa_ioc_stats_s ioc_stats;
240};
241
242struct bfa_bsg_ioc_fwstats_s {
243 bfa_status_t status;
244 u16 bfad_num;
245 u16 rsvd;
246 u32 buf_size;
247 u32 rsvd1;
248 u64 buf_ptr;
249};
250
251struct bfa_bsg_iocfc_attr_s {
252 bfa_status_t status;
253 u16 bfad_num;
254 u16 rsvd;
255 struct bfa_iocfc_attr_s iocfc_attr;
256};
257
258struct bfa_bsg_iocfc_intr_s {
259 bfa_status_t status;
260 u16 bfad_num;
261 u16 rsvd;
262 struct bfa_iocfc_intr_attr_s attr;
263};
264
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700265struct bfa_bsg_port_attr_s {
266 bfa_status_t status;
267 u16 bfad_num;
268 u16 rsvd;
269 struct bfa_port_attr_s attr;
270};
271
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700272struct bfa_bsg_port_cfg_s {
273 bfa_status_t status;
274 u16 bfad_num;
275 u16 rsvd;
276 u32 param;
277 u32 rsvd1;
278};
279
280struct bfa_bsg_port_cfg_maxfrsize_s {
281 bfa_status_t status;
282 u16 bfad_num;
283 u16 maxfrsize;
284};
285
Krishna Gudipati60138062011-06-24 20:25:15 -0700286struct bfa_bsg_port_stats_s {
287 bfa_status_t status;
288 u16 bfad_num;
289 u16 rsvd;
290 u32 buf_size;
291 u32 rsvd1;
292 u64 buf_ptr;
293};
294
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700295struct bfa_bsg_lport_attr_s {
296 bfa_status_t status;
297 u16 bfad_num;
298 u16 vf_id;
299 wwn_t pwwn;
300 struct bfa_lport_attr_s port_attr;
301};
302
Krishna Gudipati60138062011-06-24 20:25:15 -0700303struct bfa_bsg_lport_stats_s {
304 bfa_status_t status;
305 u16 bfad_num;
306 u16 vf_id;
307 wwn_t pwwn;
308 struct bfa_lport_stats_s port_stats;
309};
310
311struct bfa_bsg_lport_iostats_s {
312 bfa_status_t status;
313 u16 bfad_num;
314 u16 vf_id;
315 wwn_t pwwn;
316 struct bfa_itnim_iostats_s iostats;
317};
318
319struct bfa_bsg_lport_get_rports_s {
320 bfa_status_t status;
321 u16 bfad_num;
322 u16 vf_id;
323 wwn_t pwwn;
324 u64 rbuf_ptr;
325 u32 nrports;
326 u32 rsvd;
327};
328
329struct bfa_bsg_rport_attr_s {
330 bfa_status_t status;
331 u16 bfad_num;
332 u16 vf_id;
333 wwn_t pwwn;
334 wwn_t rpwwn;
Krishna Gudipatiee1a4a42012-08-22 19:50:43 -0700335 u32 pid;
336 u32 rsvd;
Krishna Gudipati60138062011-06-24 20:25:15 -0700337 struct bfa_rport_attr_s attr;
338};
339
340struct bfa_bsg_rport_stats_s {
341 bfa_status_t status;
342 u16 bfad_num;
343 u16 vf_id;
344 wwn_t pwwn;
345 wwn_t rpwwn;
346 struct bfa_rport_stats_s stats;
347};
348
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700349struct bfa_bsg_rport_scsi_addr_s {
350 bfa_status_t status;
351 u16 bfad_num;
352 u16 vf_id;
353 wwn_t pwwn;
354 wwn_t rpwwn;
355 u32 host;
356 u32 bus;
357 u32 target;
358 u32 lun;
359};
360
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700361struct bfa_bsg_rport_reset_stats_s {
362 bfa_status_t status;
363 u16 bfad_num;
364 u16 vf_id;
365 wwn_t pwwn;
366 wwn_t rpwwn;
367};
368
369struct bfa_bsg_rport_set_speed_s {
370 bfa_status_t status;
371 u16 bfad_num;
372 u16 vf_id;
373 enum bfa_port_speed speed;
374 u32 rsvd;
375 wwn_t pwwn;
376 wwn_t rpwwn;
377};
378
379struct bfa_bsg_vport_attr_s {
380 bfa_status_t status;
381 u16 bfad_num;
382 u16 vf_id;
383 wwn_t vpwwn;
384 struct bfa_vport_attr_s vport_attr;
385};
386
387struct bfa_bsg_vport_stats_s {
388 bfa_status_t status;
389 u16 bfad_num;
390 u16 vf_id;
391 wwn_t vpwwn;
392 struct bfa_vport_stats_s vport_stats;
393};
394
395struct bfa_bsg_reset_stats_s {
396 bfa_status_t status;
397 u16 bfad_num;
398 u16 vf_id;
399 wwn_t vpwwn;
400};
401
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700402struct bfa_bsg_fabric_get_lports_s {
403 bfa_status_t status;
404 u16 bfad_num;
405 u16 vf_id;
406 u64 buf_ptr;
407 u32 nports;
408 u32 rsvd;
409};
410
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700411struct bfa_bsg_trl_speed_s {
412 bfa_status_t status;
413 u16 bfad_num;
414 u16 rsvd;
415 enum bfa_port_speed speed;
416};
417
418struct bfa_bsg_fcpim_s {
419 bfa_status_t status;
420 u16 bfad_num;
421 u16 param;
422};
423
Krishna Gudipati60138062011-06-24 20:25:15 -0700424struct bfa_bsg_fcpim_modstats_s {
425 bfa_status_t status;
426 u16 bfad_num;
427 struct bfa_itnim_iostats_s modstats;
428};
429
430struct bfa_bsg_fcpim_del_itn_stats_s {
431 bfa_status_t status;
432 u16 bfad_num;
433 struct bfa_fcpim_del_itn_stats_s modstats;
434};
435
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700436struct bfa_bsg_fcpim_modstatsclr_s {
437 bfa_status_t status;
438 u16 bfad_num;
439};
440
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700441struct bfa_bsg_itnim_attr_s {
442 bfa_status_t status;
443 u16 bfad_num;
444 u16 vf_id;
445 wwn_t lpwwn;
446 wwn_t rpwwn;
447 struct bfa_itnim_attr_s attr;
448};
449
Krishna Gudipati60138062011-06-24 20:25:15 -0700450struct bfa_bsg_itnim_iostats_s {
451 bfa_status_t status;
452 u16 bfad_num;
453 u16 vf_id;
454 wwn_t lpwwn;
455 wwn_t rpwwn;
456 struct bfa_itnim_iostats_s iostats;
457};
458
459struct bfa_bsg_itnim_itnstats_s {
460 bfa_status_t status;
461 u16 bfad_num;
462 u16 vf_id;
463 wwn_t lpwwn;
464 wwn_t rpwwn;
465 struct bfa_itnim_stats_s itnstats;
466};
467
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700468struct bfa_bsg_pcifn_cfg_s {
469 bfa_status_t status;
470 u16 bfad_num;
471 u16 rsvd;
472 struct bfa_ablk_cfg_s pcifn_cfg;
473};
474
475struct bfa_bsg_pcifn_s {
476 bfa_status_t status;
477 u16 bfad_num;
478 u16 pcifn_id;
Krishna Gudipati1a1297c2012-09-21 17:26:50 -0700479 u16 bw_min;
480 u16 bw_max;
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700481 u8 port;
482 enum bfi_pcifn_class pcifn_class;
483 u8 rsvd[1];
484};
485
486struct bfa_bsg_adapter_cfg_mode_s {
487 bfa_status_t status;
488 u16 bfad_num;
489 u16 rsvd;
490 struct bfa_adapter_cfg_mode_s cfg;
491};
492
493struct bfa_bsg_port_cfg_mode_s {
494 bfa_status_t status;
495 u16 bfad_num;
496 u16 instance;
497 struct bfa_port_cfg_mode_s cfg;
498};
499
Vijaya Mohan Guvvabbe37a62013-05-13 02:33:19 -0700500struct bfa_bsg_bbcr_enable_s {
501 bfa_status_t status;
502 u16 bfad_num;
503 u8 bb_scn;
504 u8 rsvd;
505};
506
507struct bfa_bsg_bbcr_attr_s {
508 bfa_status_t status;
509 u16 bfad_num;
510 u16 rsvd;
511 struct bfa_bbcr_attr_s attr;
512};
513
Krishna Gudipatia7141342011-06-24 20:23:19 -0700514struct bfa_bsg_faa_attr_s {
515 bfa_status_t status;
516 u16 bfad_num;
517 u16 rsvd;
518 struct bfa_faa_attr_s faa_attr;
519};
520
Krishna Gudipati148d6102011-06-24 20:25:36 -0700521struct bfa_bsg_cee_attr_s {
522 bfa_status_t status;
523 u16 bfad_num;
524 u16 rsvd;
525 u32 buf_size;
526 u32 rsvd1;
527 u64 buf_ptr;
528};
529
530struct bfa_bsg_cee_stats_s {
531 bfa_status_t status;
532 u16 bfad_num;
533 u16 rsvd;
534 u32 buf_size;
535 u32 rsvd1;
536 u64 buf_ptr;
537};
538
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700539struct bfa_bsg_sfp_media_s {
540 bfa_status_t status;
541 u16 bfad_num;
542 u16 rsvd;
543 enum bfa_defs_sfp_media_e media;
544};
545
546struct bfa_bsg_sfp_speed_s {
547 bfa_status_t status;
548 u16 bfad_num;
549 u16 rsvd;
550 enum bfa_port_speed speed;
551};
552
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700553struct bfa_bsg_flash_attr_s {
554 bfa_status_t status;
555 u16 bfad_num;
556 u16 rsvd;
557 struct bfa_flash_attr_s attr;
558};
559
560struct bfa_bsg_flash_s {
561 bfa_status_t status;
562 u16 bfad_num;
563 u8 instance;
564 u8 rsvd;
565 enum bfa_flash_part_type type;
566 int bufsz;
567 u64 buf_ptr;
568};
569
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700570struct bfa_bsg_diag_get_temp_s {
571 bfa_status_t status;
572 u16 bfad_num;
573 u16 rsvd;
574 struct bfa_diag_results_tempsensor_s result;
575};
576
577struct bfa_bsg_diag_memtest_s {
578 bfa_status_t status;
579 u16 bfad_num;
580 u16 rsvd[3];
581 u32 pat;
582 struct bfa_diag_memtest_result result;
583 struct bfa_diag_memtest_s memtest;
584};
585
586struct bfa_bsg_diag_loopback_s {
587 bfa_status_t status;
588 u16 bfad_num;
589 u16 rsvd;
590 enum bfa_port_opmode opmode;
591 enum bfa_port_speed speed;
592 u32 lpcnt;
593 u32 pat;
594 struct bfa_diag_loopback_result_s result;
595};
596
Vijaya Mohan Guvva1a898a72013-05-13 02:33:21 -0700597struct bfa_bsg_diag_dport_show_s {
598 bfa_status_t status;
599 u16 bfad_num;
600 u16 rsvd;
601 struct bfa_diag_dport_result_s result;
602};
603
604struct bfa_bsg_dport_enable_s {
605 bfa_status_t status;
606 u16 bfad_num;
607 u16 rsvd;
608 u16 lpcnt;
609 u16 pat;
610};
611
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700612struct bfa_bsg_diag_fwping_s {
613 bfa_status_t status;
614 u16 bfad_num;
615 u16 rsvd;
616 u32 cnt;
617 u32 pattern;
618 struct bfa_diag_results_fwping result;
619};
620
621struct bfa_bsg_diag_qtest_s {
622 bfa_status_t status;
623 u16 bfad_num;
624 u16 rsvd;
625 u32 force;
626 u32 queue;
627 struct bfa_diag_qtest_result_s result;
628};
629
630struct bfa_bsg_sfp_show_s {
631 bfa_status_t status;
632 u16 bfad_num;
633 u16 rsvd;
634 struct sfp_mem_s sfp;
635};
636
637struct bfa_bsg_diag_led_s {
638 bfa_status_t status;
639 u16 bfad_num;
640 u16 rsvd;
641 struct bfa_diag_ledtest_s ledtest;
642};
643
644struct bfa_bsg_diag_beacon_s {
645 bfa_status_t status;
646 u16 bfad_num;
647 u16 rsvd;
648 bfa_boolean_t beacon;
649 bfa_boolean_t link_e2e_beacon;
650 u32 second;
651};
652
653struct bfa_bsg_diag_lb_stat_s {
654 bfa_status_t status;
655 u16 bfad_num;
656 u16 rsvd;
657};
658
Krishna Gudipati3350d982011-06-24 20:28:37 -0700659struct bfa_bsg_phy_attr_s {
660 bfa_status_t status;
661 u16 bfad_num;
662 u16 instance;
663 struct bfa_phy_attr_s attr;
664};
665
666struct bfa_bsg_phy_s {
667 bfa_status_t status;
668 u16 bfad_num;
669 u16 instance;
670 u64 bufsz;
671 u64 buf_ptr;
672};
673
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700674struct bfa_bsg_debug_s {
675 bfa_status_t status;
676 u16 bfad_num;
677 u16 rsvd;
678 u32 bufsz;
679 int inst_no;
680 u64 buf_ptr;
681 u64 offset;
682};
683
Krishna Gudipati3350d982011-06-24 20:28:37 -0700684struct bfa_bsg_phy_stats_s {
685 bfa_status_t status;
686 u16 bfad_num;
687 u16 instance;
688 struct bfa_phy_stats_s stats;
689};
690
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700691struct bfa_bsg_vhba_attr_s {
692 bfa_status_t status;
693 u16 bfad_num;
694 u16 pcifn_id;
695 struct bfa_vhba_attr_s attr;
696};
697
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700698struct bfa_bsg_boot_s {
699 bfa_status_t status;
700 u16 bfad_num;
701 u16 rsvd;
702 struct bfa_boot_cfg_s cfg;
703};
704
705struct bfa_bsg_preboot_s {
706 bfa_status_t status;
707 u16 bfad_num;
708 u16 rsvd;
709 struct bfa_boot_pbc_s cfg;
710};
711
712struct bfa_bsg_ethboot_s {
713 bfa_status_t status;
714 u16 bfad_num;
715 u16 rsvd;
716 struct bfa_ethboot_cfg_s cfg;
717};
718
Krishna Gudipati45191232011-07-20 17:02:50 -0700719struct bfa_bsg_trunk_attr_s {
720 bfa_status_t status;
721 u16 bfad_num;
722 u16 rsvd;
723 struct bfa_trunk_attr_s attr;
724};
725
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700726struct bfa_bsg_qos_attr_s {
727 bfa_status_t status;
728 u16 bfad_num;
729 u16 rsvd;
730 struct bfa_qos_attr_s attr;
731};
732
733struct bfa_bsg_qos_vc_attr_s {
734 bfa_status_t status;
735 u16 bfad_num;
736 u16 rsvd;
737 struct bfa_qos_vc_attr_s attr;
738};
739
Krishna Gudipati6894f012012-09-21 17:26:31 -0700740struct bfa_bsg_qos_bw_s {
741 bfa_status_t status;
742 u16 bfad_num;
743 u16 rsvd;
744 struct bfa_qos_bw_s qos_bw;
745};
746
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700747struct bfa_bsg_vf_stats_s {
748 bfa_status_t status;
749 u16 bfad_num;
750 u16 vf_id;
751 struct bfa_vf_stats_s stats;
752};
753
754struct bfa_bsg_vf_reset_stats_s {
755 bfa_status_t status;
756 u16 bfad_num;
757 u16 vf_id;
758};
759
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700760struct bfa_bsg_fcpim_lunmask_query_s {
761 bfa_status_t status;
762 u16 bfad_num;
763 struct bfa_lunmask_cfg_s lun_mask;
764};
765
766struct bfa_bsg_fcpim_lunmask_s {
767 bfa_status_t status;
768 u16 bfad_num;
769 u16 vf_id;
770 wwn_t pwwn;
771 wwn_t rpwwn;
772 struct scsi_lun lun;
773};
774
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700775struct bfa_bsg_fcpim_throttle_s {
776 bfa_status_t status;
777 u16 bfad_num;
778 u16 vf_id;
779 struct bfa_defs_fcpim_throttle_s throttle;
780};
781
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700782#define BFA_TFRU_DATA_SIZE 64
783#define BFA_MAX_FRUVPD_TRANSFER_SIZE 0x1000
784
785struct bfa_bsg_tfru_s {
786 bfa_status_t status;
787 u16 bfad_num;
788 u16 rsvd;
789 u32 offset;
790 u32 len;
791 u8 data[BFA_TFRU_DATA_SIZE];
792};
793
794struct bfa_bsg_fruvpd_s {
795 bfa_status_t status;
796 u16 bfad_num;
797 u16 rsvd;
798 u32 offset;
799 u32 len;
800 u8 data[BFA_MAX_FRUVPD_TRANSFER_SIZE];
801};
802
803struct bfa_bsg_fruvpd_max_size_s {
804 bfa_status_t status;
805 u16 bfad_num;
806 u16 rsvd;
807 u32 max_size;
808};
809
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700810struct bfa_bsg_fcpt_s {
811 bfa_status_t status;
812 u16 vf_id;
813 wwn_t lpwwn;
814 wwn_t dpwwn;
815 u32 tsecs;
816 int cts;
817 enum fc_cos cos;
818 struct fchs_s fchs;
819};
820#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
821
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700822#pragma pack(1)
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700823struct bfa_bsg_data {
824 int payload_len;
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700825 u64 payload;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700826};
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700827#pragma pack()
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700828
829#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
830 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
831 BFA_STATUS_FAILED : BFA_STATUS_OK)
832
833#endif /* BFAD_BSG_H */