xref: /openbmc/linux/drivers/scsi/bfa/bfad_bsg.h (revision 2223cbec)
1 /*
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  */
26 enum {
27 	IOCMD_IOC_ENABLE = 0x1,
28 	IOCMD_IOC_DISABLE,
29 	IOCMD_IOC_GET_ATTR,
30 	IOCMD_IOC_GET_INFO,
31 	IOCMD_IOC_GET_STATS,
32 	IOCMD_IOC_GET_FWSTATS,
33 	IOCMD_IOC_RESET_STATS,
34 	IOCMD_IOC_RESET_FWSTATS,
35 	IOCMD_IOC_SET_ADAPTER_NAME,
36 	IOCMD_IOC_SET_PORT_NAME,
37 	IOCMD_IOCFC_GET_ATTR,
38 	IOCMD_IOCFC_SET_INTR,
39 	IOCMD_PORT_ENABLE,
40 	IOCMD_PORT_DISABLE,
41 	IOCMD_PORT_GET_ATTR,
42 	IOCMD_PORT_GET_STATS,
43 	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,
51 	IOCMD_LPORT_GET_ATTR,
52 	IOCMD_LPORT_GET_RPORTS,
53 	IOCMD_LPORT_GET_STATS,
54 	IOCMD_LPORT_RESET_STATS,
55 	IOCMD_LPORT_GET_IOSTATS,
56 	IOCMD_RPORT_GET_ATTR,
57 	IOCMD_RPORT_GET_ADDR,
58 	IOCMD_RPORT_GET_STATS,
59 	IOCMD_RPORT_RESET_STATS,
60 	IOCMD_RPORT_SET_SPEED,
61 	IOCMD_VPORT_GET_ATTR,
62 	IOCMD_VPORT_GET_STATS,
63 	IOCMD_VPORT_RESET_STATS,
64 	IOCMD_FABRIC_GET_LPORTS,
65 	IOCMD_RATELIM_ENABLE,
66 	IOCMD_RATELIM_DISABLE,
67 	IOCMD_RATELIM_DEF_SPEED,
68 	IOCMD_FCPIM_FAILOVER,
69 	IOCMD_FCPIM_MODSTATS,
70 	IOCMD_FCPIM_MODSTATSCLR,
71 	IOCMD_FCPIM_DEL_ITN_STATS,
72 	IOCMD_ITNIM_GET_ATTR,
73 	IOCMD_ITNIM_GET_IOSTATS,
74 	IOCMD_ITNIM_RESET_STATS,
75 	IOCMD_ITNIM_GET_ITNSTATS,
76 	IOCMD_IOC_PCIFN_CFG,
77 	IOCMD_FCPORT_ENABLE,
78 	IOCMD_FCPORT_DISABLE,
79 	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,
86 	IOCMD_FAA_QUERY,
87 	IOCMD_CEE_GET_ATTR,
88 	IOCMD_CEE_GET_STATS,
89 	IOCMD_CEE_RESET_STATS,
90 	IOCMD_SFP_MEDIA,
91 	IOCMD_SFP_SPEED,
92 	IOCMD_FLASH_GET_ATTR,
93 	IOCMD_FLASH_ERASE_PART,
94 	IOCMD_FLASH_UPDATE_PART,
95 	IOCMD_FLASH_READ_PART,
96 	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,
105 	IOCMD_PHY_GET_ATTR,
106 	IOCMD_PHY_GET_STATS,
107 	IOCMD_PHY_UPDATE_FW,
108 	IOCMD_PHY_READ_FW,
109 	IOCMD_VHBA_QUERY,
110 	IOCMD_DEBUG_PORTLOG,
111 	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,
117 	IOCMD_FCPIM_PROFILE_ON,
118 	IOCMD_FCPIM_PROFILE_OFF,
119 	IOCMD_ITNIM_GET_IOPROFILE,
120 	IOCMD_FCPORT_GET_STATS,
121 	IOCMD_FCPORT_RESET_STATS,
122 	IOCMD_BOOT_CFG,
123 	IOCMD_BOOT_QUERY,
124 	IOCMD_PREBOOT_QUERY,
125 	IOCMD_ETHBOOT_CFG,
126 	IOCMD_ETHBOOT_QUERY,
127 	IOCMD_TRUNK_ENABLE,
128 	IOCMD_TRUNK_DISABLE,
129 	IOCMD_TRUNK_GET_ATTR,
130 	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,
136 	IOCMD_VF_GET_STATS,
137 	IOCMD_VF_RESET_STATS,
138 	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,
144 	IOCMD_DIAG_DPORT_ENABLE,
145 	IOCMD_DIAG_DPORT_DISABLE,
146 	IOCMD_DIAG_DPORT_GET_STATE,
147 	IOCMD_QOS_SET_BW,
148 	IOCMD_FCPIM_THROTTLE_QUERY,
149 	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,
155 };
156 
157 struct bfa_bsg_gen_s {
158 	bfa_status_t	status;
159 	u16		bfad_num;
160 	u16		rsvd;
161 };
162 
163 struct 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 
171 struct bfa_bsg_fcpim_profile_s {
172 	bfa_status_t    status;
173 	u16		bfad_num;
174 	u16		rsvd;
175 };
176 
177 struct 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 
186 struct 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 
193 struct 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 
200 struct 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 
226 struct 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 
233 struct 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 
240 struct 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 
249 struct 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 
256 struct 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 
263 struct 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 
270 struct 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 
278 struct bfa_bsg_port_cfg_maxfrsize_s {
279 	bfa_status_t	status;
280 	u16		bfad_num;
281 	u16		maxfrsize;
282 };
283 
284 struct 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 
293 struct 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 
301 struct 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 
309 struct 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 
317 struct 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 
327 struct 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;
333 	u32		pid;
334 	u32		rsvd;
335 	struct bfa_rport_attr_s attr;
336 };
337 
338 struct 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 
347 struct 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 
359 struct 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 
367 struct 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 
377 struct 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 
385 struct 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 
393 struct bfa_bsg_reset_stats_s {
394 	bfa_status_t	status;
395 	u16		bfad_num;
396 	u16		vf_id;
397 	wwn_t		vpwwn;
398 };
399 
400 struct 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 
409 struct 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 
416 struct bfa_bsg_fcpim_s {
417 	bfa_status_t	status;
418 	u16		bfad_num;
419 	u16		param;
420 };
421 
422 struct bfa_bsg_fcpim_modstats_s {
423 	bfa_status_t	status;
424 	u16		bfad_num;
425 	struct bfa_itnim_iostats_s modstats;
426 };
427 
428 struct 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 
434 struct bfa_bsg_fcpim_modstatsclr_s {
435 	bfa_status_t	status;
436 	u16		bfad_num;
437 };
438 
439 struct 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 
448 struct 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 
457 struct 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 
466 struct 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 
473 struct bfa_bsg_pcifn_s {
474 	bfa_status_t		status;
475 	u16			bfad_num;
476 	u16			pcifn_id;
477 	u16			bw_min;
478 	u16			bw_max;
479 	u8			port;
480 	enum bfi_pcifn_class	pcifn_class;
481 	u8			rsvd[1];
482 };
483 
484 struct 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 
491 struct 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 
498 struct 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 
505 struct 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 
514 struct 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 
523 struct 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 
530 struct 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 
537 struct 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 
544 struct 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 
554 struct 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 
561 struct 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 
570 struct 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 
581 struct 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 
590 struct 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 
599 struct 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 
606 struct 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 
613 struct 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 
622 struct bfa_bsg_diag_lb_stat_s {
623 	bfa_status_t	status;
624 	u16		bfad_num;
625 	u16		rsvd;
626 };
627 
628 struct 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 
635 struct 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 
642 struct 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 
650 struct 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 
660 struct 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 
667 struct 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 
674 struct 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 
681 struct 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 
688 struct 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 
695 struct 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 
702 struct 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 
709 struct 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 
716 struct 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 
723 struct 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 
730 struct bfa_bsg_vf_reset_stats_s {
731 	bfa_status_t	status;
732 	u16		bfad_num;
733 	u16		vf_id;
734 };
735 
736 struct 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 
742 struct 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 
751 struct 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 
758 #define BFA_TFRU_DATA_SIZE		64
759 #define BFA_MAX_FRUVPD_TRANSFER_SIZE	0x1000
760 
761 struct 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 
770 struct 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 
779 struct bfa_bsg_fruvpd_max_size_s {
780 	bfa_status_t	status;
781 	u16		bfad_num;
782 	u16		rsvd;
783 	u32		max_size;
784 };
785 
786 struct 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 
798 struct 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 */
808