PageRenderTime 46ms CodeModel.GetById 12ms app.highlight 30ms RepoModel.GetById 1ms app.codeStats 1ms

/drivers/scsi/bfa/bfad_bsg.h

http://github.com/mirrors/linux
C Header | 829 lines | 729 code | 88 blank | 12 comment | 1 complexity | 08dcab21c81a967b82cf187d607495de MD5 | raw file
  1/* SPDX-License-Identifier: GPL-2.0-only */
  2/*
  3 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
  4 * Copyright (c) 2014- QLogic Corporation.
  5 * All rights reserved
  6 * www.qlogic.com
  7 *
  8 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
  9 */
 10#ifndef BFAD_BSG_H
 11#define BFAD_BSG_H
 12
 13#include "bfa_defs.h"
 14#include "bfa_defs_fcs.h"
 15
 16/* Definitions of vendor unique structures and command codes passed in
 17 * using FC_BSG_HST_VENDOR message code.
 18 */
 19enum {
 20	IOCMD_IOC_ENABLE = 0x1,
 21	IOCMD_IOC_DISABLE,
 22	IOCMD_IOC_GET_ATTR,
 23	IOCMD_IOC_GET_INFO,
 24	IOCMD_IOC_GET_STATS,
 25	IOCMD_IOC_GET_FWSTATS,
 26	IOCMD_IOC_RESET_STATS,
 27	IOCMD_IOC_RESET_FWSTATS,
 28	IOCMD_IOC_SET_ADAPTER_NAME,
 29	IOCMD_IOC_SET_PORT_NAME,
 30	IOCMD_IOC_FW_SIG_INV,
 31	IOCMD_IOCFC_GET_ATTR,
 32	IOCMD_IOCFC_SET_INTR,
 33	IOCMD_PORT_ENABLE,
 34	IOCMD_PORT_DISABLE,
 35	IOCMD_PORT_GET_ATTR,
 36	IOCMD_PORT_GET_STATS,
 37	IOCMD_PORT_RESET_STATS,
 38	IOCMD_PORT_CFG_TOPO,
 39	IOCMD_PORT_CFG_SPEED,
 40	IOCMD_PORT_CFG_ALPA,
 41	IOCMD_PORT_CFG_MAXFRSZ,
 42	IOCMD_PORT_CLR_ALPA,
 43	IOCMD_PORT_BBCR_ENABLE,
 44	IOCMD_PORT_BBCR_DISABLE,
 45	IOCMD_PORT_BBCR_GET_ATTR,
 46	IOCMD_LPORT_GET_ATTR,
 47	IOCMD_LPORT_GET_RPORTS,
 48	IOCMD_LPORT_GET_STATS,
 49	IOCMD_LPORT_RESET_STATS,
 50	IOCMD_LPORT_GET_IOSTATS,
 51	IOCMD_RPORT_GET_ATTR,
 52	IOCMD_RPORT_GET_ADDR,
 53	IOCMD_RPORT_GET_STATS,
 54	IOCMD_RPORT_RESET_STATS,
 55	IOCMD_RPORT_SET_SPEED,
 56	IOCMD_VPORT_GET_ATTR,
 57	IOCMD_VPORT_GET_STATS,
 58	IOCMD_VPORT_RESET_STATS,
 59	IOCMD_FABRIC_GET_LPORTS,
 60	IOCMD_RATELIM_ENABLE,
 61	IOCMD_RATELIM_DISABLE,
 62	IOCMD_RATELIM_DEF_SPEED,
 63	IOCMD_FCPIM_FAILOVER,
 64	IOCMD_FCPIM_MODSTATS,
 65	IOCMD_FCPIM_MODSTATSCLR,
 66	IOCMD_FCPIM_DEL_ITN_STATS,
 67	IOCMD_ITNIM_GET_ATTR,
 68	IOCMD_ITNIM_GET_IOSTATS,
 69	IOCMD_ITNIM_RESET_STATS,
 70	IOCMD_ITNIM_GET_ITNSTATS,
 71	IOCMD_IOC_PCIFN_CFG,
 72	IOCMD_FCPORT_ENABLE,
 73	IOCMD_FCPORT_DISABLE,
 74	IOCMD_PCIFN_CREATE,
 75	IOCMD_PCIFN_DELETE,
 76	IOCMD_PCIFN_BW,
 77	IOCMD_ADAPTER_CFG_MODE,
 78	IOCMD_PORT_CFG_MODE,
 79	IOCMD_FLASH_ENABLE_OPTROM,
 80	IOCMD_FLASH_DISABLE_OPTROM,
 81	IOCMD_FAA_QUERY,
 82	IOCMD_CEE_GET_ATTR,
 83	IOCMD_CEE_GET_STATS,
 84	IOCMD_CEE_RESET_STATS,
 85	IOCMD_SFP_MEDIA,
 86	IOCMD_SFP_SPEED,
 87	IOCMD_FLASH_GET_ATTR,
 88	IOCMD_FLASH_ERASE_PART,
 89	IOCMD_FLASH_UPDATE_PART,
 90	IOCMD_FLASH_READ_PART,
 91	IOCMD_DIAG_TEMP,
 92	IOCMD_DIAG_MEMTEST,
 93	IOCMD_DIAG_LOOPBACK,
 94	IOCMD_DIAG_FWPING,
 95	IOCMD_DIAG_QUEUETEST,
 96	IOCMD_DIAG_SFP,
 97	IOCMD_DIAG_LED,
 98	IOCMD_DIAG_BEACON_LPORT,
 99	IOCMD_DIAG_LB_STAT,
100	IOCMD_PHY_GET_ATTR,
101	IOCMD_PHY_GET_STATS,
102	IOCMD_PHY_UPDATE_FW,
103	IOCMD_PHY_READ_FW,
104	IOCMD_VHBA_QUERY,
105	IOCMD_DEBUG_PORTLOG,
106	IOCMD_DEBUG_FW_CORE,
107	IOCMD_DEBUG_FW_STATE_CLR,
108	IOCMD_DEBUG_PORTLOG_CLR,
109	IOCMD_DEBUG_START_DTRC,
110	IOCMD_DEBUG_STOP_DTRC,
111	IOCMD_DEBUG_PORTLOG_CTL,
112	IOCMD_FCPIM_PROFILE_ON,
113	IOCMD_FCPIM_PROFILE_OFF,
114	IOCMD_ITNIM_GET_IOPROFILE,
115	IOCMD_FCPORT_GET_STATS,
116	IOCMD_FCPORT_RESET_STATS,
117	IOCMD_BOOT_CFG,
118	IOCMD_BOOT_QUERY,
119	IOCMD_PREBOOT_QUERY,
120	IOCMD_ETHBOOT_CFG,
121	IOCMD_ETHBOOT_QUERY,
122	IOCMD_TRUNK_ENABLE,
123	IOCMD_TRUNK_DISABLE,
124	IOCMD_TRUNK_GET_ATTR,
125	IOCMD_QOS_ENABLE,
126	IOCMD_QOS_DISABLE,
127	IOCMD_QOS_GET_ATTR,
128	IOCMD_QOS_GET_VC_ATTR,
129	IOCMD_QOS_GET_STATS,
130	IOCMD_QOS_RESET_STATS,
131	IOCMD_VF_GET_STATS,
132	IOCMD_VF_RESET_STATS,
133	IOCMD_FCPIM_LUNMASK_ENABLE,
134	IOCMD_FCPIM_LUNMASK_DISABLE,
135	IOCMD_FCPIM_LUNMASK_CLEAR,
136	IOCMD_FCPIM_LUNMASK_QUERY,
137	IOCMD_FCPIM_LUNMASK_ADD,
138	IOCMD_FCPIM_LUNMASK_DELETE,
139	IOCMD_DIAG_DPORT_ENABLE,
140	IOCMD_DIAG_DPORT_DISABLE,
141	IOCMD_QOS_SET_BW,
142	IOCMD_FCPIM_THROTTLE_QUERY,
143	IOCMD_FCPIM_THROTTLE_SET,
144	IOCMD_TFRU_READ,
145	IOCMD_TFRU_WRITE,
146	IOCMD_FRUVPD_READ,
147	IOCMD_FRUVPD_UPDATE,
148	IOCMD_FRUVPD_GET_MAX_SIZE,
149	IOCMD_DIAG_DPORT_SHOW,
150	IOCMD_DIAG_DPORT_START,
151};
152
153struct bfa_bsg_gen_s {
154	bfa_status_t	status;
155	u16		bfad_num;
156	u16		rsvd;
157};
158
159struct bfa_bsg_portlogctl_s {
160	bfa_status_t	status;
161	u16		bfad_num;
162	u16		rsvd;
163	bfa_boolean_t	ctl;
164	int		inst_no;
165};
166
167struct bfa_bsg_fcpim_profile_s {
168	bfa_status_t    status;
169	u16		bfad_num;
170	u16		rsvd;
171};
172
173struct bfa_bsg_itnim_ioprofile_s {
174	bfa_status_t	status;
175	u16		bfad_num;
176	u16		vf_id;
177	wwn_t		lpwwn;
178	wwn_t		rpwwn;
179	struct bfa_itnim_ioprofile_s ioprofile;
180};
181
182struct bfa_bsg_fcport_stats_s {
183	bfa_status_t	status;
184	u16		bfad_num;
185	u16		rsvd;
186	union bfa_fcport_stats_u stats;
187};
188
189struct bfa_bsg_ioc_name_s {
190	bfa_status_t	status;
191	u16		bfad_num;
192	u16		rsvd;
193	char		name[BFA_ADAPTER_SYM_NAME_LEN];
194};
195
196struct bfa_bsg_ioc_info_s {
197	bfa_status_t	status;
198	u16		bfad_num;
199	u16		rsvd;
200	char		serialnum[64];
201	char		hwpath[BFA_STRING_32];
202	char		adapter_hwpath[BFA_STRING_32];
203	char		guid[BFA_ADAPTER_SYM_NAME_LEN*2];
204	char		name[BFA_ADAPTER_SYM_NAME_LEN];
205	char		port_name[BFA_ADAPTER_SYM_NAME_LEN];
206	char		eth_name[BFA_ADAPTER_SYM_NAME_LEN];
207	wwn_t		pwwn;
208	wwn_t		nwwn;
209	wwn_t		factorypwwn;
210	wwn_t		factorynwwn;
211	mac_t		mac;
212	mac_t		factory_mac; /* Factory mac address */
213	mac_t		current_mac; /* Currently assigned mac address */
214	enum bfa_ioc_type_e	ioc_type;
215	u16		pvid; /* Port vlan id */
216	u16		rsvd1;
217	u32		host;
218	u32		bandwidth; /* For PF support */
219	u32		rsvd2;
220};
221
222struct bfa_bsg_ioc_attr_s {
223	bfa_status_t	status;
224	u16		bfad_num;
225	u16		rsvd;
226	struct bfa_ioc_attr_s  ioc_attr;
227};
228
229struct bfa_bsg_ioc_stats_s {
230	bfa_status_t	status;
231	u16		bfad_num;
232	u16		rsvd;
233	struct bfa_ioc_stats_s ioc_stats;
234};
235
236struct bfa_bsg_ioc_fwstats_s {
237	bfa_status_t	status;
238	u16		bfad_num;
239	u16		rsvd;
240	u32		buf_size;
241	u32		rsvd1;
242	u64		buf_ptr;
243};
244
245struct bfa_bsg_iocfc_attr_s {
246	bfa_status_t	status;
247	u16		bfad_num;
248	u16		rsvd;
249	struct bfa_iocfc_attr_s	iocfc_attr;
250};
251
252struct bfa_bsg_iocfc_intr_s {
253	bfa_status_t	status;
254	u16		bfad_num;
255	u16		rsvd;
256	struct bfa_iocfc_intr_attr_s attr;
257};
258
259struct bfa_bsg_port_attr_s {
260	bfa_status_t	status;
261	u16		bfad_num;
262	u16		rsvd;
263	struct bfa_port_attr_s	attr;
264};
265
266struct bfa_bsg_port_cfg_s {
267	bfa_status_t	status;
268	u16		bfad_num;
269	u16		rsvd;
270	u32		param;
271	u32		rsvd1;
272};
273
274struct bfa_bsg_port_cfg_maxfrsize_s {
275	bfa_status_t	status;
276	u16		bfad_num;
277	u16		maxfrsize;
278};
279
280struct bfa_bsg_port_stats_s {
281	bfa_status_t	status;
282	u16		bfad_num;
283	u16		rsvd;
284	u32		buf_size;
285	u32		rsvd1;
286	u64		buf_ptr;
287};
288
289struct bfa_bsg_lport_attr_s {
290	bfa_status_t	status;
291	u16		bfad_num;
292	u16		vf_id;
293	wwn_t		pwwn;
294	struct bfa_lport_attr_s port_attr;
295};
296
297struct bfa_bsg_lport_stats_s {
298	bfa_status_t	status;
299	u16		bfad_num;
300	u16		vf_id;
301	wwn_t		pwwn;
302	struct bfa_lport_stats_s port_stats;
303};
304
305struct bfa_bsg_lport_iostats_s {
306	bfa_status_t	status;
307	u16		bfad_num;
308	u16		vf_id;
309	wwn_t		pwwn;
310	struct bfa_itnim_iostats_s iostats;
311};
312
313struct bfa_bsg_lport_get_rports_s {
314	bfa_status_t	status;
315	u16		bfad_num;
316	u16		vf_id;
317	wwn_t		pwwn;
318	u64		rbuf_ptr;
319	u32		nrports;
320	u32		rsvd;
321};
322
323struct bfa_bsg_rport_attr_s {
324	bfa_status_t	status;
325	u16		bfad_num;
326	u16		vf_id;
327	wwn_t		pwwn;
328	wwn_t		rpwwn;
329	u32		pid;
330	u32		rsvd;
331	struct bfa_rport_attr_s attr;
332};
333
334struct bfa_bsg_rport_stats_s {
335	bfa_status_t	status;
336	u16		bfad_num;
337	u16		vf_id;
338	wwn_t		pwwn;
339	wwn_t		rpwwn;
340	struct bfa_rport_stats_s stats;
341};
342
343struct bfa_bsg_rport_scsi_addr_s {
344	bfa_status_t	status;
345	u16		bfad_num;
346	u16		vf_id;
347	wwn_t		pwwn;
348	wwn_t		rpwwn;
349	u32		host;
350	u32		bus;
351	u32		target;
352	u32		lun;
353};
354
355struct bfa_bsg_rport_reset_stats_s {
356	bfa_status_t	status;
357	u16		bfad_num;
358	u16		vf_id;
359	wwn_t		pwwn;
360	wwn_t		rpwwn;
361};
362
363struct bfa_bsg_rport_set_speed_s {
364	bfa_status_t		status;
365	u16			bfad_num;
366	u16			vf_id;
367	enum bfa_port_speed	speed;
368	u32			rsvd;
369	wwn_t			pwwn;
370	wwn_t			rpwwn;
371};
372
373struct bfa_bsg_vport_attr_s {
374	bfa_status_t	status;
375	u16		bfad_num;
376	u16		vf_id;
377	wwn_t		vpwwn;
378	struct bfa_vport_attr_s vport_attr;
379};
380
381struct bfa_bsg_vport_stats_s {
382	bfa_status_t	status;
383	u16		bfad_num;
384	u16		vf_id;
385	wwn_t		vpwwn;
386	struct bfa_vport_stats_s vport_stats;
387};
388
389struct bfa_bsg_reset_stats_s {
390	bfa_status_t	status;
391	u16		bfad_num;
392	u16		vf_id;
393	wwn_t		vpwwn;
394};
395
396struct bfa_bsg_fabric_get_lports_s {
397	bfa_status_t	status;
398	u16		bfad_num;
399	u16		vf_id;
400	u64		buf_ptr;
401	u32		nports;
402	u32		rsvd;
403};
404
405struct bfa_bsg_trl_speed_s {
406	bfa_status_t	status;
407	u16		bfad_num;
408	u16		rsvd;
409	enum bfa_port_speed speed;
410};
411
412struct bfa_bsg_fcpim_s {
413	bfa_status_t	status;
414	u16		bfad_num;
415	u16		param;
416};
417
418struct bfa_bsg_fcpim_modstats_s {
419	bfa_status_t	status;
420	u16		bfad_num;
421	struct bfa_itnim_iostats_s modstats;
422};
423
424struct bfa_bsg_fcpim_del_itn_stats_s {
425	bfa_status_t	status;
426	u16		bfad_num;
427	struct bfa_fcpim_del_itn_stats_s modstats;
428};
429
430struct bfa_bsg_fcpim_modstatsclr_s {
431	bfa_status_t	status;
432	u16		bfad_num;
433};
434
435struct bfa_bsg_itnim_attr_s {
436	bfa_status_t	status;
437	u16		bfad_num;
438	u16		vf_id;
439	wwn_t		lpwwn;
440	wwn_t		rpwwn;
441	struct bfa_itnim_attr_s	attr;
442};
443
444struct bfa_bsg_itnim_iostats_s {
445	bfa_status_t	status;
446	u16		bfad_num;
447	u16		vf_id;
448	wwn_t		lpwwn;
449	wwn_t		rpwwn;
450	struct bfa_itnim_iostats_s iostats;
451};
452
453struct bfa_bsg_itnim_itnstats_s {
454	bfa_status_t	status;
455	u16		bfad_num;
456	u16		vf_id;
457	wwn_t		lpwwn;
458	wwn_t		rpwwn;
459	struct bfa_itnim_stats_s itnstats;
460};
461
462struct bfa_bsg_pcifn_cfg_s {
463	bfa_status_t		status;
464	u16			bfad_num;
465	u16			rsvd;
466	struct bfa_ablk_cfg_s	pcifn_cfg;
467};
468
469struct bfa_bsg_pcifn_s {
470	bfa_status_t		status;
471	u16			bfad_num;
472	u16			pcifn_id;
473	u16			bw_min;
474	u16			bw_max;
475	u8			port;
476	enum bfi_pcifn_class	pcifn_class;
477	u8			rsvd[1];
478};
479
480struct bfa_bsg_adapter_cfg_mode_s {
481	bfa_status_t	status;
482	u16		bfad_num;
483	u16		rsvd;
484	struct bfa_adapter_cfg_mode_s	cfg;
485};
486
487struct bfa_bsg_port_cfg_mode_s {
488	bfa_status_t	status;
489	u16		bfad_num;
490	u16		instance;
491	struct bfa_port_cfg_mode_s cfg;
492};
493
494struct bfa_bsg_bbcr_enable_s {
495	bfa_status_t    status;
496	u16		bfad_num;
497	u8		bb_scn;
498	u8		rsvd;
499};
500
501struct bfa_bsg_bbcr_attr_s {
502	bfa_status_t    status;
503	u16		bfad_num;
504	u16		rsvd;
505	struct bfa_bbcr_attr_s attr;
506};
507
508struct bfa_bsg_faa_attr_s {
509	bfa_status_t		status;
510	u16			bfad_num;
511	u16			rsvd;
512	struct bfa_faa_attr_s	faa_attr;
513};
514
515struct bfa_bsg_cee_attr_s {
516	bfa_status_t	status;
517	u16		bfad_num;
518	u16		rsvd;
519	u32		buf_size;
520	u32		rsvd1;
521	u64		buf_ptr;
522};
523
524struct bfa_bsg_cee_stats_s {
525	bfa_status_t	status;
526	u16		bfad_num;
527	u16		rsvd;
528	u32		buf_size;
529	u32		rsvd1;
530	u64		buf_ptr;
531};
532
533struct bfa_bsg_sfp_media_s {
534	bfa_status_t	status;
535	u16		bfad_num;
536	u16		rsvd;
537	enum bfa_defs_sfp_media_e media;
538};
539
540struct bfa_bsg_sfp_speed_s {
541	bfa_status_t	status;
542	u16		bfad_num;
543	u16		rsvd;
544	enum bfa_port_speed speed;
545};
546
547struct bfa_bsg_flash_attr_s {
548	bfa_status_t	status;
549	u16		bfad_num;
550	u16		rsvd;
551	struct bfa_flash_attr_s attr;
552};
553
554struct bfa_bsg_flash_s {
555	bfa_status_t	status;
556	u16		bfad_num;
557	u8		instance;
558	u8		rsvd;
559	enum  bfa_flash_part_type type;
560	int		bufsz;
561	u64		buf_ptr;
562};
563
564struct bfa_bsg_diag_get_temp_s {
565	bfa_status_t	status;
566	u16		bfad_num;
567	u16		rsvd;
568	struct bfa_diag_results_tempsensor_s result;
569};
570
571struct bfa_bsg_diag_memtest_s {
572	bfa_status_t	status;
573	u16		bfad_num;
574	u16		rsvd[3];
575	u32		pat;
576	struct bfa_diag_memtest_result result;
577	struct bfa_diag_memtest_s memtest;
578};
579
580struct bfa_bsg_diag_loopback_s {
581	bfa_status_t	status;
582	u16		bfad_num;
583	u16		rsvd;
584	enum bfa_port_opmode opmode;
585	enum bfa_port_speed speed;
586	u32		lpcnt;
587	u32		pat;
588	struct bfa_diag_loopback_result_s result;
589};
590
591struct bfa_bsg_diag_dport_show_s {
592	bfa_status_t	status;
593	u16		bfad_num;
594	u16		rsvd;
595	struct bfa_diag_dport_result_s result;
596};
597
598struct bfa_bsg_dport_enable_s {
599	bfa_status_t	status;
600	u16		bfad_num;
601	u16		rsvd;
602	u16		lpcnt;
603	u16		pat;
604};
605
606struct bfa_bsg_diag_fwping_s {
607	bfa_status_t	status;
608	u16		bfad_num;
609	u16		rsvd;
610	u32		cnt;
611	u32		pattern;
612	struct bfa_diag_results_fwping result;
613};
614
615struct bfa_bsg_diag_qtest_s {
616	bfa_status_t	status;
617	u16	bfad_num;
618	u16	rsvd;
619	u32	force;
620	u32	queue;
621	struct bfa_diag_qtest_result_s result;
622};
623
624struct bfa_bsg_sfp_show_s {
625	bfa_status_t	status;
626	u16		bfad_num;
627	u16		rsvd;
628	struct sfp_mem_s sfp;
629};
630
631struct bfa_bsg_diag_led_s {
632	bfa_status_t	status;
633	u16		bfad_num;
634	u16		rsvd;
635	struct bfa_diag_ledtest_s ledtest;
636};
637
638struct bfa_bsg_diag_beacon_s {
639	bfa_status_t	status;
640	u16		bfad_num;
641	u16		rsvd;
642	bfa_boolean_t   beacon;
643	bfa_boolean_t   link_e2e_beacon;
644	u32		second;
645};
646
647struct bfa_bsg_diag_lb_stat_s {
648	bfa_status_t	status;
649	u16		bfad_num;
650	u16		rsvd;
651};
652
653struct bfa_bsg_phy_attr_s {
654	bfa_status_t	status;
655	u16	bfad_num;
656	u16	instance;
657	struct bfa_phy_attr_s	attr;
658};
659
660struct bfa_bsg_phy_s {
661	bfa_status_t	status;
662	u16	bfad_num;
663	u16	instance;
664	u64	bufsz;
665	u64	buf_ptr;
666};
667
668struct bfa_bsg_debug_s {
669	bfa_status_t	status;
670	u16		bfad_num;
671	u16		rsvd;
672	u32		bufsz;
673	int		inst_no;
674	u64		buf_ptr;
675	u64		offset;
676};
677
678struct bfa_bsg_phy_stats_s {
679	bfa_status_t	status;
680	u16	bfad_num;
681	u16	instance;
682	struct bfa_phy_stats_s	stats;
683};
684
685struct bfa_bsg_vhba_attr_s {
686	bfa_status_t	status;
687	u16		bfad_num;
688	u16		pcifn_id;
689	struct bfa_vhba_attr_s	attr;
690};
691
692struct bfa_bsg_boot_s {
693	bfa_status_t	status;
694	u16		bfad_num;
695	u16		rsvd;
696	struct bfa_boot_cfg_s	cfg;
697};
698
699struct bfa_bsg_preboot_s {
700	bfa_status_t	status;
701	u16		bfad_num;
702	u16		rsvd;
703	struct bfa_boot_pbc_s	cfg;
704};
705
706struct bfa_bsg_ethboot_s {
707	bfa_status_t	status;
708	u16		bfad_num;
709	u16		rsvd;
710	struct  bfa_ethboot_cfg_s  cfg;
711};
712
713struct bfa_bsg_trunk_attr_s {
714	bfa_status_t	status;
715	u16		bfad_num;
716	u16		rsvd;
717	struct bfa_trunk_attr_s attr;
718};
719
720struct bfa_bsg_qos_attr_s {
721	bfa_status_t	status;
722	u16		bfad_num;
723	u16		rsvd;
724	struct bfa_qos_attr_s	attr;
725};
726
727struct bfa_bsg_qos_vc_attr_s {
728	bfa_status_t	status;
729	u16		bfad_num;
730	u16		rsvd;
731	struct bfa_qos_vc_attr_s attr;
732};
733
734struct bfa_bsg_qos_bw_s {
735	bfa_status_t	status;
736	u16		bfad_num;
737	u16		rsvd;
738	struct bfa_qos_bw_s qos_bw;
739};
740
741struct bfa_bsg_vf_stats_s {
742	bfa_status_t	status;
743	u16		bfad_num;
744	u16		vf_id;
745	struct bfa_vf_stats_s	stats;
746};
747
748struct bfa_bsg_vf_reset_stats_s {
749	bfa_status_t	status;
750	u16		bfad_num;
751	u16		vf_id;
752};
753
754struct bfa_bsg_fcpim_lunmask_query_s {
755	bfa_status_t	status;
756	u16		bfad_num;
757	struct bfa_lunmask_cfg_s lun_mask;
758};
759
760struct bfa_bsg_fcpim_lunmask_s {
761	bfa_status_t	status;
762	u16		bfad_num;
763	u16		vf_id;
764	wwn_t		pwwn;
765	wwn_t		rpwwn;
766	struct scsi_lun	lun;
767};
768
769struct bfa_bsg_fcpim_throttle_s {
770	bfa_status_t	status;
771	u16		bfad_num;
772	u16		vf_id;
773	struct bfa_defs_fcpim_throttle_s throttle;
774};
775
776#define BFA_TFRU_DATA_SIZE		64
777#define BFA_MAX_FRUVPD_TRANSFER_SIZE	0x1000
778
779struct bfa_bsg_tfru_s {
780	bfa_status_t	status;
781	u16		bfad_num;
782	u16		rsvd;
783	u32		offset;
784	u32		len;
785	u8		data[BFA_TFRU_DATA_SIZE];
786};
787
788struct bfa_bsg_fruvpd_s {
789	bfa_status_t	status;
790	u16		bfad_num;
791	u16		rsvd1;
792	u32		offset;
793	u32		len;
794	u8		data[BFA_MAX_FRUVPD_TRANSFER_SIZE];
795	u8		trfr_cmpl;
796	u8		rsvd2[3];
797};
798
799struct bfa_bsg_fruvpd_max_size_s {
800	bfa_status_t	status;
801	u16		bfad_num;
802	u16		rsvd;
803	u32		max_size;
804};
805
806struct bfa_bsg_fcpt_s {
807	bfa_status_t    status;
808	u16		vf_id;
809	wwn_t		lpwwn;
810	wwn_t		dpwwn;
811	u32		tsecs;
812	int		cts;
813	enum fc_cos	cos;
814	struct fchs_s	fchs;
815};
816#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
817
818#pragma pack(1)
819struct bfa_bsg_data {
820	int payload_len;
821	u64 payload;
822};
823#pragma pack()
824
825#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz)	\
826	(((__payload_len) != ((__hdrsz) + (__bufsz))) ?		\
827	 BFA_STATUS_FAILED : BFA_STATUS_OK)
828
829#endif /* BFAD_BSG_H */