blob: 15e1fc8e796bc86d94862e0a0a1bab202c413b2e [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,
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,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700155};
156
157struct bfa_bsg_gen_s {
158 bfa_status_t status;
159 u16 bfad_num;
160 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700161};
162
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700163struct bfa_bsg_portlogctl_s {
164 bfa_status_t status;
165 u16 bfad_num;
166 u16 rsvd;
167 bfa_boolean_t ctl;
168 int inst_no;
169};
170
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700171struct bfa_bsg_fcpim_profile_s {
172 bfa_status_t status;
173 u16 bfad_num;
174 u16 rsvd;
175};
176
177struct bfa_bsg_itnim_ioprofile_s {
178 bfa_status_t status;
179 u16 bfad_num;
180 u16 vf_id;
181 wwn_t lpwwn;
182 wwn_t rpwwn;
183 struct bfa_itnim_ioprofile_s ioprofile;
184};
185
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700186struct bfa_bsg_fcport_stats_s {
187 bfa_status_t status;
188 u16 bfad_num;
189 u16 rsvd;
190 union bfa_fcport_stats_u stats;
191};
192
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700193struct bfa_bsg_ioc_name_s {
194 bfa_status_t status;
195 u16 bfad_num;
196 u16 rsvd;
197 char name[BFA_ADAPTER_SYM_NAME_LEN];
198};
199
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700200struct bfa_bsg_ioc_info_s {
201 bfa_status_t status;
202 u16 bfad_num;
203 u16 rsvd;
204 char serialnum[64];
205 char hwpath[BFA_STRING_32];
206 char adapter_hwpath[BFA_STRING_32];
207 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
208 char name[BFA_ADAPTER_SYM_NAME_LEN];
209 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
210 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
211 wwn_t pwwn;
212 wwn_t nwwn;
213 wwn_t factorypwwn;
214 wwn_t factorynwwn;
215 mac_t mac;
216 mac_t factory_mac; /* Factory mac address */
217 mac_t current_mac; /* Currently assigned mac address */
218 enum bfa_ioc_type_e ioc_type;
219 u16 pvid; /* Port vlan id */
220 u16 rsvd1;
221 u32 host;
222 u32 bandwidth; /* For PF support */
223 u32 rsvd2;
224};
225
226struct bfa_bsg_ioc_attr_s {
227 bfa_status_t status;
228 u16 bfad_num;
229 u16 rsvd;
230 struct bfa_ioc_attr_s ioc_attr;
231};
232
Krishna Gudipati60138062011-06-24 20:25:15 -0700233struct bfa_bsg_ioc_stats_s {
234 bfa_status_t status;
235 u16 bfad_num;
236 u16 rsvd;
237 struct bfa_ioc_stats_s ioc_stats;
238};
239
240struct bfa_bsg_ioc_fwstats_s {
241 bfa_status_t status;
242 u16 bfad_num;
243 u16 rsvd;
244 u32 buf_size;
245 u32 rsvd1;
246 u64 buf_ptr;
247};
248
249struct bfa_bsg_iocfc_attr_s {
250 bfa_status_t status;
251 u16 bfad_num;
252 u16 rsvd;
253 struct bfa_iocfc_attr_s iocfc_attr;
254};
255
256struct bfa_bsg_iocfc_intr_s {
257 bfa_status_t status;
258 u16 bfad_num;
259 u16 rsvd;
260 struct bfa_iocfc_intr_attr_s attr;
261};
262
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700263struct bfa_bsg_port_attr_s {
264 bfa_status_t status;
265 u16 bfad_num;
266 u16 rsvd;
267 struct bfa_port_attr_s attr;
268};
269
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700270struct bfa_bsg_port_cfg_s {
271 bfa_status_t status;
272 u16 bfad_num;
273 u16 rsvd;
274 u32 param;
275 u32 rsvd1;
276};
277
278struct bfa_bsg_port_cfg_maxfrsize_s {
279 bfa_status_t status;
280 u16 bfad_num;
281 u16 maxfrsize;
282};
283
Krishna Gudipati60138062011-06-24 20:25:15 -0700284struct bfa_bsg_port_stats_s {
285 bfa_status_t status;
286 u16 bfad_num;
287 u16 rsvd;
288 u32 buf_size;
289 u32 rsvd1;
290 u64 buf_ptr;
291};
292
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700293struct bfa_bsg_lport_attr_s {
294 bfa_status_t status;
295 u16 bfad_num;
296 u16 vf_id;
297 wwn_t pwwn;
298 struct bfa_lport_attr_s port_attr;
299};
300
Krishna Gudipati60138062011-06-24 20:25:15 -0700301struct bfa_bsg_lport_stats_s {
302 bfa_status_t status;
303 u16 bfad_num;
304 u16 vf_id;
305 wwn_t pwwn;
306 struct bfa_lport_stats_s port_stats;
307};
308
309struct bfa_bsg_lport_iostats_s {
310 bfa_status_t status;
311 u16 bfad_num;
312 u16 vf_id;
313 wwn_t pwwn;
314 struct bfa_itnim_iostats_s iostats;
315};
316
317struct bfa_bsg_lport_get_rports_s {
318 bfa_status_t status;
319 u16 bfad_num;
320 u16 vf_id;
321 wwn_t pwwn;
322 u64 rbuf_ptr;
323 u32 nrports;
324 u32 rsvd;
325};
326
327struct bfa_bsg_rport_attr_s {
328 bfa_status_t status;
329 u16 bfad_num;
330 u16 vf_id;
331 wwn_t pwwn;
332 wwn_t rpwwn;
Krishna Gudipatiee1a4a42012-08-22 19:50:43 -0700333 u32 pid;
334 u32 rsvd;
Krishna Gudipati60138062011-06-24 20:25:15 -0700335 struct bfa_rport_attr_s attr;
336};
337
338struct bfa_bsg_rport_stats_s {
339 bfa_status_t status;
340 u16 bfad_num;
341 u16 vf_id;
342 wwn_t pwwn;
343 wwn_t rpwwn;
344 struct bfa_rport_stats_s stats;
345};
346
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700347struct bfa_bsg_rport_scsi_addr_s {
348 bfa_status_t status;
349 u16 bfad_num;
350 u16 vf_id;
351 wwn_t pwwn;
352 wwn_t rpwwn;
353 u32 host;
354 u32 bus;
355 u32 target;
356 u32 lun;
357};
358
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700359struct bfa_bsg_rport_reset_stats_s {
360 bfa_status_t status;
361 u16 bfad_num;
362 u16 vf_id;
363 wwn_t pwwn;
364 wwn_t rpwwn;
365};
366
367struct bfa_bsg_rport_set_speed_s {
368 bfa_status_t status;
369 u16 bfad_num;
370 u16 vf_id;
371 enum bfa_port_speed speed;
372 u32 rsvd;
373 wwn_t pwwn;
374 wwn_t rpwwn;
375};
376
377struct bfa_bsg_vport_attr_s {
378 bfa_status_t status;
379 u16 bfad_num;
380 u16 vf_id;
381 wwn_t vpwwn;
382 struct bfa_vport_attr_s vport_attr;
383};
384
385struct bfa_bsg_vport_stats_s {
386 bfa_status_t status;
387 u16 bfad_num;
388 u16 vf_id;
389 wwn_t vpwwn;
390 struct bfa_vport_stats_s vport_stats;
391};
392
393struct bfa_bsg_reset_stats_s {
394 bfa_status_t status;
395 u16 bfad_num;
396 u16 vf_id;
397 wwn_t vpwwn;
398};
399
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700400struct bfa_bsg_fabric_get_lports_s {
401 bfa_status_t status;
402 u16 bfad_num;
403 u16 vf_id;
404 u64 buf_ptr;
405 u32 nports;
406 u32 rsvd;
407};
408
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700409struct bfa_bsg_trl_speed_s {
410 bfa_status_t status;
411 u16 bfad_num;
412 u16 rsvd;
413 enum bfa_port_speed speed;
414};
415
416struct bfa_bsg_fcpim_s {
417 bfa_status_t status;
418 u16 bfad_num;
419 u16 param;
420};
421
Krishna Gudipati60138062011-06-24 20:25:15 -0700422struct bfa_bsg_fcpim_modstats_s {
423 bfa_status_t status;
424 u16 bfad_num;
425 struct bfa_itnim_iostats_s modstats;
426};
427
428struct bfa_bsg_fcpim_del_itn_stats_s {
429 bfa_status_t status;
430 u16 bfad_num;
431 struct bfa_fcpim_del_itn_stats_s modstats;
432};
433
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700434struct bfa_bsg_fcpim_modstatsclr_s {
435 bfa_status_t status;
436 u16 bfad_num;
437};
438
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700439struct bfa_bsg_itnim_attr_s {
440 bfa_status_t status;
441 u16 bfad_num;
442 u16 vf_id;
443 wwn_t lpwwn;
444 wwn_t rpwwn;
445 struct bfa_itnim_attr_s attr;
446};
447
Krishna Gudipati60138062011-06-24 20:25:15 -0700448struct bfa_bsg_itnim_iostats_s {
449 bfa_status_t status;
450 u16 bfad_num;
451 u16 vf_id;
452 wwn_t lpwwn;
453 wwn_t rpwwn;
454 struct bfa_itnim_iostats_s iostats;
455};
456
457struct bfa_bsg_itnim_itnstats_s {
458 bfa_status_t status;
459 u16 bfad_num;
460 u16 vf_id;
461 wwn_t lpwwn;
462 wwn_t rpwwn;
463 struct bfa_itnim_stats_s itnstats;
464};
465
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700466struct bfa_bsg_pcifn_cfg_s {
467 bfa_status_t status;
468 u16 bfad_num;
469 u16 rsvd;
470 struct bfa_ablk_cfg_s pcifn_cfg;
471};
472
473struct bfa_bsg_pcifn_s {
474 bfa_status_t status;
475 u16 bfad_num;
476 u16 pcifn_id;
Krishna Gudipati1a1297c2012-09-21 17:26:50 -0700477 u16 bw_min;
478 u16 bw_max;
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700479 u8 port;
480 enum bfi_pcifn_class pcifn_class;
481 u8 rsvd[1];
482};
483
484struct bfa_bsg_adapter_cfg_mode_s {
485 bfa_status_t status;
486 u16 bfad_num;
487 u16 rsvd;
488 struct bfa_adapter_cfg_mode_s cfg;
489};
490
491struct bfa_bsg_port_cfg_mode_s {
492 bfa_status_t status;
493 u16 bfad_num;
494 u16 instance;
495 struct bfa_port_cfg_mode_s cfg;
496};
497
Krishna Gudipatia7141342011-06-24 20:23:19 -0700498struct bfa_bsg_faa_attr_s {
499 bfa_status_t status;
500 u16 bfad_num;
501 u16 rsvd;
502 struct bfa_faa_attr_s faa_attr;
503};
504
Krishna Gudipati148d6102011-06-24 20:25:36 -0700505struct bfa_bsg_cee_attr_s {
506 bfa_status_t status;
507 u16 bfad_num;
508 u16 rsvd;
509 u32 buf_size;
510 u32 rsvd1;
511 u64 buf_ptr;
512};
513
514struct bfa_bsg_cee_stats_s {
515 bfa_status_t status;
516 u16 bfad_num;
517 u16 rsvd;
518 u32 buf_size;
519 u32 rsvd1;
520 u64 buf_ptr;
521};
522
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700523struct bfa_bsg_sfp_media_s {
524 bfa_status_t status;
525 u16 bfad_num;
526 u16 rsvd;
527 enum bfa_defs_sfp_media_e media;
528};
529
530struct bfa_bsg_sfp_speed_s {
531 bfa_status_t status;
532 u16 bfad_num;
533 u16 rsvd;
534 enum bfa_port_speed speed;
535};
536
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700537struct bfa_bsg_flash_attr_s {
538 bfa_status_t status;
539 u16 bfad_num;
540 u16 rsvd;
541 struct bfa_flash_attr_s attr;
542};
543
544struct bfa_bsg_flash_s {
545 bfa_status_t status;
546 u16 bfad_num;
547 u8 instance;
548 u8 rsvd;
549 enum bfa_flash_part_type type;
550 int bufsz;
551 u64 buf_ptr;
552};
553
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700554struct bfa_bsg_diag_get_temp_s {
555 bfa_status_t status;
556 u16 bfad_num;
557 u16 rsvd;
558 struct bfa_diag_results_tempsensor_s result;
559};
560
561struct bfa_bsg_diag_memtest_s {
562 bfa_status_t status;
563 u16 bfad_num;
564 u16 rsvd[3];
565 u32 pat;
566 struct bfa_diag_memtest_result result;
567 struct bfa_diag_memtest_s memtest;
568};
569
570struct bfa_bsg_diag_loopback_s {
571 bfa_status_t status;
572 u16 bfad_num;
573 u16 rsvd;
574 enum bfa_port_opmode opmode;
575 enum bfa_port_speed speed;
576 u32 lpcnt;
577 u32 pat;
578 struct bfa_diag_loopback_result_s result;
579};
580
581struct bfa_bsg_diag_fwping_s {
582 bfa_status_t status;
583 u16 bfad_num;
584 u16 rsvd;
585 u32 cnt;
586 u32 pattern;
587 struct bfa_diag_results_fwping result;
588};
589
590struct bfa_bsg_diag_qtest_s {
591 bfa_status_t status;
592 u16 bfad_num;
593 u16 rsvd;
594 u32 force;
595 u32 queue;
596 struct bfa_diag_qtest_result_s result;
597};
598
599struct bfa_bsg_sfp_show_s {
600 bfa_status_t status;
601 u16 bfad_num;
602 u16 rsvd;
603 struct sfp_mem_s sfp;
604};
605
606struct bfa_bsg_diag_led_s {
607 bfa_status_t status;
608 u16 bfad_num;
609 u16 rsvd;
610 struct bfa_diag_ledtest_s ledtest;
611};
612
613struct bfa_bsg_diag_beacon_s {
614 bfa_status_t status;
615 u16 bfad_num;
616 u16 rsvd;
617 bfa_boolean_t beacon;
618 bfa_boolean_t link_e2e_beacon;
619 u32 second;
620};
621
622struct bfa_bsg_diag_lb_stat_s {
623 bfa_status_t status;
624 u16 bfad_num;
625 u16 rsvd;
626};
627
Krishna Gudipatie3535462012-09-21 17:26:07 -0700628struct bfa_bsg_diag_dport_get_state_s {
629 bfa_status_t status;
630 u16 bfad_num;
631 u16 rsvd;
632 enum bfa_dport_state state;
633};
634
Krishna Gudipati3350d982011-06-24 20:28:37 -0700635struct bfa_bsg_phy_attr_s {
636 bfa_status_t status;
637 u16 bfad_num;
638 u16 instance;
639 struct bfa_phy_attr_s attr;
640};
641
642struct bfa_bsg_phy_s {
643 bfa_status_t status;
644 u16 bfad_num;
645 u16 instance;
646 u64 bufsz;
647 u64 buf_ptr;
648};
649
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700650struct bfa_bsg_debug_s {
651 bfa_status_t status;
652 u16 bfad_num;
653 u16 rsvd;
654 u32 bufsz;
655 int inst_no;
656 u64 buf_ptr;
657 u64 offset;
658};
659
Krishna Gudipati3350d982011-06-24 20:28:37 -0700660struct bfa_bsg_phy_stats_s {
661 bfa_status_t status;
662 u16 bfad_num;
663 u16 instance;
664 struct bfa_phy_stats_s stats;
665};
666
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700667struct bfa_bsg_vhba_attr_s {
668 bfa_status_t status;
669 u16 bfad_num;
670 u16 pcifn_id;
671 struct bfa_vhba_attr_s attr;
672};
673
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700674struct bfa_bsg_boot_s {
675 bfa_status_t status;
676 u16 bfad_num;
677 u16 rsvd;
678 struct bfa_boot_cfg_s cfg;
679};
680
681struct bfa_bsg_preboot_s {
682 bfa_status_t status;
683 u16 bfad_num;
684 u16 rsvd;
685 struct bfa_boot_pbc_s cfg;
686};
687
688struct bfa_bsg_ethboot_s {
689 bfa_status_t status;
690 u16 bfad_num;
691 u16 rsvd;
692 struct bfa_ethboot_cfg_s cfg;
693};
694
Krishna Gudipati45191232011-07-20 17:02:50 -0700695struct bfa_bsg_trunk_attr_s {
696 bfa_status_t status;
697 u16 bfad_num;
698 u16 rsvd;
699 struct bfa_trunk_attr_s attr;
700};
701
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700702struct bfa_bsg_qos_attr_s {
703 bfa_status_t status;
704 u16 bfad_num;
705 u16 rsvd;
706 struct bfa_qos_attr_s attr;
707};
708
709struct bfa_bsg_qos_vc_attr_s {
710 bfa_status_t status;
711 u16 bfad_num;
712 u16 rsvd;
713 struct bfa_qos_vc_attr_s attr;
714};
715
Krishna Gudipati6894f012012-09-21 17:26:31 -0700716struct bfa_bsg_qos_bw_s {
717 bfa_status_t status;
718 u16 bfad_num;
719 u16 rsvd;
720 struct bfa_qos_bw_s qos_bw;
721};
722
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700723struct bfa_bsg_vf_stats_s {
724 bfa_status_t status;
725 u16 bfad_num;
726 u16 vf_id;
727 struct bfa_vf_stats_s stats;
728};
729
730struct bfa_bsg_vf_reset_stats_s {
731 bfa_status_t status;
732 u16 bfad_num;
733 u16 vf_id;
734};
735
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700736struct bfa_bsg_fcpim_lunmask_query_s {
737 bfa_status_t status;
738 u16 bfad_num;
739 struct bfa_lunmask_cfg_s lun_mask;
740};
741
742struct bfa_bsg_fcpim_lunmask_s {
743 bfa_status_t status;
744 u16 bfad_num;
745 u16 vf_id;
746 wwn_t pwwn;
747 wwn_t rpwwn;
748 struct scsi_lun lun;
749};
750
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700751struct bfa_bsg_fcpim_throttle_s {
752 bfa_status_t status;
753 u16 bfad_num;
754 u16 vf_id;
755 struct bfa_defs_fcpim_throttle_s throttle;
756};
757
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700758#define BFA_TFRU_DATA_SIZE 64
759#define BFA_MAX_FRUVPD_TRANSFER_SIZE 0x1000
760
761struct bfa_bsg_tfru_s {
762 bfa_status_t status;
763 u16 bfad_num;
764 u16 rsvd;
765 u32 offset;
766 u32 len;
767 u8 data[BFA_TFRU_DATA_SIZE];
768};
769
770struct bfa_bsg_fruvpd_s {
771 bfa_status_t status;
772 u16 bfad_num;
773 u16 rsvd;
774 u32 offset;
775 u32 len;
776 u8 data[BFA_MAX_FRUVPD_TRANSFER_SIZE];
777};
778
779struct bfa_bsg_fruvpd_max_size_s {
780 bfa_status_t status;
781 u16 bfad_num;
782 u16 rsvd;
783 u32 max_size;
784};
785
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700786struct bfa_bsg_fcpt_s {
787 bfa_status_t status;
788 u16 vf_id;
789 wwn_t lpwwn;
790 wwn_t dpwwn;
791 u32 tsecs;
792 int cts;
793 enum fc_cos cos;
794 struct fchs_s fchs;
795};
796#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
797
798struct bfa_bsg_data {
799 int payload_len;
800 void *payload;
801};
802
803#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
804 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
805 BFA_STATUS_FAILED : BFA_STATUS_OK)
806
807#endif /* BFAD_BSG_H */