blob: 917e140dfbcced89d3a69b30486ca1f03c334e82 [file] [log] [blame]
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07001/*
Anil Gurumurthy889d0d42015-11-26 03:54:45 -05002 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
3 * Copyright (c) 2014- QLogic Corporation.
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07004 * All rights reserved
Anil Gurumurthy889d0d42015-11-26 03:54:45 -05005 * www.qlogic.com
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07006 *
Anil Gurumurthy31e1d562015-11-26 03:54:46 -05007 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07008 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License (GPL) Version 2 as
11 * published by the Free Software Foundation
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 */
18#ifndef BFAD_BSG_H
19#define BFAD_BSG_H
20
21#include "bfa_defs.h"
22#include "bfa_defs_fcs.h"
23
24/* Definitions of vendor unique structures and command codes passed in
25 * using FC_BSG_HST_VENDOR message code.
26 */
27enum {
Krishna Gudipati60138062011-06-24 20:25:15 -070028 IOCMD_IOC_ENABLE = 0x1,
29 IOCMD_IOC_DISABLE,
30 IOCMD_IOC_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070031 IOCMD_IOC_GET_INFO,
Krishna Gudipati60138062011-06-24 20:25:15 -070032 IOCMD_IOC_GET_STATS,
33 IOCMD_IOC_GET_FWSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070034 IOCMD_IOC_RESET_STATS,
35 IOCMD_IOC_RESET_FWSTATS,
36 IOCMD_IOC_SET_ADAPTER_NAME,
37 IOCMD_IOC_SET_PORT_NAME,
Vijaya Mohan Guvva28d358d2013-11-21 01:37:28 -080038 IOCMD_IOC_FW_SIG_INV,
Krishna Gudipati60138062011-06-24 20:25:15 -070039 IOCMD_IOCFC_GET_ATTR,
40 IOCMD_IOCFC_SET_INTR,
41 IOCMD_PORT_ENABLE,
42 IOCMD_PORT_DISABLE,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070043 IOCMD_PORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070044 IOCMD_PORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070045 IOCMD_PORT_RESET_STATS,
46 IOCMD_PORT_CFG_TOPO,
47 IOCMD_PORT_CFG_SPEED,
48 IOCMD_PORT_CFG_ALPA,
49 IOCMD_PORT_CFG_MAXFRSZ,
50 IOCMD_PORT_CLR_ALPA,
Vijaya Mohan Guvvabbe37a62013-05-13 02:33:19 -070051 IOCMD_PORT_BBCR_ENABLE,
52 IOCMD_PORT_BBCR_DISABLE,
53 IOCMD_PORT_BBCR_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070054 IOCMD_LPORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070055 IOCMD_LPORT_GET_RPORTS,
56 IOCMD_LPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070057 IOCMD_LPORT_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070058 IOCMD_LPORT_GET_IOSTATS,
59 IOCMD_RPORT_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070060 IOCMD_RPORT_GET_ADDR,
Krishna Gudipati60138062011-06-24 20:25:15 -070061 IOCMD_RPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070062 IOCMD_RPORT_RESET_STATS,
63 IOCMD_RPORT_SET_SPEED,
64 IOCMD_VPORT_GET_ATTR,
65 IOCMD_VPORT_GET_STATS,
66 IOCMD_VPORT_RESET_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070067 IOCMD_FABRIC_GET_LPORTS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070068 IOCMD_RATELIM_ENABLE,
69 IOCMD_RATELIM_DISABLE,
70 IOCMD_RATELIM_DEF_SPEED,
71 IOCMD_FCPIM_FAILOVER,
Krishna Gudipati60138062011-06-24 20:25:15 -070072 IOCMD_FCPIM_MODSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070073 IOCMD_FCPIM_MODSTATSCLR,
Krishna Gudipati60138062011-06-24 20:25:15 -070074 IOCMD_FCPIM_DEL_ITN_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070075 IOCMD_ITNIM_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070076 IOCMD_ITNIM_GET_IOSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070077 IOCMD_ITNIM_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070078 IOCMD_ITNIM_GET_ITNSTATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070079 IOCMD_IOC_PCIFN_CFG,
Krishna Gudipati60138062011-06-24 20:25:15 -070080 IOCMD_FCPORT_ENABLE,
81 IOCMD_FCPORT_DISABLE,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070082 IOCMD_PCIFN_CREATE,
83 IOCMD_PCIFN_DELETE,
84 IOCMD_PCIFN_BW,
85 IOCMD_ADAPTER_CFG_MODE,
86 IOCMD_PORT_CFG_MODE,
87 IOCMD_FLASH_ENABLE_OPTROM,
88 IOCMD_FLASH_DISABLE_OPTROM,
Krishna Gudipatia7141342011-06-24 20:23:19 -070089 IOCMD_FAA_QUERY,
Krishna Gudipati148d6102011-06-24 20:25:36 -070090 IOCMD_CEE_GET_ATTR,
91 IOCMD_CEE_GET_STATS,
92 IOCMD_CEE_RESET_STATS,
Krishna Gudipati51e569a2011-06-24 20:26:25 -070093 IOCMD_SFP_MEDIA,
94 IOCMD_SFP_SPEED,
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -070095 IOCMD_FLASH_GET_ATTR,
96 IOCMD_FLASH_ERASE_PART,
97 IOCMD_FLASH_UPDATE_PART,
98 IOCMD_FLASH_READ_PART,
Krishna Gudipati3d7fc662011-06-24 20:28:17 -070099 IOCMD_DIAG_TEMP,
100 IOCMD_DIAG_MEMTEST,
101 IOCMD_DIAG_LOOPBACK,
102 IOCMD_DIAG_FWPING,
103 IOCMD_DIAG_QUEUETEST,
104 IOCMD_DIAG_SFP,
105 IOCMD_DIAG_LED,
106 IOCMD_DIAG_BEACON_LPORT,
107 IOCMD_DIAG_LB_STAT,
Krishna Gudipati3350d982011-06-24 20:28:37 -0700108 IOCMD_PHY_GET_ATTR,
109 IOCMD_PHY_GET_STATS,
110 IOCMD_PHY_UPDATE_FW,
111 IOCMD_PHY_READ_FW,
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700112 IOCMD_VHBA_QUERY,
113 IOCMD_DEBUG_PORTLOG,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700114 IOCMD_DEBUG_FW_CORE,
115 IOCMD_DEBUG_FW_STATE_CLR,
116 IOCMD_DEBUG_PORTLOG_CLR,
117 IOCMD_DEBUG_START_DTRC,
118 IOCMD_DEBUG_STOP_DTRC,
119 IOCMD_DEBUG_PORTLOG_CTL,
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700120 IOCMD_FCPIM_PROFILE_ON,
121 IOCMD_FCPIM_PROFILE_OFF,
122 IOCMD_ITNIM_GET_IOPROFILE,
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700123 IOCMD_FCPORT_GET_STATS,
124 IOCMD_FCPORT_RESET_STATS,
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700125 IOCMD_BOOT_CFG,
126 IOCMD_BOOT_QUERY,
127 IOCMD_PREBOOT_QUERY,
128 IOCMD_ETHBOOT_CFG,
129 IOCMD_ETHBOOT_QUERY,
Krishna Gudipati45191232011-07-20 17:02:50 -0700130 IOCMD_TRUNK_ENABLE,
131 IOCMD_TRUNK_DISABLE,
132 IOCMD_TRUNK_GET_ATTR,
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700133 IOCMD_QOS_ENABLE,
134 IOCMD_QOS_DISABLE,
135 IOCMD_QOS_GET_ATTR,
136 IOCMD_QOS_GET_VC_ATTR,
137 IOCMD_QOS_GET_STATS,
138 IOCMD_QOS_RESET_STATS,
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700139 IOCMD_VF_GET_STATS,
140 IOCMD_VF_RESET_STATS,
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700141 IOCMD_FCPIM_LUNMASK_ENABLE,
142 IOCMD_FCPIM_LUNMASK_DISABLE,
143 IOCMD_FCPIM_LUNMASK_CLEAR,
144 IOCMD_FCPIM_LUNMASK_QUERY,
145 IOCMD_FCPIM_LUNMASK_ADD,
146 IOCMD_FCPIM_LUNMASK_DELETE,
Krishna Gudipatie3535462012-09-21 17:26:07 -0700147 IOCMD_DIAG_DPORT_ENABLE,
148 IOCMD_DIAG_DPORT_DISABLE,
Krishna Gudipati6894f012012-09-21 17:26:31 -0700149 IOCMD_QOS_SET_BW,
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700150 IOCMD_FCPIM_THROTTLE_QUERY,
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700151 IOCMD_FCPIM_THROTTLE_SET,
152 IOCMD_TFRU_READ,
153 IOCMD_TFRU_WRITE,
154 IOCMD_FRUVPD_READ,
155 IOCMD_FRUVPD_UPDATE,
156 IOCMD_FRUVPD_GET_MAX_SIZE,
Vijaya Mohan Guvva1a898a72013-05-13 02:33:21 -0700157 IOCMD_DIAG_DPORT_SHOW,
158 IOCMD_DIAG_DPORT_START,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700159};
160
161struct bfa_bsg_gen_s {
162 bfa_status_t status;
163 u16 bfad_num;
164 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700165};
166
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700167struct bfa_bsg_portlogctl_s {
168 bfa_status_t status;
169 u16 bfad_num;
170 u16 rsvd;
171 bfa_boolean_t ctl;
172 int inst_no;
173};
174
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700175struct bfa_bsg_fcpim_profile_s {
176 bfa_status_t status;
177 u16 bfad_num;
178 u16 rsvd;
179};
180
181struct bfa_bsg_itnim_ioprofile_s {
182 bfa_status_t status;
183 u16 bfad_num;
184 u16 vf_id;
185 wwn_t lpwwn;
186 wwn_t rpwwn;
187 struct bfa_itnim_ioprofile_s ioprofile;
188};
189
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700190struct bfa_bsg_fcport_stats_s {
191 bfa_status_t status;
192 u16 bfad_num;
193 u16 rsvd;
194 union bfa_fcport_stats_u stats;
195};
196
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700197struct bfa_bsg_ioc_name_s {
198 bfa_status_t status;
199 u16 bfad_num;
200 u16 rsvd;
201 char name[BFA_ADAPTER_SYM_NAME_LEN];
202};
203
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700204struct bfa_bsg_ioc_info_s {
205 bfa_status_t status;
206 u16 bfad_num;
207 u16 rsvd;
208 char serialnum[64];
209 char hwpath[BFA_STRING_32];
210 char adapter_hwpath[BFA_STRING_32];
211 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
212 char name[BFA_ADAPTER_SYM_NAME_LEN];
213 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
214 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
215 wwn_t pwwn;
216 wwn_t nwwn;
217 wwn_t factorypwwn;
218 wwn_t factorynwwn;
219 mac_t mac;
220 mac_t factory_mac; /* Factory mac address */
221 mac_t current_mac; /* Currently assigned mac address */
222 enum bfa_ioc_type_e ioc_type;
223 u16 pvid; /* Port vlan id */
224 u16 rsvd1;
225 u32 host;
226 u32 bandwidth; /* For PF support */
227 u32 rsvd2;
228};
229
230struct bfa_bsg_ioc_attr_s {
231 bfa_status_t status;
232 u16 bfad_num;
233 u16 rsvd;
234 struct bfa_ioc_attr_s ioc_attr;
235};
236
Krishna Gudipati60138062011-06-24 20:25:15 -0700237struct bfa_bsg_ioc_stats_s {
238 bfa_status_t status;
239 u16 bfad_num;
240 u16 rsvd;
241 struct bfa_ioc_stats_s ioc_stats;
242};
243
244struct bfa_bsg_ioc_fwstats_s {
245 bfa_status_t status;
246 u16 bfad_num;
247 u16 rsvd;
248 u32 buf_size;
249 u32 rsvd1;
250 u64 buf_ptr;
251};
252
253struct bfa_bsg_iocfc_attr_s {
254 bfa_status_t status;
255 u16 bfad_num;
256 u16 rsvd;
257 struct bfa_iocfc_attr_s iocfc_attr;
258};
259
260struct bfa_bsg_iocfc_intr_s {
261 bfa_status_t status;
262 u16 bfad_num;
263 u16 rsvd;
264 struct bfa_iocfc_intr_attr_s attr;
265};
266
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700267struct bfa_bsg_port_attr_s {
268 bfa_status_t status;
269 u16 bfad_num;
270 u16 rsvd;
271 struct bfa_port_attr_s attr;
272};
273
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700274struct bfa_bsg_port_cfg_s {
275 bfa_status_t status;
276 u16 bfad_num;
277 u16 rsvd;
278 u32 param;
279 u32 rsvd1;
280};
281
282struct bfa_bsg_port_cfg_maxfrsize_s {
283 bfa_status_t status;
284 u16 bfad_num;
285 u16 maxfrsize;
286};
287
Krishna Gudipati60138062011-06-24 20:25:15 -0700288struct bfa_bsg_port_stats_s {
289 bfa_status_t status;
290 u16 bfad_num;
291 u16 rsvd;
292 u32 buf_size;
293 u32 rsvd1;
294 u64 buf_ptr;
295};
296
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700297struct bfa_bsg_lport_attr_s {
298 bfa_status_t status;
299 u16 bfad_num;
300 u16 vf_id;
301 wwn_t pwwn;
302 struct bfa_lport_attr_s port_attr;
303};
304
Krishna Gudipati60138062011-06-24 20:25:15 -0700305struct bfa_bsg_lport_stats_s {
306 bfa_status_t status;
307 u16 bfad_num;
308 u16 vf_id;
309 wwn_t pwwn;
310 struct bfa_lport_stats_s port_stats;
311};
312
313struct bfa_bsg_lport_iostats_s {
314 bfa_status_t status;
315 u16 bfad_num;
316 u16 vf_id;
317 wwn_t pwwn;
318 struct bfa_itnim_iostats_s iostats;
319};
320
321struct bfa_bsg_lport_get_rports_s {
322 bfa_status_t status;
323 u16 bfad_num;
324 u16 vf_id;
325 wwn_t pwwn;
326 u64 rbuf_ptr;
327 u32 nrports;
328 u32 rsvd;
329};
330
331struct bfa_bsg_rport_attr_s {
332 bfa_status_t status;
333 u16 bfad_num;
334 u16 vf_id;
335 wwn_t pwwn;
336 wwn_t rpwwn;
Krishna Gudipatiee1a4a42012-08-22 19:50:43 -0700337 u32 pid;
338 u32 rsvd;
Krishna Gudipati60138062011-06-24 20:25:15 -0700339 struct bfa_rport_attr_s attr;
340};
341
342struct bfa_bsg_rport_stats_s {
343 bfa_status_t status;
344 u16 bfad_num;
345 u16 vf_id;
346 wwn_t pwwn;
347 wwn_t rpwwn;
348 struct bfa_rport_stats_s stats;
349};
350
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700351struct bfa_bsg_rport_scsi_addr_s {
352 bfa_status_t status;
353 u16 bfad_num;
354 u16 vf_id;
355 wwn_t pwwn;
356 wwn_t rpwwn;
357 u32 host;
358 u32 bus;
359 u32 target;
360 u32 lun;
361};
362
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700363struct bfa_bsg_rport_reset_stats_s {
364 bfa_status_t status;
365 u16 bfad_num;
366 u16 vf_id;
367 wwn_t pwwn;
368 wwn_t rpwwn;
369};
370
371struct bfa_bsg_rport_set_speed_s {
372 bfa_status_t status;
373 u16 bfad_num;
374 u16 vf_id;
375 enum bfa_port_speed speed;
376 u32 rsvd;
377 wwn_t pwwn;
378 wwn_t rpwwn;
379};
380
381struct bfa_bsg_vport_attr_s {
382 bfa_status_t status;
383 u16 bfad_num;
384 u16 vf_id;
385 wwn_t vpwwn;
386 struct bfa_vport_attr_s vport_attr;
387};
388
389struct bfa_bsg_vport_stats_s {
390 bfa_status_t status;
391 u16 bfad_num;
392 u16 vf_id;
393 wwn_t vpwwn;
394 struct bfa_vport_stats_s vport_stats;
395};
396
397struct bfa_bsg_reset_stats_s {
398 bfa_status_t status;
399 u16 bfad_num;
400 u16 vf_id;
401 wwn_t vpwwn;
402};
403
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700404struct bfa_bsg_fabric_get_lports_s {
405 bfa_status_t status;
406 u16 bfad_num;
407 u16 vf_id;
408 u64 buf_ptr;
409 u32 nports;
410 u32 rsvd;
411};
412
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700413struct bfa_bsg_trl_speed_s {
414 bfa_status_t status;
415 u16 bfad_num;
416 u16 rsvd;
417 enum bfa_port_speed speed;
418};
419
420struct bfa_bsg_fcpim_s {
421 bfa_status_t status;
422 u16 bfad_num;
423 u16 param;
424};
425
Krishna Gudipati60138062011-06-24 20:25:15 -0700426struct bfa_bsg_fcpim_modstats_s {
427 bfa_status_t status;
428 u16 bfad_num;
429 struct bfa_itnim_iostats_s modstats;
430};
431
432struct bfa_bsg_fcpim_del_itn_stats_s {
433 bfa_status_t status;
434 u16 bfad_num;
435 struct bfa_fcpim_del_itn_stats_s modstats;
436};
437
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700438struct bfa_bsg_fcpim_modstatsclr_s {
439 bfa_status_t status;
440 u16 bfad_num;
441};
442
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700443struct bfa_bsg_itnim_attr_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_attr_s attr;
450};
451
Krishna Gudipati60138062011-06-24 20:25:15 -0700452struct bfa_bsg_itnim_iostats_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_iostats_s iostats;
459};
460
461struct bfa_bsg_itnim_itnstats_s {
462 bfa_status_t status;
463 u16 bfad_num;
464 u16 vf_id;
465 wwn_t lpwwn;
466 wwn_t rpwwn;
467 struct bfa_itnim_stats_s itnstats;
468};
469
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700470struct bfa_bsg_pcifn_cfg_s {
471 bfa_status_t status;
472 u16 bfad_num;
473 u16 rsvd;
474 struct bfa_ablk_cfg_s pcifn_cfg;
475};
476
477struct bfa_bsg_pcifn_s {
478 bfa_status_t status;
479 u16 bfad_num;
480 u16 pcifn_id;
Krishna Gudipati1a1297c2012-09-21 17:26:50 -0700481 u16 bw_min;
482 u16 bw_max;
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700483 u8 port;
484 enum bfi_pcifn_class pcifn_class;
485 u8 rsvd[1];
486};
487
488struct bfa_bsg_adapter_cfg_mode_s {
489 bfa_status_t status;
490 u16 bfad_num;
491 u16 rsvd;
492 struct bfa_adapter_cfg_mode_s cfg;
493};
494
495struct bfa_bsg_port_cfg_mode_s {
496 bfa_status_t status;
497 u16 bfad_num;
498 u16 instance;
499 struct bfa_port_cfg_mode_s cfg;
500};
501
Vijaya Mohan Guvvabbe37a62013-05-13 02:33:19 -0700502struct bfa_bsg_bbcr_enable_s {
503 bfa_status_t status;
504 u16 bfad_num;
505 u8 bb_scn;
506 u8 rsvd;
507};
508
509struct bfa_bsg_bbcr_attr_s {
510 bfa_status_t status;
511 u16 bfad_num;
512 u16 rsvd;
513 struct bfa_bbcr_attr_s attr;
514};
515
Krishna Gudipatia7141342011-06-24 20:23:19 -0700516struct bfa_bsg_faa_attr_s {
517 bfa_status_t status;
518 u16 bfad_num;
519 u16 rsvd;
520 struct bfa_faa_attr_s faa_attr;
521};
522
Krishna Gudipati148d6102011-06-24 20:25:36 -0700523struct bfa_bsg_cee_attr_s {
524 bfa_status_t status;
525 u16 bfad_num;
526 u16 rsvd;
527 u32 buf_size;
528 u32 rsvd1;
529 u64 buf_ptr;
530};
531
532struct bfa_bsg_cee_stats_s {
533 bfa_status_t status;
534 u16 bfad_num;
535 u16 rsvd;
536 u32 buf_size;
537 u32 rsvd1;
538 u64 buf_ptr;
539};
540
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700541struct bfa_bsg_sfp_media_s {
542 bfa_status_t status;
543 u16 bfad_num;
544 u16 rsvd;
545 enum bfa_defs_sfp_media_e media;
546};
547
548struct bfa_bsg_sfp_speed_s {
549 bfa_status_t status;
550 u16 bfad_num;
551 u16 rsvd;
552 enum bfa_port_speed speed;
553};
554
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700555struct bfa_bsg_flash_attr_s {
556 bfa_status_t status;
557 u16 bfad_num;
558 u16 rsvd;
559 struct bfa_flash_attr_s attr;
560};
561
562struct bfa_bsg_flash_s {
563 bfa_status_t status;
564 u16 bfad_num;
565 u8 instance;
566 u8 rsvd;
567 enum bfa_flash_part_type type;
568 int bufsz;
569 u64 buf_ptr;
570};
571
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700572struct bfa_bsg_diag_get_temp_s {
573 bfa_status_t status;
574 u16 bfad_num;
575 u16 rsvd;
576 struct bfa_diag_results_tempsensor_s result;
577};
578
579struct bfa_bsg_diag_memtest_s {
580 bfa_status_t status;
581 u16 bfad_num;
582 u16 rsvd[3];
583 u32 pat;
584 struct bfa_diag_memtest_result result;
585 struct bfa_diag_memtest_s memtest;
586};
587
588struct bfa_bsg_diag_loopback_s {
589 bfa_status_t status;
590 u16 bfad_num;
591 u16 rsvd;
592 enum bfa_port_opmode opmode;
593 enum bfa_port_speed speed;
594 u32 lpcnt;
595 u32 pat;
596 struct bfa_diag_loopback_result_s result;
597};
598
Vijaya Mohan Guvva1a898a72013-05-13 02:33:21 -0700599struct bfa_bsg_diag_dport_show_s {
600 bfa_status_t status;
601 u16 bfad_num;
602 u16 rsvd;
603 struct bfa_diag_dport_result_s result;
604};
605
606struct bfa_bsg_dport_enable_s {
607 bfa_status_t status;
608 u16 bfad_num;
609 u16 rsvd;
610 u16 lpcnt;
611 u16 pat;
612};
613
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700614struct bfa_bsg_diag_fwping_s {
615 bfa_status_t status;
616 u16 bfad_num;
617 u16 rsvd;
618 u32 cnt;
619 u32 pattern;
620 struct bfa_diag_results_fwping result;
621};
622
623struct bfa_bsg_diag_qtest_s {
624 bfa_status_t status;
625 u16 bfad_num;
626 u16 rsvd;
627 u32 force;
628 u32 queue;
629 struct bfa_diag_qtest_result_s result;
630};
631
632struct bfa_bsg_sfp_show_s {
633 bfa_status_t status;
634 u16 bfad_num;
635 u16 rsvd;
636 struct sfp_mem_s sfp;
637};
638
639struct bfa_bsg_diag_led_s {
640 bfa_status_t status;
641 u16 bfad_num;
642 u16 rsvd;
643 struct bfa_diag_ledtest_s ledtest;
644};
645
646struct bfa_bsg_diag_beacon_s {
647 bfa_status_t status;
648 u16 bfad_num;
649 u16 rsvd;
650 bfa_boolean_t beacon;
651 bfa_boolean_t link_e2e_beacon;
652 u32 second;
653};
654
655struct bfa_bsg_diag_lb_stat_s {
656 bfa_status_t status;
657 u16 bfad_num;
658 u16 rsvd;
659};
660
Krishna Gudipati3350d982011-06-24 20:28:37 -0700661struct bfa_bsg_phy_attr_s {
662 bfa_status_t status;
663 u16 bfad_num;
664 u16 instance;
665 struct bfa_phy_attr_s attr;
666};
667
668struct bfa_bsg_phy_s {
669 bfa_status_t status;
670 u16 bfad_num;
671 u16 instance;
672 u64 bufsz;
673 u64 buf_ptr;
674};
675
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700676struct bfa_bsg_debug_s {
677 bfa_status_t status;
678 u16 bfad_num;
679 u16 rsvd;
680 u32 bufsz;
681 int inst_no;
682 u64 buf_ptr;
683 u64 offset;
684};
685
Krishna Gudipati3350d982011-06-24 20:28:37 -0700686struct bfa_bsg_phy_stats_s {
687 bfa_status_t status;
688 u16 bfad_num;
689 u16 instance;
690 struct bfa_phy_stats_s stats;
691};
692
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700693struct bfa_bsg_vhba_attr_s {
694 bfa_status_t status;
695 u16 bfad_num;
696 u16 pcifn_id;
697 struct bfa_vhba_attr_s attr;
698};
699
Krishna Gudipatia46bd302011-07-20 17:02:32 -0700700struct bfa_bsg_boot_s {
701 bfa_status_t status;
702 u16 bfad_num;
703 u16 rsvd;
704 struct bfa_boot_cfg_s cfg;
705};
706
707struct bfa_bsg_preboot_s {
708 bfa_status_t status;
709 u16 bfad_num;
710 u16 rsvd;
711 struct bfa_boot_pbc_s cfg;
712};
713
714struct bfa_bsg_ethboot_s {
715 bfa_status_t status;
716 u16 bfad_num;
717 u16 rsvd;
718 struct bfa_ethboot_cfg_s cfg;
719};
720
Krishna Gudipati45191232011-07-20 17:02:50 -0700721struct bfa_bsg_trunk_attr_s {
722 bfa_status_t status;
723 u16 bfad_num;
724 u16 rsvd;
725 struct bfa_trunk_attr_s attr;
726};
727
Krishna Gudipati3ec4f2c2011-07-20 17:03:09 -0700728struct bfa_bsg_qos_attr_s {
729 bfa_status_t status;
730 u16 bfad_num;
731 u16 rsvd;
732 struct bfa_qos_attr_s attr;
733};
734
735struct bfa_bsg_qos_vc_attr_s {
736 bfa_status_t status;
737 u16 bfad_num;
738 u16 rsvd;
739 struct bfa_qos_vc_attr_s attr;
740};
741
Krishna Gudipati6894f012012-09-21 17:26:31 -0700742struct bfa_bsg_qos_bw_s {
743 bfa_status_t status;
744 u16 bfad_num;
745 u16 rsvd;
746 struct bfa_qos_bw_s qos_bw;
747};
748
Krishna Gudipatic0350bf2011-07-20 17:03:27 -0700749struct bfa_bsg_vf_stats_s {
750 bfa_status_t status;
751 u16 bfad_num;
752 u16 vf_id;
753 struct bfa_vf_stats_s stats;
754};
755
756struct bfa_bsg_vf_reset_stats_s {
757 bfa_status_t status;
758 u16 bfad_num;
759 u16 vf_id;
760};
761
Krishna Gudipati4c5d22b2011-07-20 17:04:24 -0700762struct bfa_bsg_fcpim_lunmask_query_s {
763 bfa_status_t status;
764 u16 bfad_num;
765 struct bfa_lunmask_cfg_s lun_mask;
766};
767
768struct bfa_bsg_fcpim_lunmask_s {
769 bfa_status_t status;
770 u16 bfad_num;
771 u16 vf_id;
772 wwn_t pwwn;
773 wwn_t rpwwn;
774 struct scsi_lun lun;
775};
776
Krishna Gudipati7ace27a2012-09-21 17:26:41 -0700777struct bfa_bsg_fcpim_throttle_s {
778 bfa_status_t status;
779 u16 bfad_num;
780 u16 vf_id;
781 struct bfa_defs_fcpim_throttle_s throttle;
782};
783
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700784#define BFA_TFRU_DATA_SIZE 64
785#define BFA_MAX_FRUVPD_TRANSFER_SIZE 0x1000
786
787struct bfa_bsg_tfru_s {
788 bfa_status_t status;
789 u16 bfad_num;
790 u16 rsvd;
791 u32 offset;
792 u32 len;
793 u8 data[BFA_TFRU_DATA_SIZE];
794};
795
796struct bfa_bsg_fruvpd_s {
797 bfa_status_t status;
798 u16 bfad_num;
Vijaya Mohan Guvva079bcbc2013-05-13 02:33:28 -0700799 u16 rsvd1;
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700800 u32 offset;
801 u32 len;
802 u8 data[BFA_MAX_FRUVPD_TRANSFER_SIZE];
Vijaya Mohan Guvva079bcbc2013-05-13 02:33:28 -0700803 u8 trfr_cmpl;
804 u8 rsvd2[3];
Krishna Gudipatie6826c92012-09-21 17:27:14 -0700805};
806
807struct bfa_bsg_fruvpd_max_size_s {
808 bfa_status_t status;
809 u16 bfad_num;
810 u16 rsvd;
811 u32 max_size;
812};
813
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700814struct bfa_bsg_fcpt_s {
815 bfa_status_t status;
816 u16 vf_id;
817 wwn_t lpwwn;
818 wwn_t dpwwn;
819 u32 tsecs;
820 int cts;
821 enum fc_cos cos;
822 struct fchs_s fchs;
823};
824#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
825
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700826#pragma pack(1)
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700827struct bfa_bsg_data {
828 int payload_len;
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700829 u64 payload;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700830};
Vijaya Mohan Guvvabccd2682013-05-13 02:33:27 -0700831#pragma pack()
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700832
833#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
834 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
835 BFA_STATUS_FAILED : BFA_STATUS_OK)
836
837#endif /* BFAD_BSG_H */