brintos

brintos / linux-shallow public Read only

0
0
Text · 174.7 KiB · 26e1313 Raw
5080 lines · c
1/*******************************************************************2 * This file is part of the Emulex Linux Device Driver for         *3 * Fibre Channel Host Bus Adapters.                                *4 * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *5 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.  *6 * Copyright (C) 2009-2016 Emulex.  All rights reserved.           *7 * EMULEX and SLI are trademarks of Emulex.                        *8 * www.broadcom.com                                                *9 *                                                                 *10 * This program is free software; you can redistribute it and/or   *11 * modify it under the terms of version 2 of the GNU General       *12 * Public License as published by the Free Software Foundation.    *13 * This program is distributed in the hope that it will be useful. *14 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *15 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *16 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *17 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *18 * TO BE LEGALLY INVALID.  See the GNU General Public License for  *19 * more details, a copy of which can be found in the file COPYING  *20 * included with this package.                                     *21 *******************************************************************/22 23#include <uapi/scsi/fc/fc_fs.h>24#include <uapi/scsi/fc/fc_els.h>25 26/* Macros to deal with bit fields. Each bit field must have 3 #defines27 * associated with it (_SHIFT, _MASK, and _WORD).28 * EG. For a bit field that is in the 7th bit of the "field4" field of a29 * structure and is 2 bits in size the following #defines must exist:30 *	struct temp {31 *		uint32_t	field1;32 *		uint32_t	field2;33 *		uint32_t	field3;34 *		uint32_t	field4;35 *	#define example_bit_field_SHIFT		736 *	#define example_bit_field_MASK		0x0337 *	#define example_bit_field_WORD		field438 *		uint32_t	field5;39 *	};40 * Then the macros below may be used to get or set the value of that field.41 * EG. To get the value of the bit field from the above example:42 *	struct temp t1;43 *	value = bf_get(example_bit_field, &t1);44 * And then to set that bit field:45 *	bf_set(example_bit_field, &t1, 2);46 * Or clear that bit field:47 *	bf_set(example_bit_field, &t1, 0);48 */49#define bf_get_be32(name, ptr) \50	((be32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK)51#define bf_get_le32(name, ptr) \52	((le32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK)53#define bf_get(name, ptr) \54	(((ptr)->name##_WORD >> name##_SHIFT) & name##_MASK)55#define bf_set_le32(name, ptr, value) \56	((ptr)->name##_WORD = cpu_to_le32(((((value) & \57	name##_MASK) << name##_SHIFT) | (le32_to_cpu((ptr)->name##_WORD) & \58	~(name##_MASK << name##_SHIFT)))))59#define bf_set(name, ptr, value) \60	((ptr)->name##_WORD = ((((value) & name##_MASK) << name##_SHIFT) | \61		 ((ptr)->name##_WORD & ~(name##_MASK << name##_SHIFT))))62 63#define get_wqe_reqtag(x)	(((x)->wqe.words[9] >>  0) & 0xFFFF)64#define get_wqe_tmo(x)		(((x)->wqe.words[7] >> 24) & 0x00FF)65 66#define get_job_ulpword(x, y)	((x)->iocb.un.ulpWord[y])67 68#define set_job_ulpstatus(x, y)	bf_set(lpfc_wcqe_c_status, &(x)->wcqe_cmpl, y)69#define set_job_ulpword4(x, y)	((&(x)->wcqe_cmpl)->parameter = y)70 71struct dma_address {72	uint32_t addr_lo;73	uint32_t addr_hi;74};75 76struct lpfc_sli_intf {77	uint32_t word0;78#define lpfc_sli_intf_valid_SHIFT		2979#define lpfc_sli_intf_valid_MASK		0x0000000780#define lpfc_sli_intf_valid_WORD		word081#define LPFC_SLI_INTF_VALID		682#define lpfc_sli_intf_sli_hint2_SHIFT		2483#define lpfc_sli_intf_sli_hint2_MASK		0x0000001F84#define lpfc_sli_intf_sli_hint2_WORD		word085#define LPFC_SLI_INTF_SLI_HINT2_NONE	086#define lpfc_sli_intf_sli_hint1_SHIFT		1687#define lpfc_sli_intf_sli_hint1_MASK		0x000000FF88#define lpfc_sli_intf_sli_hint1_WORD		word089#define LPFC_SLI_INTF_SLI_HINT1_NONE	090#define LPFC_SLI_INTF_SLI_HINT1_1	191#define LPFC_SLI_INTF_SLI_HINT1_2	292#define lpfc_sli_intf_if_type_SHIFT		1293#define lpfc_sli_intf_if_type_MASK		0x0000000F94#define lpfc_sli_intf_if_type_WORD		word095#define LPFC_SLI_INTF_IF_TYPE_0		096#define LPFC_SLI_INTF_IF_TYPE_1		197#define LPFC_SLI_INTF_IF_TYPE_2		298#define LPFC_SLI_INTF_IF_TYPE_6		699#define lpfc_sli_intf_sli_family_SHIFT		8100#define lpfc_sli_intf_sli_family_MASK		0x0000000F101#define lpfc_sli_intf_sli_family_WORD		word0102#define LPFC_SLI_INTF_FAMILY_BE2	0x0103#define LPFC_SLI_INTF_FAMILY_BE3	0x1104#define LPFC_SLI_INTF_FAMILY_LNCR_A0	0xa105#define LPFC_SLI_INTF_FAMILY_LNCR_B0	0xb106#define LPFC_SLI_INTF_FAMILY_G6		0xc107#define LPFC_SLI_INTF_FAMILY_G7		0xd108#define LPFC_SLI_INTF_FAMILY_G7P	0xe109#define lpfc_sli_intf_slirev_SHIFT		4110#define lpfc_sli_intf_slirev_MASK		0x0000000F111#define lpfc_sli_intf_slirev_WORD		word0112#define LPFC_SLI_INTF_REV_SLI3		3113#define LPFC_SLI_INTF_REV_SLI4		4114#define lpfc_sli_intf_func_type_SHIFT		0115#define lpfc_sli_intf_func_type_MASK		0x00000001116#define lpfc_sli_intf_func_type_WORD		word0117#define LPFC_SLI_INTF_IF_TYPE_PHYS	0118#define LPFC_SLI_INTF_IF_TYPE_VIRT	1119};120 121#define LPFC_SLI4_MBX_EMBED	true122#define LPFC_SLI4_MBX_NEMBED	false123 124#define LPFC_SLI4_MB_WORD_COUNT		64125#define LPFC_MAX_MQ_PAGE		8126#define LPFC_MAX_WQ_PAGE_V0		4127#define LPFC_MAX_WQ_PAGE		8128#define LPFC_MAX_RQ_PAGE		8129#define LPFC_MAX_CQ_PAGE		4130#define LPFC_MAX_EQ_PAGE		8131 132#define LPFC_VIR_FUNC_MAX       32 /* Maximum number of virtual functions */133#define LPFC_PCI_FUNC_MAX        5 /* Maximum number of PCI functions */134#define LPFC_VFR_PAGE_SIZE	0x1000 /* 4KB BAR2 per-VF register page size */135 136/* Define SLI4 Alignment requirements. */137#define LPFC_ALIGN_16_BYTE	16138#define LPFC_ALIGN_64_BYTE	64139#define SLI4_PAGE_SIZE		4096140 141/* Define SLI4 specific definitions. */142#define LPFC_MQ_CQE_BYTE_OFFSET	256143#define LPFC_MBX_CMD_HDR_LENGTH 16144#define LPFC_MBX_ERROR_RANGE	0x4000145#define LPFC_BMBX_BIT1_ADDR_HI	0x2146#define LPFC_BMBX_BIT1_ADDR_LO	0147#define LPFC_RPI_HDR_COUNT	64148#define LPFC_HDR_TEMPLATE_SIZE	4096149#define LPFC_RPI_ALLOC_ERROR 	0xFFFF150#define LPFC_FCF_RECORD_WD_CNT	132151#define LPFC_ENTIRE_FCF_DATABASE 0152#define LPFC_DFLT_FCF_INDEX	 0153 154/* Virtual function numbers */155#define LPFC_VF0		0156#define LPFC_VF1		1157#define LPFC_VF2		2158#define LPFC_VF3		3159#define LPFC_VF4		4160#define LPFC_VF5		5161#define LPFC_VF6		6162#define LPFC_VF7		7163#define LPFC_VF8		8164#define LPFC_VF9		9165#define LPFC_VF10		10166#define LPFC_VF11		11167#define LPFC_VF12		12168#define LPFC_VF13		13169#define LPFC_VF14		14170#define LPFC_VF15		15171#define LPFC_VF16		16172#define LPFC_VF17		17173#define LPFC_VF18		18174#define LPFC_VF19		19175#define LPFC_VF20		20176#define LPFC_VF21		21177#define LPFC_VF22		22178#define LPFC_VF23		23179#define LPFC_VF24		24180#define LPFC_VF25		25181#define LPFC_VF26		26182#define LPFC_VF27		27183#define LPFC_VF28		28184#define LPFC_VF29		29185#define LPFC_VF30		30186#define LPFC_VF31		31187 188/* PCI function numbers */189#define LPFC_PCI_FUNC0		0190#define LPFC_PCI_FUNC1		1191#define LPFC_PCI_FUNC2		2192#define LPFC_PCI_FUNC3		3193#define LPFC_PCI_FUNC4		4194 195/* SLI4 interface type-2 PDEV_CTL register */196#define LPFC_CTL_PDEV_CTL_OFFSET	0x414197#define LPFC_CTL_PDEV_CTL_DRST		0x00000001198#define LPFC_CTL_PDEV_CTL_FRST		0x00000002199#define LPFC_CTL_PDEV_CTL_DD		0x00000004200#define LPFC_CTL_PDEV_CTL_LC		0x00000008201#define LPFC_CTL_PDEV_CTL_FRL_ALL	0x00202#define LPFC_CTL_PDEV_CTL_FRL_FC_FCOE	0x10203#define LPFC_CTL_PDEV_CTL_FRL_NIC	0x20204#define LPFC_CTL_PDEV_CTL_DDL_RAS	0x1000000205 206#define LPFC_FW_DUMP_REQUEST    (LPFC_CTL_PDEV_CTL_DD | LPFC_CTL_PDEV_CTL_FRST)207 208/* Active interrupt test count */209#define LPFC_ACT_INTR_CNT	4210 211/* Algrithmns for scheduling FCP commands to WQs */212#define	LPFC_FCP_SCHED_BY_HDWQ		0213#define	LPFC_FCP_SCHED_BY_CPU		1214 215/* Algrithmns for NameServer Query after RSCN */216#define LPFC_NS_QUERY_GID_FT	0217#define LPFC_NS_QUERY_GID_PT	1218 219/* Delay Multiplier constant */220#define LPFC_DMULT_CONST       651042221#define LPFC_DMULT_MAX         1023222 223/* Configuration of Interrupts / sec for entire HBA port */224#define LPFC_MIN_IMAX          5000225#define LPFC_MAX_IMAX          5000000226#define LPFC_DEF_IMAX          0227 228#define LPFC_MAX_AUTO_EQ_DELAY 120229#define LPFC_EQ_DELAY_STEP     15230#define LPFC_EQD_ISR_TRIGGER   20000231/* 1s intervals */232#define LPFC_EQ_DELAY_MSECS    1000233 234#define LPFC_MIN_CPU_MAP       0235#define LPFC_MAX_CPU_MAP       1236#define LPFC_HBA_CPU_MAP       1237 238/* PORT_CAPABILITIES constants. */239#define LPFC_MAX_SUPPORTED_PAGES	8240 241enum ulp_bde64_word3 {242	ULP_BDE64_SIZE_MASK		= 0xffffff,243 244	ULP_BDE64_TYPE_SHIFT		= 24,245	ULP_BDE64_TYPE_MASK		= (0xff << ULP_BDE64_TYPE_SHIFT),246 247	/* BDE (Host_resident) */248	ULP_BDE64_TYPE_BDE_64		= (0x00 << ULP_BDE64_TYPE_SHIFT),249	/* Immediate Data BDE */250	ULP_BDE64_TYPE_BDE_IMMED	= (0x01 << ULP_BDE64_TYPE_SHIFT),251	/* BDE (Port-resident) */252	ULP_BDE64_TYPE_BDE_64P		= (0x02 << ULP_BDE64_TYPE_SHIFT),253	/* Input BDE (Host-resident) */254	ULP_BDE64_TYPE_BDE_64I		= (0x08 << ULP_BDE64_TYPE_SHIFT),255	/* Input BDE (Port-resident) */256	ULP_BDE64_TYPE_BDE_64IP		= (0x0A << ULP_BDE64_TYPE_SHIFT),257	/* BLP (Host-resident) */258	ULP_BDE64_TYPE_BLP_64		= (0x40 << ULP_BDE64_TYPE_SHIFT),259	/* BLP (Port-resident) */260	ULP_BDE64_TYPE_BLP_64P		= (0x42 << ULP_BDE64_TYPE_SHIFT),261};262 263struct ulp_bde64_le {264	__le32 type_size; /* type 31:24, size 23:0 */265	__le32 addr_low;266	__le32 addr_high;267};268 269struct ulp_bde64 {270	union ULP_BDE_TUS {271		uint32_t w;272		struct {273#ifdef __BIG_ENDIAN_BITFIELD274			uint32_t bdeFlags:8;	/* BDE Flags 0 IS A SUPPORTED275						   VALUE !! */276			uint32_t bdeSize:24;	/* Size of buffer (in bytes) */277#else	/*  __LITTLE_ENDIAN_BITFIELD */278			uint32_t bdeSize:24;	/* Size of buffer (in bytes) */279			uint32_t bdeFlags:8;	/* BDE Flags 0 IS A SUPPORTED280						   VALUE !! */281#endif282#define BUFF_TYPE_BDE_64    0x00	/* BDE (Host_resident) */283#define BUFF_TYPE_BDE_IMMED 0x01	/* Immediate Data BDE */284#define BUFF_TYPE_BDE_64P   0x02	/* BDE (Port-resident) */285#define BUFF_TYPE_BDE_64I   0x08	/* Input BDE (Host-resident) */286#define BUFF_TYPE_BDE_64IP  0x0A	/* Input BDE (Port-resident) */287#define BUFF_TYPE_BLP_64    0x40	/* BLP (Host-resident) */288#define BUFF_TYPE_BLP_64P   0x42	/* BLP (Port-resident) */289		} f;290	} tus;291	uint32_t addrLow;292	uint32_t addrHigh;293};294 295/* Maximun size of immediate data that can fit into a 128 byte WQE */296#define LPFC_MAX_BDE_IMM_SIZE	64297 298struct lpfc_sli4_flags {299	uint32_t word0;300#define lpfc_idx_rsrc_rdy_SHIFT		0301#define lpfc_idx_rsrc_rdy_MASK		0x00000001302#define lpfc_idx_rsrc_rdy_WORD		word0303#define LPFC_IDX_RSRC_RDY		1304#define lpfc_rpi_rsrc_rdy_SHIFT		1305#define lpfc_rpi_rsrc_rdy_MASK		0x00000001306#define lpfc_rpi_rsrc_rdy_WORD		word0307#define LPFC_RPI_RSRC_RDY		1308#define lpfc_vpi_rsrc_rdy_SHIFT		2309#define lpfc_vpi_rsrc_rdy_MASK		0x00000001310#define lpfc_vpi_rsrc_rdy_WORD		word0311#define LPFC_VPI_RSRC_RDY		1312#define lpfc_vfi_rsrc_rdy_SHIFT		3313#define lpfc_vfi_rsrc_rdy_MASK		0x00000001314#define lpfc_vfi_rsrc_rdy_WORD		word0315#define LPFC_VFI_RSRC_RDY		1316#define lpfc_ftr_ashdr_SHIFT            4317#define lpfc_ftr_ashdr_MASK             0x00000001318#define lpfc_ftr_ashdr_WORD             word0319};320 321struct sli4_bls_rsp {322	uint32_t word0_rsvd;      /* Word0 must be reserved */323	uint32_t word1;324#define lpfc_abts_orig_SHIFT      0325#define lpfc_abts_orig_MASK       0x00000001326#define lpfc_abts_orig_WORD       word1327#define LPFC_ABTS_UNSOL_RSP       1328#define LPFC_ABTS_UNSOL_INT       0329	uint32_t word2;330#define lpfc_abts_rxid_SHIFT      0331#define lpfc_abts_rxid_MASK       0x0000FFFF332#define lpfc_abts_rxid_WORD       word2333#define lpfc_abts_oxid_SHIFT      16334#define lpfc_abts_oxid_MASK       0x0000FFFF335#define lpfc_abts_oxid_WORD       word2336	uint32_t word3;337#define lpfc_vndr_code_SHIFT	0338#define lpfc_vndr_code_MASK	0x000000FF339#define lpfc_vndr_code_WORD	word3340#define lpfc_rsn_expln_SHIFT	8341#define lpfc_rsn_expln_MASK	0x000000FF342#define lpfc_rsn_expln_WORD	word3343#define lpfc_rsn_code_SHIFT	16344#define lpfc_rsn_code_MASK	0x000000FF345#define lpfc_rsn_code_WORD	word3346 347	uint32_t word4;348	uint32_t word5_rsvd;	/* Word5 must be reserved */349};350 351/* event queue entry structure */352struct lpfc_eqe {353	uint32_t word0;354#define lpfc_eqe_resource_id_SHIFT	16355#define lpfc_eqe_resource_id_MASK	0x0000FFFF356#define lpfc_eqe_resource_id_WORD	word0357#define lpfc_eqe_minor_code_SHIFT	4358#define lpfc_eqe_minor_code_MASK	0x00000FFF359#define lpfc_eqe_minor_code_WORD	word0360#define lpfc_eqe_major_code_SHIFT	1361#define lpfc_eqe_major_code_MASK	0x00000007362#define lpfc_eqe_major_code_WORD	word0363#define lpfc_eqe_valid_SHIFT		0364#define lpfc_eqe_valid_MASK		0x00000001365#define lpfc_eqe_valid_WORD		word0366};367 368/* completion queue entry structure (common fields for all cqe types) */369struct lpfc_cqe {370	uint32_t reserved0;371	uint32_t reserved1;372	uint32_t reserved2;373	uint32_t word3;374#define lpfc_cqe_valid_SHIFT		31375#define lpfc_cqe_valid_MASK		0x00000001376#define lpfc_cqe_valid_WORD		word3377#define lpfc_cqe_code_SHIFT		16378#define lpfc_cqe_code_MASK		0x000000FF379#define lpfc_cqe_code_WORD		word3380};381 382/* Completion Queue Entry Status Codes */383#define CQE_STATUS_SUCCESS		0x0384#define CQE_STATUS_FCP_RSP_FAILURE	0x1385#define CQE_STATUS_REMOTE_STOP		0x2386#define CQE_STATUS_LOCAL_REJECT		0x3387#define CQE_STATUS_NPORT_RJT		0x4388#define CQE_STATUS_FABRIC_RJT		0x5389#define CQE_STATUS_NPORT_BSY		0x6390#define CQE_STATUS_FABRIC_BSY		0x7391#define CQE_STATUS_INTERMED_RSP		0x8392#define CQE_STATUS_LS_RJT		0x9393#define CQE_STATUS_CMD_REJECT		0xb394#define CQE_STATUS_FCP_TGT_LENCHECK	0xc395#define CQE_STATUS_NEED_BUFF_ENTRY	0xf396#define CQE_STATUS_DI_ERROR		0x16397 398/* Status returned by hardware (valid only if status = CQE_STATUS_SUCCESS). */399#define CQE_HW_STATUS_NO_ERR		0x0400#define CQE_HW_STATUS_UNDERRUN		0x1401#define CQE_HW_STATUS_OVERRUN		0x2402 403/* Completion Queue Entry Codes */404#define CQE_CODE_COMPL_WQE		0x1405#define CQE_CODE_RELEASE_WQE		0x2406#define CQE_CODE_RECEIVE		0x4407#define CQE_CODE_XRI_ABORTED		0x5408#define CQE_CODE_RECEIVE_V1		0x9409#define CQE_CODE_NVME_ERSP		0xd410 411/*412 * Define mask value for xri_aborted and wcqe completed CQE extended status.413 * Currently, extended status is limited to 9 bits (0x0 -> 0x103) .414 */415#define WCQE_PARAM_MASK		0x1FF416 417/* completion queue entry for wqe completions */418struct lpfc_wcqe_complete {419	uint32_t word0;420#define lpfc_wcqe_c_request_tag_SHIFT	16421#define lpfc_wcqe_c_request_tag_MASK	0x0000FFFF422#define lpfc_wcqe_c_request_tag_WORD	word0423#define lpfc_wcqe_c_status_SHIFT	8424#define lpfc_wcqe_c_status_MASK		0x000000FF425#define lpfc_wcqe_c_status_WORD		word0426#define lpfc_wcqe_c_hw_status_SHIFT	0427#define lpfc_wcqe_c_hw_status_MASK	0x000000FF428#define lpfc_wcqe_c_hw_status_WORD	word0429#define lpfc_wcqe_c_ersp0_SHIFT		0430#define lpfc_wcqe_c_ersp0_MASK		0x0000FFFF431#define lpfc_wcqe_c_ersp0_WORD		word0432	uint32_t total_data_placed;433#define lpfc_wcqe_c_cmf_cg_SHIFT	31434#define lpfc_wcqe_c_cmf_cg_MASK		0x00000001435#define lpfc_wcqe_c_cmf_cg_WORD		total_data_placed436#define lpfc_wcqe_c_cmf_bw_SHIFT	0437#define lpfc_wcqe_c_cmf_bw_MASK		0x0FFFFFFF438#define lpfc_wcqe_c_cmf_bw_WORD		total_data_placed439	uint32_t parameter;440#define lpfc_wcqe_c_bg_edir_SHIFT	5441#define lpfc_wcqe_c_bg_edir_MASK	0x00000001442#define lpfc_wcqe_c_bg_edir_WORD	parameter443#define lpfc_wcqe_c_bg_tdpv_SHIFT	3444#define lpfc_wcqe_c_bg_tdpv_MASK	0x00000001445#define lpfc_wcqe_c_bg_tdpv_WORD	parameter446#define lpfc_wcqe_c_bg_re_SHIFT		2447#define lpfc_wcqe_c_bg_re_MASK		0x00000001448#define lpfc_wcqe_c_bg_re_WORD		parameter449#define lpfc_wcqe_c_bg_ae_SHIFT		1450#define lpfc_wcqe_c_bg_ae_MASK		0x00000001451#define lpfc_wcqe_c_bg_ae_WORD		parameter452#define lpfc_wcqe_c_bg_ge_SHIFT		0453#define lpfc_wcqe_c_bg_ge_MASK		0x00000001454#define lpfc_wcqe_c_bg_ge_WORD		parameter455	uint32_t word3;456#define lpfc_wcqe_c_valid_SHIFT		lpfc_cqe_valid_SHIFT457#define lpfc_wcqe_c_valid_MASK		lpfc_cqe_valid_MASK458#define lpfc_wcqe_c_valid_WORD		lpfc_cqe_valid_WORD459#define lpfc_wcqe_c_xb_SHIFT		28460#define lpfc_wcqe_c_xb_MASK		0x00000001461#define lpfc_wcqe_c_xb_WORD		word3462#define lpfc_wcqe_c_pv_SHIFT		27463#define lpfc_wcqe_c_pv_MASK		0x00000001464#define lpfc_wcqe_c_pv_WORD		word3465#define lpfc_wcqe_c_priority_SHIFT	24466#define lpfc_wcqe_c_priority_MASK	0x00000007467#define lpfc_wcqe_c_priority_WORD	word3468#define lpfc_wcqe_c_code_SHIFT		lpfc_cqe_code_SHIFT469#define lpfc_wcqe_c_code_MASK		lpfc_cqe_code_MASK470#define lpfc_wcqe_c_code_WORD		lpfc_cqe_code_WORD471#define lpfc_wcqe_c_sqhead_SHIFT	0472#define lpfc_wcqe_c_sqhead_MASK		0x0000FFFF473#define lpfc_wcqe_c_sqhead_WORD		word3474};475 476/* completion queue entry for wqe release */477struct lpfc_wcqe_release {478	uint32_t reserved0;479	uint32_t reserved1;480	uint32_t word2;481#define lpfc_wcqe_r_wq_id_SHIFT		16482#define lpfc_wcqe_r_wq_id_MASK		0x0000FFFF483#define lpfc_wcqe_r_wq_id_WORD		word2484#define lpfc_wcqe_r_wqe_index_SHIFT	0485#define lpfc_wcqe_r_wqe_index_MASK	0x0000FFFF486#define lpfc_wcqe_r_wqe_index_WORD	word2487	uint32_t word3;488#define lpfc_wcqe_r_valid_SHIFT		lpfc_cqe_valid_SHIFT489#define lpfc_wcqe_r_valid_MASK		lpfc_cqe_valid_MASK490#define lpfc_wcqe_r_valid_WORD		lpfc_cqe_valid_WORD491#define lpfc_wcqe_r_code_SHIFT		lpfc_cqe_code_SHIFT492#define lpfc_wcqe_r_code_MASK		lpfc_cqe_code_MASK493#define lpfc_wcqe_r_code_WORD		lpfc_cqe_code_WORD494};495 496struct sli4_wcqe_xri_aborted {497	uint32_t word0;498#define lpfc_wcqe_xa_status_SHIFT		8499#define lpfc_wcqe_xa_status_MASK		0x000000FF500#define lpfc_wcqe_xa_status_WORD		word0501	uint32_t parameter;502	uint32_t word2;503#define lpfc_wcqe_xa_remote_xid_SHIFT	16504#define lpfc_wcqe_xa_remote_xid_MASK	0x0000FFFF505#define lpfc_wcqe_xa_remote_xid_WORD	word2506#define lpfc_wcqe_xa_xri_SHIFT		0507#define lpfc_wcqe_xa_xri_MASK		0x0000FFFF508#define lpfc_wcqe_xa_xri_WORD		word2509	uint32_t word3;510#define lpfc_wcqe_xa_valid_SHIFT	lpfc_cqe_valid_SHIFT511#define lpfc_wcqe_xa_valid_MASK		lpfc_cqe_valid_MASK512#define lpfc_wcqe_xa_valid_WORD		lpfc_cqe_valid_WORD513#define lpfc_wcqe_xa_ia_SHIFT		30514#define lpfc_wcqe_xa_ia_MASK		0x00000001515#define lpfc_wcqe_xa_ia_WORD		word3516#define CQE_XRI_ABORTED_IA_REMOTE	0517#define CQE_XRI_ABORTED_IA_LOCAL	1518#define lpfc_wcqe_xa_br_SHIFT		29519#define lpfc_wcqe_xa_br_MASK		0x00000001520#define lpfc_wcqe_xa_br_WORD		word3521#define CQE_XRI_ABORTED_BR_BA_ACC	0522#define CQE_XRI_ABORTED_BR_BA_RJT	1523#define lpfc_wcqe_xa_eo_SHIFT		28524#define lpfc_wcqe_xa_eo_MASK		0x00000001525#define lpfc_wcqe_xa_eo_WORD		word3526#define CQE_XRI_ABORTED_EO_REMOTE	0527#define CQE_XRI_ABORTED_EO_LOCAL	1528#define lpfc_wcqe_xa_code_SHIFT		lpfc_cqe_code_SHIFT529#define lpfc_wcqe_xa_code_MASK		lpfc_cqe_code_MASK530#define lpfc_wcqe_xa_code_WORD		lpfc_cqe_code_WORD531};532 533/* completion queue entry structure for rqe completion */534struct lpfc_rcqe {535	uint32_t word0;536#define lpfc_rcqe_iv_SHIFT		31537#define lpfc_rcqe_iv_MASK		0x00000001538#define lpfc_rcqe_iv_WORD		word0539#define lpfc_rcqe_status_SHIFT		8540#define lpfc_rcqe_status_MASK		0x000000FF541#define lpfc_rcqe_status_WORD		word0542#define FC_STATUS_RQ_SUCCESS		0x10 /* Async receive successful */543#define FC_STATUS_RQ_BUF_LEN_EXCEEDED 	0x11 /* payload truncated */544#define FC_STATUS_INSUFF_BUF_NEED_BUF 	0x12 /* Insufficient buffers */545#define FC_STATUS_INSUFF_BUF_FRM_DISC 	0x13 /* Frame Discard */546#define FC_STATUS_RQ_DMA_FAILURE	0x14 /* DMA failure */547	uint32_t word1;548#define lpfc_rcqe_fcf_id_v1_SHIFT	0549#define lpfc_rcqe_fcf_id_v1_MASK	0x0000003F550#define lpfc_rcqe_fcf_id_v1_WORD	word1551	uint32_t word2;552#define lpfc_rcqe_length_SHIFT		16553#define lpfc_rcqe_length_MASK		0x0000FFFF554#define lpfc_rcqe_length_WORD		word2555#define lpfc_rcqe_rq_id_SHIFT		6556#define lpfc_rcqe_rq_id_MASK		0x000003FF557#define lpfc_rcqe_rq_id_WORD		word2558#define lpfc_rcqe_fcf_id_SHIFT		0559#define lpfc_rcqe_fcf_id_MASK		0x0000003F560#define lpfc_rcqe_fcf_id_WORD		word2561#define lpfc_rcqe_rq_id_v1_SHIFT	0562#define lpfc_rcqe_rq_id_v1_MASK		0x0000FFFF563#define lpfc_rcqe_rq_id_v1_WORD		word2564	uint32_t word3;565#define lpfc_rcqe_valid_SHIFT		lpfc_cqe_valid_SHIFT566#define lpfc_rcqe_valid_MASK		lpfc_cqe_valid_MASK567#define lpfc_rcqe_valid_WORD		lpfc_cqe_valid_WORD568#define lpfc_rcqe_port_SHIFT		30569#define lpfc_rcqe_port_MASK		0x00000001570#define lpfc_rcqe_port_WORD		word3571#define lpfc_rcqe_hdr_length_SHIFT	24572#define lpfc_rcqe_hdr_length_MASK	0x0000001F573#define lpfc_rcqe_hdr_length_WORD	word3574#define lpfc_rcqe_code_SHIFT		lpfc_cqe_code_SHIFT575#define lpfc_rcqe_code_MASK		lpfc_cqe_code_MASK576#define lpfc_rcqe_code_WORD		lpfc_cqe_code_WORD577#define lpfc_rcqe_eof_SHIFT		8578#define lpfc_rcqe_eof_MASK		0x000000FF579#define lpfc_rcqe_eof_WORD		word3580#define FCOE_EOFn	0x41581#define FCOE_EOFt	0x42582#define FCOE_EOFni	0x49583#define FCOE_EOFa	0x50584#define lpfc_rcqe_sof_SHIFT		0585#define lpfc_rcqe_sof_MASK		0x000000FF586#define lpfc_rcqe_sof_WORD		word3587#define FCOE_SOFi2	0x2d588#define FCOE_SOFi3	0x2e589#define FCOE_SOFn2	0x35590#define FCOE_SOFn3	0x36591};592 593struct lpfc_rqe {594	uint32_t address_hi;595	uint32_t address_lo;596};597 598/* buffer descriptors */599struct lpfc_bde4 {600	uint32_t addr_hi;601	uint32_t addr_lo;602	uint32_t word2;603#define lpfc_bde4_last_SHIFT		31604#define lpfc_bde4_last_MASK		0x00000001605#define lpfc_bde4_last_WORD		word2606#define lpfc_bde4_sge_offset_SHIFT	0607#define lpfc_bde4_sge_offset_MASK	0x000003FF608#define lpfc_bde4_sge_offset_WORD	word2609	uint32_t word3;610#define lpfc_bde4_length_SHIFT		0611#define lpfc_bde4_length_MASK		0x000000FF612#define lpfc_bde4_length_WORD		word3613};614 615struct lpfc_register {616	uint32_t word0;617};618 619#define LPFC_PORT_SEM_UE_RECOVERABLE    0xE000620#define LPFC_PORT_SEM_MASK		0xF000621/* The following BAR0 Registers apply to SLI4 if_type 0 UCNAs. */622#define LPFC_UERR_STATUS_HI		0x00A4623#define LPFC_UERR_STATUS_LO		0x00A0624#define LPFC_UE_MASK_HI			0x00AC625#define LPFC_UE_MASK_LO			0x00A8626 627/* The following BAR0 register sets are defined for if_type 0 and 2 UCNAs. */628#define LPFC_SLI_INTF			0x0058629#define LPFC_SLI_ASIC_VER		0x009C630 631#define LPFC_CTL_PORT_SEM_OFFSET	0x400632#define lpfc_port_smphr_perr_SHIFT	31633#define lpfc_port_smphr_perr_MASK	0x1634#define lpfc_port_smphr_perr_WORD	word0635#define lpfc_port_smphr_sfi_SHIFT	30636#define lpfc_port_smphr_sfi_MASK	0x1637#define lpfc_port_smphr_sfi_WORD	word0638#define lpfc_port_smphr_nip_SHIFT	29639#define lpfc_port_smphr_nip_MASK	0x1640#define lpfc_port_smphr_nip_WORD	word0641#define lpfc_port_smphr_ipc_SHIFT	28642#define lpfc_port_smphr_ipc_MASK	0x1643#define lpfc_port_smphr_ipc_WORD	word0644#define lpfc_port_smphr_scr1_SHIFT	27645#define lpfc_port_smphr_scr1_MASK	0x1646#define lpfc_port_smphr_scr1_WORD	word0647#define lpfc_port_smphr_scr2_SHIFT	26648#define lpfc_port_smphr_scr2_MASK	0x1649#define lpfc_port_smphr_scr2_WORD	word0650#define lpfc_port_smphr_host_scratch_SHIFT	16651#define lpfc_port_smphr_host_scratch_MASK	0xFF652#define lpfc_port_smphr_host_scratch_WORD	word0653#define lpfc_port_smphr_port_status_SHIFT	0654#define lpfc_port_smphr_port_status_MASK	0xFFFF655#define lpfc_port_smphr_port_status_WORD	word0656 657#define LPFC_POST_STAGE_POWER_ON_RESET			0x0000658#define LPFC_POST_STAGE_AWAITING_HOST_RDY		0x0001659#define LPFC_POST_STAGE_HOST_RDY			0x0002660#define LPFC_POST_STAGE_BE_RESET			0x0003661#define LPFC_POST_STAGE_SEEPROM_CS_START		0x0100662#define LPFC_POST_STAGE_SEEPROM_CS_DONE			0x0101663#define LPFC_POST_STAGE_DDR_CONFIG_START		0x0200664#define LPFC_POST_STAGE_DDR_CONFIG_DONE			0x0201665#define LPFC_POST_STAGE_DDR_CALIBRATE_START		0x0300666#define LPFC_POST_STAGE_DDR_CALIBRATE_DONE		0x0301667#define LPFC_POST_STAGE_DDR_TEST_START			0x0400668#define LPFC_POST_STAGE_DDR_TEST_DONE			0x0401669#define LPFC_POST_STAGE_REDBOOT_INIT_START		0x0600670#define LPFC_POST_STAGE_REDBOOT_INIT_DONE		0x0601671#define LPFC_POST_STAGE_FW_IMAGE_LOAD_START		0x0700672#define LPFC_POST_STAGE_FW_IMAGE_LOAD_DONE		0x0701673#define LPFC_POST_STAGE_ARMFW_START			0x0800674#define LPFC_POST_STAGE_DHCP_QUERY_START		0x0900675#define LPFC_POST_STAGE_DHCP_QUERY_DONE			0x0901676#define LPFC_POST_STAGE_BOOT_TARGET_DISCOVERY_START	0x0A00677#define LPFC_POST_STAGE_BOOT_TARGET_DISCOVERY_DONE	0x0A01678#define LPFC_POST_STAGE_RC_OPTION_SET			0x0B00679#define LPFC_POST_STAGE_SWITCH_LINK			0x0B01680#define LPFC_POST_STAGE_SEND_ICDS_MESSAGE		0x0B02681#define LPFC_POST_STAGE_PERFROM_TFTP			0x0B03682#define LPFC_POST_STAGE_PARSE_XML			0x0B04683#define LPFC_POST_STAGE_DOWNLOAD_IMAGE			0x0B05684#define LPFC_POST_STAGE_FLASH_IMAGE			0x0B06685#define LPFC_POST_STAGE_RC_DONE				0x0B07686#define LPFC_POST_STAGE_REBOOT_SYSTEM			0x0B08687#define LPFC_POST_STAGE_MAC_ADDRESS			0x0C00688#define LPFC_POST_STAGE_PORT_READY			0xC000689#define LPFC_POST_STAGE_PORT_UE 			0xF000690 691#define LPFC_CTL_PORT_STA_OFFSET	0x404692#define lpfc_sliport_status_err_SHIFT	31693#define lpfc_sliport_status_err_MASK	0x1694#define lpfc_sliport_status_err_WORD	word0695#define lpfc_sliport_status_end_SHIFT	30696#define lpfc_sliport_status_end_MASK	0x1697#define lpfc_sliport_status_end_WORD	word0698#define lpfc_sliport_status_oti_SHIFT	29699#define lpfc_sliport_status_oti_MASK	0x1700#define lpfc_sliport_status_oti_WORD	word0701#define lpfc_sliport_status_dip_SHIFT	25702#define lpfc_sliport_status_dip_MASK	0x1703#define lpfc_sliport_status_dip_WORD	word0704#define lpfc_sliport_status_rn_SHIFT	24705#define lpfc_sliport_status_rn_MASK	0x1706#define lpfc_sliport_status_rn_WORD	word0707#define lpfc_sliport_status_rdy_SHIFT	23708#define lpfc_sliport_status_rdy_MASK	0x1709#define lpfc_sliport_status_rdy_WORD	word0710#define lpfc_sliport_status_pldv_SHIFT	0711#define lpfc_sliport_status_pldv_MASK	0x1712#define lpfc_sliport_status_pldv_WORD	word0713#define CFG_PLD				0x3C714#define MAX_IF_TYPE_2_RESETS		6715 716#define LPFC_CTL_PORT_CTL_OFFSET	0x408717#define lpfc_sliport_ctrl_end_SHIFT	30718#define lpfc_sliport_ctrl_end_MASK	0x1719#define lpfc_sliport_ctrl_end_WORD	word0720#define LPFC_SLIPORT_LITTLE_ENDIAN 0721#define LPFC_SLIPORT_BIG_ENDIAN	   1722#define lpfc_sliport_ctrl_ip_SHIFT	27723#define lpfc_sliport_ctrl_ip_MASK	0x1724#define lpfc_sliport_ctrl_ip_WORD	word0725#define LPFC_SLIPORT_INIT_PORT	1726 727#define LPFC_CTL_PORT_ER1_OFFSET	0x40C728#define LPFC_CTL_PORT_ER2_OFFSET	0x410729 730#define LPFC_CTL_PORT_EQ_DELAY_OFFSET	0x418731#define lpfc_sliport_eqdelay_delay_SHIFT 16732#define lpfc_sliport_eqdelay_delay_MASK	0xffff733#define lpfc_sliport_eqdelay_delay_WORD	word0734#define lpfc_sliport_eqdelay_id_SHIFT	0735#define lpfc_sliport_eqdelay_id_MASK	0xfff736#define lpfc_sliport_eqdelay_id_WORD	word0737#define LPFC_SEC_TO_USEC		1000000738#define LPFC_SEC_TO_MSEC		1000739#define LPFC_MSECS_TO_SECS(msecs) ((msecs) / 1000)740 741/* The following Registers apply to SLI4 if_type 0 UCNAs. They typically742 * reside in BAR 2.743 */744#define LPFC_SLIPORT_IF0_SMPHR	0x00AC745 746#define LPFC_IMR_MASK_ALL	0xFFFFFFFF747#define LPFC_ISCR_CLEAR_ALL	0xFFFFFFFF748 749#define LPFC_HST_ISR0		0x0C18750#define LPFC_HST_ISR1		0x0C1C751#define LPFC_HST_ISR2		0x0C20752#define LPFC_HST_ISR3		0x0C24753#define LPFC_HST_ISR4		0x0C28754 755#define LPFC_HST_IMR0		0x0C48756#define LPFC_HST_IMR1		0x0C4C757#define LPFC_HST_IMR2		0x0C50758#define LPFC_HST_IMR3		0x0C54759#define LPFC_HST_IMR4		0x0C58760 761#define LPFC_HST_ISCR0		0x0C78762#define LPFC_HST_ISCR1		0x0C7C763#define LPFC_HST_ISCR2		0x0C80764#define LPFC_HST_ISCR3		0x0C84765#define LPFC_HST_ISCR4		0x0C88766 767#define LPFC_SLI4_INTR0			BIT0768#define LPFC_SLI4_INTR1			BIT1769#define LPFC_SLI4_INTR2			BIT2770#define LPFC_SLI4_INTR3			BIT3771#define LPFC_SLI4_INTR4			BIT4772#define LPFC_SLI4_INTR5			BIT5773#define LPFC_SLI4_INTR6			BIT6774#define LPFC_SLI4_INTR7			BIT7775#define LPFC_SLI4_INTR8			BIT8776#define LPFC_SLI4_INTR9			BIT9777#define LPFC_SLI4_INTR10		BIT10778#define LPFC_SLI4_INTR11		BIT11779#define LPFC_SLI4_INTR12		BIT12780#define LPFC_SLI4_INTR13		BIT13781#define LPFC_SLI4_INTR14		BIT14782#define LPFC_SLI4_INTR15		BIT15783#define LPFC_SLI4_INTR16		BIT16784#define LPFC_SLI4_INTR17		BIT17785#define LPFC_SLI4_INTR18		BIT18786#define LPFC_SLI4_INTR19		BIT19787#define LPFC_SLI4_INTR20		BIT20788#define LPFC_SLI4_INTR21		BIT21789#define LPFC_SLI4_INTR22		BIT22790#define LPFC_SLI4_INTR23		BIT23791#define LPFC_SLI4_INTR24		BIT24792#define LPFC_SLI4_INTR25		BIT25793#define LPFC_SLI4_INTR26		BIT26794#define LPFC_SLI4_INTR27		BIT27795#define LPFC_SLI4_INTR28		BIT28796#define LPFC_SLI4_INTR29		BIT29797#define LPFC_SLI4_INTR30		BIT30798#define LPFC_SLI4_INTR31		BIT31799 800/*801 * The Doorbell registers defined here exist in different BAR802 * register sets depending on the UCNA Port's reported if_type803 * value.  For UCNA ports running SLI4 and if_type 0, they reside in804 * BAR4.  For UCNA ports running SLI4 and if_type 2, they reside in805 * BAR0.  For FC ports running SLI4 and if_type 6, they reside in806 * BAR2. The offsets and base address are different,  so the driver807 * has to compute the register addresses accordingly808 */809#define LPFC_ULP0_RQ_DOORBELL		0x00A0810#define LPFC_ULP1_RQ_DOORBELL		0x00C0811#define LPFC_IF6_RQ_DOORBELL		0x0080812#define lpfc_rq_db_list_fm_num_posted_SHIFT	24813#define lpfc_rq_db_list_fm_num_posted_MASK	0x00FF814#define lpfc_rq_db_list_fm_num_posted_WORD	word0815#define lpfc_rq_db_list_fm_index_SHIFT		16816#define lpfc_rq_db_list_fm_index_MASK		0x00FF817#define lpfc_rq_db_list_fm_index_WORD		word0818#define lpfc_rq_db_list_fm_id_SHIFT		0819#define lpfc_rq_db_list_fm_id_MASK		0xFFFF820#define lpfc_rq_db_list_fm_id_WORD		word0821#define lpfc_rq_db_ring_fm_num_posted_SHIFT	16822#define lpfc_rq_db_ring_fm_num_posted_MASK	0x3FFF823#define lpfc_rq_db_ring_fm_num_posted_WORD	word0824#define lpfc_rq_db_ring_fm_id_SHIFT		0825#define lpfc_rq_db_ring_fm_id_MASK		0xFFFF826#define lpfc_rq_db_ring_fm_id_WORD		word0827 828#define LPFC_ULP0_WQ_DOORBELL		0x0040829#define LPFC_ULP1_WQ_DOORBELL		0x0060830#define lpfc_wq_db_list_fm_num_posted_SHIFT	24831#define lpfc_wq_db_list_fm_num_posted_MASK	0x00FF832#define lpfc_wq_db_list_fm_num_posted_WORD	word0833#define lpfc_wq_db_list_fm_index_SHIFT		16834#define lpfc_wq_db_list_fm_index_MASK		0x00FF835#define lpfc_wq_db_list_fm_index_WORD		word0836#define lpfc_wq_db_list_fm_id_SHIFT		0837#define lpfc_wq_db_list_fm_id_MASK		0xFFFF838#define lpfc_wq_db_list_fm_id_WORD		word0839#define lpfc_wq_db_ring_fm_num_posted_SHIFT     16840#define lpfc_wq_db_ring_fm_num_posted_MASK      0x3FFF841#define lpfc_wq_db_ring_fm_num_posted_WORD      word0842#define lpfc_wq_db_ring_fm_id_SHIFT             0843#define lpfc_wq_db_ring_fm_id_MASK              0xFFFF844#define lpfc_wq_db_ring_fm_id_WORD              word0845 846#define LPFC_IF6_WQ_DOORBELL		0x0040847#define lpfc_if6_wq_db_list_fm_num_posted_SHIFT	24848#define lpfc_if6_wq_db_list_fm_num_posted_MASK	0x00FF849#define lpfc_if6_wq_db_list_fm_num_posted_WORD	word0850#define lpfc_if6_wq_db_list_fm_dpp_SHIFT	23851#define lpfc_if6_wq_db_list_fm_dpp_MASK		0x0001852#define lpfc_if6_wq_db_list_fm_dpp_WORD		word0853#define lpfc_if6_wq_db_list_fm_dpp_id_SHIFT	16854#define lpfc_if6_wq_db_list_fm_dpp_id_MASK	0x001F855#define lpfc_if6_wq_db_list_fm_dpp_id_WORD	word0856#define lpfc_if6_wq_db_list_fm_id_SHIFT		0857#define lpfc_if6_wq_db_list_fm_id_MASK		0xFFFF858#define lpfc_if6_wq_db_list_fm_id_WORD		word0859 860#define LPFC_EQCQ_DOORBELL		0x0120861#define lpfc_eqcq_doorbell_se_SHIFT		31862#define lpfc_eqcq_doorbell_se_MASK		0x0001863#define lpfc_eqcq_doorbell_se_WORD		word0864#define LPFC_EQCQ_SOLICIT_ENABLE_OFF	0865#define LPFC_EQCQ_SOLICIT_ENABLE_ON	1866#define lpfc_eqcq_doorbell_arm_SHIFT		29867#define lpfc_eqcq_doorbell_arm_MASK		0x0001868#define lpfc_eqcq_doorbell_arm_WORD		word0869#define lpfc_eqcq_doorbell_num_released_SHIFT	16870#define lpfc_eqcq_doorbell_num_released_MASK	0x1FFF871#define lpfc_eqcq_doorbell_num_released_WORD	word0872#define lpfc_eqcq_doorbell_qt_SHIFT		10873#define lpfc_eqcq_doorbell_qt_MASK		0x0001874#define lpfc_eqcq_doorbell_qt_WORD		word0875#define LPFC_QUEUE_TYPE_COMPLETION	0876#define LPFC_QUEUE_TYPE_EVENT		1877#define lpfc_eqcq_doorbell_eqci_SHIFT		9878#define lpfc_eqcq_doorbell_eqci_MASK		0x0001879#define lpfc_eqcq_doorbell_eqci_WORD		word0880#define lpfc_eqcq_doorbell_cqid_lo_SHIFT	0881#define lpfc_eqcq_doorbell_cqid_lo_MASK		0x03FF882#define lpfc_eqcq_doorbell_cqid_lo_WORD		word0883#define lpfc_eqcq_doorbell_cqid_hi_SHIFT	11884#define lpfc_eqcq_doorbell_cqid_hi_MASK		0x001F885#define lpfc_eqcq_doorbell_cqid_hi_WORD		word0886#define lpfc_eqcq_doorbell_eqid_lo_SHIFT	0887#define lpfc_eqcq_doorbell_eqid_lo_MASK		0x01FF888#define lpfc_eqcq_doorbell_eqid_lo_WORD		word0889#define lpfc_eqcq_doorbell_eqid_hi_SHIFT	11890#define lpfc_eqcq_doorbell_eqid_hi_MASK		0x001F891#define lpfc_eqcq_doorbell_eqid_hi_WORD		word0892#define LPFC_CQID_HI_FIELD_SHIFT		10893#define LPFC_EQID_HI_FIELD_SHIFT		9894 895#define LPFC_IF6_CQ_DOORBELL			0x00C0896#define lpfc_if6_cq_doorbell_se_SHIFT		31897#define lpfc_if6_cq_doorbell_se_MASK		0x0001898#define lpfc_if6_cq_doorbell_se_WORD		word0899#define LPFC_IF6_CQ_SOLICIT_ENABLE_OFF		0900#define LPFC_IF6_CQ_SOLICIT_ENABLE_ON		1901#define lpfc_if6_cq_doorbell_arm_SHIFT		29902#define lpfc_if6_cq_doorbell_arm_MASK		0x0001903#define lpfc_if6_cq_doorbell_arm_WORD		word0904#define lpfc_if6_cq_doorbell_num_released_SHIFT	16905#define lpfc_if6_cq_doorbell_num_released_MASK	0x1FFF906#define lpfc_if6_cq_doorbell_num_released_WORD	word0907#define lpfc_if6_cq_doorbell_cqid_SHIFT		0908#define lpfc_if6_cq_doorbell_cqid_MASK		0xFFFF909#define lpfc_if6_cq_doorbell_cqid_WORD		word0910 911#define LPFC_IF6_EQ_DOORBELL			0x0120912#define lpfc_if6_eq_doorbell_io_SHIFT		31913#define lpfc_if6_eq_doorbell_io_MASK		0x0001914#define lpfc_if6_eq_doorbell_io_WORD		word0915#define LPFC_IF6_EQ_INTR_OVERRIDE_OFF		0916#define LPFC_IF6_EQ_INTR_OVERRIDE_ON		1917#define lpfc_if6_eq_doorbell_arm_SHIFT		29918#define lpfc_if6_eq_doorbell_arm_MASK		0x0001919#define lpfc_if6_eq_doorbell_arm_WORD		word0920#define lpfc_if6_eq_doorbell_num_released_SHIFT	16921#define lpfc_if6_eq_doorbell_num_released_MASK	0x1FFF922#define lpfc_if6_eq_doorbell_num_released_WORD	word0923#define lpfc_if6_eq_doorbell_eqid_SHIFT		0924#define lpfc_if6_eq_doorbell_eqid_MASK		0x0FFF925#define lpfc_if6_eq_doorbell_eqid_WORD		word0926 927#define LPFC_BMBX			0x0160928#define lpfc_bmbx_addr_SHIFT		2929#define lpfc_bmbx_addr_MASK		0x3FFFFFFF930#define lpfc_bmbx_addr_WORD		word0931#define lpfc_bmbx_hi_SHIFT		1932#define lpfc_bmbx_hi_MASK		0x0001933#define lpfc_bmbx_hi_WORD		word0934#define lpfc_bmbx_rdy_SHIFT		0935#define lpfc_bmbx_rdy_MASK		0x0001936#define lpfc_bmbx_rdy_WORD		word0937 938#define LPFC_MQ_DOORBELL			0x0140939#define LPFC_IF6_MQ_DOORBELL			0x0160940#define lpfc_mq_doorbell_num_posted_SHIFT	16941#define lpfc_mq_doorbell_num_posted_MASK	0x3FFF942#define lpfc_mq_doorbell_num_posted_WORD	word0943#define lpfc_mq_doorbell_id_SHIFT		0944#define lpfc_mq_doorbell_id_MASK		0xFFFF945#define lpfc_mq_doorbell_id_WORD		word0946 947struct lpfc_sli4_cfg_mhdr {948	uint32_t word1;949#define lpfc_mbox_hdr_emb_SHIFT		0950#define lpfc_mbox_hdr_emb_MASK		0x00000001951#define lpfc_mbox_hdr_emb_WORD		word1952#define lpfc_mbox_hdr_sge_cnt_SHIFT	3953#define lpfc_mbox_hdr_sge_cnt_MASK	0x0000001F954#define lpfc_mbox_hdr_sge_cnt_WORD	word1955	uint32_t payload_length;956	uint32_t tag_lo;957	uint32_t tag_hi;958	uint32_t reserved5;959};960 961union lpfc_sli4_cfg_shdr {962	struct {963		uint32_t word6;964#define lpfc_mbox_hdr_opcode_SHIFT	0965#define lpfc_mbox_hdr_opcode_MASK	0x000000FF966#define lpfc_mbox_hdr_opcode_WORD	word6967#define lpfc_mbox_hdr_subsystem_SHIFT	8968#define lpfc_mbox_hdr_subsystem_MASK	0x000000FF969#define lpfc_mbox_hdr_subsystem_WORD	word6970#define lpfc_mbox_hdr_port_number_SHIFT	16971#define lpfc_mbox_hdr_port_number_MASK	0x000000FF972#define lpfc_mbox_hdr_port_number_WORD	word6973#define lpfc_mbox_hdr_domain_SHIFT	24974#define lpfc_mbox_hdr_domain_MASK	0x000000FF975#define lpfc_mbox_hdr_domain_WORD	word6976		uint32_t timeout;977		uint32_t request_length;978		uint32_t word9;979#define lpfc_mbox_hdr_version_SHIFT	0980#define lpfc_mbox_hdr_version_MASK	0x000000FF981#define lpfc_mbox_hdr_version_WORD	word9982#define lpfc_mbox_hdr_pf_num_SHIFT	16983#define lpfc_mbox_hdr_pf_num_MASK	0x000000FF984#define lpfc_mbox_hdr_pf_num_WORD	word9985#define lpfc_mbox_hdr_vh_num_SHIFT	24986#define lpfc_mbox_hdr_vh_num_MASK	0x000000FF987#define lpfc_mbox_hdr_vh_num_WORD	word9988#define LPFC_Q_CREATE_VERSION_2	2989#define LPFC_Q_CREATE_VERSION_1	1990#define LPFC_Q_CREATE_VERSION_0	0991#define LPFC_OPCODE_VERSION_0	0992#define LPFC_OPCODE_VERSION_1	1993	} request;994	struct {995		uint32_t word6;996#define lpfc_mbox_hdr_opcode_SHIFT		0997#define lpfc_mbox_hdr_opcode_MASK		0x000000FF998#define lpfc_mbox_hdr_opcode_WORD		word6999#define lpfc_mbox_hdr_subsystem_SHIFT		81000#define lpfc_mbox_hdr_subsystem_MASK		0x000000FF1001#define lpfc_mbox_hdr_subsystem_WORD		word61002#define lpfc_mbox_hdr_domain_SHIFT		241003#define lpfc_mbox_hdr_domain_MASK		0x000000FF1004#define lpfc_mbox_hdr_domain_WORD		word61005		uint32_t word7;1006#define lpfc_mbox_hdr_status_SHIFT		01007#define lpfc_mbox_hdr_status_MASK		0x000000FF1008#define lpfc_mbox_hdr_status_WORD		word71009#define lpfc_mbox_hdr_add_status_SHIFT		81010#define lpfc_mbox_hdr_add_status_MASK		0x000000FF1011#define lpfc_mbox_hdr_add_status_WORD		word71012#define LPFC_ADD_STATUS_INCOMPAT_OBJ		0xA21013#define lpfc_mbox_hdr_add_status_2_SHIFT	161014#define lpfc_mbox_hdr_add_status_2_MASK		0x000000FF1015#define lpfc_mbox_hdr_add_status_2_WORD		word71016#define LPFC_ADD_STATUS_2_INCOMPAT_FLASH	0x011017#define LPFC_ADD_STATUS_2_INCORRECT_ASIC	0x021018		uint32_t response_length;1019		uint32_t actual_response_length;1020	} response;1021};1022 1023/* Mailbox Header structures.1024 * struct mbox_header is defined for first generation SLI4_CFG mailbox1025 * calls deployed for BE-based ports.1026 *1027 * struct sli4_mbox_header is defined for second generation SLI41028 * ports that don't deploy the SLI4_CFG mechanism.1029 */1030struct mbox_header {1031	struct lpfc_sli4_cfg_mhdr cfg_mhdr;1032	union  lpfc_sli4_cfg_shdr cfg_shdr;1033};1034 1035#define LPFC_EXTENT_LOCAL		01036#define LPFC_TIMEOUT_DEFAULT		01037#define LPFC_EXTENT_VERSION_DEFAULT	01038 1039/* Subsystem Definitions */1040#define LPFC_MBOX_SUBSYSTEM_NA		0x01041#define LPFC_MBOX_SUBSYSTEM_COMMON	0x11042#define LPFC_MBOX_SUBSYSTEM_LOWLEVEL	0xB1043#define LPFC_MBOX_SUBSYSTEM_FCOE	0xC1044 1045/* Device Specific Definitions */1046 1047/* The HOST ENDIAN defines are in Big Endian format. */1048#define HOST_ENDIAN_LOW_WORD0   0xFF3412FF1049#define HOST_ENDIAN_HIGH_WORD1	0xFF7856FF1050 1051/* Common Opcodes */1052#define LPFC_MBOX_OPCODE_NA				0x001053#define LPFC_MBOX_OPCODE_CQ_CREATE			0x0C1054#define LPFC_MBOX_OPCODE_EQ_CREATE			0x0D1055#define LPFC_MBOX_OPCODE_MQ_CREATE			0x151056#define LPFC_MBOX_OPCODE_GET_CNTL_ATTRIBUTES		0x201057#define LPFC_MBOX_OPCODE_NOP				0x211058#define LPFC_MBOX_OPCODE_MODIFY_EQ_DELAY		0x291059#define LPFC_MBOX_OPCODE_MQ_DESTROY			0x351060#define LPFC_MBOX_OPCODE_CQ_DESTROY			0x361061#define LPFC_MBOX_OPCODE_EQ_DESTROY			0x371062#define LPFC_MBOX_OPCODE_QUERY_FW_CFG			0x3A1063#define LPFC_MBOX_OPCODE_FUNCTION_RESET			0x3D1064#define LPFC_MBOX_OPCODE_SET_PHYSICAL_LINK_CONFIG	0x3E1065#define LPFC_MBOX_OPCODE_SET_BOOT_CONFIG		0x431066#define LPFC_MBOX_OPCODE_SET_BEACON_CONFIG              0x451067#define LPFC_MBOX_OPCODE_GET_BEACON_CONFIG              0x461068#define LPFC_MBOX_OPCODE_GET_PORT_NAME			0x4D1069#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT			0x5A1070#define LPFC_MBOX_OPCODE_GET_VPD_DATA			0x5B1071#define LPFC_MBOX_OPCODE_SET_HOST_DATA			0x5D1072#define LPFC_MBOX_OPCODE_SEND_ACTIVATION		0x731073#define LPFC_MBOX_OPCODE_RESET_LICENSES			0x741074#define LPFC_MBOX_OPCODE_REG_CONGESTION_BUF		0x8E1075#define LPFC_MBOX_OPCODE_GET_RSRC_EXTENT_INFO		0x9A1076#define LPFC_MBOX_OPCODE_GET_ALLOC_RSRC_EXTENT		0x9B1077#define LPFC_MBOX_OPCODE_ALLOC_RSRC_EXTENT		0x9C1078#define LPFC_MBOX_OPCODE_DEALLOC_RSRC_EXTENT		0x9D1079#define LPFC_MBOX_OPCODE_GET_FUNCTION_CONFIG		0xA01080#define LPFC_MBOX_OPCODE_GET_PROFILE_CAPACITIES		0xA11081#define LPFC_MBOX_OPCODE_GET_PROFILE_CONFIG		0xA41082#define LPFC_MBOX_OPCODE_SET_PROFILE_CONFIG		0xA51083#define LPFC_MBOX_OPCODE_GET_PROFILE_LIST		0xA61084#define LPFC_MBOX_OPCODE_SET_ACT_PROFILE		0xA81085#define LPFC_MBOX_OPCODE_GET_FACTORY_PROFILE_CONFIG	0xA91086#define LPFC_MBOX_OPCODE_READ_OBJECT			0xAB1087#define LPFC_MBOX_OPCODE_WRITE_OBJECT			0xAC1088#define LPFC_MBOX_OPCODE_READ_OBJECT_LIST		0xAD1089#define LPFC_MBOX_OPCODE_DELETE_OBJECT			0xAE1090#define LPFC_MBOX_OPCODE_GET_SLI4_PARAMETERS		0xB51091#define LPFC_MBOX_OPCODE_SET_FEATURES                   0xBF1092 1093/* FCoE Opcodes */1094#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE			0x011095#define LPFC_MBOX_OPCODE_FCOE_WQ_DESTROY		0x021096#define LPFC_MBOX_OPCODE_FCOE_POST_SGL_PAGES		0x031097#define LPFC_MBOX_OPCODE_FCOE_REMOVE_SGL_PAGES		0x041098#define LPFC_MBOX_OPCODE_FCOE_RQ_CREATE			0x051099#define LPFC_MBOX_OPCODE_FCOE_RQ_DESTROY		0x061100#define LPFC_MBOX_OPCODE_FCOE_READ_FCF_TABLE		0x081101#define LPFC_MBOX_OPCODE_FCOE_ADD_FCF			0x091102#define LPFC_MBOX_OPCODE_FCOE_DELETE_FCF		0x0A1103#define LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE		0x0B1104#define LPFC_MBOX_OPCODE_FCOE_REDISCOVER_FCF		0x101105#define LPFC_MBOX_OPCODE_FCOE_CQ_CREATE_SET		0x1D1106#define LPFC_MBOX_OPCODE_FCOE_SET_FCLINK_SETTINGS	0x211107#define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE		0x221108#define LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_LOOPBACK	0x231109#define LPFC_MBOX_OPCODE_FCOE_FC_SET_TRUNK_MODE		0x421110 1111/* Low level Opcodes */1112#define LPFC_MBOX_OPCODE_SET_DIAG_LOG_OPTION		0x371113 1114/* Mailbox command structures */1115struct eq_context {1116	uint32_t word0;1117#define lpfc_eq_context_size_SHIFT	311118#define lpfc_eq_context_size_MASK	0x000000011119#define lpfc_eq_context_size_WORD	word01120#define LPFC_EQE_SIZE_4			0x01121#define LPFC_EQE_SIZE_16		0x11122#define lpfc_eq_context_valid_SHIFT	291123#define lpfc_eq_context_valid_MASK	0x000000011124#define lpfc_eq_context_valid_WORD	word01125#define lpfc_eq_context_autovalid_SHIFT 281126#define lpfc_eq_context_autovalid_MASK  0x000000011127#define lpfc_eq_context_autovalid_WORD  word01128	uint32_t word1;1129#define lpfc_eq_context_count_SHIFT	261130#define lpfc_eq_context_count_MASK	0x000000031131#define lpfc_eq_context_count_WORD	word11132#define LPFC_EQ_CNT_256		0x01133#define LPFC_EQ_CNT_512		0x11134#define LPFC_EQ_CNT_1024	0x21135#define LPFC_EQ_CNT_2048	0x31136#define LPFC_EQ_CNT_4096	0x41137	uint32_t word2;1138#define lpfc_eq_context_delay_multi_SHIFT	131139#define lpfc_eq_context_delay_multi_MASK	0x000003FF1140#define lpfc_eq_context_delay_multi_WORD	word21141	uint32_t reserved3;1142};1143 1144struct eq_delay_info {1145	uint32_t eq_id;1146	uint32_t phase;1147	uint32_t delay_multi;1148};1149#define	LPFC_MAX_EQ_DELAY_EQID_CNT	81150 1151struct sgl_page_pairs {1152	uint32_t sgl_pg0_addr_lo;1153	uint32_t sgl_pg0_addr_hi;1154	uint32_t sgl_pg1_addr_lo;1155	uint32_t sgl_pg1_addr_hi;1156};1157 1158struct lpfc_mbx_post_sgl_pages {1159	struct mbox_header header;1160	uint32_t word0;1161#define lpfc_post_sgl_pages_xri_SHIFT	01162#define lpfc_post_sgl_pages_xri_MASK	0x0000FFFF1163#define lpfc_post_sgl_pages_xri_WORD	word01164#define lpfc_post_sgl_pages_xricnt_SHIFT	161165#define lpfc_post_sgl_pages_xricnt_MASK	0x0000FFFF1166#define lpfc_post_sgl_pages_xricnt_WORD	word01167	struct sgl_page_pairs  sgl_pg_pairs[1];1168};1169 1170/* word0 of page-1 struct shares the same SHIFT/MASK/WORD defines as above */1171struct lpfc_mbx_post_uembed_sgl_page1 {1172	union  lpfc_sli4_cfg_shdr cfg_shdr;1173	uint32_t word0;1174	struct sgl_page_pairs sgl_pg_pairs;1175};1176 1177struct lpfc_mbx_sge {1178	uint32_t pa_lo;1179	uint32_t pa_hi;1180	uint32_t length;1181};1182 1183struct lpfc_mbx_host_buf {1184	uint32_t length;1185	uint32_t pa_lo;1186	uint32_t pa_hi;1187};1188 1189struct lpfc_mbx_nembed_cmd {1190	struct lpfc_sli4_cfg_mhdr cfg_mhdr;1191#define LPFC_SLI4_MBX_SGE_MAX_PAGES	191192	struct lpfc_mbx_sge sge[LPFC_SLI4_MBX_SGE_MAX_PAGES];1193};1194 1195struct lpfc_mbx_nembed_sge_virt {1196	void *addr[LPFC_SLI4_MBX_SGE_MAX_PAGES];1197};1198 1199#define LPFC_MBX_OBJECT_NAME_LEN_DW	261200struct lpfc_mbx_read_object {  /* Version 0 */1201	struct mbox_header header;1202	union {1203		struct {1204			uint32_t word0;1205#define lpfc_mbx_rd_object_rlen_SHIFT	01206#define lpfc_mbx_rd_object_rlen_MASK	0x00FFFFFF1207#define lpfc_mbx_rd_object_rlen_WORD	word01208			uint32_t rd_object_offset;1209			__le32 rd_object_name[LPFC_MBX_OBJECT_NAME_LEN_DW];1210#define LPFC_OBJ_NAME_SZ 104   /* 26 x sizeof(uint32_t) is 104. */1211			uint32_t rd_object_cnt;1212			struct lpfc_mbx_host_buf rd_object_hbuf[4];1213		} request;1214		struct {1215			uint32_t rd_object_actual_rlen;1216			uint32_t word1;1217#define lpfc_mbx_rd_object_eof_SHIFT	311218#define lpfc_mbx_rd_object_eof_MASK	0x11219#define lpfc_mbx_rd_object_eof_WORD	word11220		} response;1221	} u;1222};1223 1224struct lpfc_mbx_eq_create {1225	struct mbox_header header;1226	union {1227		struct {1228			uint32_t word0;1229#define lpfc_mbx_eq_create_num_pages_SHIFT	01230#define lpfc_mbx_eq_create_num_pages_MASK	0x0000FFFF1231#define lpfc_mbx_eq_create_num_pages_WORD	word01232			struct eq_context context;1233			struct dma_address page[LPFC_MAX_EQ_PAGE];1234		} request;1235		struct {1236			uint32_t word0;1237#define lpfc_mbx_eq_create_q_id_SHIFT	01238#define lpfc_mbx_eq_create_q_id_MASK	0x0000FFFF1239#define lpfc_mbx_eq_create_q_id_WORD	word01240		} response;1241	} u;1242};1243 1244struct lpfc_mbx_modify_eq_delay {1245	struct mbox_header header;1246	union {1247		struct {1248			uint32_t num_eq;1249			struct eq_delay_info eq[LPFC_MAX_EQ_DELAY_EQID_CNT];1250		} request;1251		struct {1252			uint32_t word0;1253		} response;1254	} u;1255};1256 1257struct lpfc_mbx_eq_destroy {1258	struct mbox_header header;1259	union {1260		struct {1261			uint32_t word0;1262#define lpfc_mbx_eq_destroy_q_id_SHIFT	01263#define lpfc_mbx_eq_destroy_q_id_MASK	0x0000FFFF1264#define lpfc_mbx_eq_destroy_q_id_WORD	word01265		} request;1266		struct {1267			uint32_t word0;1268		} response;1269	} u;1270};1271 1272struct lpfc_mbx_nop {1273	struct mbox_header header;1274	uint32_t context[2];1275};1276 1277 1278 1279struct lpfc_mbx_set_ras_fwlog {1280	struct mbox_header header;1281	union {1282		struct {1283			uint32_t word4;1284#define lpfc_fwlog_enable_SHIFT		01285#define lpfc_fwlog_enable_MASK		0x000000011286#define lpfc_fwlog_enable_WORD		word41287#define lpfc_fwlog_loglvl_SHIFT		81288#define lpfc_fwlog_loglvl_MASK		0x0000000F1289#define lpfc_fwlog_loglvl_WORD		word41290#define lpfc_fwlog_ra_SHIFT		151291#define lpfc_fwlog_ra_WORD		0x000000081292#define lpfc_fwlog_buffcnt_SHIFT	161293#define lpfc_fwlog_buffcnt_MASK		0x000000FF1294#define lpfc_fwlog_buffcnt_WORD		word41295#define lpfc_fwlog_buffsz_SHIFT		241296#define lpfc_fwlog_buffsz_MASK		0x000000FF1297#define lpfc_fwlog_buffsz_WORD		word41298			uint32_t word5;1299#define lpfc_fwlog_acqe_SHIFT		01300#define lpfc_fwlog_acqe_MASK		0x0000FFFF1301#define lpfc_fwlog_acqe_WORD		word51302#define lpfc_fwlog_cqid_SHIFT		161303#define lpfc_fwlog_cqid_MASK		0x0000FFFF1304#define lpfc_fwlog_cqid_WORD		word51305#define LPFC_MAX_FWLOG_PAGE	161306			struct dma_address lwpd;1307			struct dma_address buff_fwlog[LPFC_MAX_FWLOG_PAGE];1308		} request;1309		struct {1310			uint32_t word0;1311		} response;1312	} u;1313};1314 1315 1316struct cq_context {1317	uint32_t word0;1318#define lpfc_cq_context_event_SHIFT	311319#define lpfc_cq_context_event_MASK	0x000000011320#define lpfc_cq_context_event_WORD	word01321#define lpfc_cq_context_valid_SHIFT	291322#define lpfc_cq_context_valid_MASK	0x000000011323#define lpfc_cq_context_valid_WORD	word01324#define lpfc_cq_context_count_SHIFT	271325#define lpfc_cq_context_count_MASK	0x000000031326#define lpfc_cq_context_count_WORD	word01327#define LPFC_CQ_CNT_256		0x01328#define LPFC_CQ_CNT_512		0x11329#define LPFC_CQ_CNT_1024	0x21330#define LPFC_CQ_CNT_WORD7	0x31331#define lpfc_cq_context_autovalid_SHIFT 151332#define lpfc_cq_context_autovalid_MASK  0x000000011333#define lpfc_cq_context_autovalid_WORD  word01334	uint32_t word1;1335#define lpfc_cq_eq_id_SHIFT		22	/* Version 0 Only */1336#define lpfc_cq_eq_id_MASK		0x000000FF1337#define lpfc_cq_eq_id_WORD		word11338#define lpfc_cq_eq_id_2_SHIFT		0 	/* Version 2 Only */1339#define lpfc_cq_eq_id_2_MASK		0x0000FFFF1340#define lpfc_cq_eq_id_2_WORD		word11341	uint32_t lpfc_cq_context_count;		/* Version 2 Only */1342	uint32_t reserved1;1343};1344 1345struct lpfc_mbx_cq_create {1346	struct mbox_header header;1347	union {1348		struct {1349			uint32_t word0;1350#define lpfc_mbx_cq_create_page_size_SHIFT	16	/* Version 2 Only */1351#define lpfc_mbx_cq_create_page_size_MASK	0x000000FF1352#define lpfc_mbx_cq_create_page_size_WORD	word01353#define lpfc_mbx_cq_create_num_pages_SHIFT	01354#define lpfc_mbx_cq_create_num_pages_MASK	0x0000FFFF1355#define lpfc_mbx_cq_create_num_pages_WORD	word01356			struct cq_context context;1357			struct dma_address page[LPFC_MAX_CQ_PAGE];1358		} request;1359		struct {1360			uint32_t word0;1361#define lpfc_mbx_cq_create_q_id_SHIFT	01362#define lpfc_mbx_cq_create_q_id_MASK	0x0000FFFF1363#define lpfc_mbx_cq_create_q_id_WORD	word01364		} response;1365	} u;1366};1367 1368struct lpfc_mbx_cq_create_set {1369	union  lpfc_sli4_cfg_shdr cfg_shdr;1370	union {1371		struct {1372			uint32_t word0;1373#define lpfc_mbx_cq_create_set_page_size_SHIFT	16	/* Version 2 Only */1374#define lpfc_mbx_cq_create_set_page_size_MASK	0x000000FF1375#define lpfc_mbx_cq_create_set_page_size_WORD	word01376#define lpfc_mbx_cq_create_set_num_pages_SHIFT	01377#define lpfc_mbx_cq_create_set_num_pages_MASK	0x0000FFFF1378#define lpfc_mbx_cq_create_set_num_pages_WORD	word01379			uint32_t word1;1380#define lpfc_mbx_cq_create_set_evt_SHIFT	311381#define lpfc_mbx_cq_create_set_evt_MASK		0x000000011382#define lpfc_mbx_cq_create_set_evt_WORD		word11383#define lpfc_mbx_cq_create_set_valid_SHIFT	291384#define lpfc_mbx_cq_create_set_valid_MASK	0x000000011385#define lpfc_mbx_cq_create_set_valid_WORD	word11386#define lpfc_mbx_cq_create_set_cqe_cnt_SHIFT	271387#define lpfc_mbx_cq_create_set_cqe_cnt_MASK	0x000000031388#define lpfc_mbx_cq_create_set_cqe_cnt_WORD	word11389#define lpfc_mbx_cq_create_set_cqe_size_SHIFT	251390#define lpfc_mbx_cq_create_set_cqe_size_MASK	0x000000031391#define lpfc_mbx_cq_create_set_cqe_size_WORD	word11392#define lpfc_mbx_cq_create_set_autovalid_SHIFT	151393#define lpfc_mbx_cq_create_set_autovalid_MASK	0x00000011394#define lpfc_mbx_cq_create_set_autovalid_WORD	word11395#define lpfc_mbx_cq_create_set_nodelay_SHIFT	141396#define lpfc_mbx_cq_create_set_nodelay_MASK	0x000000011397#define lpfc_mbx_cq_create_set_nodelay_WORD	word11398#define lpfc_mbx_cq_create_set_clswm_SHIFT	121399#define lpfc_mbx_cq_create_set_clswm_MASK	0x000000031400#define lpfc_mbx_cq_create_set_clswm_WORD	word11401			uint32_t word2;1402#define lpfc_mbx_cq_create_set_arm_SHIFT	311403#define lpfc_mbx_cq_create_set_arm_MASK		0x000000011404#define lpfc_mbx_cq_create_set_arm_WORD		word21405#define lpfc_mbx_cq_create_set_cq_cnt_SHIFT	161406#define lpfc_mbx_cq_create_set_cq_cnt_MASK	0x00007FFF1407#define lpfc_mbx_cq_create_set_cq_cnt_WORD	word21408#define lpfc_mbx_cq_create_set_num_cq_SHIFT	01409#define lpfc_mbx_cq_create_set_num_cq_MASK	0x0000FFFF1410#define lpfc_mbx_cq_create_set_num_cq_WORD	word21411			uint32_t word3;1412#define lpfc_mbx_cq_create_set_eq_id1_SHIFT	161413#define lpfc_mbx_cq_create_set_eq_id1_MASK	0x0000FFFF1414#define lpfc_mbx_cq_create_set_eq_id1_WORD	word31415#define lpfc_mbx_cq_create_set_eq_id0_SHIFT	01416#define lpfc_mbx_cq_create_set_eq_id0_MASK	0x0000FFFF1417#define lpfc_mbx_cq_create_set_eq_id0_WORD	word31418			uint32_t word4;1419#define lpfc_mbx_cq_create_set_eq_id3_SHIFT	161420#define lpfc_mbx_cq_create_set_eq_id3_MASK	0x0000FFFF1421#define lpfc_mbx_cq_create_set_eq_id3_WORD	word41422#define lpfc_mbx_cq_create_set_eq_id2_SHIFT	01423#define lpfc_mbx_cq_create_set_eq_id2_MASK	0x0000FFFF1424#define lpfc_mbx_cq_create_set_eq_id2_WORD	word41425			uint32_t word5;1426#define lpfc_mbx_cq_create_set_eq_id5_SHIFT	161427#define lpfc_mbx_cq_create_set_eq_id5_MASK	0x0000FFFF1428#define lpfc_mbx_cq_create_set_eq_id5_WORD	word51429#define lpfc_mbx_cq_create_set_eq_id4_SHIFT	01430#define lpfc_mbx_cq_create_set_eq_id4_MASK	0x0000FFFF1431#define lpfc_mbx_cq_create_set_eq_id4_WORD	word51432			uint32_t word6;1433#define lpfc_mbx_cq_create_set_eq_id7_SHIFT	161434#define lpfc_mbx_cq_create_set_eq_id7_MASK	0x0000FFFF1435#define lpfc_mbx_cq_create_set_eq_id7_WORD	word61436#define lpfc_mbx_cq_create_set_eq_id6_SHIFT	01437#define lpfc_mbx_cq_create_set_eq_id6_MASK	0x0000FFFF1438#define lpfc_mbx_cq_create_set_eq_id6_WORD	word61439			uint32_t word7;1440#define lpfc_mbx_cq_create_set_eq_id9_SHIFT	161441#define lpfc_mbx_cq_create_set_eq_id9_MASK	0x0000FFFF1442#define lpfc_mbx_cq_create_set_eq_id9_WORD	word71443#define lpfc_mbx_cq_create_set_eq_id8_SHIFT	01444#define lpfc_mbx_cq_create_set_eq_id8_MASK	0x0000FFFF1445#define lpfc_mbx_cq_create_set_eq_id8_WORD	word71446			uint32_t word8;1447#define lpfc_mbx_cq_create_set_eq_id11_SHIFT	161448#define lpfc_mbx_cq_create_set_eq_id11_MASK	0x0000FFFF1449#define lpfc_mbx_cq_create_set_eq_id11_WORD	word81450#define lpfc_mbx_cq_create_set_eq_id10_SHIFT	01451#define lpfc_mbx_cq_create_set_eq_id10_MASK	0x0000FFFF1452#define lpfc_mbx_cq_create_set_eq_id10_WORD	word81453			uint32_t word9;1454#define lpfc_mbx_cq_create_set_eq_id13_SHIFT	161455#define lpfc_mbx_cq_create_set_eq_id13_MASK	0x0000FFFF1456#define lpfc_mbx_cq_create_set_eq_id13_WORD	word91457#define lpfc_mbx_cq_create_set_eq_id12_SHIFT	01458#define lpfc_mbx_cq_create_set_eq_id12_MASK	0x0000FFFF1459#define lpfc_mbx_cq_create_set_eq_id12_WORD	word91460			uint32_t word10;1461#define lpfc_mbx_cq_create_set_eq_id15_SHIFT	161462#define lpfc_mbx_cq_create_set_eq_id15_MASK	0x0000FFFF1463#define lpfc_mbx_cq_create_set_eq_id15_WORD	word101464#define lpfc_mbx_cq_create_set_eq_id14_SHIFT	01465#define lpfc_mbx_cq_create_set_eq_id14_MASK	0x0000FFFF1466#define lpfc_mbx_cq_create_set_eq_id14_WORD	word101467			struct dma_address page[1];1468		} request;1469		struct {1470			uint32_t word0;1471#define lpfc_mbx_cq_create_set_num_alloc_SHIFT	161472#define lpfc_mbx_cq_create_set_num_alloc_MASK	0x0000FFFF1473#define lpfc_mbx_cq_create_set_num_alloc_WORD	word01474#define lpfc_mbx_cq_create_set_base_id_SHIFT	01475#define lpfc_mbx_cq_create_set_base_id_MASK	0x0000FFFF1476#define lpfc_mbx_cq_create_set_base_id_WORD	word01477		} response;1478	} u;1479};1480 1481struct lpfc_mbx_cq_destroy {1482	struct mbox_header header;1483	union {1484		struct {1485			uint32_t word0;1486#define lpfc_mbx_cq_destroy_q_id_SHIFT	01487#define lpfc_mbx_cq_destroy_q_id_MASK	0x0000FFFF1488#define lpfc_mbx_cq_destroy_q_id_WORD	word01489		} request;1490		struct {1491			uint32_t word0;1492		} response;1493	} u;1494};1495 1496struct wq_context {1497	uint32_t reserved0;1498	uint32_t reserved1;1499	uint32_t reserved2;1500	uint32_t reserved3;1501};1502 1503struct lpfc_mbx_wq_create {1504	struct mbox_header header;1505	union {1506		struct {	/* Version 0 Request */1507			uint32_t word0;1508#define lpfc_mbx_wq_create_num_pages_SHIFT	01509#define lpfc_mbx_wq_create_num_pages_MASK	0x000000FF1510#define lpfc_mbx_wq_create_num_pages_WORD	word01511#define lpfc_mbx_wq_create_dua_SHIFT		81512#define lpfc_mbx_wq_create_dua_MASK		0x000000011513#define lpfc_mbx_wq_create_dua_WORD		word01514#define lpfc_mbx_wq_create_cq_id_SHIFT		161515#define lpfc_mbx_wq_create_cq_id_MASK		0x0000FFFF1516#define lpfc_mbx_wq_create_cq_id_WORD		word01517			struct dma_address page[LPFC_MAX_WQ_PAGE_V0];1518			uint32_t word9;1519#define lpfc_mbx_wq_create_bua_SHIFT		01520#define lpfc_mbx_wq_create_bua_MASK		0x000000011521#define lpfc_mbx_wq_create_bua_WORD		word91522#define lpfc_mbx_wq_create_ulp_num_SHIFT	81523#define lpfc_mbx_wq_create_ulp_num_MASK		0x000000FF1524#define lpfc_mbx_wq_create_ulp_num_WORD		word91525		} request;1526		struct {	/* Version 1 Request */1527			uint32_t word0;	/* Word 0 is the same as in v0 */1528			uint32_t word1;1529#define lpfc_mbx_wq_create_page_size_SHIFT	01530#define lpfc_mbx_wq_create_page_size_MASK	0x000000FF1531#define lpfc_mbx_wq_create_page_size_WORD	word11532#define LPFC_WQ_PAGE_SIZE_4096	0x11533#define lpfc_mbx_wq_create_dpp_req_SHIFT	151534#define lpfc_mbx_wq_create_dpp_req_MASK		0x000000011535#define lpfc_mbx_wq_create_dpp_req_WORD		word11536#define lpfc_mbx_wq_create_doe_SHIFT		141537#define lpfc_mbx_wq_create_doe_MASK		0x000000011538#define lpfc_mbx_wq_create_doe_WORD		word11539#define lpfc_mbx_wq_create_toe_SHIFT		131540#define lpfc_mbx_wq_create_toe_MASK		0x000000011541#define lpfc_mbx_wq_create_toe_WORD		word11542#define lpfc_mbx_wq_create_wqe_size_SHIFT	81543#define lpfc_mbx_wq_create_wqe_size_MASK	0x0000000F1544#define lpfc_mbx_wq_create_wqe_size_WORD	word11545#define LPFC_WQ_WQE_SIZE_64	0x51546#define LPFC_WQ_WQE_SIZE_128	0x61547#define lpfc_mbx_wq_create_wqe_count_SHIFT	161548#define lpfc_mbx_wq_create_wqe_count_MASK	0x0000FFFF1549#define lpfc_mbx_wq_create_wqe_count_WORD	word11550			uint32_t word2;1551			struct dma_address page[LPFC_MAX_WQ_PAGE-1];1552		} request_1;1553		struct {1554			uint32_t word0;1555#define lpfc_mbx_wq_create_q_id_SHIFT	01556#define lpfc_mbx_wq_create_q_id_MASK	0x0000FFFF1557#define lpfc_mbx_wq_create_q_id_WORD	word01558			uint32_t doorbell_offset;1559			uint32_t word2;1560#define lpfc_mbx_wq_create_bar_set_SHIFT	01561#define lpfc_mbx_wq_create_bar_set_MASK		0x0000FFFF1562#define lpfc_mbx_wq_create_bar_set_WORD		word21563#define WQ_PCI_BAR_0_AND_1	0x001564#define WQ_PCI_BAR_2_AND_3	0x011565#define WQ_PCI_BAR_4_AND_5	0x021566#define lpfc_mbx_wq_create_db_format_SHIFT	161567#define lpfc_mbx_wq_create_db_format_MASK	0x0000FFFF1568#define lpfc_mbx_wq_create_db_format_WORD	word21569		} response;1570		struct {1571			uint32_t word0;1572#define lpfc_mbx_wq_create_dpp_rsp_SHIFT	311573#define lpfc_mbx_wq_create_dpp_rsp_MASK		0x000000011574#define lpfc_mbx_wq_create_dpp_rsp_WORD		word01575#define lpfc_mbx_wq_create_v1_q_id_SHIFT	01576#define lpfc_mbx_wq_create_v1_q_id_MASK		0x0000FFFF1577#define lpfc_mbx_wq_create_v1_q_id_WORD		word01578			uint32_t word1;1579#define lpfc_mbx_wq_create_v1_bar_set_SHIFT	01580#define lpfc_mbx_wq_create_v1_bar_set_MASK	0x0000000F1581#define lpfc_mbx_wq_create_v1_bar_set_WORD	word11582			uint32_t doorbell_offset;1583			uint32_t word3;1584#define lpfc_mbx_wq_create_dpp_id_SHIFT		161585#define lpfc_mbx_wq_create_dpp_id_MASK		0x0000001F1586#define lpfc_mbx_wq_create_dpp_id_WORD		word31587#define lpfc_mbx_wq_create_dpp_bar_SHIFT	01588#define lpfc_mbx_wq_create_dpp_bar_MASK		0x0000000F1589#define lpfc_mbx_wq_create_dpp_bar_WORD		word31590			uint32_t dpp_offset;1591		} response_1;1592	} u;1593};1594 1595struct lpfc_mbx_wq_destroy {1596	struct mbox_header header;1597	union {1598		struct {1599			uint32_t word0;1600#define lpfc_mbx_wq_destroy_q_id_SHIFT	01601#define lpfc_mbx_wq_destroy_q_id_MASK	0x0000FFFF1602#define lpfc_mbx_wq_destroy_q_id_WORD	word01603		} request;1604		struct {1605			uint32_t word0;1606		} response;1607	} u;1608};1609 1610#define LPFC_HDR_BUF_SIZE 1281611#define LPFC_DATA_BUF_SIZE 20481612#define LPFC_NVMET_DATA_BUF_SIZE 1281613struct rq_context {1614	uint32_t word0;1615#define lpfc_rq_context_rqe_count_SHIFT	16	/* Version 0 Only */1616#define lpfc_rq_context_rqe_count_MASK	0x0000000F1617#define lpfc_rq_context_rqe_count_WORD	word01618#define LPFC_RQ_RING_SIZE_512		9	/* 512 entries */1619#define LPFC_RQ_RING_SIZE_1024		10	/* 1024 entries */1620#define LPFC_RQ_RING_SIZE_2048		11	/* 2048 entries */1621#define LPFC_RQ_RING_SIZE_4096		12	/* 4096 entries */1622#define lpfc_rq_context_rqe_count_1_SHIFT	16	/* Version 1-2 Only */1623#define lpfc_rq_context_rqe_count_1_MASK	0x0000FFFF1624#define lpfc_rq_context_rqe_count_1_WORD	word01625#define lpfc_rq_context_rqe_size_SHIFT	8		/* Version 1-2 Only */1626#define lpfc_rq_context_rqe_size_MASK	0x0000000F1627#define lpfc_rq_context_rqe_size_WORD	word01628#define LPFC_RQE_SIZE_8		21629#define LPFC_RQE_SIZE_16	31630#define LPFC_RQE_SIZE_32	41631#define LPFC_RQE_SIZE_64	51632#define LPFC_RQE_SIZE_128	61633#define lpfc_rq_context_page_size_SHIFT	0		/* Version 1 Only */1634#define lpfc_rq_context_page_size_MASK	0x000000FF1635#define lpfc_rq_context_page_size_WORD	word01636#define	LPFC_RQ_PAGE_SIZE_4096	0x11637	uint32_t word1;1638#define lpfc_rq_context_data_size_SHIFT	16		/* Version 2 Only */1639#define lpfc_rq_context_data_size_MASK	0x0000FFFF1640#define lpfc_rq_context_data_size_WORD	word11641#define lpfc_rq_context_hdr_size_SHIFT	0		/* Version 2 Only */1642#define lpfc_rq_context_hdr_size_MASK	0x0000FFFF1643#define lpfc_rq_context_hdr_size_WORD	word11644	uint32_t word2;1645#define lpfc_rq_context_cq_id_SHIFT	161646#define lpfc_rq_context_cq_id_MASK	0x0000FFFF1647#define lpfc_rq_context_cq_id_WORD	word21648#define lpfc_rq_context_buf_size_SHIFT	01649#define lpfc_rq_context_buf_size_MASK	0x0000FFFF1650#define lpfc_rq_context_buf_size_WORD	word21651#define lpfc_rq_context_base_cq_SHIFT	0		/* Version 2 Only */1652#define lpfc_rq_context_base_cq_MASK	0x0000FFFF1653#define lpfc_rq_context_base_cq_WORD	word21654	uint32_t buffer_size;				/* Version 1 Only */1655};1656 1657struct lpfc_mbx_rq_create {1658	struct mbox_header header;1659	union {1660		struct {1661			uint32_t word0;1662#define lpfc_mbx_rq_create_num_pages_SHIFT	01663#define lpfc_mbx_rq_create_num_pages_MASK	0x0000FFFF1664#define lpfc_mbx_rq_create_num_pages_WORD	word01665#define lpfc_mbx_rq_create_dua_SHIFT		161666#define lpfc_mbx_rq_create_dua_MASK		0x000000011667#define lpfc_mbx_rq_create_dua_WORD		word01668#define lpfc_mbx_rq_create_bqu_SHIFT		171669#define lpfc_mbx_rq_create_bqu_MASK		0x000000011670#define lpfc_mbx_rq_create_bqu_WORD		word01671#define lpfc_mbx_rq_create_ulp_num_SHIFT	241672#define lpfc_mbx_rq_create_ulp_num_MASK		0x000000FF1673#define lpfc_mbx_rq_create_ulp_num_WORD		word01674			struct rq_context context;1675			struct dma_address page[LPFC_MAX_RQ_PAGE];1676		} request;1677		struct {1678			uint32_t word0;1679#define lpfc_mbx_rq_create_q_cnt_v2_SHIFT	161680#define lpfc_mbx_rq_create_q_cnt_v2_MASK	0x0000FFFF1681#define lpfc_mbx_rq_create_q_cnt_v2_WORD	word01682#define lpfc_mbx_rq_create_q_id_SHIFT		01683#define lpfc_mbx_rq_create_q_id_MASK		0x0000FFFF1684#define lpfc_mbx_rq_create_q_id_WORD		word01685			uint32_t doorbell_offset;1686			uint32_t word2;1687#define lpfc_mbx_rq_create_bar_set_SHIFT	01688#define lpfc_mbx_rq_create_bar_set_MASK		0x0000FFFF1689#define lpfc_mbx_rq_create_bar_set_WORD		word21690#define lpfc_mbx_rq_create_db_format_SHIFT	161691#define lpfc_mbx_rq_create_db_format_MASK	0x0000FFFF1692#define lpfc_mbx_rq_create_db_format_WORD	word21693		} response;1694	} u;1695};1696 1697struct lpfc_mbx_rq_create_v2 {1698	union  lpfc_sli4_cfg_shdr cfg_shdr;1699	union {1700		struct {1701			uint32_t word0;1702#define lpfc_mbx_rq_create_num_pages_SHIFT	01703#define lpfc_mbx_rq_create_num_pages_MASK	0x0000FFFF1704#define lpfc_mbx_rq_create_num_pages_WORD	word01705#define lpfc_mbx_rq_create_rq_cnt_SHIFT		161706#define lpfc_mbx_rq_create_rq_cnt_MASK		0x000000FF1707#define lpfc_mbx_rq_create_rq_cnt_WORD		word01708#define lpfc_mbx_rq_create_dua_SHIFT		161709#define lpfc_mbx_rq_create_dua_MASK		0x000000011710#define lpfc_mbx_rq_create_dua_WORD		word01711#define lpfc_mbx_rq_create_bqu_SHIFT		171712#define lpfc_mbx_rq_create_bqu_MASK		0x000000011713#define lpfc_mbx_rq_create_bqu_WORD		word01714#define lpfc_mbx_rq_create_ulp_num_SHIFT	241715#define lpfc_mbx_rq_create_ulp_num_MASK		0x000000FF1716#define lpfc_mbx_rq_create_ulp_num_WORD		word01717#define lpfc_mbx_rq_create_dim_SHIFT		291718#define lpfc_mbx_rq_create_dim_MASK		0x000000011719#define lpfc_mbx_rq_create_dim_WORD		word01720#define lpfc_mbx_rq_create_dfd_SHIFT		301721#define lpfc_mbx_rq_create_dfd_MASK		0x000000011722#define lpfc_mbx_rq_create_dfd_WORD		word01723#define lpfc_mbx_rq_create_dnb_SHIFT		311724#define lpfc_mbx_rq_create_dnb_MASK		0x000000011725#define lpfc_mbx_rq_create_dnb_WORD		word01726			struct rq_context context;1727			struct dma_address page[1];1728		} request;1729		struct {1730			uint32_t word0;1731#define lpfc_mbx_rq_create_q_cnt_v2_SHIFT	161732#define lpfc_mbx_rq_create_q_cnt_v2_MASK	0x0000FFFF1733#define lpfc_mbx_rq_create_q_cnt_v2_WORD	word01734#define lpfc_mbx_rq_create_q_id_SHIFT		01735#define lpfc_mbx_rq_create_q_id_MASK		0x0000FFFF1736#define lpfc_mbx_rq_create_q_id_WORD		word01737			uint32_t doorbell_offset;1738			uint32_t word2;1739#define lpfc_mbx_rq_create_bar_set_SHIFT	01740#define lpfc_mbx_rq_create_bar_set_MASK		0x0000FFFF1741#define lpfc_mbx_rq_create_bar_set_WORD		word21742#define lpfc_mbx_rq_create_db_format_SHIFT	161743#define lpfc_mbx_rq_create_db_format_MASK	0x0000FFFF1744#define lpfc_mbx_rq_create_db_format_WORD	word21745		} response;1746	} u;1747};1748 1749struct lpfc_mbx_rq_destroy {1750	struct mbox_header header;1751	union {1752		struct {1753			uint32_t word0;1754#define lpfc_mbx_rq_destroy_q_id_SHIFT	01755#define lpfc_mbx_rq_destroy_q_id_MASK	0x0000FFFF1756#define lpfc_mbx_rq_destroy_q_id_WORD	word01757		} request;1758		struct {1759			uint32_t word0;1760		} response;1761	} u;1762};1763 1764struct mq_context {1765	uint32_t word0;1766#define lpfc_mq_context_cq_id_SHIFT	22 	/* Version 0 Only */1767#define lpfc_mq_context_cq_id_MASK	0x000003FF1768#define lpfc_mq_context_cq_id_WORD	word01769#define lpfc_mq_context_ring_size_SHIFT	161770#define lpfc_mq_context_ring_size_MASK	0x0000000F1771#define lpfc_mq_context_ring_size_WORD	word01772#define LPFC_MQ_RING_SIZE_16		0x51773#define LPFC_MQ_RING_SIZE_32		0x61774#define LPFC_MQ_RING_SIZE_64		0x71775#define LPFC_MQ_RING_SIZE_128		0x81776	uint32_t word1;1777#define lpfc_mq_context_valid_SHIFT	311778#define lpfc_mq_context_valid_MASK	0x000000011779#define lpfc_mq_context_valid_WORD	word11780	uint32_t reserved2;1781	uint32_t reserved3;1782};1783 1784struct lpfc_mbx_mq_create {1785	struct mbox_header header;1786	union {1787		struct {1788			uint32_t word0;1789#define lpfc_mbx_mq_create_num_pages_SHIFT	01790#define lpfc_mbx_mq_create_num_pages_MASK	0x0000FFFF1791#define lpfc_mbx_mq_create_num_pages_WORD	word01792			struct mq_context context;1793			struct dma_address page[LPFC_MAX_MQ_PAGE];1794		} request;1795		struct {1796			uint32_t word0;1797#define lpfc_mbx_mq_create_q_id_SHIFT	01798#define lpfc_mbx_mq_create_q_id_MASK	0x0000FFFF1799#define lpfc_mbx_mq_create_q_id_WORD	word01800		} response;1801	} u;1802};1803 1804struct lpfc_mbx_mq_create_ext {1805	struct mbox_header header;1806	union {1807		struct {1808			uint32_t word0;1809#define lpfc_mbx_mq_create_ext_num_pages_SHIFT	01810#define lpfc_mbx_mq_create_ext_num_pages_MASK	0x0000FFFF1811#define lpfc_mbx_mq_create_ext_num_pages_WORD	word01812#define lpfc_mbx_mq_create_ext_cq_id_SHIFT	16	/* Version 1 Only */1813#define lpfc_mbx_mq_create_ext_cq_id_MASK	0x0000FFFF1814#define lpfc_mbx_mq_create_ext_cq_id_WORD	word01815			uint32_t async_evt_bmap;1816#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT	LPFC_TRAILER_CODE_LINK1817#define lpfc_mbx_mq_create_ext_async_evt_link_MASK	0x000000011818#define lpfc_mbx_mq_create_ext_async_evt_link_WORD	async_evt_bmap1819#define LPFC_EVT_CODE_LINK_NO_LINK	0x01820#define LPFC_EVT_CODE_LINK_10_MBIT	0x11821#define LPFC_EVT_CODE_LINK_100_MBIT	0x21822#define LPFC_EVT_CODE_LINK_1_GBIT	0x31823#define LPFC_EVT_CODE_LINK_10_GBIT	0x41824#define lpfc_mbx_mq_create_ext_async_evt_fip_SHIFT	LPFC_TRAILER_CODE_FCOE1825#define lpfc_mbx_mq_create_ext_async_evt_fip_MASK	0x000000011826#define lpfc_mbx_mq_create_ext_async_evt_fip_WORD	async_evt_bmap1827#define lpfc_mbx_mq_create_ext_async_evt_group5_SHIFT	LPFC_TRAILER_CODE_GRP51828#define lpfc_mbx_mq_create_ext_async_evt_group5_MASK	0x000000011829#define lpfc_mbx_mq_create_ext_async_evt_group5_WORD	async_evt_bmap1830#define lpfc_mbx_mq_create_ext_async_evt_fc_SHIFT	LPFC_TRAILER_CODE_FC1831#define lpfc_mbx_mq_create_ext_async_evt_fc_MASK	0x000000011832#define lpfc_mbx_mq_create_ext_async_evt_fc_WORD	async_evt_bmap1833#define LPFC_EVT_CODE_FC_NO_LINK	0x01834#define LPFC_EVT_CODE_FC_1_GBAUD	0x11835#define LPFC_EVT_CODE_FC_2_GBAUD	0x21836#define LPFC_EVT_CODE_FC_4_GBAUD	0x41837#define LPFC_EVT_CODE_FC_8_GBAUD	0x81838#define LPFC_EVT_CODE_FC_10_GBAUD	0xA1839#define LPFC_EVT_CODE_FC_16_GBAUD	0x101840#define lpfc_mbx_mq_create_ext_async_evt_sli_SHIFT	LPFC_TRAILER_CODE_SLI1841#define lpfc_mbx_mq_create_ext_async_evt_sli_MASK	0x000000011842#define lpfc_mbx_mq_create_ext_async_evt_sli_WORD	async_evt_bmap1843			struct mq_context context;1844			struct dma_address page[LPFC_MAX_MQ_PAGE];1845		} request;1846		struct {1847			uint32_t word0;1848#define lpfc_mbx_mq_create_q_id_SHIFT	01849#define lpfc_mbx_mq_create_q_id_MASK	0x0000FFFF1850#define lpfc_mbx_mq_create_q_id_WORD	word01851		} response;1852	} u;1853#define LPFC_ASYNC_EVENT_LINK_STATE	0x21854#define LPFC_ASYNC_EVENT_FCF_STATE	0x41855#define LPFC_ASYNC_EVENT_GROUP5		0x201856};1857 1858struct lpfc_mbx_mq_destroy {1859	struct mbox_header header;1860	union {1861		struct {1862			uint32_t word0;1863#define lpfc_mbx_mq_destroy_q_id_SHIFT	01864#define lpfc_mbx_mq_destroy_q_id_MASK	0x0000FFFF1865#define lpfc_mbx_mq_destroy_q_id_WORD	word01866		} request;1867		struct {1868			uint32_t word0;1869		} response;1870	} u;1871};1872 1873/* Start Gen 2 SLI4 Mailbox definitions: */1874 1875/* Define allocate-ready Gen 2 SLI4 FCoE Resource Extent Types. */1876#define LPFC_RSC_TYPE_FCOE_VFI	0x201877#define LPFC_RSC_TYPE_FCOE_VPI	0x211878#define LPFC_RSC_TYPE_FCOE_RPI	0x221879#define LPFC_RSC_TYPE_FCOE_XRI	0x231880 1881struct lpfc_mbx_get_rsrc_extent_info {1882	struct mbox_header header;1883	union {1884		struct {1885			uint32_t word4;1886#define lpfc_mbx_get_rsrc_extent_info_type_SHIFT	01887#define lpfc_mbx_get_rsrc_extent_info_type_MASK		0x0000FFFF1888#define lpfc_mbx_get_rsrc_extent_info_type_WORD		word41889		} req;1890		struct {1891			uint32_t word4;1892#define lpfc_mbx_get_rsrc_extent_info_cnt_SHIFT		01893#define lpfc_mbx_get_rsrc_extent_info_cnt_MASK		0x0000FFFF1894#define lpfc_mbx_get_rsrc_extent_info_cnt_WORD		word41895#define lpfc_mbx_get_rsrc_extent_info_size_SHIFT	161896#define lpfc_mbx_get_rsrc_extent_info_size_MASK		0x0000FFFF1897#define lpfc_mbx_get_rsrc_extent_info_size_WORD		word41898		} rsp;1899	} u;1900};1901 1902struct lpfc_mbx_query_fw_config {1903	struct mbox_header header;1904	struct {1905		uint32_t config_number;1906#define	LPFC_FC_FCOE		0x000000071907		uint32_t asic_revision;1908		uint32_t physical_port;1909		uint32_t function_mode;1910#define LPFC_FCOE_INI_MODE	0x000000401911#define LPFC_FCOE_TGT_MODE	0x000000801912#define LPFC_DUA_MODE		0x000008001913		uint32_t ulp0_mode;1914#define LPFC_ULP_FCOE_INIT_MODE	0x000000401915#define LPFC_ULP_FCOE_TGT_MODE	0x000000801916		uint32_t ulp0_nap_words[12];1917		uint32_t ulp1_mode;1918		uint32_t ulp1_nap_words[12];1919		uint32_t function_capabilities;1920		uint32_t cqid_base;1921		uint32_t cqid_tot;1922		uint32_t eqid_base;1923		uint32_t eqid_tot;1924		uint32_t ulp0_nap2_words[2];1925		uint32_t ulp1_nap2_words[2];1926	} rsp;1927};1928 1929struct lpfc_mbx_set_beacon_config {1930	struct mbox_header header;1931	uint32_t word4;1932#define lpfc_mbx_set_beacon_port_num_SHIFT		01933#define lpfc_mbx_set_beacon_port_num_MASK		0x0000003F1934#define lpfc_mbx_set_beacon_port_num_WORD		word41935#define lpfc_mbx_set_beacon_port_type_SHIFT		61936#define lpfc_mbx_set_beacon_port_type_MASK		0x000000031937#define lpfc_mbx_set_beacon_port_type_WORD		word41938#define lpfc_mbx_set_beacon_state_SHIFT			81939#define lpfc_mbx_set_beacon_state_MASK			0x000000FF1940#define lpfc_mbx_set_beacon_state_WORD			word41941#define lpfc_mbx_set_beacon_duration_SHIFT		161942#define lpfc_mbx_set_beacon_duration_MASK		0x000000FF1943#define lpfc_mbx_set_beacon_duration_WORD		word41944 1945/* COMMON_SET_BEACON_CONFIG_V1 */1946#define lpfc_mbx_set_beacon_duration_v1_SHIFT		161947#define lpfc_mbx_set_beacon_duration_v1_MASK		0x0000FFFF1948#define lpfc_mbx_set_beacon_duration_v1_WORD		word41949	uint32_t word5;  /* RESERVED  */1950};1951 1952struct lpfc_id_range {1953	uint32_t word5;1954#define lpfc_mbx_rsrc_id_word4_0_SHIFT	01955#define lpfc_mbx_rsrc_id_word4_0_MASK	0x0000FFFF1956#define lpfc_mbx_rsrc_id_word4_0_WORD	word51957#define lpfc_mbx_rsrc_id_word4_1_SHIFT	161958#define lpfc_mbx_rsrc_id_word4_1_MASK	0x0000FFFF1959#define lpfc_mbx_rsrc_id_word4_1_WORD	word51960};1961 1962struct lpfc_mbx_set_link_diag_state {1963	struct mbox_header header;1964	union {1965		struct {1966			uint32_t word0;1967#define lpfc_mbx_set_diag_state_diag_SHIFT	01968#define lpfc_mbx_set_diag_state_diag_MASK	0x000000011969#define lpfc_mbx_set_diag_state_diag_WORD	word01970#define lpfc_mbx_set_diag_state_diag_bit_valid_SHIFT	21971#define lpfc_mbx_set_diag_state_diag_bit_valid_MASK	0x000000011972#define lpfc_mbx_set_diag_state_diag_bit_valid_WORD	word01973#define LPFC_DIAG_STATE_DIAG_BIT_VALID_NO_CHANGE	01974#define LPFC_DIAG_STATE_DIAG_BIT_VALID_CHANGE		11975#define lpfc_mbx_set_diag_state_link_num_SHIFT	161976#define lpfc_mbx_set_diag_state_link_num_MASK	0x0000003F1977#define lpfc_mbx_set_diag_state_link_num_WORD	word01978#define lpfc_mbx_set_diag_state_link_type_SHIFT 221979#define lpfc_mbx_set_diag_state_link_type_MASK	0x000000031980#define lpfc_mbx_set_diag_state_link_type_WORD	word01981		} req;1982		struct {1983			uint32_t word0;1984		} rsp;1985	} u;1986};1987 1988struct lpfc_mbx_set_link_diag_loopback {1989	struct mbox_header header;1990	union {1991		struct {1992			uint32_t word0;1993#define lpfc_mbx_set_diag_lpbk_type_SHIFT		01994#define lpfc_mbx_set_diag_lpbk_type_MASK		0x000000031995#define lpfc_mbx_set_diag_lpbk_type_WORD		word01996#define LPFC_DIAG_LOOPBACK_TYPE_DISABLE			0x01997#define LPFC_DIAG_LOOPBACK_TYPE_INTERNAL		0x11998#define LPFC_DIAG_LOOPBACK_TYPE_SERDES			0x21999#define LPFC_DIAG_LOOPBACK_TYPE_EXTERNAL_TRUNKED	0x32000#define lpfc_mbx_set_diag_lpbk_link_num_SHIFT		162001#define lpfc_mbx_set_diag_lpbk_link_num_MASK		0x0000003F2002#define lpfc_mbx_set_diag_lpbk_link_num_WORD		word02003#define lpfc_mbx_set_diag_lpbk_link_type_SHIFT		222004#define lpfc_mbx_set_diag_lpbk_link_type_MASK		0x000000032005#define lpfc_mbx_set_diag_lpbk_link_type_WORD		word02006		} req;2007		struct {2008			uint32_t word0;2009		} rsp;2010	} u;2011};2012 2013struct lpfc_mbx_run_link_diag_test {2014	struct mbox_header header;2015	union {2016		struct {2017			uint32_t word0;2018#define lpfc_mbx_run_diag_test_link_num_SHIFT	162019#define lpfc_mbx_run_diag_test_link_num_MASK	0x0000003F2020#define lpfc_mbx_run_diag_test_link_num_WORD	word02021#define lpfc_mbx_run_diag_test_link_type_SHIFT	222022#define lpfc_mbx_run_diag_test_link_type_MASK	0x000000032023#define lpfc_mbx_run_diag_test_link_type_WORD	word02024			uint32_t word1;2025#define lpfc_mbx_run_diag_test_test_id_SHIFT	02026#define lpfc_mbx_run_diag_test_test_id_MASK	0x0000FFFF2027#define lpfc_mbx_run_diag_test_test_id_WORD	word12028#define lpfc_mbx_run_diag_test_loops_SHIFT	162029#define lpfc_mbx_run_diag_test_loops_MASK	0x0000FFFF2030#define lpfc_mbx_run_diag_test_loops_WORD	word12031			uint32_t word2;2032#define lpfc_mbx_run_diag_test_test_ver_SHIFT	02033#define lpfc_mbx_run_diag_test_test_ver_MASK	0x0000FFFF2034#define lpfc_mbx_run_diag_test_test_ver_WORD	word22035#define lpfc_mbx_run_diag_test_err_act_SHIFT	162036#define lpfc_mbx_run_diag_test_err_act_MASK	0x000000FF2037#define lpfc_mbx_run_diag_test_err_act_WORD	word22038		} req;2039		struct {2040			uint32_t word0;2041		} rsp;2042	} u;2043};2044 2045/*2046 * struct lpfc_mbx_alloc_rsrc_extents:2047 * A mbox is generically 256 bytes long. An SLI4_CONFIG mailbox requires2048 * 6 words of header + 4 words of shared subcommand header +2049 * 1 words of Extent-Opcode-specific header = 11 words or 44 bytes total.2050 *2051 * An embedded version of SLI4_CONFIG therefore has 256 - 44 = 212 bytes2052 * for extents payload.2053 *2054 * 212/2 (bytes per extent) = 106 extents.2055 * 106/2 (extents per word) = 53 words.2056 * lpfc_id_range id is statically size to 53.2057 *2058 * This mailbox definition is used for ALLOC or GET_ALLOCATED2059 * extent ranges.  For ALLOC, the type and cnt are required.2060 * For GET_ALLOCATED, only the type is required.2061 */2062struct lpfc_mbx_alloc_rsrc_extents {2063	struct mbox_header header;2064	union {2065		struct {2066			uint32_t word4;2067#define lpfc_mbx_alloc_rsrc_extents_type_SHIFT	02068#define lpfc_mbx_alloc_rsrc_extents_type_MASK	0x0000FFFF2069#define lpfc_mbx_alloc_rsrc_extents_type_WORD	word42070#define lpfc_mbx_alloc_rsrc_extents_cnt_SHIFT	162071#define lpfc_mbx_alloc_rsrc_extents_cnt_MASK	0x0000FFFF2072#define lpfc_mbx_alloc_rsrc_extents_cnt_WORD	word42073		} req;2074		struct {2075			uint32_t word4;2076#define lpfc_mbx_rsrc_cnt_SHIFT	02077#define lpfc_mbx_rsrc_cnt_MASK	0x0000FFFF2078#define lpfc_mbx_rsrc_cnt_WORD	word42079			struct lpfc_id_range id[53];2080		} rsp;2081	} u;2082};2083 2084/*2085 * This is the non-embedded version of ALLOC or GET RSRC_EXTENTS. Word4 in this2086 * structure shares the same SHIFT/MASK/WORD defines provided in the2087 * mbx_alloc_rsrc_extents and mbx_get_alloc_rsrc_extents, word4, provided in2088 * the structures defined above.  This non-embedded structure provides for the2089 * maximum number of extents supported by the port.2090 */2091struct lpfc_mbx_nembed_rsrc_extent {2092	union  lpfc_sli4_cfg_shdr cfg_shdr;2093	uint32_t word4;2094	struct lpfc_id_range id;2095};2096 2097struct lpfc_mbx_dealloc_rsrc_extents {2098	struct mbox_header header;2099	struct {2100		uint32_t word4;2101#define lpfc_mbx_dealloc_rsrc_extents_type_SHIFT	02102#define lpfc_mbx_dealloc_rsrc_extents_type_MASK		0x0000FFFF2103#define lpfc_mbx_dealloc_rsrc_extents_type_WORD		word42104	} req;2105 2106};2107 2108/* Start SLI4 FCoE specific mbox structures. */2109 2110struct lpfc_mbx_post_hdr_tmpl {2111	struct mbox_header header;2112	uint32_t word10;2113#define lpfc_mbx_post_hdr_tmpl_rpi_offset_SHIFT  02114#define lpfc_mbx_post_hdr_tmpl_rpi_offset_MASK   0x0000FFFF2115#define lpfc_mbx_post_hdr_tmpl_rpi_offset_WORD   word102116#define lpfc_mbx_post_hdr_tmpl_page_cnt_SHIFT   162117#define lpfc_mbx_post_hdr_tmpl_page_cnt_MASK    0x0000FFFF2118#define lpfc_mbx_post_hdr_tmpl_page_cnt_WORD    word102119	uint32_t rpi_paddr_lo;2120	uint32_t rpi_paddr_hi;2121};2122 2123struct sli4_sge {	/* SLI-4 */2124	uint32_t addr_hi;2125	uint32_t addr_lo;2126 2127	uint32_t word2;2128#define lpfc_sli4_sge_offset_SHIFT	02129#define lpfc_sli4_sge_offset_MASK	0x07FFFFFF2130#define lpfc_sli4_sge_offset_WORD	word22131#define lpfc_sli4_sge_type_SHIFT	272132#define lpfc_sli4_sge_type_MASK		0x0000000F2133#define lpfc_sli4_sge_type_WORD		word22134#define LPFC_SGE_TYPE_DATA		0x02135#define LPFC_SGE_TYPE_DIF		0x42136#define LPFC_SGE_TYPE_LSP		0x52137#define LPFC_SGE_TYPE_PEDIF		0x62138#define LPFC_SGE_TYPE_PESEED		0x72139#define LPFC_SGE_TYPE_DISEED		0x82140#define LPFC_SGE_TYPE_ENC		0x92141#define LPFC_SGE_TYPE_ATM		0xA2142#define LPFC_SGE_TYPE_SKIP		0xC2143#define lpfc_sli4_sge_last_SHIFT	31 /* Last SEG in the SGL sets it */2144#define lpfc_sli4_sge_last_MASK		0x000000012145#define lpfc_sli4_sge_last_WORD		word22146	uint32_t sge_len;2147};2148 2149struct sli4_sge_le {2150	__le32 addr_hi;2151	__le32 addr_lo;2152 2153	__le32 word2;2154	__le32 sge_len;2155};2156 2157struct sli4_hybrid_sgl {2158	struct list_head list_node;2159	struct sli4_sge *dma_sgl;2160	dma_addr_t dma_phys_sgl;2161};2162 2163struct fcp_cmd_rsp_buf {2164	struct list_head list_node;2165 2166	/* for storing cmd/rsp dma alloc'ed virt_addr */2167	struct fcp_cmnd *fcp_cmnd;2168	struct fcp_rsp *fcp_rsp;2169 2170	/* for storing this cmd/rsp's dma mapped phys addr from per CPU pool */2171	dma_addr_t fcp_cmd_rsp_dma_handle;2172};2173 2174struct sli4_sge_diseed {	/* SLI-4 */2175	uint32_t ref_tag;2176	uint32_t ref_tag_tran;2177 2178	uint32_t word2;2179#define lpfc_sli4_sge_dif_apptran_SHIFT	02180#define lpfc_sli4_sge_dif_apptran_MASK	0x0000FFFF2181#define lpfc_sli4_sge_dif_apptran_WORD	word22182#define lpfc_sli4_sge_dif_af_SHIFT	242183#define lpfc_sli4_sge_dif_af_MASK	0x000000012184#define lpfc_sli4_sge_dif_af_WORD	word22185#define lpfc_sli4_sge_dif_na_SHIFT	252186#define lpfc_sli4_sge_dif_na_MASK	0x000000012187#define lpfc_sli4_sge_dif_na_WORD	word22188#define lpfc_sli4_sge_dif_hi_SHIFT	262189#define lpfc_sli4_sge_dif_hi_MASK	0x000000012190#define lpfc_sli4_sge_dif_hi_WORD	word22191#define lpfc_sli4_sge_dif_type_SHIFT	272192#define lpfc_sli4_sge_dif_type_MASK	0x0000000F2193#define lpfc_sli4_sge_dif_type_WORD	word22194#define lpfc_sli4_sge_dif_last_SHIFT	31 /* Last SEG in the SGL sets it */2195#define lpfc_sli4_sge_dif_last_MASK	0x000000012196#define lpfc_sli4_sge_dif_last_WORD	word22197	uint32_t word3;2198#define lpfc_sli4_sge_dif_apptag_SHIFT	02199#define lpfc_sli4_sge_dif_apptag_MASK	0x0000FFFF2200#define lpfc_sli4_sge_dif_apptag_WORD	word32201#define lpfc_sli4_sge_dif_bs_SHIFT	162202#define lpfc_sli4_sge_dif_bs_MASK	0x000000072203#define lpfc_sli4_sge_dif_bs_WORD	word32204#define lpfc_sli4_sge_dif_ai_SHIFT	192205#define lpfc_sli4_sge_dif_ai_MASK	0x000000012206#define lpfc_sli4_sge_dif_ai_WORD	word32207#define lpfc_sli4_sge_dif_me_SHIFT	202208#define lpfc_sli4_sge_dif_me_MASK	0x000000012209#define lpfc_sli4_sge_dif_me_WORD	word32210#define lpfc_sli4_sge_dif_re_SHIFT	212211#define lpfc_sli4_sge_dif_re_MASK	0x000000012212#define lpfc_sli4_sge_dif_re_WORD	word32213#define lpfc_sli4_sge_dif_ce_SHIFT	222214#define lpfc_sli4_sge_dif_ce_MASK	0x000000012215#define lpfc_sli4_sge_dif_ce_WORD	word32216#define lpfc_sli4_sge_dif_nr_SHIFT	232217#define lpfc_sli4_sge_dif_nr_MASK	0x000000012218#define lpfc_sli4_sge_dif_nr_WORD	word32219#define lpfc_sli4_sge_dif_oprx_SHIFT	242220#define lpfc_sli4_sge_dif_oprx_MASK	0x0000000F2221#define lpfc_sli4_sge_dif_oprx_WORD	word32222#define lpfc_sli4_sge_dif_optx_SHIFT	282223#define lpfc_sli4_sge_dif_optx_MASK	0x0000000F2224#define lpfc_sli4_sge_dif_optx_WORD	word32225/* optx and oprx use BG_OP_IN defines in lpfc_hw.h */2226};2227 2228struct fcf_record {2229	uint32_t max_rcv_size;2230	uint32_t fka_adv_period;2231	uint32_t fip_priority;2232	uint32_t word3;2233#define lpfc_fcf_record_mac_0_SHIFT		02234#define lpfc_fcf_record_mac_0_MASK		0x000000FF2235#define lpfc_fcf_record_mac_0_WORD		word32236#define lpfc_fcf_record_mac_1_SHIFT		82237#define lpfc_fcf_record_mac_1_MASK		0x000000FF2238#define lpfc_fcf_record_mac_1_WORD		word32239#define lpfc_fcf_record_mac_2_SHIFT		162240#define lpfc_fcf_record_mac_2_MASK		0x000000FF2241#define lpfc_fcf_record_mac_2_WORD		word32242#define lpfc_fcf_record_mac_3_SHIFT		242243#define lpfc_fcf_record_mac_3_MASK		0x000000FF2244#define lpfc_fcf_record_mac_3_WORD		word32245	uint32_t word4;2246#define lpfc_fcf_record_mac_4_SHIFT		02247#define lpfc_fcf_record_mac_4_MASK		0x000000FF2248#define lpfc_fcf_record_mac_4_WORD		word42249#define lpfc_fcf_record_mac_5_SHIFT		82250#define lpfc_fcf_record_mac_5_MASK		0x000000FF2251#define lpfc_fcf_record_mac_5_WORD		word42252#define lpfc_fcf_record_fcf_avail_SHIFT		162253#define lpfc_fcf_record_fcf_avail_MASK		0x000000FF2254#define lpfc_fcf_record_fcf_avail_WORD		word42255#define lpfc_fcf_record_mac_addr_prov_SHIFT	242256#define lpfc_fcf_record_mac_addr_prov_MASK	0x000000FF2257#define lpfc_fcf_record_mac_addr_prov_WORD	word42258#define LPFC_FCF_FPMA           1 	/* Fabric Provided MAC Address */2259#define LPFC_FCF_SPMA           2       /* Server Provided MAC Address */2260	uint32_t word5;2261#define lpfc_fcf_record_fab_name_0_SHIFT	02262#define lpfc_fcf_record_fab_name_0_MASK		0x000000FF2263#define lpfc_fcf_record_fab_name_0_WORD		word52264#define lpfc_fcf_record_fab_name_1_SHIFT	82265#define lpfc_fcf_record_fab_name_1_MASK		0x000000FF2266#define lpfc_fcf_record_fab_name_1_WORD		word52267#define lpfc_fcf_record_fab_name_2_SHIFT	162268#define lpfc_fcf_record_fab_name_2_MASK		0x000000FF2269#define lpfc_fcf_record_fab_name_2_WORD		word52270#define lpfc_fcf_record_fab_name_3_SHIFT	242271#define lpfc_fcf_record_fab_name_3_MASK		0x000000FF2272#define lpfc_fcf_record_fab_name_3_WORD		word52273	uint32_t word6;2274#define lpfc_fcf_record_fab_name_4_SHIFT	02275#define lpfc_fcf_record_fab_name_4_MASK		0x000000FF2276#define lpfc_fcf_record_fab_name_4_WORD		word62277#define lpfc_fcf_record_fab_name_5_SHIFT	82278#define lpfc_fcf_record_fab_name_5_MASK		0x000000FF2279#define lpfc_fcf_record_fab_name_5_WORD		word62280#define lpfc_fcf_record_fab_name_6_SHIFT	162281#define lpfc_fcf_record_fab_name_6_MASK		0x000000FF2282#define lpfc_fcf_record_fab_name_6_WORD		word62283#define lpfc_fcf_record_fab_name_7_SHIFT	242284#define lpfc_fcf_record_fab_name_7_MASK		0x000000FF2285#define lpfc_fcf_record_fab_name_7_WORD		word62286	uint32_t word7;2287#define lpfc_fcf_record_fc_map_0_SHIFT		02288#define lpfc_fcf_record_fc_map_0_MASK		0x000000FF2289#define lpfc_fcf_record_fc_map_0_WORD		word72290#define lpfc_fcf_record_fc_map_1_SHIFT		82291#define lpfc_fcf_record_fc_map_1_MASK		0x000000FF2292#define lpfc_fcf_record_fc_map_1_WORD		word72293#define lpfc_fcf_record_fc_map_2_SHIFT		162294#define lpfc_fcf_record_fc_map_2_MASK		0x000000FF2295#define lpfc_fcf_record_fc_map_2_WORD		word72296#define lpfc_fcf_record_fcf_valid_SHIFT		242297#define lpfc_fcf_record_fcf_valid_MASK		0x000000012298#define lpfc_fcf_record_fcf_valid_WORD		word72299#define lpfc_fcf_record_fcf_fc_SHIFT		252300#define lpfc_fcf_record_fcf_fc_MASK		0x000000012301#define lpfc_fcf_record_fcf_fc_WORD		word72302#define lpfc_fcf_record_fcf_sol_SHIFT		312303#define lpfc_fcf_record_fcf_sol_MASK		0x000000012304#define lpfc_fcf_record_fcf_sol_WORD		word72305	uint32_t word8;2306#define lpfc_fcf_record_fcf_index_SHIFT		02307#define lpfc_fcf_record_fcf_index_MASK		0x0000FFFF2308#define lpfc_fcf_record_fcf_index_WORD		word82309#define lpfc_fcf_record_fcf_state_SHIFT		162310#define lpfc_fcf_record_fcf_state_MASK		0x0000FFFF2311#define lpfc_fcf_record_fcf_state_WORD		word82312	uint8_t vlan_bitmap[512];2313	uint32_t word137;2314#define lpfc_fcf_record_switch_name_0_SHIFT	02315#define lpfc_fcf_record_switch_name_0_MASK	0x000000FF2316#define lpfc_fcf_record_switch_name_0_WORD	word1372317#define lpfc_fcf_record_switch_name_1_SHIFT	82318#define lpfc_fcf_record_switch_name_1_MASK	0x000000FF2319#define lpfc_fcf_record_switch_name_1_WORD	word1372320#define lpfc_fcf_record_switch_name_2_SHIFT	162321#define lpfc_fcf_record_switch_name_2_MASK	0x000000FF2322#define lpfc_fcf_record_switch_name_2_WORD	word1372323#define lpfc_fcf_record_switch_name_3_SHIFT	242324#define lpfc_fcf_record_switch_name_3_MASK	0x000000FF2325#define lpfc_fcf_record_switch_name_3_WORD	word1372326	uint32_t word138;2327#define lpfc_fcf_record_switch_name_4_SHIFT	02328#define lpfc_fcf_record_switch_name_4_MASK	0x000000FF2329#define lpfc_fcf_record_switch_name_4_WORD	word1382330#define lpfc_fcf_record_switch_name_5_SHIFT	82331#define lpfc_fcf_record_switch_name_5_MASK	0x000000FF2332#define lpfc_fcf_record_switch_name_5_WORD	word1382333#define lpfc_fcf_record_switch_name_6_SHIFT	162334#define lpfc_fcf_record_switch_name_6_MASK	0x000000FF2335#define lpfc_fcf_record_switch_name_6_WORD	word1382336#define lpfc_fcf_record_switch_name_7_SHIFT	242337#define lpfc_fcf_record_switch_name_7_MASK	0x000000FF2338#define lpfc_fcf_record_switch_name_7_WORD	word1382339};2340 2341struct lpfc_mbx_read_fcf_tbl {2342	union lpfc_sli4_cfg_shdr cfg_shdr;2343	union {2344		struct {2345			uint32_t word10;2346#define lpfc_mbx_read_fcf_tbl_indx_SHIFT	02347#define lpfc_mbx_read_fcf_tbl_indx_MASK		0x0000FFFF2348#define lpfc_mbx_read_fcf_tbl_indx_WORD		word102349		} request;2350		struct {2351			uint32_t eventag;2352		} response;2353	} u;2354	uint32_t word11;2355#define lpfc_mbx_read_fcf_tbl_nxt_vindx_SHIFT	02356#define lpfc_mbx_read_fcf_tbl_nxt_vindx_MASK	0x0000FFFF2357#define lpfc_mbx_read_fcf_tbl_nxt_vindx_WORD	word112358};2359 2360struct lpfc_mbx_add_fcf_tbl_entry {2361	union lpfc_sli4_cfg_shdr cfg_shdr;2362	uint32_t word10;2363#define lpfc_mbx_add_fcf_tbl_fcfi_SHIFT        02364#define lpfc_mbx_add_fcf_tbl_fcfi_MASK         0x0000FFFF2365#define lpfc_mbx_add_fcf_tbl_fcfi_WORD         word102366	struct lpfc_mbx_sge fcf_sge;2367};2368 2369struct lpfc_mbx_del_fcf_tbl_entry {2370	struct mbox_header header;2371	uint32_t word10;2372#define lpfc_mbx_del_fcf_tbl_count_SHIFT	02373#define lpfc_mbx_del_fcf_tbl_count_MASK		0x0000FFFF2374#define lpfc_mbx_del_fcf_tbl_count_WORD		word102375#define lpfc_mbx_del_fcf_tbl_index_SHIFT	162376#define lpfc_mbx_del_fcf_tbl_index_MASK		0x0000FFFF2377#define lpfc_mbx_del_fcf_tbl_index_WORD		word102378};2379 2380struct lpfc_mbx_redisc_fcf_tbl {2381	struct mbox_header header;2382	uint32_t word10;2383#define lpfc_mbx_redisc_fcf_count_SHIFT		02384#define lpfc_mbx_redisc_fcf_count_MASK		0x0000FFFF2385#define lpfc_mbx_redisc_fcf_count_WORD		word102386	uint32_t resvd;2387	uint32_t word12;2388#define lpfc_mbx_redisc_fcf_index_SHIFT		02389#define lpfc_mbx_redisc_fcf_index_MASK		0x0000FFFF2390#define lpfc_mbx_redisc_fcf_index_WORD		word122391};2392 2393/* Status field for embedded SLI_CONFIG mailbox command */2394#define STATUS_SUCCESS					0x02395#define STATUS_FAILED 					0x12396#define STATUS_ILLEGAL_REQUEST				0x22397#define STATUS_ILLEGAL_FIELD				0x32398#define STATUS_INSUFFICIENT_BUFFER 			0x42399#define STATUS_UNAUTHORIZED_REQUEST			0x52400#define STATUS_FLASHROM_SAVE_FAILED			0x172401#define STATUS_FLASHROM_RESTORE_FAILED			0x182402#define STATUS_ICCBINDEX_ALLOC_FAILED			0x1a2403#define STATUS_IOCTLHANDLE_ALLOC_FAILED 		0x1b2404#define STATUS_INVALID_PHY_ADDR_FROM_OSM		0x1c2405#define STATUS_INVALID_PHY_ADDR_LEN_FROM_OSM		0x1d2406#define STATUS_ASSERT_FAILED				0x1e2407#define STATUS_INVALID_SESSION				0x1f2408#define STATUS_INVALID_CONNECTION			0x202409#define STATUS_BTL_PATH_EXCEEDS_OSM_LIMIT		0x212410#define STATUS_BTL_NO_FREE_SLOT_PATH			0x242411#define STATUS_BTL_NO_FREE_SLOT_TGTID			0x252412#define STATUS_OSM_DEVSLOT_NOT_FOUND			0x262413#define STATUS_FLASHROM_READ_FAILED			0x272414#define STATUS_POLL_IOCTL_TIMEOUT			0x282415#define STATUS_ERROR_ACITMAIN				0x2a2416#define STATUS_REBOOT_REQUIRED				0x2c2417#define STATUS_FCF_IN_USE				0x3a2418#define STATUS_FCF_TABLE_EMPTY				0x432419 2420/*2421 * Additional status field for embedded SLI_CONFIG mailbox2422 * command.2423 */2424#define ADD_STATUS_OPERATION_ALREADY_ACTIVE		0x672425#define ADD_STATUS_FW_NOT_SUPPORTED			0xEB2426#define ADD_STATUS_INVALID_REQUEST			0x4B2427#define ADD_STATUS_INVALID_OBJECT_NAME			0xA02428#define ADD_STATUS_FW_DOWNLOAD_HW_DISABLED              0x582429 2430struct lpfc_mbx_sli4_config {2431	struct mbox_header header;2432};2433 2434struct lpfc_mbx_init_vfi {2435	uint32_t word1;2436#define lpfc_init_vfi_vr_SHIFT		312437#define lpfc_init_vfi_vr_MASK		0x000000012438#define lpfc_init_vfi_vr_WORD		word12439#define lpfc_init_vfi_vt_SHIFT		302440#define lpfc_init_vfi_vt_MASK		0x000000012441#define lpfc_init_vfi_vt_WORD		word12442#define lpfc_init_vfi_vf_SHIFT		292443#define lpfc_init_vfi_vf_MASK		0x000000012444#define lpfc_init_vfi_vf_WORD		word12445#define lpfc_init_vfi_vp_SHIFT		282446#define lpfc_init_vfi_vp_MASK		0x000000012447#define lpfc_init_vfi_vp_WORD		word12448#define lpfc_init_vfi_vfi_SHIFT		02449#define lpfc_init_vfi_vfi_MASK		0x0000FFFF2450#define lpfc_init_vfi_vfi_WORD		word12451	uint32_t word2;2452#define lpfc_init_vfi_vpi_SHIFT		162453#define lpfc_init_vfi_vpi_MASK		0x0000FFFF2454#define lpfc_init_vfi_vpi_WORD		word22455#define lpfc_init_vfi_fcfi_SHIFT	02456#define lpfc_init_vfi_fcfi_MASK		0x0000FFFF2457#define lpfc_init_vfi_fcfi_WORD		word22458	uint32_t word3;2459#define lpfc_init_vfi_pri_SHIFT		132460#define lpfc_init_vfi_pri_MASK		0x000000072461#define lpfc_init_vfi_pri_WORD		word32462#define lpfc_init_vfi_vf_id_SHIFT	12463#define lpfc_init_vfi_vf_id_MASK	0x00000FFF2464#define lpfc_init_vfi_vf_id_WORD	word32465	uint32_t word4;2466#define lpfc_init_vfi_hop_count_SHIFT	242467#define lpfc_init_vfi_hop_count_MASK	0x000000FF2468#define lpfc_init_vfi_hop_count_WORD	word42469};2470#define MBX_VFI_IN_USE			0x9F022471 2472 2473struct lpfc_mbx_reg_vfi {2474	uint32_t word1;2475#define lpfc_reg_vfi_upd_SHIFT		292476#define lpfc_reg_vfi_upd_MASK		0x000000012477#define lpfc_reg_vfi_upd_WORD		word12478#define lpfc_reg_vfi_vp_SHIFT		282479#define lpfc_reg_vfi_vp_MASK		0x000000012480#define lpfc_reg_vfi_vp_WORD		word12481#define lpfc_reg_vfi_vfi_SHIFT		02482#define lpfc_reg_vfi_vfi_MASK		0x0000FFFF2483#define lpfc_reg_vfi_vfi_WORD		word12484	uint32_t word2;2485#define lpfc_reg_vfi_vpi_SHIFT		162486#define lpfc_reg_vfi_vpi_MASK		0x0000FFFF2487#define lpfc_reg_vfi_vpi_WORD		word22488#define lpfc_reg_vfi_fcfi_SHIFT		02489#define lpfc_reg_vfi_fcfi_MASK		0x0000FFFF2490#define lpfc_reg_vfi_fcfi_WORD		word22491	uint32_t wwn[2];2492	struct ulp_bde64 bde;2493	uint32_t e_d_tov;2494	uint32_t r_a_tov;2495	uint32_t word10;2496#define lpfc_reg_vfi_nport_id_SHIFT	02497#define lpfc_reg_vfi_nport_id_MASK	0x00FFFFFF2498#define lpfc_reg_vfi_nport_id_WORD	word102499#define lpfc_reg_vfi_bbcr_SHIFT		272500#define lpfc_reg_vfi_bbcr_MASK		0x000000012501#define lpfc_reg_vfi_bbcr_WORD		word102502#define lpfc_reg_vfi_bbscn_SHIFT	282503#define lpfc_reg_vfi_bbscn_MASK		0x0000000F2504#define lpfc_reg_vfi_bbscn_WORD		word102505};2506 2507struct lpfc_mbx_init_vpi {2508	uint32_t word1;2509#define lpfc_init_vpi_vfi_SHIFT		162510#define lpfc_init_vpi_vfi_MASK		0x0000FFFF2511#define lpfc_init_vpi_vfi_WORD		word12512#define lpfc_init_vpi_vpi_SHIFT		02513#define lpfc_init_vpi_vpi_MASK		0x0000FFFF2514#define lpfc_init_vpi_vpi_WORD		word12515};2516 2517struct lpfc_mbx_read_vpi {2518	uint32_t word1_rsvd;2519	uint32_t word2;2520#define lpfc_mbx_read_vpi_vnportid_SHIFT	02521#define lpfc_mbx_read_vpi_vnportid_MASK		0x00FFFFFF2522#define lpfc_mbx_read_vpi_vnportid_WORD		word22523	uint32_t word3_rsvd;2524	uint32_t word4;2525#define lpfc_mbx_read_vpi_acq_alpa_SHIFT	02526#define lpfc_mbx_read_vpi_acq_alpa_MASK		0x000000FF2527#define lpfc_mbx_read_vpi_acq_alpa_WORD		word42528#define lpfc_mbx_read_vpi_pb_SHIFT		152529#define lpfc_mbx_read_vpi_pb_MASK		0x000000012530#define lpfc_mbx_read_vpi_pb_WORD		word42531#define lpfc_mbx_read_vpi_spec_alpa_SHIFT	162532#define lpfc_mbx_read_vpi_spec_alpa_MASK	0x000000FF2533#define lpfc_mbx_read_vpi_spec_alpa_WORD	word42534#define lpfc_mbx_read_vpi_ns_SHIFT		302535#define lpfc_mbx_read_vpi_ns_MASK		0x000000012536#define lpfc_mbx_read_vpi_ns_WORD		word42537#define lpfc_mbx_read_vpi_hl_SHIFT		312538#define lpfc_mbx_read_vpi_hl_MASK		0x000000012539#define lpfc_mbx_read_vpi_hl_WORD		word42540	uint32_t word5_rsvd;2541	uint32_t word6;2542#define lpfc_mbx_read_vpi_vpi_SHIFT		02543#define lpfc_mbx_read_vpi_vpi_MASK		0x0000FFFF2544#define lpfc_mbx_read_vpi_vpi_WORD		word62545	uint32_t word7;2546#define lpfc_mbx_read_vpi_mac_0_SHIFT		02547#define lpfc_mbx_read_vpi_mac_0_MASK		0x000000FF2548#define lpfc_mbx_read_vpi_mac_0_WORD		word72549#define lpfc_mbx_read_vpi_mac_1_SHIFT		82550#define lpfc_mbx_read_vpi_mac_1_MASK		0x000000FF2551#define lpfc_mbx_read_vpi_mac_1_WORD		word72552#define lpfc_mbx_read_vpi_mac_2_SHIFT		162553#define lpfc_mbx_read_vpi_mac_2_MASK		0x000000FF2554#define lpfc_mbx_read_vpi_mac_2_WORD		word72555#define lpfc_mbx_read_vpi_mac_3_SHIFT		242556#define lpfc_mbx_read_vpi_mac_3_MASK		0x000000FF2557#define lpfc_mbx_read_vpi_mac_3_WORD		word72558	uint32_t word8;2559#define lpfc_mbx_read_vpi_mac_4_SHIFT		02560#define lpfc_mbx_read_vpi_mac_4_MASK		0x000000FF2561#define lpfc_mbx_read_vpi_mac_4_WORD		word82562#define lpfc_mbx_read_vpi_mac_5_SHIFT		82563#define lpfc_mbx_read_vpi_mac_5_MASK		0x000000FF2564#define lpfc_mbx_read_vpi_mac_5_WORD		word82565#define lpfc_mbx_read_vpi_vlan_tag_SHIFT	162566#define lpfc_mbx_read_vpi_vlan_tag_MASK		0x00000FFF2567#define lpfc_mbx_read_vpi_vlan_tag_WORD		word82568#define lpfc_mbx_read_vpi_vv_SHIFT		282569#define lpfc_mbx_read_vpi_vv_MASK		0x00000012570#define lpfc_mbx_read_vpi_vv_WORD		word82571};2572 2573struct lpfc_mbx_unreg_vfi {2574	uint32_t word1_rsvd;2575	uint32_t word2;2576#define lpfc_unreg_vfi_vfi_SHIFT	02577#define lpfc_unreg_vfi_vfi_MASK		0x0000FFFF2578#define lpfc_unreg_vfi_vfi_WORD		word22579};2580 2581struct lpfc_mbx_resume_rpi {2582	uint32_t word1;2583#define lpfc_resume_rpi_index_SHIFT	02584#define lpfc_resume_rpi_index_MASK	0x0000FFFF2585#define lpfc_resume_rpi_index_WORD	word12586#define lpfc_resume_rpi_ii_SHIFT	302587#define lpfc_resume_rpi_ii_MASK		0x000000032588#define lpfc_resume_rpi_ii_WORD		word12589#define RESUME_INDEX_RPI		02590#define RESUME_INDEX_VPI		12591#define RESUME_INDEX_VFI		22592#define RESUME_INDEX_FCFI		32593	uint32_t event_tag;2594};2595 2596#define REG_FCF_INVALID_QID	0xFFFF2597struct lpfc_mbx_reg_fcfi {2598	uint32_t word1;2599#define lpfc_reg_fcfi_info_index_SHIFT	02600#define lpfc_reg_fcfi_info_index_MASK	0x0000FFFF2601#define lpfc_reg_fcfi_info_index_WORD	word12602#define lpfc_reg_fcfi_fcfi_SHIFT	162603#define lpfc_reg_fcfi_fcfi_MASK		0x0000FFFF2604#define lpfc_reg_fcfi_fcfi_WORD		word12605	uint32_t word2;2606#define lpfc_reg_fcfi_rq_id1_SHIFT	02607#define lpfc_reg_fcfi_rq_id1_MASK	0x0000FFFF2608#define lpfc_reg_fcfi_rq_id1_WORD	word22609#define lpfc_reg_fcfi_rq_id0_SHIFT	162610#define lpfc_reg_fcfi_rq_id0_MASK	0x0000FFFF2611#define lpfc_reg_fcfi_rq_id0_WORD	word22612	uint32_t word3;2613#define lpfc_reg_fcfi_rq_id3_SHIFT	02614#define lpfc_reg_fcfi_rq_id3_MASK	0x0000FFFF2615#define lpfc_reg_fcfi_rq_id3_WORD	word32616#define lpfc_reg_fcfi_rq_id2_SHIFT	162617#define lpfc_reg_fcfi_rq_id2_MASK	0x0000FFFF2618#define lpfc_reg_fcfi_rq_id2_WORD	word32619	uint32_t word4;2620#define lpfc_reg_fcfi_type_match0_SHIFT	242621#define lpfc_reg_fcfi_type_match0_MASK	0x000000FF2622#define lpfc_reg_fcfi_type_match0_WORD	word42623#define lpfc_reg_fcfi_type_mask0_SHIFT	162624#define lpfc_reg_fcfi_type_mask0_MASK	0x000000FF2625#define lpfc_reg_fcfi_type_mask0_WORD	word42626#define lpfc_reg_fcfi_rctl_match0_SHIFT	82627#define lpfc_reg_fcfi_rctl_match0_MASK	0x000000FF2628#define lpfc_reg_fcfi_rctl_match0_WORD	word42629#define lpfc_reg_fcfi_rctl_mask0_SHIFT	02630#define lpfc_reg_fcfi_rctl_mask0_MASK	0x000000FF2631#define lpfc_reg_fcfi_rctl_mask0_WORD	word42632	uint32_t word5;2633#define lpfc_reg_fcfi_type_match1_SHIFT	242634#define lpfc_reg_fcfi_type_match1_MASK	0x000000FF2635#define lpfc_reg_fcfi_type_match1_WORD	word52636#define lpfc_reg_fcfi_type_mask1_SHIFT	162637#define lpfc_reg_fcfi_type_mask1_MASK	0x000000FF2638#define lpfc_reg_fcfi_type_mask1_WORD	word52639#define lpfc_reg_fcfi_rctl_match1_SHIFT	82640#define lpfc_reg_fcfi_rctl_match1_MASK	0x000000FF2641#define lpfc_reg_fcfi_rctl_match1_WORD	word52642#define lpfc_reg_fcfi_rctl_mask1_SHIFT	02643#define lpfc_reg_fcfi_rctl_mask1_MASK	0x000000FF2644#define lpfc_reg_fcfi_rctl_mask1_WORD	word52645	uint32_t word6;2646#define lpfc_reg_fcfi_type_match2_SHIFT	242647#define lpfc_reg_fcfi_type_match2_MASK	0x000000FF2648#define lpfc_reg_fcfi_type_match2_WORD	word62649#define lpfc_reg_fcfi_type_mask2_SHIFT	162650#define lpfc_reg_fcfi_type_mask2_MASK	0x000000FF2651#define lpfc_reg_fcfi_type_mask2_WORD	word62652#define lpfc_reg_fcfi_rctl_match2_SHIFT	82653#define lpfc_reg_fcfi_rctl_match2_MASK	0x000000FF2654#define lpfc_reg_fcfi_rctl_match2_WORD	word62655#define lpfc_reg_fcfi_rctl_mask2_SHIFT	02656#define lpfc_reg_fcfi_rctl_mask2_MASK	0x000000FF2657#define lpfc_reg_fcfi_rctl_mask2_WORD	word62658	uint32_t word7;2659#define lpfc_reg_fcfi_type_match3_SHIFT	242660#define lpfc_reg_fcfi_type_match3_MASK	0x000000FF2661#define lpfc_reg_fcfi_type_match3_WORD	word72662#define lpfc_reg_fcfi_type_mask3_SHIFT	162663#define lpfc_reg_fcfi_type_mask3_MASK	0x000000FF2664#define lpfc_reg_fcfi_type_mask3_WORD	word72665#define lpfc_reg_fcfi_rctl_match3_SHIFT	82666#define lpfc_reg_fcfi_rctl_match3_MASK	0x000000FF2667#define lpfc_reg_fcfi_rctl_match3_WORD	word72668#define lpfc_reg_fcfi_rctl_mask3_SHIFT	02669#define lpfc_reg_fcfi_rctl_mask3_MASK	0x000000FF2670#define lpfc_reg_fcfi_rctl_mask3_WORD	word72671	uint32_t word8;2672#define lpfc_reg_fcfi_mam_SHIFT		132673#define lpfc_reg_fcfi_mam_MASK		0x000000032674#define lpfc_reg_fcfi_mam_WORD		word82675#define LPFC_MAM_BOTH		0	/* Both SPMA and FPMA */2676#define LPFC_MAM_SPMA		1	/* Server Provided MAC Address */2677#define LPFC_MAM_FPMA		2	/* Fabric Provided MAC Address */2678#define lpfc_reg_fcfi_vv_SHIFT		122679#define lpfc_reg_fcfi_vv_MASK		0x000000012680#define lpfc_reg_fcfi_vv_WORD		word82681#define lpfc_reg_fcfi_vlan_tag_SHIFT	02682#define lpfc_reg_fcfi_vlan_tag_MASK	0x00000FFF2683#define lpfc_reg_fcfi_vlan_tag_WORD	word82684};2685 2686struct lpfc_mbx_reg_fcfi_mrq {2687	uint32_t word1;2688#define lpfc_reg_fcfi_mrq_info_index_SHIFT	02689#define lpfc_reg_fcfi_mrq_info_index_MASK	0x0000FFFF2690#define lpfc_reg_fcfi_mrq_info_index_WORD	word12691#define lpfc_reg_fcfi_mrq_fcfi_SHIFT		162692#define lpfc_reg_fcfi_mrq_fcfi_MASK		0x0000FFFF2693#define lpfc_reg_fcfi_mrq_fcfi_WORD		word12694	uint32_t word2;2695#define lpfc_reg_fcfi_mrq_rq_id1_SHIFT		02696#define lpfc_reg_fcfi_mrq_rq_id1_MASK		0x0000FFFF2697#define lpfc_reg_fcfi_mrq_rq_id1_WORD		word22698#define lpfc_reg_fcfi_mrq_rq_id0_SHIFT		162699#define lpfc_reg_fcfi_mrq_rq_id0_MASK		0x0000FFFF2700#define lpfc_reg_fcfi_mrq_rq_id0_WORD		word22701	uint32_t word3;2702#define lpfc_reg_fcfi_mrq_rq_id3_SHIFT		02703#define lpfc_reg_fcfi_mrq_rq_id3_MASK		0x0000FFFF2704#define lpfc_reg_fcfi_mrq_rq_id3_WORD		word32705#define lpfc_reg_fcfi_mrq_rq_id2_SHIFT		162706#define lpfc_reg_fcfi_mrq_rq_id2_MASK		0x0000FFFF2707#define lpfc_reg_fcfi_mrq_rq_id2_WORD		word32708	uint32_t word4;2709#define lpfc_reg_fcfi_mrq_type_match0_SHIFT	242710#define lpfc_reg_fcfi_mrq_type_match0_MASK	0x000000FF2711#define lpfc_reg_fcfi_mrq_type_match0_WORD	word42712#define lpfc_reg_fcfi_mrq_type_mask0_SHIFT	162713#define lpfc_reg_fcfi_mrq_type_mask0_MASK	0x000000FF2714#define lpfc_reg_fcfi_mrq_type_mask0_WORD	word42715#define lpfc_reg_fcfi_mrq_rctl_match0_SHIFT	82716#define lpfc_reg_fcfi_mrq_rctl_match0_MASK	0x000000FF2717#define lpfc_reg_fcfi_mrq_rctl_match0_WORD	word42718#define lpfc_reg_fcfi_mrq_rctl_mask0_SHIFT	02719#define lpfc_reg_fcfi_mrq_rctl_mask0_MASK	0x000000FF2720#define lpfc_reg_fcfi_mrq_rctl_mask0_WORD	word42721	uint32_t word5;2722#define lpfc_reg_fcfi_mrq_type_match1_SHIFT	242723#define lpfc_reg_fcfi_mrq_type_match1_MASK	0x000000FF2724#define lpfc_reg_fcfi_mrq_type_match1_WORD	word52725#define lpfc_reg_fcfi_mrq_type_mask1_SHIFT	162726#define lpfc_reg_fcfi_mrq_type_mask1_MASK	0x000000FF2727#define lpfc_reg_fcfi_mrq_type_mask1_WORD	word52728#define lpfc_reg_fcfi_mrq_rctl_match1_SHIFT	82729#define lpfc_reg_fcfi_mrq_rctl_match1_MASK	0x000000FF2730#define lpfc_reg_fcfi_mrq_rctl_match1_WORD	word52731#define lpfc_reg_fcfi_mrq_rctl_mask1_SHIFT	02732#define lpfc_reg_fcfi_mrq_rctl_mask1_MASK	0x000000FF2733#define lpfc_reg_fcfi_mrq_rctl_mask1_WORD	word52734	uint32_t word6;2735#define lpfc_reg_fcfi_mrq_type_match2_SHIFT	242736#define lpfc_reg_fcfi_mrq_type_match2_MASK	0x000000FF2737#define lpfc_reg_fcfi_mrq_type_match2_WORD	word62738#define lpfc_reg_fcfi_mrq_type_mask2_SHIFT	162739#define lpfc_reg_fcfi_mrq_type_mask2_MASK	0x000000FF2740#define lpfc_reg_fcfi_mrq_type_mask2_WORD	word62741#define lpfc_reg_fcfi_mrq_rctl_match2_SHIFT	82742#define lpfc_reg_fcfi_mrq_rctl_match2_MASK	0x000000FF2743#define lpfc_reg_fcfi_mrq_rctl_match2_WORD	word62744#define lpfc_reg_fcfi_mrq_rctl_mask2_SHIFT	02745#define lpfc_reg_fcfi_mrq_rctl_mask2_MASK	0x000000FF2746#define lpfc_reg_fcfi_mrq_rctl_mask2_WORD	word62747	uint32_t word7;2748#define lpfc_reg_fcfi_mrq_type_match3_SHIFT	242749#define lpfc_reg_fcfi_mrq_type_match3_MASK	0x000000FF2750#define lpfc_reg_fcfi_mrq_type_match3_WORD	word72751#define lpfc_reg_fcfi_mrq_type_mask3_SHIFT	162752#define lpfc_reg_fcfi_mrq_type_mask3_MASK	0x000000FF2753#define lpfc_reg_fcfi_mrq_type_mask3_WORD	word72754#define lpfc_reg_fcfi_mrq_rctl_match3_SHIFT	82755#define lpfc_reg_fcfi_mrq_rctl_match3_MASK	0x000000FF2756#define lpfc_reg_fcfi_mrq_rctl_match3_WORD	word72757#define lpfc_reg_fcfi_mrq_rctl_mask3_SHIFT	02758#define lpfc_reg_fcfi_mrq_rctl_mask3_MASK	0x000000FF2759#define lpfc_reg_fcfi_mrq_rctl_mask3_WORD	word72760	uint32_t word8;2761#define lpfc_reg_fcfi_mrq_ptc7_SHIFT		312762#define lpfc_reg_fcfi_mrq_ptc7_MASK		0x000000012763#define lpfc_reg_fcfi_mrq_ptc7_WORD		word82764#define lpfc_reg_fcfi_mrq_ptc6_SHIFT		302765#define lpfc_reg_fcfi_mrq_ptc6_MASK		0x000000012766#define lpfc_reg_fcfi_mrq_ptc6_WORD		word82767#define lpfc_reg_fcfi_mrq_ptc5_SHIFT		292768#define lpfc_reg_fcfi_mrq_ptc5_MASK		0x000000012769#define lpfc_reg_fcfi_mrq_ptc5_WORD		word82770#define lpfc_reg_fcfi_mrq_ptc4_SHIFT		282771#define lpfc_reg_fcfi_mrq_ptc4_MASK		0x000000012772#define lpfc_reg_fcfi_mrq_ptc4_WORD		word82773#define lpfc_reg_fcfi_mrq_ptc3_SHIFT		272774#define lpfc_reg_fcfi_mrq_ptc3_MASK		0x000000012775#define lpfc_reg_fcfi_mrq_ptc3_WORD		word82776#define lpfc_reg_fcfi_mrq_ptc2_SHIFT		262777#define lpfc_reg_fcfi_mrq_ptc2_MASK		0x000000012778#define lpfc_reg_fcfi_mrq_ptc2_WORD		word82779#define lpfc_reg_fcfi_mrq_ptc1_SHIFT		252780#define lpfc_reg_fcfi_mrq_ptc1_MASK		0x000000012781#define lpfc_reg_fcfi_mrq_ptc1_WORD		word82782#define lpfc_reg_fcfi_mrq_ptc0_SHIFT		242783#define lpfc_reg_fcfi_mrq_ptc0_MASK		0x000000012784#define lpfc_reg_fcfi_mrq_ptc0_WORD		word82785#define lpfc_reg_fcfi_mrq_pt7_SHIFT		232786#define lpfc_reg_fcfi_mrq_pt7_MASK		0x000000012787#define lpfc_reg_fcfi_mrq_pt7_WORD		word82788#define lpfc_reg_fcfi_mrq_pt6_SHIFT		222789#define lpfc_reg_fcfi_mrq_pt6_MASK		0x000000012790#define lpfc_reg_fcfi_mrq_pt6_WORD		word82791#define lpfc_reg_fcfi_mrq_pt5_SHIFT		212792#define lpfc_reg_fcfi_mrq_pt5_MASK		0x000000012793#define lpfc_reg_fcfi_mrq_pt5_WORD		word82794#define lpfc_reg_fcfi_mrq_pt4_SHIFT		202795#define lpfc_reg_fcfi_mrq_pt4_MASK		0x000000012796#define lpfc_reg_fcfi_mrq_pt4_WORD		word82797#define lpfc_reg_fcfi_mrq_pt3_SHIFT		192798#define lpfc_reg_fcfi_mrq_pt3_MASK		0x000000012799#define lpfc_reg_fcfi_mrq_pt3_WORD		word82800#define lpfc_reg_fcfi_mrq_pt2_SHIFT		182801#define lpfc_reg_fcfi_mrq_pt2_MASK		0x000000012802#define lpfc_reg_fcfi_mrq_pt2_WORD		word82803#define lpfc_reg_fcfi_mrq_pt1_SHIFT		172804#define lpfc_reg_fcfi_mrq_pt1_MASK		0x000000012805#define lpfc_reg_fcfi_mrq_pt1_WORD		word82806#define lpfc_reg_fcfi_mrq_pt0_SHIFT		162807#define lpfc_reg_fcfi_mrq_pt0_MASK		0x000000012808#define lpfc_reg_fcfi_mrq_pt0_WORD		word82809#define lpfc_reg_fcfi_mrq_xmv_SHIFT		152810#define lpfc_reg_fcfi_mrq_xmv_MASK		0x000000012811#define lpfc_reg_fcfi_mrq_xmv_WORD		word82812#define lpfc_reg_fcfi_mrq_mode_SHIFT		132813#define lpfc_reg_fcfi_mrq_mode_MASK		0x000000012814#define lpfc_reg_fcfi_mrq_mode_WORD		word82815#define lpfc_reg_fcfi_mrq_vv_SHIFT		122816#define lpfc_reg_fcfi_mrq_vv_MASK		0x000000012817#define lpfc_reg_fcfi_mrq_vv_WORD		word82818#define lpfc_reg_fcfi_mrq_vlan_tag_SHIFT	02819#define lpfc_reg_fcfi_mrq_vlan_tag_MASK		0x00000FFF2820#define lpfc_reg_fcfi_mrq_vlan_tag_WORD		word82821	uint32_t word9;2822#define lpfc_reg_fcfi_mrq_policy_SHIFT		122823#define lpfc_reg_fcfi_mrq_policy_MASK		0x0000000F2824#define lpfc_reg_fcfi_mrq_policy_WORD		word92825#define lpfc_reg_fcfi_mrq_filter_SHIFT		82826#define lpfc_reg_fcfi_mrq_filter_MASK		0x0000000F2827#define lpfc_reg_fcfi_mrq_filter_WORD		word92828#define lpfc_reg_fcfi_mrq_npairs_SHIFT		02829#define lpfc_reg_fcfi_mrq_npairs_MASK		0x000000FF2830#define lpfc_reg_fcfi_mrq_npairs_WORD		word92831	uint32_t word10;2832	uint32_t word11;2833	uint32_t word12;2834	uint32_t word13;2835	uint32_t word14;2836	uint32_t word15;2837	uint32_t word16;2838};2839 2840struct lpfc_mbx_unreg_fcfi {2841	uint32_t word1_rsv;2842	uint32_t word2;2843#define lpfc_unreg_fcfi_SHIFT		02844#define lpfc_unreg_fcfi_MASK		0x0000FFFF2845#define lpfc_unreg_fcfi_WORD		word22846};2847 2848struct lpfc_mbx_read_rev {2849	uint32_t word1;2850#define lpfc_mbx_rd_rev_sli_lvl_SHIFT  		162851#define lpfc_mbx_rd_rev_sli_lvl_MASK   		0x0000000F2852#define lpfc_mbx_rd_rev_sli_lvl_WORD   		word12853#define lpfc_mbx_rd_rev_fcoe_SHIFT		202854#define lpfc_mbx_rd_rev_fcoe_MASK		0x000000012855#define lpfc_mbx_rd_rev_fcoe_WORD		word12856#define lpfc_mbx_rd_rev_cee_ver_SHIFT		212857#define lpfc_mbx_rd_rev_cee_ver_MASK		0x000000032858#define lpfc_mbx_rd_rev_cee_ver_WORD		word12859#define LPFC_PREDCBX_CEE_MODE	02860#define LPFC_DCBX_CEE_MODE	12861#define lpfc_mbx_rd_rev_vpd_SHIFT		292862#define lpfc_mbx_rd_rev_vpd_MASK		0x000000012863#define lpfc_mbx_rd_rev_vpd_WORD		word12864	uint32_t first_hw_rev;2865#define LPFC_G7_ASIC_1				0xd2866	uint32_t second_hw_rev;2867	uint32_t word4_rsvd;2868	uint32_t third_hw_rev;2869	uint32_t word6;2870#define lpfc_mbx_rd_rev_fcph_low_SHIFT		02871#define lpfc_mbx_rd_rev_fcph_low_MASK		0x000000FF2872#define lpfc_mbx_rd_rev_fcph_low_WORD		word62873#define lpfc_mbx_rd_rev_fcph_high_SHIFT		82874#define lpfc_mbx_rd_rev_fcph_high_MASK		0x000000FF2875#define lpfc_mbx_rd_rev_fcph_high_WORD		word62876#define lpfc_mbx_rd_rev_ftr_lvl_low_SHIFT	162877#define lpfc_mbx_rd_rev_ftr_lvl_low_MASK	0x000000FF2878#define lpfc_mbx_rd_rev_ftr_lvl_low_WORD	word62879#define lpfc_mbx_rd_rev_ftr_lvl_high_SHIFT	242880#define lpfc_mbx_rd_rev_ftr_lvl_high_MASK	0x000000FF2881#define lpfc_mbx_rd_rev_ftr_lvl_high_WORD	word62882	uint32_t word7_rsvd;2883	uint32_t fw_id_rev;2884	uint8_t  fw_name[16];2885	uint32_t ulp_fw_id_rev;2886	uint8_t  ulp_fw_name[16];2887	uint32_t word18_47_rsvd[30];2888	uint32_t word48;2889#define lpfc_mbx_rd_rev_avail_len_SHIFT		02890#define lpfc_mbx_rd_rev_avail_len_MASK		0x00FFFFFF2891#define lpfc_mbx_rd_rev_avail_len_WORD		word482892	uint32_t vpd_paddr_low;2893	uint32_t vpd_paddr_high;2894	uint32_t avail_vpd_len;2895	uint32_t rsvd_52_63[12];2896};2897 2898struct lpfc_mbx_read_config {2899	uint32_t word1;2900#define lpfc_mbx_rd_conf_extnts_inuse_SHIFT	312901#define lpfc_mbx_rd_conf_extnts_inuse_MASK	0x000000012902#define lpfc_mbx_rd_conf_extnts_inuse_WORD	word12903#define lpfc_mbx_rd_conf_fawwpn_SHIFT		302904#define lpfc_mbx_rd_conf_fawwpn_MASK		0x000000012905#define lpfc_mbx_rd_conf_fawwpn_WORD		word12906#define lpfc_mbx_rd_conf_wcs_SHIFT		28	/* warning signaling */2907#define lpfc_mbx_rd_conf_wcs_MASK		0x000000012908#define lpfc_mbx_rd_conf_wcs_WORD		word12909#define lpfc_mbx_rd_conf_acs_SHIFT		27	/* alarm signaling */2910#define lpfc_mbx_rd_conf_acs_MASK		0x000000012911#define lpfc_mbx_rd_conf_acs_WORD		word12912	uint32_t word2;2913#define lpfc_mbx_rd_conf_lnk_numb_SHIFT		02914#define lpfc_mbx_rd_conf_lnk_numb_MASK		0x0000003F2915#define lpfc_mbx_rd_conf_lnk_numb_WORD		word22916#define lpfc_mbx_rd_conf_lnk_type_SHIFT		62917#define lpfc_mbx_rd_conf_lnk_type_MASK		0x000000032918#define lpfc_mbx_rd_conf_lnk_type_WORD		word22919#define LPFC_LNK_TYPE_GE	02920#define LPFC_LNK_TYPE_FC	12921#define lpfc_mbx_rd_conf_lnk_ldv_SHIFT		82922#define lpfc_mbx_rd_conf_lnk_ldv_MASK		0x000000012923#define lpfc_mbx_rd_conf_lnk_ldv_WORD		word22924#define lpfc_mbx_rd_conf_trunk_SHIFT		122925#define lpfc_mbx_rd_conf_trunk_MASK		0x0000000F2926#define lpfc_mbx_rd_conf_trunk_WORD		word22927#define lpfc_mbx_rd_conf_pt_SHIFT		202928#define lpfc_mbx_rd_conf_pt_MASK		0x000000032929#define lpfc_mbx_rd_conf_pt_WORD		word22930#define lpfc_mbx_rd_conf_tf_SHIFT		222931#define lpfc_mbx_rd_conf_tf_MASK		0x000000012932#define lpfc_mbx_rd_conf_tf_WORD		word22933#define lpfc_mbx_rd_conf_ptv_SHIFT		232934#define lpfc_mbx_rd_conf_ptv_MASK		0x000000012935#define lpfc_mbx_rd_conf_ptv_WORD		word22936#define lpfc_mbx_rd_conf_topology_SHIFT		242937#define lpfc_mbx_rd_conf_topology_MASK		0x000000FF2938#define lpfc_mbx_rd_conf_topology_WORD		word22939	uint32_t rsvd_3;2940	uint32_t word4;2941#define lpfc_mbx_rd_conf_e_d_tov_SHIFT		02942#define lpfc_mbx_rd_conf_e_d_tov_MASK		0x0000FFFF2943#define lpfc_mbx_rd_conf_e_d_tov_WORD		word42944	uint32_t rsvd_5;2945	uint32_t word6;2946#define lpfc_mbx_rd_conf_r_a_tov_SHIFT		02947#define lpfc_mbx_rd_conf_r_a_tov_MASK		0x0000FFFF2948#define lpfc_mbx_rd_conf_r_a_tov_WORD		word62949#define lpfc_mbx_rd_conf_link_speed_SHIFT	162950#define lpfc_mbx_rd_conf_link_speed_MASK	0x0000FFFF2951#define lpfc_mbx_rd_conf_link_speed_WORD	word62952	uint32_t rsvd_7;2953	uint32_t word8;2954#define lpfc_mbx_rd_conf_bbscn_min_SHIFT	02955#define lpfc_mbx_rd_conf_bbscn_min_MASK		0x0000000F2956#define lpfc_mbx_rd_conf_bbscn_min_WORD		word82957#define lpfc_mbx_rd_conf_bbscn_max_SHIFT	42958#define lpfc_mbx_rd_conf_bbscn_max_MASK		0x0000000F2959#define lpfc_mbx_rd_conf_bbscn_max_WORD		word82960#define lpfc_mbx_rd_conf_bbscn_def_SHIFT	82961#define lpfc_mbx_rd_conf_bbscn_def_MASK		0x0000000F2962#define lpfc_mbx_rd_conf_bbscn_def_WORD		word82963	uint32_t word9;2964#define lpfc_mbx_rd_conf_lmt_SHIFT		02965#define lpfc_mbx_rd_conf_lmt_MASK		0x0000FFFF2966#define lpfc_mbx_rd_conf_lmt_WORD		word92967	uint32_t rsvd_10;2968	uint32_t rsvd_11;2969	uint32_t word12;2970#define lpfc_mbx_rd_conf_xri_base_SHIFT		02971#define lpfc_mbx_rd_conf_xri_base_MASK		0x0000FFFF2972#define lpfc_mbx_rd_conf_xri_base_WORD		word122973#define lpfc_mbx_rd_conf_xri_count_SHIFT	162974#define lpfc_mbx_rd_conf_xri_count_MASK		0x0000FFFF2975#define lpfc_mbx_rd_conf_xri_count_WORD		word122976	uint32_t word13;2977#define lpfc_mbx_rd_conf_rpi_base_SHIFT		02978#define lpfc_mbx_rd_conf_rpi_base_MASK		0x0000FFFF2979#define lpfc_mbx_rd_conf_rpi_base_WORD		word132980#define lpfc_mbx_rd_conf_rpi_count_SHIFT	162981#define lpfc_mbx_rd_conf_rpi_count_MASK		0x0000FFFF2982#define lpfc_mbx_rd_conf_rpi_count_WORD		word132983	uint32_t word14;2984#define lpfc_mbx_rd_conf_vpi_base_SHIFT		02985#define lpfc_mbx_rd_conf_vpi_base_MASK		0x0000FFFF2986#define lpfc_mbx_rd_conf_vpi_base_WORD		word142987#define lpfc_mbx_rd_conf_vpi_count_SHIFT	162988#define lpfc_mbx_rd_conf_vpi_count_MASK		0x0000FFFF2989#define lpfc_mbx_rd_conf_vpi_count_WORD		word142990	uint32_t word15;2991#define lpfc_mbx_rd_conf_vfi_base_SHIFT         02992#define lpfc_mbx_rd_conf_vfi_base_MASK          0x0000FFFF2993#define lpfc_mbx_rd_conf_vfi_base_WORD          word152994#define lpfc_mbx_rd_conf_vfi_count_SHIFT        162995#define lpfc_mbx_rd_conf_vfi_count_MASK         0x0000FFFF2996#define lpfc_mbx_rd_conf_vfi_count_WORD         word152997	uint32_t word16;2998#define lpfc_mbx_rd_conf_fcfi_count_SHIFT	162999#define lpfc_mbx_rd_conf_fcfi_count_MASK	0x0000FFFF3000#define lpfc_mbx_rd_conf_fcfi_count_WORD	word163001	uint32_t word17;3002#define lpfc_mbx_rd_conf_rq_count_SHIFT		03003#define lpfc_mbx_rd_conf_rq_count_MASK		0x0000FFFF3004#define lpfc_mbx_rd_conf_rq_count_WORD		word173005#define lpfc_mbx_rd_conf_eq_count_SHIFT		163006#define lpfc_mbx_rd_conf_eq_count_MASK		0x0000FFFF3007#define lpfc_mbx_rd_conf_eq_count_WORD		word173008	uint32_t word18;3009#define lpfc_mbx_rd_conf_wq_count_SHIFT		03010#define lpfc_mbx_rd_conf_wq_count_MASK		0x0000FFFF3011#define lpfc_mbx_rd_conf_wq_count_WORD		word183012#define lpfc_mbx_rd_conf_cq_count_SHIFT		163013#define lpfc_mbx_rd_conf_cq_count_MASK		0x0000FFFF3014#define lpfc_mbx_rd_conf_cq_count_WORD		word183015};3016 3017struct lpfc_mbx_request_features {3018	uint32_t word1;3019#define lpfc_mbx_rq_ftr_qry_SHIFT		03020#define lpfc_mbx_rq_ftr_qry_MASK		0x000000013021#define lpfc_mbx_rq_ftr_qry_WORD		word13022	uint32_t word2;3023#define lpfc_mbx_rq_ftr_rq_iaab_SHIFT		03024#define lpfc_mbx_rq_ftr_rq_iaab_MASK		0x000000013025#define lpfc_mbx_rq_ftr_rq_iaab_WORD		word23026#define lpfc_mbx_rq_ftr_rq_npiv_SHIFT		13027#define lpfc_mbx_rq_ftr_rq_npiv_MASK		0x000000013028#define lpfc_mbx_rq_ftr_rq_npiv_WORD		word23029#define lpfc_mbx_rq_ftr_rq_dif_SHIFT		23030#define lpfc_mbx_rq_ftr_rq_dif_MASK		0x000000013031#define lpfc_mbx_rq_ftr_rq_dif_WORD		word23032#define lpfc_mbx_rq_ftr_rq_vf_SHIFT		33033#define lpfc_mbx_rq_ftr_rq_vf_MASK		0x000000013034#define lpfc_mbx_rq_ftr_rq_vf_WORD		word23035#define lpfc_mbx_rq_ftr_rq_fcpi_SHIFT		43036#define lpfc_mbx_rq_ftr_rq_fcpi_MASK		0x000000013037#define lpfc_mbx_rq_ftr_rq_fcpi_WORD		word23038#define lpfc_mbx_rq_ftr_rq_fcpt_SHIFT		53039#define lpfc_mbx_rq_ftr_rq_fcpt_MASK		0x000000013040#define lpfc_mbx_rq_ftr_rq_fcpt_WORD		word23041#define lpfc_mbx_rq_ftr_rq_fcpc_SHIFT		63042#define lpfc_mbx_rq_ftr_rq_fcpc_MASK		0x000000013043#define lpfc_mbx_rq_ftr_rq_fcpc_WORD		word23044#define lpfc_mbx_rq_ftr_rq_ifip_SHIFT		73045#define lpfc_mbx_rq_ftr_rq_ifip_MASK		0x000000013046#define lpfc_mbx_rq_ftr_rq_ifip_WORD		word23047#define lpfc_mbx_rq_ftr_rq_iaar_SHIFT		93048#define lpfc_mbx_rq_ftr_rq_iaar_MASK		0x000000013049#define lpfc_mbx_rq_ftr_rq_iaar_WORD		word23050#define lpfc_mbx_rq_ftr_rq_perfh_SHIFT		113051#define lpfc_mbx_rq_ftr_rq_perfh_MASK		0x000000013052#define lpfc_mbx_rq_ftr_rq_perfh_WORD		word23053#define lpfc_mbx_rq_ftr_rq_mrqp_SHIFT		163054#define lpfc_mbx_rq_ftr_rq_mrqp_MASK		0x000000013055#define lpfc_mbx_rq_ftr_rq_mrqp_WORD		word23056#define lpfc_mbx_rq_ftr_rq_ashdr_SHIFT          173057#define lpfc_mbx_rq_ftr_rq_ashdr_MASK           0x000000013058#define lpfc_mbx_rq_ftr_rq_ashdr_WORD           word23059	uint32_t word3;3060#define lpfc_mbx_rq_ftr_rsp_iaab_SHIFT		03061#define lpfc_mbx_rq_ftr_rsp_iaab_MASK		0x000000013062#define lpfc_mbx_rq_ftr_rsp_iaab_WORD		word33063#define lpfc_mbx_rq_ftr_rsp_npiv_SHIFT		13064#define lpfc_mbx_rq_ftr_rsp_npiv_MASK		0x000000013065#define lpfc_mbx_rq_ftr_rsp_npiv_WORD		word33066#define lpfc_mbx_rq_ftr_rsp_dif_SHIFT		23067#define lpfc_mbx_rq_ftr_rsp_dif_MASK		0x000000013068#define lpfc_mbx_rq_ftr_rsp_dif_WORD		word33069#define lpfc_mbx_rq_ftr_rsp_vf_SHIFT		33070#define lpfc_mbx_rq_ftr_rsp_vf__MASK		0x000000013071#define lpfc_mbx_rq_ftr_rsp_vf_WORD		word33072#define lpfc_mbx_rq_ftr_rsp_fcpi_SHIFT		43073#define lpfc_mbx_rq_ftr_rsp_fcpi_MASK		0x000000013074#define lpfc_mbx_rq_ftr_rsp_fcpi_WORD		word33075#define lpfc_mbx_rq_ftr_rsp_fcpt_SHIFT		53076#define lpfc_mbx_rq_ftr_rsp_fcpt_MASK		0x000000013077#define lpfc_mbx_rq_ftr_rsp_fcpt_WORD		word33078#define lpfc_mbx_rq_ftr_rsp_fcpc_SHIFT		63079#define lpfc_mbx_rq_ftr_rsp_fcpc_MASK		0x000000013080#define lpfc_mbx_rq_ftr_rsp_fcpc_WORD		word33081#define lpfc_mbx_rq_ftr_rsp_ifip_SHIFT		73082#define lpfc_mbx_rq_ftr_rsp_ifip_MASK		0x000000013083#define lpfc_mbx_rq_ftr_rsp_ifip_WORD		word33084#define lpfc_mbx_rq_ftr_rsp_perfh_SHIFT		113085#define lpfc_mbx_rq_ftr_rsp_perfh_MASK		0x000000013086#define lpfc_mbx_rq_ftr_rsp_perfh_WORD		word33087#define lpfc_mbx_rq_ftr_rsp_mrqp_SHIFT		163088#define lpfc_mbx_rq_ftr_rsp_mrqp_MASK		0x000000013089#define lpfc_mbx_rq_ftr_rsp_mrqp_WORD		word33090#define lpfc_mbx_rq_ftr_rsp_ashdr_SHIFT         173091#define lpfc_mbx_rq_ftr_rsp_ashdr_MASK          0x000000013092#define lpfc_mbx_rq_ftr_rsp_ashdr_WORD          word33093};3094 3095struct lpfc_mbx_memory_dump_type3 {3096	uint32_t word1;3097#define lpfc_mbx_memory_dump_type3_type_SHIFT    03098#define lpfc_mbx_memory_dump_type3_type_MASK     0x0000000f3099#define lpfc_mbx_memory_dump_type3_type_WORD     word13100#define lpfc_mbx_memory_dump_type3_link_SHIFT    243101#define lpfc_mbx_memory_dump_type3_link_MASK     0x000000ff3102#define lpfc_mbx_memory_dump_type3_link_WORD     word13103	uint32_t word2;3104#define lpfc_mbx_memory_dump_type3_page_no_SHIFT  03105#define lpfc_mbx_memory_dump_type3_page_no_MASK   0x0000ffff3106#define lpfc_mbx_memory_dump_type3_page_no_WORD   word23107#define lpfc_mbx_memory_dump_type3_offset_SHIFT   163108#define lpfc_mbx_memory_dump_type3_offset_MASK    0x0000ffff3109#define lpfc_mbx_memory_dump_type3_offset_WORD    word23110	uint32_t word3;3111#define lpfc_mbx_memory_dump_type3_length_SHIFT  03112#define lpfc_mbx_memory_dump_type3_length_MASK   0x00ffffff3113#define lpfc_mbx_memory_dump_type3_length_WORD   word33114	uint32_t addr_lo;3115	uint32_t addr_hi;3116	uint32_t return_len;3117};3118 3119#define DMP_PAGE_A0             0xa03120#define DMP_PAGE_A2             0xa23121#define DMP_SFF_PAGE_A0_SIZE	2563122#define DMP_SFF_PAGE_A2_SIZE	2563123 3124#define SFP_WAVELENGTH_LC1310	13103125#define SFP_WAVELENGTH_LL1550	15503126 3127 3128/*3129 *  * SFF-8472 TABLE 3.43130 *   */3131#define  SFF_PG0_CONNECTOR_UNKNOWN    0x00   /* Unknown  */3132#define  SFF_PG0_CONNECTOR_SC         0x01   /* SC       */3133#define  SFF_PG0_CONNECTOR_FC_COPPER1 0x02   /* FC style 1 copper connector */3134#define  SFF_PG0_CONNECTOR_FC_COPPER2 0x03   /* FC style 2 copper connector */3135#define  SFF_PG0_CONNECTOR_BNC        0x04   /* BNC / TNC */3136#define  SFF_PG0_CONNECTOR__FC_COAX   0x05   /* FC coaxial headers */3137#define  SFF_PG0_CONNECTOR_FIBERJACK  0x06   /* FiberJack */3138#define  SFF_PG0_CONNECTOR_LC         0x07   /* LC        */3139#define  SFF_PG0_CONNECTOR_MT         0x08   /* MT - RJ   */3140#define  SFF_PG0_CONNECTOR_MU         0x09   /* MU        */3141#define  SFF_PG0_CONNECTOR_SF         0x0A   /* SG        */3142#define  SFF_PG0_CONNECTOR_OPTICAL_PIGTAIL 0x0B /* Optical pigtail */3143#define  SFF_PG0_CONNECTOR_OPTICAL_PARALLEL 0x0C /* MPO Parallel Optic */3144#define  SFF_PG0_CONNECTOR_HSSDC_II   0x20   /* HSSDC II */3145#define  SFF_PG0_CONNECTOR_COPPER_PIGTAIL 0x21 /* Copper pigtail */3146#define  SFF_PG0_CONNECTOR_RJ45       0x22  /* RJ45 */3147 3148/* SFF-8472 Table 3.1 Diagnostics: Data Fields Address/Page A0 */3149 3150#define SSF_IDENTIFIER			03151#define SSF_EXT_IDENTIFIER		13152#define SSF_CONNECTOR			23153#define SSF_TRANSCEIVER_CODE_B0		33154#define SSF_TRANSCEIVER_CODE_B1		43155#define SSF_TRANSCEIVER_CODE_B2		53156#define SSF_TRANSCEIVER_CODE_B3		63157#define SSF_TRANSCEIVER_CODE_B4		73158#define SSF_TRANSCEIVER_CODE_B5		83159#define SSF_TRANSCEIVER_CODE_B6		93160#define SSF_TRANSCEIVER_CODE_B7		103161#define SSF_ENCODING			113162#define SSF_BR_NOMINAL			123163#define SSF_RATE_IDENTIFIER		133164#define SSF_LENGTH_9UM_KM		143165#define SSF_LENGTH_9UM			153166#define SSF_LENGTH_50UM_OM2		163167#define SSF_LENGTH_62UM_OM1		173168#define SFF_LENGTH_COPPER		183169#define SSF_LENGTH_50UM_OM3		193170#define SSF_VENDOR_NAME			203171#define SSF_TRANSCEIVER2		363172#define SSF_VENDOR_OUI			373173#define SSF_VENDOR_PN			403174#define SSF_VENDOR_REV			563175#define SSF_WAVELENGTH_B1		603176#define SSF_WAVELENGTH_B0		613177#define SSF_CC_BASE			633178#define SSF_OPTIONS_B1			643179#define SSF_OPTIONS_B0			653180#define SSF_BR_MAX			663181#define SSF_BR_MIN			673182#define SSF_VENDOR_SN			683183#define SSF_DATE_CODE			843184#define SSF_MONITORING_TYPEDIAGNOSTIC	923185#define SSF_ENHANCED_OPTIONS		933186#define SFF_8472_COMPLIANCE		943187#define SSF_CC_EXT			953188#define SSF_A0_VENDOR_SPECIFIC		963189 3190/* SFF-8472 Table 3.1a Diagnostics: Data Fields Address/Page A2 */3191 3192#define SSF_TEMP_HIGH_ALARM		03193#define SSF_TEMP_LOW_ALARM		23194#define SSF_TEMP_HIGH_WARNING		43195#define SSF_TEMP_LOW_WARNING		63196#define SSF_VOLTAGE_HIGH_ALARM		83197#define SSF_VOLTAGE_LOW_ALARM		103198#define SSF_VOLTAGE_HIGH_WARNING	123199#define SSF_VOLTAGE_LOW_WARNING		143200#define SSF_BIAS_HIGH_ALARM		163201#define SSF_BIAS_LOW_ALARM		183202#define SSF_BIAS_HIGH_WARNING		203203#define SSF_BIAS_LOW_WARNING		223204#define SSF_TXPOWER_HIGH_ALARM		243205#define SSF_TXPOWER_LOW_ALARM		263206#define SSF_TXPOWER_HIGH_WARNING	283207#define SSF_TXPOWER_LOW_WARNING		303208#define SSF_RXPOWER_HIGH_ALARM		323209#define SSF_RXPOWER_LOW_ALARM		343210#define SSF_RXPOWER_HIGH_WARNING	363211#define SSF_RXPOWER_LOW_WARNING		383212#define SSF_EXT_CAL_CONSTANTS		563213#define SSF_CC_DMI			953214#define SFF_TEMPERATURE_B1		963215#define SFF_TEMPERATURE_B0		973216#define SFF_VCC_B1			983217#define SFF_VCC_B0			993218#define SFF_TX_BIAS_CURRENT_B1		1003219#define SFF_TX_BIAS_CURRENT_B0		1013220#define SFF_TXPOWER_B1			1023221#define SFF_TXPOWER_B0			1033222#define SFF_RXPOWER_B1			1043223#define SFF_RXPOWER_B0			1053224#define SSF_STATUS_CONTROL		1103225#define SSF_ALARM_FLAGS			1123226#define SSF_WARNING_FLAGS		1163227#define SSF_EXT_TATUS_CONTROL_B1	1183228#define SSF_EXT_TATUS_CONTROL_B0	1193229#define SSF_A2_VENDOR_SPECIFIC		1203230#define SSF_USER_EEPROM			1283231#define SSF_VENDOR_CONTROL		1483232 3233 3234/*3235 * Tranceiver codes Fibre Channel SFF-84723236 * Table 3.5.3237 */3238 3239struct sff_trasnceiver_codes_byte0 {3240	uint8_t inifiband:4;3241	uint8_t teng_ethernet:4;3242};3243 3244struct sff_trasnceiver_codes_byte1 {3245	uint8_t  sonet:6;3246	uint8_t  escon:2;3247};3248 3249struct sff_trasnceiver_codes_byte2 {3250	uint8_t  soNet:8;3251};3252 3253struct sff_trasnceiver_codes_byte3 {3254	uint8_t ethernet:8;3255};3256 3257struct sff_trasnceiver_codes_byte4 {3258	uint8_t fc_el_lo:1;3259	uint8_t fc_lw_laser:1;3260	uint8_t fc_sw_laser:1;3261	uint8_t fc_md_distance:1;3262	uint8_t fc_lg_distance:1;3263	uint8_t fc_int_distance:1;3264	uint8_t fc_short_distance:1;3265	uint8_t fc_vld_distance:1;3266};3267 3268struct sff_trasnceiver_codes_byte5 {3269	uint8_t reserved1:1;3270	uint8_t reserved2:1;3271	uint8_t fc_sfp_active:1;  /* Active cable   */3272	uint8_t fc_sfp_passive:1; /* Passive cable  */3273	uint8_t fc_lw_laser:1;     /* Longwave laser */3274	uint8_t fc_sw_laser_sl:1;3275	uint8_t fc_sw_laser_sn:1;3276	uint8_t fc_el_hi:1;        /* Electrical enclosure high bit */3277};3278 3279struct sff_trasnceiver_codes_byte6 {3280	uint8_t fc_tm_sm:1;      /* Single Mode */3281	uint8_t reserved:1;3282	uint8_t fc_tm_m6:1;       /* Multimode, 62.5um (M6) */3283	uint8_t fc_tm_tv:1;      /* Video Coax (TV) */3284	uint8_t fc_tm_mi:1;      /* Miniature Coax (MI) */3285	uint8_t fc_tm_tp:1;      /* Twisted Pair (TP) */3286	uint8_t fc_tm_tw:1;      /* Twin Axial Pair  */3287};3288 3289struct sff_trasnceiver_codes_byte7 {3290	uint8_t fc_sp_100MB:1;   /*  100 MB/sec */3291	uint8_t speed_chk_ecc:1;3292	uint8_t fc_sp_200mb:1;   /*  200 MB/sec */3293	uint8_t fc_sp_3200MB:1;  /* 3200 MB/sec */3294	uint8_t fc_sp_400MB:1;   /*  400 MB/sec */3295	uint8_t fc_sp_1600MB:1;  /* 1600 MB/sec */3296	uint8_t fc_sp_800MB:1;   /*  800 MB/sec */3297	uint8_t fc_sp_1200MB:1;  /* 1200 MB/sec */3298};3299 3300/* User writable non-volatile memory, SFF-8472 Table 3.20 */3301struct user_eeprom {3302	uint8_t vendor_name[16];3303	uint8_t vendor_oui[3];3304	uint8_t vendor_pn[816];3305	uint8_t vendor_rev[4];3306	uint8_t vendor_sn[16];3307	uint8_t datecode[6];3308	uint8_t lot_code[2];3309	uint8_t reserved191[57];3310};3311 3312#define SLI4_PAGE_ALIGN(addr) (((addr)+((SLI4_PAGE_SIZE)-1)) \3313			       &(~((SLI4_PAGE_SIZE)-1)))3314 3315struct lpfc_sli4_parameters {3316	uint32_t word0;3317#define cfg_prot_type_SHIFT			03318#define cfg_prot_type_MASK			0x000000FF3319#define cfg_prot_type_WORD			word03320	uint32_t word1;3321#define cfg_ft_SHIFT				03322#define cfg_ft_MASK				0x000000013323#define cfg_ft_WORD				word13324#define cfg_sli_rev_SHIFT			43325#define cfg_sli_rev_MASK			0x0000000f3326#define cfg_sli_rev_WORD			word13327#define cfg_sli_family_SHIFT			83328#define cfg_sli_family_MASK			0x0000000f3329#define cfg_sli_family_WORD			word13330#define cfg_if_type_SHIFT			123331#define cfg_if_type_MASK			0x0000000f3332#define cfg_if_type_WORD			word13333#define cfg_sli_hint_1_SHIFT			163334#define cfg_sli_hint_1_MASK			0x000000ff3335#define cfg_sli_hint_1_WORD			word13336#define cfg_sli_hint_2_SHIFT			243337#define cfg_sli_hint_2_MASK			0x0000001f3338#define cfg_sli_hint_2_WORD			word13339	uint32_t word2;3340#define cfg_eqav_SHIFT				313341#define cfg_eqav_MASK				0x000000013342#define cfg_eqav_WORD				word23343	uint32_t word3;3344	uint32_t word4;3345#define cfg_cqv_SHIFT				143346#define cfg_cqv_MASK				0x000000033347#define cfg_cqv_WORD				word43348#define cfg_cqpsize_SHIFT			163349#define cfg_cqpsize_MASK			0x000000ff3350#define cfg_cqpsize_WORD			word43351#define cfg_cqav_SHIFT				313352#define cfg_cqav_MASK				0x000000013353#define cfg_cqav_WORD				word43354	uint32_t word5;3355	uint32_t word6;3356#define cfg_mqv_SHIFT				143357#define cfg_mqv_MASK				0x000000033358#define cfg_mqv_WORD				word63359	uint32_t word7;3360	uint32_t word8;3361#define cfg_wqpcnt_SHIFT			03362#define cfg_wqpcnt_MASK				0x0000000f3363#define cfg_wqpcnt_WORD				word83364#define cfg_wqsize_SHIFT			83365#define cfg_wqsize_MASK				0x0000000f3366#define cfg_wqsize_WORD				word83367#define cfg_wqv_SHIFT				143368#define cfg_wqv_MASK				0x000000033369#define cfg_wqv_WORD				word83370#define cfg_wqpsize_SHIFT			163371#define cfg_wqpsize_MASK			0x000000ff3372#define cfg_wqpsize_WORD			word83373	uint32_t word9;3374	uint32_t word10;3375#define cfg_rqv_SHIFT				143376#define cfg_rqv_MASK				0x000000033377#define cfg_rqv_WORD				word103378	uint32_t word11;3379#define cfg_rq_db_window_SHIFT			283380#define cfg_rq_db_window_MASK			0x0000000f3381#define cfg_rq_db_window_WORD			word113382	uint32_t word12;3383#define cfg_fcoe_SHIFT				03384#define cfg_fcoe_MASK				0x000000013385#define cfg_fcoe_WORD				word123386#define cfg_ext_SHIFT				13387#define cfg_ext_MASK				0x000000013388#define cfg_ext_WORD				word123389#define cfg_hdrr_SHIFT				23390#define cfg_hdrr_MASK				0x000000013391#define cfg_hdrr_WORD				word123392#define cfg_phwq_SHIFT				153393#define cfg_phwq_MASK				0x000000013394#define cfg_phwq_WORD				word123395#define cfg_oas_SHIFT				253396#define cfg_oas_MASK				0x000000013397#define cfg_oas_WORD				word123398#define cfg_loopbk_scope_SHIFT			283399#define cfg_loopbk_scope_MASK			0x0000000f3400#define cfg_loopbk_scope_WORD			word123401	uint32_t sge_supp_len;3402	uint32_t word14;3403#define cfg_sgl_page_cnt_SHIFT			03404#define cfg_sgl_page_cnt_MASK			0x0000000f3405#define cfg_sgl_page_cnt_WORD			word143406#define cfg_sgl_page_size_SHIFT			83407#define cfg_sgl_page_size_MASK			0x000000ff3408#define cfg_sgl_page_size_WORD			word143409#define cfg_sgl_pp_align_SHIFT			163410#define cfg_sgl_pp_align_MASK			0x000000ff3411#define cfg_sgl_pp_align_WORD			word143412	uint32_t word15;3413	uint32_t word16;3414	uint32_t word17;3415	uint32_t word18;3416	uint32_t word19;3417#define cfg_ext_embed_cb_SHIFT			03418#define cfg_ext_embed_cb_MASK			0x000000013419#define cfg_ext_embed_cb_WORD			word193420#define cfg_mds_diags_SHIFT			13421#define cfg_mds_diags_MASK			0x000000013422#define cfg_mds_diags_WORD			word193423#define cfg_nvme_SHIFT				33424#define cfg_nvme_MASK				0x000000013425#define cfg_nvme_WORD				word193426#define cfg_xib_SHIFT				43427#define cfg_xib_MASK				0x000000013428#define cfg_xib_WORD				word193429#define cfg_xpsgl_SHIFT				63430#define cfg_xpsgl_MASK				0x000000013431#define cfg_xpsgl_WORD				word193432#define cfg_eqdr_SHIFT				83433#define cfg_eqdr_MASK				0x000000013434#define cfg_eqdr_WORD				word193435#define cfg_nosr_SHIFT				93436#define cfg_nosr_MASK				0x000000013437#define cfg_nosr_WORD				word193438#define cfg_bv1s_SHIFT                          103439#define cfg_bv1s_MASK                           0x000000013440#define cfg_bv1s_WORD                           word193441 3442#define cfg_nsler_SHIFT                         123443#define cfg_nsler_MASK                          0x000000013444#define cfg_nsler_WORD                          word193445#define cfg_pvl_SHIFT				133446#define cfg_pvl_MASK				0x000000013447#define cfg_pvl_WORD				word193448 3449#define cfg_pbde_SHIFT				203450#define cfg_pbde_MASK				0x000000013451#define cfg_pbde_WORD				word193452 3453	uint32_t word20;3454#define cfg_max_tow_xri_SHIFT			03455#define cfg_max_tow_xri_MASK			0x0000ffff3456#define cfg_max_tow_xri_WORD			word203457 3458	uint32_t word21;3459#define cfg_mi_ver_SHIFT			03460#define cfg_mi_ver_MASK				0x0000ffff3461#define cfg_mi_ver_WORD				word213462#define cfg_cmf_SHIFT				243463#define cfg_cmf_MASK				0x000000ff3464#define cfg_cmf_WORD				word213465 3466	uint32_t mib_size;3467	uint32_t word23;                        /* RESERVED */3468 3469	uint32_t word24;3470#define cfg_frag_field_offset_SHIFT		03471#define cfg_frag_field_offset_MASK		0x0000ffff3472#define cfg_frag_field_offset_WORD		word243473 3474#define cfg_frag_field_size_SHIFT		163475#define cfg_frag_field_size_MASK		0x0000ffff3476#define cfg_frag_field_size_WORD		word243477 3478	uint32_t word25;3479#define cfg_sgl_field_offset_SHIFT		03480#define cfg_sgl_field_offset_MASK		0x0000ffff3481#define cfg_sgl_field_offset_WORD		word253482 3483#define cfg_sgl_field_size_SHIFT		163484#define cfg_sgl_field_size_MASK			0x0000ffff3485#define cfg_sgl_field_size_WORD			word253486 3487	uint32_t word26;	/* Chain SGE initial value LOW  */3488	uint32_t word27;	/* Chain SGE initial value HIGH */3489#define LPFC_NODELAY_MAX_IO			323490};3491 3492#define LPFC_SET_UE_RECOVERY		0x103493#define LPFC_SET_MDS_DIAGS		0x123494#define LPFC_SET_DUAL_DUMP		0x1e3495#define LPFC_SET_CGN_SIGNAL		0x1f3496#define LPFC_SET_ENABLE_MI		0x213497#define LPFC_SET_LD_SIGNAL		0x233498#define LPFC_SET_ENABLE_CMF		0x243499struct lpfc_mbx_set_feature {3500	struct mbox_header header;3501	uint32_t feature;3502	uint32_t param_len;3503	uint32_t word6;3504#define lpfc_mbx_set_feature_UER_SHIFT  03505#define lpfc_mbx_set_feature_UER_MASK   0x000000013506#define lpfc_mbx_set_feature_UER_WORD   word63507#define lpfc_mbx_set_feature_mds_SHIFT  23508#define lpfc_mbx_set_feature_mds_MASK   0x000000013509#define lpfc_mbx_set_feature_mds_WORD   word63510#define lpfc_mbx_set_feature_mds_deep_loopbk_SHIFT  13511#define lpfc_mbx_set_feature_mds_deep_loopbk_MASK   0x000000013512#define lpfc_mbx_set_feature_mds_deep_loopbk_WORD   word63513#define lpfc_mbx_set_feature_CGN_warn_freq_SHIFT 03514#define lpfc_mbx_set_feature_CGN_warn_freq_MASK  0x0000ffff3515#define lpfc_mbx_set_feature_CGN_warn_freq_WORD  word63516#define lpfc_mbx_set_feature_dd_SHIFT		03517#define lpfc_mbx_set_feature_dd_MASK		0x000000013518#define lpfc_mbx_set_feature_dd_WORD		word63519#define lpfc_mbx_set_feature_ddquery_SHIFT	13520#define lpfc_mbx_set_feature_ddquery_MASK	0x000000013521#define lpfc_mbx_set_feature_ddquery_WORD	word63522#define LPFC_DISABLE_DUAL_DUMP		03523#define LPFC_ENABLE_DUAL_DUMP		13524#define LPFC_QUERY_OP_DUAL_DUMP		23525#define lpfc_mbx_set_feature_cmf_SHIFT		03526#define lpfc_mbx_set_feature_cmf_MASK		0x000000013527#define lpfc_mbx_set_feature_cmf_WORD		word63528#define lpfc_mbx_set_feature_lds_qry_SHIFT	03529#define lpfc_mbx_set_feature_lds_qry_MASK	0x000000013530#define lpfc_mbx_set_feature_lds_qry_WORD	word63531#define LPFC_QUERY_LDS_OP		13532#define lpfc_mbx_set_feature_mi_SHIFT		03533#define lpfc_mbx_set_feature_mi_MASK		0x0000ffff3534#define lpfc_mbx_set_feature_mi_WORD		word63535#define lpfc_mbx_set_feature_milunq_SHIFT	163536#define lpfc_mbx_set_feature_milunq_MASK	0x0000ffff3537#define lpfc_mbx_set_feature_milunq_WORD	word63538	u32 word7;3539#define lpfc_mbx_set_feature_UERP_SHIFT 03540#define lpfc_mbx_set_feature_UERP_MASK  0x0000ffff3541#define lpfc_mbx_set_feature_UERP_WORD  word73542#define lpfc_mbx_set_feature_UESR_SHIFT 163543#define lpfc_mbx_set_feature_UESR_MASK  0x0000ffff3544#define lpfc_mbx_set_feature_UESR_WORD  word73545#define lpfc_mbx_set_feature_CGN_alarm_freq_SHIFT 03546#define lpfc_mbx_set_feature_CGN_alarm_freq_MASK  0x0000ffff3547#define lpfc_mbx_set_feature_CGN_alarm_freq_WORD  word73548	u32 word8;3549#define lpfc_mbx_set_feature_CGN_acqe_freq_SHIFT 03550#define lpfc_mbx_set_feature_CGN_acqe_freq_MASK  0x000000ff3551#define lpfc_mbx_set_feature_CGN_acqe_freq_WORD  word83552	u32 word9;3553	u32 word10;3554};3555 3556 3557#define LPFC_SET_HOST_OS_DRIVER_VERSION    0x23558#define LPFC_SET_HOST_DATE_TIME		   0x43559 3560struct lpfc_mbx_set_host_date_time {3561	uint32_t word6;3562#define lpfc_mbx_set_host_month_WORD	word63563#define lpfc_mbx_set_host_month_SHIFT	163564#define lpfc_mbx_set_host_month_MASK	0xFF3565#define lpfc_mbx_set_host_day_WORD	word63566#define lpfc_mbx_set_host_day_SHIFT	83567#define lpfc_mbx_set_host_day_MASK	0xFF3568#define lpfc_mbx_set_host_year_WORD	word63569#define lpfc_mbx_set_host_year_SHIFT	03570#define lpfc_mbx_set_host_year_MASK	0xFF3571	uint32_t word7;3572#define lpfc_mbx_set_host_hour_WORD	word73573#define lpfc_mbx_set_host_hour_SHIFT	163574#define lpfc_mbx_set_host_hour_MASK	0xFF3575#define lpfc_mbx_set_host_min_WORD	word73576#define lpfc_mbx_set_host_min_SHIFT	83577#define lpfc_mbx_set_host_min_MASK	0xFF3578#define lpfc_mbx_set_host_sec_WORD	word73579#define lpfc_mbx_set_host_sec_SHIFT     03580#define lpfc_mbx_set_host_sec_MASK      0xFF3581};3582 3583struct lpfc_mbx_set_host_data {3584#define LPFC_HOST_OS_DRIVER_VERSION_SIZE   483585	struct mbox_header header;3586	uint32_t param_id;3587	uint32_t param_len;3588	union {3589		uint8_t data[LPFC_HOST_OS_DRIVER_VERSION_SIZE];3590		struct  lpfc_mbx_set_host_date_time tm;3591	} un;3592};3593 3594struct lpfc_mbx_set_trunk_mode {3595	struct mbox_header header;3596	uint32_t word0;3597#define lpfc_mbx_set_trunk_mode_WORD      word03598#define lpfc_mbx_set_trunk_mode_SHIFT     03599#define lpfc_mbx_set_trunk_mode_MASK      0xFF3600	uint32_t word1;3601	uint32_t word2;3602};3603 3604struct lpfc_mbx_get_sli4_parameters {3605	struct mbox_header header;3606	struct lpfc_sli4_parameters sli4_parameters;3607};3608 3609struct lpfc_mbx_reg_congestion_buf {3610	struct mbox_header header;3611	uint32_t word0;3612#define lpfc_mbx_reg_cgn_buf_type_WORD		word03613#define lpfc_mbx_reg_cgn_buf_type_SHIFT		03614#define lpfc_mbx_reg_cgn_buf_type_MASK		0xFF3615#define lpfc_mbx_reg_cgn_buf_cnt_WORD		word03616#define lpfc_mbx_reg_cgn_buf_cnt_SHIFT		163617#define lpfc_mbx_reg_cgn_buf_cnt_MASK		0xFF3618	uint32_t word1;3619	uint32_t length;3620	uint32_t addr_lo;3621	uint32_t addr_hi;3622};3623 3624struct lpfc_rscr_desc_generic {3625#define LPFC_RSRC_DESC_WSIZE			223626	uint32_t desc[LPFC_RSRC_DESC_WSIZE];3627};3628 3629struct lpfc_rsrc_desc_pcie {3630	uint32_t word0;3631#define lpfc_rsrc_desc_pcie_type_SHIFT		03632#define lpfc_rsrc_desc_pcie_type_MASK		0x000000ff3633#define lpfc_rsrc_desc_pcie_type_WORD		word03634#define LPFC_RSRC_DESC_TYPE_PCIE		0x403635#define lpfc_rsrc_desc_pcie_length_SHIFT	83636#define lpfc_rsrc_desc_pcie_length_MASK		0x000000ff3637#define lpfc_rsrc_desc_pcie_length_WORD		word03638	uint32_t word1;3639#define lpfc_rsrc_desc_pcie_pfnum_SHIFT		03640#define lpfc_rsrc_desc_pcie_pfnum_MASK		0x000000ff3641#define lpfc_rsrc_desc_pcie_pfnum_WORD		word13642	uint32_t reserved;3643	uint32_t word3;3644#define lpfc_rsrc_desc_pcie_sriov_sta_SHIFT	03645#define lpfc_rsrc_desc_pcie_sriov_sta_MASK	0x000000ff3646#define lpfc_rsrc_desc_pcie_sriov_sta_WORD	word33647#define lpfc_rsrc_desc_pcie_pf_sta_SHIFT	83648#define lpfc_rsrc_desc_pcie_pf_sta_MASK		0x000000ff3649#define lpfc_rsrc_desc_pcie_pf_sta_WORD		word33650#define lpfc_rsrc_desc_pcie_pf_type_SHIFT	163651#define lpfc_rsrc_desc_pcie_pf_type_MASK	0x000000ff3652#define lpfc_rsrc_desc_pcie_pf_type_WORD	word33653	uint32_t word4;3654#define lpfc_rsrc_desc_pcie_nr_virtfn_SHIFT	03655#define lpfc_rsrc_desc_pcie_nr_virtfn_MASK	0x0000ffff3656#define lpfc_rsrc_desc_pcie_nr_virtfn_WORD	word43657};3658 3659struct lpfc_rsrc_desc_fcfcoe {3660	uint32_t word0;3661#define lpfc_rsrc_desc_fcfcoe_type_SHIFT	03662#define lpfc_rsrc_desc_fcfcoe_type_MASK		0x000000ff3663#define lpfc_rsrc_desc_fcfcoe_type_WORD		word03664#define LPFC_RSRC_DESC_TYPE_FCFCOE		0x433665#define lpfc_rsrc_desc_fcfcoe_length_SHIFT	83666#define lpfc_rsrc_desc_fcfcoe_length_MASK	0x000000ff3667#define lpfc_rsrc_desc_fcfcoe_length_WORD	word03668#define LPFC_RSRC_DESC_TYPE_FCFCOE_V0_RSVD	03669#define LPFC_RSRC_DESC_TYPE_FCFCOE_V0_LENGTH	723670#define LPFC_RSRC_DESC_TYPE_FCFCOE_V1_LENGTH	883671	uint32_t word1;3672#define lpfc_rsrc_desc_fcfcoe_vfnum_SHIFT	03673#define lpfc_rsrc_desc_fcfcoe_vfnum_MASK	0x000000ff3674#define lpfc_rsrc_desc_fcfcoe_vfnum_WORD	word13675#define lpfc_rsrc_desc_fcfcoe_pfnum_SHIFT	163676#define lpfc_rsrc_desc_fcfcoe_pfnum_MASK        0x000007ff3677#define lpfc_rsrc_desc_fcfcoe_pfnum_WORD        word13678	uint32_t word2;3679#define lpfc_rsrc_desc_fcfcoe_rpi_cnt_SHIFT	03680#define lpfc_rsrc_desc_fcfcoe_rpi_cnt_MASK	0x0000ffff3681#define lpfc_rsrc_desc_fcfcoe_rpi_cnt_WORD	word23682#define lpfc_rsrc_desc_fcfcoe_xri_cnt_SHIFT	163683#define lpfc_rsrc_desc_fcfcoe_xri_cnt_MASK	0x0000ffff3684#define lpfc_rsrc_desc_fcfcoe_xri_cnt_WORD	word23685	uint32_t word3;3686#define lpfc_rsrc_desc_fcfcoe_wq_cnt_SHIFT	03687#define lpfc_rsrc_desc_fcfcoe_wq_cnt_MASK	0x0000ffff3688#define lpfc_rsrc_desc_fcfcoe_wq_cnt_WORD	word33689#define lpfc_rsrc_desc_fcfcoe_rq_cnt_SHIFT	163690#define lpfc_rsrc_desc_fcfcoe_rq_cnt_MASK	0x0000ffff3691#define lpfc_rsrc_desc_fcfcoe_rq_cnt_WORD	word33692	uint32_t word4;3693#define lpfc_rsrc_desc_fcfcoe_cq_cnt_SHIFT	03694#define lpfc_rsrc_desc_fcfcoe_cq_cnt_MASK	0x0000ffff3695#define lpfc_rsrc_desc_fcfcoe_cq_cnt_WORD	word43696#define lpfc_rsrc_desc_fcfcoe_vpi_cnt_SHIFT	163697#define lpfc_rsrc_desc_fcfcoe_vpi_cnt_MASK	0x0000ffff3698#define lpfc_rsrc_desc_fcfcoe_vpi_cnt_WORD	word43699	uint32_t word5;3700#define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_SHIFT	03701#define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_MASK	0x0000ffff3702#define lpfc_rsrc_desc_fcfcoe_fcfi_cnt_WORD	word53703#define lpfc_rsrc_desc_fcfcoe_vfi_cnt_SHIFT	163704#define lpfc_rsrc_desc_fcfcoe_vfi_cnt_MASK	0x0000ffff3705#define lpfc_rsrc_desc_fcfcoe_vfi_cnt_WORD	word53706	uint32_t word6;3707	uint32_t word7;3708	uint32_t word8;3709	uint32_t word9;3710	uint32_t word10;3711	uint32_t word11;3712	uint32_t word12;3713	uint32_t word13;3714#define lpfc_rsrc_desc_fcfcoe_lnk_nr_SHIFT	03715#define lpfc_rsrc_desc_fcfcoe_lnk_nr_MASK	0x0000003f3716#define lpfc_rsrc_desc_fcfcoe_lnk_nr_WORD	word133717#define lpfc_rsrc_desc_fcfcoe_lnk_tp_SHIFT      63718#define lpfc_rsrc_desc_fcfcoe_lnk_tp_MASK	0x000000033719#define lpfc_rsrc_desc_fcfcoe_lnk_tp_WORD	word133720#define lpfc_rsrc_desc_fcfcoe_lmc_SHIFT		83721#define lpfc_rsrc_desc_fcfcoe_lmc_MASK		0x000000013722#define lpfc_rsrc_desc_fcfcoe_lmc_WORD		word133723#define lpfc_rsrc_desc_fcfcoe_lld_SHIFT		93724#define lpfc_rsrc_desc_fcfcoe_lld_MASK		0x000000013725#define lpfc_rsrc_desc_fcfcoe_lld_WORD		word133726#define lpfc_rsrc_desc_fcfcoe_eq_cnt_SHIFT	163727#define lpfc_rsrc_desc_fcfcoe_eq_cnt_MASK	0x0000ffff3728#define lpfc_rsrc_desc_fcfcoe_eq_cnt_WORD	word133729/* extended FC/FCoE Resource Descriptor when length = 88 bytes */3730	uint32_t bw_min;3731	uint32_t bw_max;3732	uint32_t iops_min;3733	uint32_t iops_max;3734	uint32_t reserved[4];3735};3736 3737struct lpfc_func_cfg {3738#define LPFC_RSRC_DESC_MAX_NUM			23739	uint32_t rsrc_desc_count;3740	struct lpfc_rscr_desc_generic desc[LPFC_RSRC_DESC_MAX_NUM];3741};3742 3743struct lpfc_mbx_get_func_cfg {3744	struct mbox_header header;3745#define LPFC_CFG_TYPE_PERSISTENT_OVERRIDE	0x03746#define LPFC_CFG_TYPE_FACTURY_DEFAULT		0x13747#define LPFC_CFG_TYPE_CURRENT_ACTIVE		0x23748	struct lpfc_func_cfg func_cfg;3749};3750 3751struct lpfc_prof_cfg {3752#define LPFC_RSRC_DESC_MAX_NUM			23753	uint32_t rsrc_desc_count;3754	struct lpfc_rscr_desc_generic desc[LPFC_RSRC_DESC_MAX_NUM];3755};3756 3757struct lpfc_mbx_get_prof_cfg {3758	struct mbox_header header;3759#define LPFC_CFG_TYPE_PERSISTENT_OVERRIDE	0x03760#define LPFC_CFG_TYPE_FACTURY_DEFAULT		0x13761#define LPFC_CFG_TYPE_CURRENT_ACTIVE		0x23762	union {3763		struct {3764			uint32_t word10;3765#define lpfc_mbx_get_prof_cfg_prof_id_SHIFT	03766#define lpfc_mbx_get_prof_cfg_prof_id_MASK	0x000000ff3767#define lpfc_mbx_get_prof_cfg_prof_id_WORD	word103768#define lpfc_mbx_get_prof_cfg_prof_tp_SHIFT	83769#define lpfc_mbx_get_prof_cfg_prof_tp_MASK	0x000000033770#define lpfc_mbx_get_prof_cfg_prof_tp_WORD	word103771		} request;3772		struct {3773			struct lpfc_prof_cfg prof_cfg;3774		} response;3775	} u;3776};3777 3778struct lpfc_controller_attribute {3779	uint32_t version_string[8];3780	uint32_t manufacturer_name[8];3781	uint32_t supported_modes;3782	uint32_t word17;3783#define lpfc_cntl_attr_eprom_ver_lo_SHIFT	03784#define lpfc_cntl_attr_eprom_ver_lo_MASK	0x000000ff3785#define lpfc_cntl_attr_eprom_ver_lo_WORD	word173786#define lpfc_cntl_attr_eprom_ver_hi_SHIFT	83787#define lpfc_cntl_attr_eprom_ver_hi_MASK	0x000000ff3788#define lpfc_cntl_attr_eprom_ver_hi_WORD	word173789#define lpfc_cntl_attr_flash_id_SHIFT		163790#define lpfc_cntl_attr_flash_id_MASK		0x000000ff3791#define lpfc_cntl_attr_flash_id_WORD		word173792	uint32_t mbx_da_struct_ver;3793	uint32_t ep_fw_da_struct_ver;3794	uint32_t ncsi_ver_str[3];3795	uint32_t dflt_ext_timeout;3796	uint32_t model_number[8];3797	uint32_t description[16];3798	uint32_t serial_number[8];3799	uint32_t ip_ver_str[8];3800	uint32_t fw_ver_str[8];3801	uint32_t bios_ver_str[8];3802	uint32_t redboot_ver_str[8];3803	uint32_t driver_ver_str[8];3804	uint32_t flash_fw_ver_str[8];3805	uint32_t functionality;3806	uint32_t word105;3807#define lpfc_cntl_attr_max_cbd_len_SHIFT	03808#define lpfc_cntl_attr_max_cbd_len_MASK		0x0000ffff3809#define lpfc_cntl_attr_max_cbd_len_WORD		word1053810#define lpfc_cntl_attr_asic_rev_SHIFT		163811#define lpfc_cntl_attr_asic_rev_MASK		0x000000ff3812#define lpfc_cntl_attr_asic_rev_WORD		word1053813#define lpfc_cntl_attr_gen_guid0_SHIFT		243814#define lpfc_cntl_attr_gen_guid0_MASK		0x000000ff3815#define lpfc_cntl_attr_gen_guid0_WORD		word1053816	uint32_t gen_guid1_12[3];3817	uint32_t word109;3818#define lpfc_cntl_attr_gen_guid13_14_SHIFT	03819#define lpfc_cntl_attr_gen_guid13_14_MASK	0x0000ffff3820#define lpfc_cntl_attr_gen_guid13_14_WORD	word1093821#define lpfc_cntl_attr_gen_guid15_SHIFT		163822#define lpfc_cntl_attr_gen_guid15_MASK		0x000000ff3823#define lpfc_cntl_attr_gen_guid15_WORD		word1093824#define lpfc_cntl_attr_hba_port_cnt_SHIFT	243825#define lpfc_cntl_attr_hba_port_cnt_MASK	0x000000ff3826#define lpfc_cntl_attr_hba_port_cnt_WORD	word1093827	uint32_t word110;3828#define lpfc_cntl_attr_dflt_lnk_tmo_SHIFT	03829#define lpfc_cntl_attr_dflt_lnk_tmo_MASK	0x0000ffff3830#define lpfc_cntl_attr_dflt_lnk_tmo_WORD	word1103831#define lpfc_cntl_attr_multi_func_dev_SHIFT	243832#define lpfc_cntl_attr_multi_func_dev_MASK	0x000000ff3833#define lpfc_cntl_attr_multi_func_dev_WORD	word1103834	uint32_t word111;3835#define lpfc_cntl_attr_cache_valid_SHIFT	03836#define lpfc_cntl_attr_cache_valid_MASK		0x000000ff3837#define lpfc_cntl_attr_cache_valid_WORD		word1113838#define lpfc_cntl_attr_hba_status_SHIFT		83839#define lpfc_cntl_attr_hba_status_MASK		0x000000ff3840#define lpfc_cntl_attr_hba_status_WORD		word1113841#define lpfc_cntl_attr_max_domain_SHIFT		163842#define lpfc_cntl_attr_max_domain_MASK		0x000000ff3843#define lpfc_cntl_attr_max_domain_WORD		word1113844#define lpfc_cntl_attr_lnk_numb_SHIFT		243845#define lpfc_cntl_attr_lnk_numb_MASK		0x0000003f3846#define lpfc_cntl_attr_lnk_numb_WORD		word1113847#define lpfc_cntl_attr_lnk_type_SHIFT		303848#define lpfc_cntl_attr_lnk_type_MASK		0x000000033849#define lpfc_cntl_attr_lnk_type_WORD		word1113850	uint32_t fw_post_status;3851	uint32_t hba_mtu[8];3852	uint32_t word121;3853	uint32_t reserved1[3];3854	uint32_t word125;3855#define lpfc_cntl_attr_pci_vendor_id_SHIFT	03856#define lpfc_cntl_attr_pci_vendor_id_MASK	0x0000ffff3857#define lpfc_cntl_attr_pci_vendor_id_WORD	word1253858#define lpfc_cntl_attr_pci_device_id_SHIFT	163859#define lpfc_cntl_attr_pci_device_id_MASK	0x0000ffff3860#define lpfc_cntl_attr_pci_device_id_WORD	word1253861	uint32_t word126;3862#define lpfc_cntl_attr_pci_subvdr_id_SHIFT	03863#define lpfc_cntl_attr_pci_subvdr_id_MASK	0x0000ffff3864#define lpfc_cntl_attr_pci_subvdr_id_WORD	word1263865#define lpfc_cntl_attr_pci_subsys_id_SHIFT	163866#define lpfc_cntl_attr_pci_subsys_id_MASK	0x0000ffff3867#define lpfc_cntl_attr_pci_subsys_id_WORD	word1263868	uint32_t word127;3869#define lpfc_cntl_attr_pci_bus_num_SHIFT	03870#define lpfc_cntl_attr_pci_bus_num_MASK		0x000000ff3871#define lpfc_cntl_attr_pci_bus_num_WORD		word1273872#define lpfc_cntl_attr_pci_dev_num_SHIFT	83873#define lpfc_cntl_attr_pci_dev_num_MASK		0x000000ff3874#define lpfc_cntl_attr_pci_dev_num_WORD		word1273875#define lpfc_cntl_attr_pci_fnc_num_SHIFT	163876#define lpfc_cntl_attr_pci_fnc_num_MASK		0x000000ff3877#define lpfc_cntl_attr_pci_fnc_num_WORD		word1273878#define lpfc_cntl_attr_inf_type_SHIFT		243879#define lpfc_cntl_attr_inf_type_MASK		0x000000ff3880#define lpfc_cntl_attr_inf_type_WORD		word1273881	uint32_t unique_id[2];3882	uint32_t word130;3883#define lpfc_cntl_attr_num_netfil_SHIFT		03884#define lpfc_cntl_attr_num_netfil_MASK		0x000000ff3885#define lpfc_cntl_attr_num_netfil_WORD		word1303886	uint32_t reserved2[4];3887};3888 3889struct lpfc_mbx_get_cntl_attributes {3890	union  lpfc_sli4_cfg_shdr cfg_shdr;3891	struct lpfc_controller_attribute cntl_attr;3892};3893 3894struct lpfc_mbx_get_port_name {3895	struct mbox_header header;3896	union {3897		struct {3898			uint32_t word4;3899#define lpfc_mbx_get_port_name_lnk_type_SHIFT	03900#define lpfc_mbx_get_port_name_lnk_type_MASK	0x000000033901#define lpfc_mbx_get_port_name_lnk_type_WORD	word43902		} request;3903		struct {3904			uint32_t word4;3905#define lpfc_mbx_get_port_name_name0_SHIFT	03906#define lpfc_mbx_get_port_name_name0_MASK	0x000000FF3907#define lpfc_mbx_get_port_name_name0_WORD	word43908#define lpfc_mbx_get_port_name_name1_SHIFT	83909#define lpfc_mbx_get_port_name_name1_MASK	0x000000FF3910#define lpfc_mbx_get_port_name_name1_WORD	word43911#define lpfc_mbx_get_port_name_name2_SHIFT	163912#define lpfc_mbx_get_port_name_name2_MASK	0x000000FF3913#define lpfc_mbx_get_port_name_name2_WORD	word43914#define lpfc_mbx_get_port_name_name3_SHIFT	243915#define lpfc_mbx_get_port_name_name3_MASK	0x000000FF3916#define lpfc_mbx_get_port_name_name3_WORD	word43917#define LPFC_LINK_NUMBER_0			03918#define LPFC_LINK_NUMBER_1			13919#define LPFC_LINK_NUMBER_2			23920#define LPFC_LINK_NUMBER_3			33921		} response;3922	} u;3923};3924 3925/* Mailbox Completion Queue Error Messages */3926#define MB_CQE_STATUS_SUCCESS			0x03927#define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES	0x13928#define MB_CQE_STATUS_INVALID_PARAMETER		0x23929#define MB_CQE_STATUS_INSUFFICIENT_RESOURCES	0x33930#define MB_CEQ_STATUS_QUEUE_FLUSHING		0x43931#define MB_CQE_STATUS_DMA_FAILED		0x53932 3933 3934#define LPFC_MBX_WR_CONFIG_MAX_BDE		13935struct lpfc_mbx_wr_object {3936	struct mbox_header header;3937	union {3938		struct {3939			uint32_t word4;3940#define lpfc_wr_object_eof_SHIFT		313941#define lpfc_wr_object_eof_MASK			0x000000013942#define lpfc_wr_object_eof_WORD			word43943#define lpfc_wr_object_eas_SHIFT		293944#define lpfc_wr_object_eas_MASK			0x000000013945#define lpfc_wr_object_eas_WORD			word43946#define lpfc_wr_object_write_length_SHIFT	03947#define lpfc_wr_object_write_length_MASK	0x00FFFFFF3948#define lpfc_wr_object_write_length_WORD	word43949			uint32_t write_offset;3950			uint32_t object_name[LPFC_MBX_OBJECT_NAME_LEN_DW];3951			uint32_t bde_count;3952			struct ulp_bde64 bde[LPFC_MBX_WR_CONFIG_MAX_BDE];3953		} request;3954		struct {3955			uint32_t actual_write_length;3956			uint32_t word5;3957#define lpfc_wr_object_change_status_SHIFT	03958#define lpfc_wr_object_change_status_MASK	0x000000FF3959#define lpfc_wr_object_change_status_WORD	word53960#define LPFC_CHANGE_STATUS_NO_RESET_NEEDED	0x003961#define LPFC_CHANGE_STATUS_PHYS_DEV_RESET	0x013962#define LPFC_CHANGE_STATUS_FW_RESET		0x023963#define LPFC_CHANGE_STATUS_PORT_MIGRATION	0x043964#define LPFC_CHANGE_STATUS_PCI_RESET		0x053965#define lpfc_wr_object_csf_SHIFT		83966#define lpfc_wr_object_csf_MASK			0x000000013967#define lpfc_wr_object_csf_WORD			word53968		} response;3969	} u;3970};3971 3972/* mailbox queue entry structure */3973struct lpfc_mqe {3974	uint32_t word0;3975#define lpfc_mqe_status_SHIFT		163976#define lpfc_mqe_status_MASK		0x0000FFFF3977#define lpfc_mqe_status_WORD		word03978#define lpfc_mqe_command_SHIFT		83979#define lpfc_mqe_command_MASK		0x000000FF3980#define lpfc_mqe_command_WORD		word03981	union {3982		uint32_t mb_words[LPFC_SLI4_MB_WORD_COUNT - 1];3983		/* sli4 mailbox commands */3984		struct lpfc_mbx_sli4_config sli4_config;3985		struct lpfc_mbx_init_vfi init_vfi;3986		struct lpfc_mbx_reg_vfi reg_vfi;3987		struct lpfc_mbx_reg_vfi unreg_vfi;3988		struct lpfc_mbx_init_vpi init_vpi;3989		struct lpfc_mbx_resume_rpi resume_rpi;3990		struct lpfc_mbx_read_fcf_tbl read_fcf_tbl;3991		struct lpfc_mbx_add_fcf_tbl_entry add_fcf_entry;3992		struct lpfc_mbx_del_fcf_tbl_entry del_fcf_entry;3993		struct lpfc_mbx_redisc_fcf_tbl redisc_fcf_tbl;3994		struct lpfc_mbx_reg_fcfi reg_fcfi;3995		struct lpfc_mbx_reg_fcfi_mrq reg_fcfi_mrq;3996		struct lpfc_mbx_unreg_fcfi unreg_fcfi;3997		struct lpfc_mbx_mq_create mq_create;3998		struct lpfc_mbx_mq_create_ext mq_create_ext;3999		struct lpfc_mbx_read_object read_object;4000		struct lpfc_mbx_eq_create eq_create;4001		struct lpfc_mbx_modify_eq_delay eq_delay;4002		struct lpfc_mbx_cq_create cq_create;4003		struct lpfc_mbx_cq_create_set cq_create_set;4004		struct lpfc_mbx_wq_create wq_create;4005		struct lpfc_mbx_rq_create rq_create;4006		struct lpfc_mbx_rq_create_v2 rq_create_v2;4007		struct lpfc_mbx_mq_destroy mq_destroy;4008		struct lpfc_mbx_eq_destroy eq_destroy;4009		struct lpfc_mbx_cq_destroy cq_destroy;4010		struct lpfc_mbx_wq_destroy wq_destroy;4011		struct lpfc_mbx_rq_destroy rq_destroy;4012		struct lpfc_mbx_get_rsrc_extent_info rsrc_extent_info;4013		struct lpfc_mbx_alloc_rsrc_extents alloc_rsrc_extents;4014		struct lpfc_mbx_dealloc_rsrc_extents dealloc_rsrc_extents;4015		struct lpfc_mbx_post_sgl_pages post_sgl_pages;4016		struct lpfc_mbx_nembed_cmd nembed_cmd;4017		struct lpfc_mbx_read_rev read_rev;4018		struct lpfc_mbx_read_vpi read_vpi;4019		struct lpfc_mbx_read_config rd_config;4020		struct lpfc_mbx_request_features req_ftrs;4021		struct lpfc_mbx_post_hdr_tmpl hdr_tmpl;4022		struct lpfc_mbx_query_fw_config query_fw_cfg;4023		struct lpfc_mbx_set_beacon_config beacon_config;4024		struct lpfc_mbx_get_sli4_parameters get_sli4_parameters;4025		struct lpfc_mbx_reg_congestion_buf reg_congestion_buf;4026		struct lpfc_mbx_set_link_diag_state link_diag_state;4027		struct lpfc_mbx_set_link_diag_loopback link_diag_loopback;4028		struct lpfc_mbx_run_link_diag_test link_diag_test;4029		struct lpfc_mbx_get_func_cfg get_func_cfg;4030		struct lpfc_mbx_get_prof_cfg get_prof_cfg;4031		struct lpfc_mbx_wr_object wr_object;4032		struct lpfc_mbx_get_port_name get_port_name;4033		struct lpfc_mbx_set_feature  set_feature;4034		struct lpfc_mbx_memory_dump_type3 mem_dump_type3;4035		struct lpfc_mbx_set_host_data set_host_data;4036		struct lpfc_mbx_set_trunk_mode set_trunk_mode;4037		struct lpfc_mbx_nop nop;4038		struct lpfc_mbx_set_ras_fwlog ras_fwlog;4039	} un;4040};4041 4042struct lpfc_mcqe {4043	uint32_t word0;4044#define lpfc_mcqe_status_SHIFT		04045#define lpfc_mcqe_status_MASK		0x0000FFFF4046#define lpfc_mcqe_status_WORD		word04047#define lpfc_mcqe_ext_status_SHIFT	164048#define lpfc_mcqe_ext_status_MASK	0x0000FFFF4049#define lpfc_mcqe_ext_status_WORD	word04050	uint32_t mcqe_tag0;4051	uint32_t mcqe_tag1;4052	uint32_t trailer;4053#define lpfc_trailer_valid_SHIFT	314054#define lpfc_trailer_valid_MASK		0x000000014055#define lpfc_trailer_valid_WORD		trailer4056#define lpfc_trailer_async_SHIFT	304057#define lpfc_trailer_async_MASK		0x000000014058#define lpfc_trailer_async_WORD		trailer4059#define lpfc_trailer_hpi_SHIFT		294060#define lpfc_trailer_hpi_MASK		0x000000014061#define lpfc_trailer_hpi_WORD		trailer4062#define lpfc_trailer_completed_SHIFT	284063#define lpfc_trailer_completed_MASK	0x000000014064#define lpfc_trailer_completed_WORD	trailer4065#define lpfc_trailer_consumed_SHIFT	274066#define lpfc_trailer_consumed_MASK	0x000000014067#define lpfc_trailer_consumed_WORD	trailer4068#define lpfc_trailer_type_SHIFT		164069#define lpfc_trailer_type_MASK		0x000000FF4070#define lpfc_trailer_type_WORD		trailer4071#define lpfc_trailer_code_SHIFT		84072#define lpfc_trailer_code_MASK		0x000000FF4073#define lpfc_trailer_code_WORD		trailer4074#define LPFC_TRAILER_CODE_LINK	0x14075#define LPFC_TRAILER_CODE_FCOE	0x24076#define LPFC_TRAILER_CODE_DCBX	0x34077#define LPFC_TRAILER_CODE_GRP5	0x54078#define LPFC_TRAILER_CODE_FC	0x104079#define LPFC_TRAILER_CODE_SLI	0x114080};4081 4082struct lpfc_acqe_link {4083	uint32_t word0;4084#define lpfc_acqe_link_speed_SHIFT		244085#define lpfc_acqe_link_speed_MASK		0x000000FF4086#define lpfc_acqe_link_speed_WORD		word04087#define LPFC_ASYNC_LINK_SPEED_ZERO		0x04088#define LPFC_ASYNC_LINK_SPEED_10MBPS		0x14089#define LPFC_ASYNC_LINK_SPEED_100MBPS		0x24090#define LPFC_ASYNC_LINK_SPEED_1GBPS		0x34091#define LPFC_ASYNC_LINK_SPEED_10GBPS		0x44092#define LPFC_ASYNC_LINK_SPEED_20GBPS		0x54093#define LPFC_ASYNC_LINK_SPEED_25GBPS		0x64094#define LPFC_ASYNC_LINK_SPEED_40GBPS		0x74095#define LPFC_ASYNC_LINK_SPEED_100GBPS		0x84096#define lpfc_acqe_link_duplex_SHIFT		164097#define lpfc_acqe_link_duplex_MASK		0x000000FF4098#define lpfc_acqe_link_duplex_WORD		word04099#define LPFC_ASYNC_LINK_DUPLEX_NONE		0x04100#define LPFC_ASYNC_LINK_DUPLEX_HALF		0x14101#define LPFC_ASYNC_LINK_DUPLEX_FULL		0x24102#define lpfc_acqe_link_status_SHIFT		84103#define lpfc_acqe_link_status_MASK		0x000000FF4104#define lpfc_acqe_link_status_WORD		word04105#define LPFC_ASYNC_LINK_STATUS_DOWN		0x04106#define LPFC_ASYNC_LINK_STATUS_UP		0x14107#define LPFC_ASYNC_LINK_STATUS_LOGICAL_DOWN	0x24108#define LPFC_ASYNC_LINK_STATUS_LOGICAL_UP	0x34109#define lpfc_acqe_link_type_SHIFT		64110#define lpfc_acqe_link_type_MASK		0x000000034111#define lpfc_acqe_link_type_WORD		word04112#define lpfc_acqe_link_number_SHIFT		04113#define lpfc_acqe_link_number_MASK		0x0000003F4114#define lpfc_acqe_link_number_WORD		word04115	uint32_t word1;4116#define lpfc_acqe_link_fault_SHIFT	04117#define lpfc_acqe_link_fault_MASK	0x000000FF4118#define lpfc_acqe_link_fault_WORD	word14119#define LPFC_ASYNC_LINK_FAULT_NONE	0x04120#define LPFC_ASYNC_LINK_FAULT_LOCAL	0x14121#define LPFC_ASYNC_LINK_FAULT_REMOTE	0x24122#define LPFC_ASYNC_LINK_FAULT_LR_LRR	0x34123#define lpfc_acqe_logical_link_speed_SHIFT	164124#define lpfc_acqe_logical_link_speed_MASK	0x0000FFFF4125#define lpfc_acqe_logical_link_speed_WORD	word14126	uint32_t event_tag;4127	uint32_t trailer;4128#define LPFC_LINK_EVENT_TYPE_PHYSICAL	0x04129#define LPFC_LINK_EVENT_TYPE_VIRTUAL	0x14130};4131 4132struct lpfc_acqe_fip {4133	uint32_t index;4134	uint32_t word1;4135#define lpfc_acqe_fip_fcf_count_SHIFT		04136#define lpfc_acqe_fip_fcf_count_MASK		0x0000FFFF4137#define lpfc_acqe_fip_fcf_count_WORD		word14138#define lpfc_acqe_fip_event_type_SHIFT		164139#define lpfc_acqe_fip_event_type_MASK		0x0000FFFF4140#define lpfc_acqe_fip_event_type_WORD		word14141	uint32_t event_tag;4142	uint32_t trailer;4143#define LPFC_FIP_EVENT_TYPE_NEW_FCF		0x14144#define LPFC_FIP_EVENT_TYPE_FCF_TABLE_FULL	0x24145#define LPFC_FIP_EVENT_TYPE_FCF_DEAD		0x34146#define LPFC_FIP_EVENT_TYPE_CVL			0x44147#define LPFC_FIP_EVENT_TYPE_FCF_PARAM_MOD	0x54148};4149 4150struct lpfc_acqe_dcbx {4151	uint32_t tlv_ttl;4152	uint32_t reserved;4153	uint32_t event_tag;4154	uint32_t trailer;4155};4156 4157struct lpfc_acqe_grp5 {4158	uint32_t word0;4159#define lpfc_acqe_grp5_type_SHIFT		64160#define lpfc_acqe_grp5_type_MASK		0x000000034161#define lpfc_acqe_grp5_type_WORD		word04162#define lpfc_acqe_grp5_number_SHIFT		04163#define lpfc_acqe_grp5_number_MASK		0x0000003F4164#define lpfc_acqe_grp5_number_WORD		word04165	uint32_t word1;4166#define lpfc_acqe_grp5_llink_spd_SHIFT	164167#define lpfc_acqe_grp5_llink_spd_MASK	0x0000FFFF4168#define lpfc_acqe_grp5_llink_spd_WORD	word14169	uint32_t event_tag;4170	uint32_t trailer;4171};4172 4173extern const char *const trunk_errmsg[];4174 4175struct lpfc_acqe_fc_la {4176	uint32_t word0;4177#define lpfc_acqe_fc_la_speed_SHIFT		244178#define lpfc_acqe_fc_la_speed_MASK		0x000000FF4179#define lpfc_acqe_fc_la_speed_WORD		word04180#define LPFC_FC_LA_SPEED_UNKNOWN		0x04181#define LPFC_FC_LA_SPEED_1G		0x14182#define LPFC_FC_LA_SPEED_2G		0x24183#define LPFC_FC_LA_SPEED_4G		0x44184#define LPFC_FC_LA_SPEED_8G		0x84185#define LPFC_FC_LA_SPEED_10G		0xA4186#define LPFC_FC_LA_SPEED_16G		0x104187#define LPFC_FC_LA_SPEED_32G            0x204188#define LPFC_FC_LA_SPEED_64G            0x214189#define LPFC_FC_LA_SPEED_128G           0x224190#define LPFC_FC_LA_SPEED_256G           0x234191#define lpfc_acqe_fc_la_topology_SHIFT		164192#define lpfc_acqe_fc_la_topology_MASK		0x000000FF4193#define lpfc_acqe_fc_la_topology_WORD		word04194#define LPFC_FC_LA_TOP_UNKOWN		0x04195#define LPFC_FC_LA_TOP_P2P		0x14196#define LPFC_FC_LA_TOP_FCAL		0x24197#define LPFC_FC_LA_TOP_INTERNAL_LOOP	0x34198#define LPFC_FC_LA_TOP_SERDES_LOOP	0x44199#define lpfc_acqe_fc_la_att_type_SHIFT		84200#define lpfc_acqe_fc_la_att_type_MASK		0x000000FF4201#define lpfc_acqe_fc_la_att_type_WORD		word04202#define LPFC_FC_LA_TYPE_LINK_UP		0x14203#define LPFC_FC_LA_TYPE_LINK_DOWN	0x24204#define LPFC_FC_LA_TYPE_NO_HARD_ALPA	0x34205#define LPFC_FC_LA_TYPE_MDS_LINK_DOWN	0x44206#define LPFC_FC_LA_TYPE_MDS_LOOPBACK	0x54207#define LPFC_FC_LA_TYPE_UNEXP_WWPN	0x64208#define LPFC_FC_LA_TYPE_TRUNKING_EVENT  0x74209#define LPFC_FC_LA_TYPE_ACTIVATE_FAIL		0x84210#define LPFC_FC_LA_TYPE_LINK_RESET_PRTCL_EVT	0x94211#define lpfc_acqe_fc_la_port_type_SHIFT		64212#define lpfc_acqe_fc_la_port_type_MASK		0x000000034213#define lpfc_acqe_fc_la_port_type_WORD		word04214#define LPFC_LINK_TYPE_ETHERNET		0x04215#define LPFC_LINK_TYPE_FC		0x14216#define lpfc_acqe_fc_la_port_number_SHIFT	04217#define lpfc_acqe_fc_la_port_number_MASK	0x0000003F4218#define lpfc_acqe_fc_la_port_number_WORD	word04219 4220/* Attention Type is 0x07 (Trunking Event) word0 */4221#define lpfc_acqe_fc_la_trunk_link_status_port0_SHIFT	164222#define lpfc_acqe_fc_la_trunk_link_status_port0_MASK	0x00000014223#define lpfc_acqe_fc_la_trunk_link_status_port0_WORD	word04224#define lpfc_acqe_fc_la_trunk_link_status_port1_SHIFT	174225#define lpfc_acqe_fc_la_trunk_link_status_port1_MASK	0x00000014226#define lpfc_acqe_fc_la_trunk_link_status_port1_WORD	word04227#define lpfc_acqe_fc_la_trunk_link_status_port2_SHIFT	184228#define lpfc_acqe_fc_la_trunk_link_status_port2_MASK	0x00000014229#define lpfc_acqe_fc_la_trunk_link_status_port2_WORD	word04230#define lpfc_acqe_fc_la_trunk_link_status_port3_SHIFT	194231#define lpfc_acqe_fc_la_trunk_link_status_port3_MASK	0x00000014232#define lpfc_acqe_fc_la_trunk_link_status_port3_WORD	word04233#define lpfc_acqe_fc_la_trunk_config_port0_SHIFT	204234#define lpfc_acqe_fc_la_trunk_config_port0_MASK		0x00000014235#define lpfc_acqe_fc_la_trunk_config_port0_WORD		word04236#define lpfc_acqe_fc_la_trunk_config_port1_SHIFT	214237#define lpfc_acqe_fc_la_trunk_config_port1_MASK		0x00000014238#define lpfc_acqe_fc_la_trunk_config_port1_WORD		word04239#define lpfc_acqe_fc_la_trunk_config_port2_SHIFT	224240#define lpfc_acqe_fc_la_trunk_config_port2_MASK		0x00000014241#define lpfc_acqe_fc_la_trunk_config_port2_WORD		word04242#define lpfc_acqe_fc_la_trunk_config_port3_SHIFT	234243#define lpfc_acqe_fc_la_trunk_config_port3_MASK		0x00000014244#define lpfc_acqe_fc_la_trunk_config_port3_WORD		word04245	uint32_t word1;4246#define lpfc_acqe_fc_la_llink_spd_SHIFT		164247#define lpfc_acqe_fc_la_llink_spd_MASK		0x0000FFFF4248#define lpfc_acqe_fc_la_llink_spd_WORD		word14249#define lpfc_acqe_fc_la_fault_SHIFT		04250#define lpfc_acqe_fc_la_fault_MASK		0x000000FF4251#define lpfc_acqe_fc_la_fault_WORD		word14252#define lpfc_acqe_fc_la_link_status_SHIFT	84253#define lpfc_acqe_fc_la_link_status_MASK	0x0000007F4254#define lpfc_acqe_fc_la_link_status_WORD	word14255#define lpfc_acqe_fc_la_trunk_fault_SHIFT		04256#define lpfc_acqe_fc_la_trunk_fault_MASK		0x0000000F4257#define lpfc_acqe_fc_la_trunk_fault_WORD		word14258#define lpfc_acqe_fc_la_trunk_linkmask_SHIFT		44259#define lpfc_acqe_fc_la_trunk_linkmask_MASK		0x000000F4260#define lpfc_acqe_fc_la_trunk_linkmask_WORD		word14261#define LPFC_FC_LA_FAULT_NONE		0x04262#define LPFC_FC_LA_FAULT_LOCAL		0x14263#define LPFC_FC_LA_FAULT_REMOTE		0x24264	uint32_t event_tag;4265	uint32_t trailer;4266#define LPFC_FC_LA_EVENT_TYPE_FC_LINK		0x14267#define LPFC_FC_LA_EVENT_TYPE_SHARED_LINK	0x24268};4269 4270struct lpfc_acqe_misconfigured_event {4271	struct {4272	uint32_t word0;4273#define lpfc_sli_misconfigured_port0_state_SHIFT	04274#define lpfc_sli_misconfigured_port0_state_MASK		0x000000FF4275#define lpfc_sli_misconfigured_port0_state_WORD		word04276#define lpfc_sli_misconfigured_port1_state_SHIFT	84277#define lpfc_sli_misconfigured_port1_state_MASK		0x000000FF4278#define lpfc_sli_misconfigured_port1_state_WORD		word04279#define lpfc_sli_misconfigured_port2_state_SHIFT	164280#define lpfc_sli_misconfigured_port2_state_MASK		0x000000FF4281#define lpfc_sli_misconfigured_port2_state_WORD		word04282#define lpfc_sli_misconfigured_port3_state_SHIFT	244283#define lpfc_sli_misconfigured_port3_state_MASK		0x000000FF4284#define lpfc_sli_misconfigured_port3_state_WORD		word04285	uint32_t word1;4286#define lpfc_sli_misconfigured_port0_op_SHIFT		04287#define lpfc_sli_misconfigured_port0_op_MASK		0x000000014288#define lpfc_sli_misconfigured_port0_op_WORD		word14289#define lpfc_sli_misconfigured_port0_severity_SHIFT	14290#define lpfc_sli_misconfigured_port0_severity_MASK	0x000000034291#define lpfc_sli_misconfigured_port0_severity_WORD	word14292#define lpfc_sli_misconfigured_port1_op_SHIFT		84293#define lpfc_sli_misconfigured_port1_op_MASK		0x000000014294#define lpfc_sli_misconfigured_port1_op_WORD		word14295#define lpfc_sli_misconfigured_port1_severity_SHIFT	94296#define lpfc_sli_misconfigured_port1_severity_MASK	0x000000034297#define lpfc_sli_misconfigured_port1_severity_WORD	word14298#define lpfc_sli_misconfigured_port2_op_SHIFT		164299#define lpfc_sli_misconfigured_port2_op_MASK		0x000000014300#define lpfc_sli_misconfigured_port2_op_WORD		word14301#define lpfc_sli_misconfigured_port2_severity_SHIFT	174302#define lpfc_sli_misconfigured_port2_severity_MASK	0x000000034303#define lpfc_sli_misconfigured_port2_severity_WORD	word14304#define lpfc_sli_misconfigured_port3_op_SHIFT		244305#define lpfc_sli_misconfigured_port3_op_MASK		0x000000014306#define lpfc_sli_misconfigured_port3_op_WORD		word14307#define lpfc_sli_misconfigured_port3_severity_SHIFT	254308#define lpfc_sli_misconfigured_port3_severity_MASK	0x000000034309#define lpfc_sli_misconfigured_port3_severity_WORD	word14310	} theEvent;4311#define LPFC_SLI_EVENT_STATUS_VALID			0x004312#define LPFC_SLI_EVENT_STATUS_NOT_PRESENT	0x014313#define LPFC_SLI_EVENT_STATUS_WRONG_TYPE	0x024314#define LPFC_SLI_EVENT_STATUS_UNSUPPORTED	0x034315#define LPFC_SLI_EVENT_STATUS_UNQUALIFIED	0x044316#define LPFC_SLI_EVENT_STATUS_UNCERTIFIED	0x054317};4318 4319struct lpfc_acqe_cgn_signal {4320	u32 word0;4321#define lpfc_warn_acqe_SHIFT		04322#define lpfc_warn_acqe_MASK		0x7FFFFFFF4323#define lpfc_warn_acqe_WORD		word04324#define lpfc_imm_acqe_SHIFT		314325#define lpfc_imm_acqe_MASK		0x14326#define lpfc_imm_acqe_WORD		word04327	u32 alarm_cnt;4328	u32 word2;4329	u32 trailer;4330};4331 4332struct lpfc_acqe_sli {4333	uint32_t event_data1;4334	uint32_t event_data2;4335	uint32_t event_data3;4336	uint32_t trailer;4337#define LPFC_SLI_EVENT_TYPE_PORT_ERROR		0x14338#define LPFC_SLI_EVENT_TYPE_OVER_TEMP		0x24339#define LPFC_SLI_EVENT_TYPE_NORM_TEMP		0x34340#define LPFC_SLI_EVENT_TYPE_NVLOG_POST		0x44341#define LPFC_SLI_EVENT_TYPE_DIAG_DUMP		0x54342#define LPFC_SLI_EVENT_TYPE_MISCONFIGURED	0x94343#define LPFC_SLI_EVENT_TYPE_REMOTE_DPORT	0xA4344#define LPFC_SLI_EVENT_TYPE_PORT_PARAMS_CHG	0xE4345#define LPFC_SLI_EVENT_TYPE_MISCONF_FAWWN	0xF4346#define LPFC_SLI_EVENT_TYPE_EEPROM_FAILURE	0x104347#define LPFC_SLI_EVENT_TYPE_CGN_SIGNAL		0x114348#define LPFC_SLI_EVENT_TYPE_RD_SIGNAL           0x124349#define LPFC_SLI_EVENT_TYPE_RESET_CM_STATS      0x134350};4351 4352/*4353 * Define the bootstrap mailbox (bmbx) region used to communicate4354 * mailbox command between the host and port. The mailbox consists4355 * of a payload area of 256 bytes and a completion queue of length4356 * 16 bytes.4357 */4358struct lpfc_bmbx_create {4359	struct lpfc_mqe mqe;4360	struct lpfc_mcqe mcqe;4361};4362 4363#define SGL_ALIGN_SZ 644364#define SGL_PAGE_SIZE 40964365/* align SGL addr on a size boundary - adjust address up */4366#define NO_XRI  0xffff4367 4368struct wqe_common {4369	uint32_t word6;4370#define wqe_xri_tag_SHIFT     04371#define wqe_xri_tag_MASK      0x0000FFFF4372#define wqe_xri_tag_WORD      word64373#define wqe_ctxt_tag_SHIFT    164374#define wqe_ctxt_tag_MASK     0x0000FFFF4375#define wqe_ctxt_tag_WORD     word64376	uint32_t word7;4377#define wqe_dif_SHIFT         04378#define wqe_dif_MASK          0x000000034379#define wqe_dif_WORD          word74380#define LPFC_WQE_DIF_PASSTHRU	14381#define LPFC_WQE_DIF_STRIP	24382#define LPFC_WQE_DIF_INSERT	34383#define wqe_ct_SHIFT          24384#define wqe_ct_MASK           0x000000034385#define wqe_ct_WORD           word74386#define wqe_status_SHIFT      44387#define wqe_status_MASK       0x0000000f4388#define wqe_status_WORD       word74389#define wqe_cmnd_SHIFT        84390#define wqe_cmnd_MASK         0x000000ff4391#define wqe_cmnd_WORD         word74392#define wqe_class_SHIFT       164393#define wqe_class_MASK        0x000000074394#define wqe_class_WORD        word74395#define wqe_ar_SHIFT          194396#define wqe_ar_MASK           0x000000014397#define wqe_ar_WORD           word74398#define wqe_ag_SHIFT          wqe_ar_SHIFT4399#define wqe_ag_MASK           wqe_ar_MASK4400#define wqe_ag_WORD           wqe_ar_WORD4401#define wqe_pu_SHIFT          204402#define wqe_pu_MASK           0x000000034403#define wqe_pu_WORD           word74404#define wqe_erp_SHIFT         224405#define wqe_erp_MASK          0x000000014406#define wqe_erp_WORD          word74407#define wqe_conf_SHIFT        wqe_erp_SHIFT4408#define wqe_conf_MASK         wqe_erp_MASK4409#define wqe_conf_WORD         wqe_erp_WORD4410#define wqe_lnk_SHIFT         234411#define wqe_lnk_MASK          0x000000014412#define wqe_lnk_WORD          word74413#define wqe_tmo_SHIFT         244414#define wqe_tmo_MASK          0x000000ff4415#define wqe_tmo_WORD          word74416	uint32_t abort_tag; /* word 8 in WQE */4417	uint32_t word9;4418#define wqe_reqtag_SHIFT      04419#define wqe_reqtag_MASK       0x0000FFFF4420#define wqe_reqtag_WORD       word94421#define wqe_temp_rpi_SHIFT    164422#define wqe_temp_rpi_MASK     0x0000FFFF4423#define wqe_temp_rpi_WORD     word94424#define wqe_rcvoxid_SHIFT     164425#define wqe_rcvoxid_MASK      0x0000FFFF4426#define wqe_rcvoxid_WORD      word94427#define wqe_sof_SHIFT         244428#define wqe_sof_MASK          0x000000FF4429#define wqe_sof_WORD          word94430#define wqe_eof_SHIFT         164431#define wqe_eof_MASK          0x000000FF4432#define wqe_eof_WORD          word94433	uint32_t word10;4434#define wqe_ebde_cnt_SHIFT    04435#define wqe_ebde_cnt_MASK     0x0000000f4436#define wqe_ebde_cnt_WORD     word104437#define wqe_xchg_SHIFT        44438#define wqe_xchg_MASK         0x000000014439#define wqe_xchg_WORD         word104440#define LPFC_SCSI_XCHG	      0x04441#define LPFC_NVME_XCHG	      0x14442#define wqe_appid_SHIFT       54443#define wqe_appid_MASK        0x000000014444#define wqe_appid_WORD        word104445#define wqe_oas_SHIFT         64446#define wqe_oas_MASK          0x000000014447#define wqe_oas_WORD          word104448#define wqe_lenloc_SHIFT      74449#define wqe_lenloc_MASK       0x000000034450#define wqe_lenloc_WORD       word104451#define LPFC_WQE_LENLOC_NONE		04452#define LPFC_WQE_LENLOC_WORD3	14453#define LPFC_WQE_LENLOC_WORD12	24454#define LPFC_WQE_LENLOC_WORD4	34455#define wqe_qosd_SHIFT        94456#define wqe_qosd_MASK         0x000000014457#define wqe_qosd_WORD         word104458#define wqe_xbl_SHIFT         114459#define wqe_xbl_MASK          0x000000014460#define wqe_xbl_WORD          word104461#define wqe_iod_SHIFT         134462#define wqe_iod_MASK          0x000000014463#define wqe_iod_WORD          word104464#define LPFC_WQE_IOD_NONE	04465#define LPFC_WQE_IOD_WRITE	04466#define LPFC_WQE_IOD_READ	14467#define wqe_dbde_SHIFT        144468#define wqe_dbde_MASK         0x000000014469#define wqe_dbde_WORD         word104470#define wqe_wqes_SHIFT        154471#define wqe_wqes_MASK         0x000000014472#define wqe_wqes_WORD         word104473/* Note that this field overlaps above fields */4474#define wqe_wqid_SHIFT        14475#define wqe_wqid_MASK         0x00007fff4476#define wqe_wqid_WORD         word104477#define wqe_pri_SHIFT         164478#define wqe_pri_MASK          0x000000074479#define wqe_pri_WORD          word104480#define wqe_pv_SHIFT          194481#define wqe_pv_MASK           0x000000014482#define wqe_pv_WORD           word104483#define wqe_xc_SHIFT          214484#define wqe_xc_MASK           0x000000014485#define wqe_xc_WORD           word104486#define wqe_sr_SHIFT          224487#define wqe_sr_MASK           0x000000014488#define wqe_sr_WORD           word104489#define wqe_ccpe_SHIFT        234490#define wqe_ccpe_MASK         0x000000014491#define wqe_ccpe_WORD         word104492#define wqe_ccp_SHIFT         244493#define wqe_ccp_MASK          0x000000ff4494#define wqe_ccp_WORD          word104495	uint32_t word11;4496#define wqe_cmd_type_SHIFT    04497#define wqe_cmd_type_MASK     0x0000000f4498#define wqe_cmd_type_WORD     word114499#define wqe_els_id_SHIFT      44500#define wqe_els_id_MASK       0x000000074501#define wqe_els_id_WORD       word114502#define wqe_irsp_SHIFT        44503#define wqe_irsp_MASK         0x000000014504#define wqe_irsp_WORD         word114505#define wqe_pbde_SHIFT        54506#define wqe_pbde_MASK         0x000000014507#define wqe_pbde_WORD         word114508#define wqe_sup_SHIFT         64509#define wqe_sup_MASK          0x000000014510#define wqe_sup_WORD          word114511#define wqe_ffrq_SHIFT         64512#define wqe_ffrq_MASK          0x000000014513#define wqe_ffrq_WORD          word114514#define wqe_wqec_SHIFT        74515#define wqe_wqec_MASK         0x000000014516#define wqe_wqec_WORD         word114517#define wqe_irsplen_SHIFT     84518#define wqe_irsplen_MASK      0x0000000f4519#define wqe_irsplen_WORD      word114520#define wqe_cqid_SHIFT        164521#define wqe_cqid_MASK         0x0000ffff4522#define wqe_cqid_WORD         word114523#define LPFC_WQE_CQ_ID_DEFAULT	0xffff4524};4525 4526struct wqe_did {4527	uint32_t word5;4528#define wqe_els_did_SHIFT         04529#define wqe_els_did_MASK          0x00FFFFFF4530#define wqe_els_did_WORD          word54531#define wqe_xmit_bls_pt_SHIFT         284532#define wqe_xmit_bls_pt_MASK          0x000000034533#define wqe_xmit_bls_pt_WORD          word54534#define wqe_xmit_bls_ar_SHIFT         304535#define wqe_xmit_bls_ar_MASK          0x000000014536#define wqe_xmit_bls_ar_WORD          word54537#define wqe_xmit_bls_xo_SHIFT         314538#define wqe_xmit_bls_xo_MASK          0x000000014539#define wqe_xmit_bls_xo_WORD          word54540};4541 4542struct lpfc_wqe_generic{4543	struct ulp_bde64 bde;4544	uint32_t word3;4545	uint32_t word4;4546	uint32_t word5;4547	struct wqe_common wqe_com;4548	uint32_t payload[4];4549};4550 4551enum els_request64_wqe_word11 {4552	LPFC_ELS_ID_DEFAULT,4553	LPFC_ELS_ID_LOGO,4554	LPFC_ELS_ID_FDISC,4555	LPFC_ELS_ID_FLOGI,4556	LPFC_ELS_ID_PLOGI,4557};4558 4559struct els_request64_wqe {4560	struct ulp_bde64 bde;4561	uint32_t payload_len;4562	uint32_t word4;4563#define els_req64_sid_SHIFT         04564#define els_req64_sid_MASK          0x00FFFFFF4565#define els_req64_sid_WORD          word44566#define els_req64_sp_SHIFT          244567#define els_req64_sp_MASK           0x000000014568#define els_req64_sp_WORD           word44569#define els_req64_vf_SHIFT          254570#define els_req64_vf_MASK           0x000000014571#define els_req64_vf_WORD           word44572	struct wqe_did	wqe_dest;4573	struct wqe_common wqe_com; /* words 6-11 */4574	uint32_t word12;4575#define els_req64_vfid_SHIFT        14576#define els_req64_vfid_MASK         0x00000FFF4577#define els_req64_vfid_WORD         word124578#define els_req64_pri_SHIFT         134579#define els_req64_pri_MASK          0x000000074580#define els_req64_pri_WORD          word124581	uint32_t word13;4582#define els_req64_hopcnt_SHIFT      244583#define els_req64_hopcnt_MASK       0x000000ff4584#define els_req64_hopcnt_WORD       word134585	uint32_t word14;4586	uint32_t max_response_payload_len;4587};4588 4589struct xmit_els_rsp64_wqe {4590	struct ulp_bde64 bde;4591	uint32_t response_payload_len;4592	uint32_t word4;4593#define els_rsp64_sid_SHIFT         04594#define els_rsp64_sid_MASK          0x00FFFFFF4595#define els_rsp64_sid_WORD          word44596#define els_rsp64_sp_SHIFT          244597#define els_rsp64_sp_MASK           0x000000014598#define els_rsp64_sp_WORD           word44599	struct wqe_did wqe_dest;4600	struct wqe_common wqe_com; /* words 6-11 */4601	uint32_t word12;4602#define wqe_rsp_temp_rpi_SHIFT    04603#define wqe_rsp_temp_rpi_MASK     0x0000FFFF4604#define wqe_rsp_temp_rpi_WORD     word124605	uint32_t rsvd_13_15[3];4606};4607 4608struct xmit_bls_rsp64_wqe {4609	uint32_t payload0;4610/* Payload0 for BA_ACC */4611#define xmit_bls_rsp64_acc_seq_id_SHIFT        164612#define xmit_bls_rsp64_acc_seq_id_MASK         0x000000ff4613#define xmit_bls_rsp64_acc_seq_id_WORD         payload04614#define xmit_bls_rsp64_acc_seq_id_vald_SHIFT   244615#define xmit_bls_rsp64_acc_seq_id_vald_MASK    0x000000ff4616#define xmit_bls_rsp64_acc_seq_id_vald_WORD    payload04617/* Payload0 for BA_RJT */4618#define xmit_bls_rsp64_rjt_vspec_SHIFT   04619#define xmit_bls_rsp64_rjt_vspec_MASK    0x000000ff4620#define xmit_bls_rsp64_rjt_vspec_WORD    payload04621#define xmit_bls_rsp64_rjt_expc_SHIFT    84622#define xmit_bls_rsp64_rjt_expc_MASK     0x000000ff4623#define xmit_bls_rsp64_rjt_expc_WORD     payload04624#define xmit_bls_rsp64_rjt_rsnc_SHIFT    164625#define xmit_bls_rsp64_rjt_rsnc_MASK     0x000000ff4626#define xmit_bls_rsp64_rjt_rsnc_WORD     payload04627	uint32_t word1;4628#define xmit_bls_rsp64_rxid_SHIFT  04629#define xmit_bls_rsp64_rxid_MASK   0x0000ffff4630#define xmit_bls_rsp64_rxid_WORD   word14631#define xmit_bls_rsp64_oxid_SHIFT  164632#define xmit_bls_rsp64_oxid_MASK   0x0000ffff4633#define xmit_bls_rsp64_oxid_WORD   word14634	uint32_t word2;4635#define xmit_bls_rsp64_seqcnthi_SHIFT  04636#define xmit_bls_rsp64_seqcnthi_MASK   0x0000ffff4637#define xmit_bls_rsp64_seqcnthi_WORD   word24638#define xmit_bls_rsp64_seqcntlo_SHIFT  164639#define xmit_bls_rsp64_seqcntlo_MASK   0x0000ffff4640#define xmit_bls_rsp64_seqcntlo_WORD   word24641	uint32_t rsrvd3;4642	uint32_t rsrvd4;4643	struct wqe_did	wqe_dest;4644	struct wqe_common wqe_com; /* words 6-11 */4645	uint32_t word12;4646#define xmit_bls_rsp64_temprpi_SHIFT  04647#define xmit_bls_rsp64_temprpi_MASK   0x0000ffff4648#define xmit_bls_rsp64_temprpi_WORD   word124649	uint32_t rsvd_13_15[3];4650};4651 4652struct wqe_rctl_dfctl {4653	uint32_t word5;4654#define wqe_si_SHIFT 24655#define wqe_si_MASK  0x0000000014656#define wqe_si_WORD  word54657#define wqe_la_SHIFT 34658#define wqe_la_MASK  0x0000000014659#define wqe_la_WORD  word54660#define wqe_xo_SHIFT	64661#define wqe_xo_MASK	0x0000000014662#define wqe_xo_WORD	word54663#define wqe_ls_SHIFT 74664#define wqe_ls_MASK  0x0000000014665#define wqe_ls_WORD  word54666#define wqe_dfctl_SHIFT 84667#define wqe_dfctl_MASK  0x0000000ff4668#define wqe_dfctl_WORD  word54669#define wqe_type_SHIFT 164670#define wqe_type_MASK  0x0000000ff4671#define wqe_type_WORD  word54672#define wqe_rctl_SHIFT 244673#define wqe_rctl_MASK  0x0000000ff4674#define wqe_rctl_WORD  word54675};4676 4677struct xmit_seq64_wqe {4678	struct ulp_bde64 bde;4679	uint32_t rsvd3;4680	uint32_t relative_offset;4681	struct wqe_rctl_dfctl wge_ctl;4682	struct wqe_common wqe_com; /* words 6-11 */4683	uint32_t xmit_len;4684	uint32_t rsvd_12_15[3];4685};4686struct xmit_bcast64_wqe {4687	struct ulp_bde64 bde;4688	uint32_t seq_payload_len;4689	uint32_t rsvd4;4690	struct wqe_rctl_dfctl wge_ctl; /* word 5 */4691	struct wqe_common wqe_com;     /* words 6-11 */4692	uint32_t rsvd_12_15[4];4693};4694 4695struct gen_req64_wqe {4696	struct ulp_bde64 bde;4697	uint32_t request_payload_len;4698	uint32_t relative_offset;4699	struct wqe_rctl_dfctl wge_ctl; /* word 5 */4700	struct wqe_common wqe_com;     /* words 6-11 */4701	uint32_t rsvd_12_14[3];4702	uint32_t max_response_payload_len;4703};4704 4705/* Define NVME PRLI request to fabric. NVME is a4706 * fabric-only protocol.4707 * Updated to red-lined v1.08 on Sept 16, 20164708 */4709struct lpfc_nvme_prli {4710	uint32_t word1;4711	/* The Response Code is defined in the FCP PRLI lpfc_hw.h */4712#define prli_acc_rsp_code_SHIFT         84713#define prli_acc_rsp_code_MASK          0x0000000f4714#define prli_acc_rsp_code_WORD          word14715#define prli_estabImagePair_SHIFT       134716#define prli_estabImagePair_MASK        0x000000014717#define prli_estabImagePair_WORD        word14718#define prli_type_code_ext_SHIFT        164719#define prli_type_code_ext_MASK         0x000000ff4720#define prli_type_code_ext_WORD         word14721#define prli_type_code_SHIFT            244722#define prli_type_code_MASK             0x000000ff4723#define prli_type_code_WORD             word14724	uint32_t word_rsvd2;4725	uint32_t word_rsvd3;4726 4727	uint32_t word4;4728#define prli_fba_SHIFT                  04729#define prli_fba_MASK                   0x000000014730#define prli_fba_WORD                   word44731#define prli_disc_SHIFT                 34732#define prli_disc_MASK                  0x000000014733#define prli_disc_WORD                  word44734#define prli_tgt_SHIFT                  44735#define prli_tgt_MASK                   0x000000014736#define prli_tgt_WORD                   word44737#define prli_init_SHIFT                 54738#define prli_init_MASK                  0x000000014739#define prli_init_WORD                  word44740#define prli_conf_SHIFT                 74741#define prli_conf_MASK                  0x000000014742#define prli_conf_WORD                  word44743#define prli_nsler_SHIFT		84744#define prli_nsler_MASK			0x000000014745#define prli_nsler_WORD			word44746	uint32_t word5;4747#define prli_fb_sz_SHIFT                04748#define prli_fb_sz_MASK                 0x0000ffff4749#define prli_fb_sz_WORD                 word54750#define LPFC_NVMET_FB_SZ_MAX  65536   /* Driver target mode only. */4751};4752 4753struct create_xri_wqe {4754	uint32_t rsrvd[5];           /* words 0-4 */4755	struct wqe_did	wqe_dest;  /* word 5 */4756	struct wqe_common wqe_com; /* words 6-11 */4757	uint32_t rsvd_12_15[4];         /* word 12-15 */4758};4759 4760#define T_REQUEST_TAG 34761#define T_XRI_TAG 14762 4763struct cmf_sync_wqe {4764	uint32_t rsrvd[3];4765	uint32_t word3;4766#define	cmf_sync_interval_SHIFT	04767#define	cmf_sync_interval_MASK	0x00000ffff4768#define	cmf_sync_interval_WORD	word34769#define	cmf_sync_afpin_SHIFT	164770#define	cmf_sync_afpin_MASK	0x0000000014771#define	cmf_sync_afpin_WORD	word34772#define	cmf_sync_asig_SHIFT	174773#define	cmf_sync_asig_MASK	0x0000000014774#define	cmf_sync_asig_WORD	word34775#define	cmf_sync_op_SHIFT	204776#define	cmf_sync_op_MASK	0x00000000f4777#define	cmf_sync_op_WORD	word34778#define	cmf_sync_ver_SHIFT	244779#define	cmf_sync_ver_MASK	0x0000000ff4780#define	cmf_sync_ver_WORD	word34781#define LPFC_CMF_SYNC_VER	14782	uint32_t event_tag;4783	uint32_t word5;4784#define	cmf_sync_wsigmax_SHIFT	04785#define	cmf_sync_wsigmax_MASK	0x00000ffff4786#define	cmf_sync_wsigmax_WORD	word54787#define	cmf_sync_wsigcnt_SHIFT	164788#define	cmf_sync_wsigcnt_MASK	0x00000ffff4789#define	cmf_sync_wsigcnt_WORD	word54790	uint32_t word6;4791	uint32_t word7;4792#define	cmf_sync_cmnd_SHIFT	84793#define	cmf_sync_cmnd_MASK	0x0000000ff4794#define	cmf_sync_cmnd_WORD	word74795	uint32_t word8;4796	uint32_t word9;4797#define	cmf_sync_reqtag_SHIFT	04798#define	cmf_sync_reqtag_MASK	0x00000ffff4799#define	cmf_sync_reqtag_WORD	word94800#define	cmf_sync_wfpinmax_SHIFT	164801#define	cmf_sync_wfpinmax_MASK	0x0000000ff4802#define	cmf_sync_wfpinmax_WORD	word94803#define	cmf_sync_wfpincnt_SHIFT	244804#define	cmf_sync_wfpincnt_MASK	0x0000000ff4805#define	cmf_sync_wfpincnt_WORD	word94806	uint32_t word10;4807#define cmf_sync_qosd_SHIFT	94808#define cmf_sync_qosd_MASK	0x000000014809#define cmf_sync_qosd_WORD	word104810	uint32_t word11;4811#define cmf_sync_cmd_type_SHIFT	04812#define cmf_sync_cmd_type_MASK	0x0000000f4813#define cmf_sync_cmd_type_WORD	word114814#define cmf_sync_wqec_SHIFT	74815#define cmf_sync_wqec_MASK	0x000000014816#define cmf_sync_wqec_WORD	word114817#define cmf_sync_cqid_SHIFT	164818#define cmf_sync_cqid_MASK	0x0000ffff4819#define cmf_sync_cqid_WORD	word114820	uint32_t read_bytes;4821	uint32_t word13;4822#define cmf_sync_period_SHIFT	244823#define cmf_sync_period_MASK	0x000000ff4824#define cmf_sync_period_WORD	word134825	uint32_t word14;4826	uint32_t word15;4827};4828 4829struct abort_cmd_wqe {4830	uint32_t rsrvd[3];4831	uint32_t word3;4832#define	abort_cmd_ia_SHIFT  04833#define	abort_cmd_ia_MASK  0x0000000014834#define	abort_cmd_ia_WORD  word34835#define	abort_cmd_criteria_SHIFT  84836#define	abort_cmd_criteria_MASK  0x0000000ff4837#define	abort_cmd_criteria_WORD  word34838	uint32_t rsrvd4;4839	uint32_t rsrvd5;4840	struct wqe_common wqe_com;     /* words 6-11 */4841	uint32_t rsvd_12_15[4];         /* word 12-15 */4842};4843 4844struct fcp_iwrite64_wqe {4845	struct ulp_bde64 bde;4846	uint32_t word3;4847#define	cmd_buff_len_SHIFT  164848#define	cmd_buff_len_MASK  0x00000ffff4849#define	cmd_buff_len_WORD  word34850/* Note: payload_offset_len field depends on ASIC support */4851#define payload_offset_len_SHIFT 04852#define payload_offset_len_MASK 0x0000ffff4853#define payload_offset_len_WORD word34854	uint32_t total_xfer_len;4855	uint32_t initial_xfer_len;4856	struct wqe_common wqe_com;     /* words 6-11 */4857	uint32_t rsrvd12;4858	struct ulp_bde64 ph_bde;       /* words 13-15 */4859};4860 4861struct fcp_iread64_wqe {4862	struct ulp_bde64 bde;4863	uint32_t word3;4864#define	cmd_buff_len_SHIFT  164865#define	cmd_buff_len_MASK  0x00000ffff4866#define	cmd_buff_len_WORD  word34867/* Note: payload_offset_len field depends on ASIC support */4868#define payload_offset_len_SHIFT 04869#define payload_offset_len_MASK 0x0000ffff4870#define payload_offset_len_WORD word34871	uint32_t total_xfer_len;       /* word 4 */4872	uint32_t rsrvd5;               /* word 5 */4873	struct wqe_common wqe_com;     /* words 6-11 */4874	uint32_t rsrvd12;4875	struct ulp_bde64 ph_bde;       /* words 13-15 */4876};4877 4878struct fcp_icmnd64_wqe {4879	struct ulp_bde64 bde;          /* words 0-2 */4880	uint32_t word3;4881#define	cmd_buff_len_SHIFT  164882#define	cmd_buff_len_MASK  0x00000ffff4883#define	cmd_buff_len_WORD  word34884/* Note: payload_offset_len field depends on ASIC support */4885#define payload_offset_len_SHIFT 04886#define payload_offset_len_MASK 0x0000ffff4887#define payload_offset_len_WORD word34888	uint32_t rsrvd4;               /* word 4 */4889	uint32_t rsrvd5;               /* word 5 */4890	struct wqe_common wqe_com;     /* words 6-11 */4891	uint32_t rsvd_12_15[4];        /* word 12-15 */4892};4893 4894struct fcp_trsp64_wqe {4895	struct ulp_bde64 bde;4896	uint32_t response_len;4897	uint32_t rsvd_4_5[2];4898	struct wqe_common wqe_com;      /* words 6-11 */4899	uint32_t rsvd_12_15[4];         /* word 12-15 */4900};4901 4902struct fcp_tsend64_wqe {4903	struct ulp_bde64 bde;4904	uint32_t payload_offset_len;4905	uint32_t relative_offset;4906	uint32_t reserved;4907	struct wqe_common wqe_com;     /* words 6-11 */4908	uint32_t fcp_data_len;         /* word 12 */4909	uint32_t rsvd_13_15[3];        /* word 13-15 */4910};4911 4912struct fcp_treceive64_wqe {4913	struct ulp_bde64 bde;4914	uint32_t payload_offset_len;4915	uint32_t relative_offset;4916	uint32_t reserved;4917	struct wqe_common wqe_com;     /* words 6-11 */4918	uint32_t fcp_data_len;         /* word 12 */4919	uint32_t rsvd_13_15[3];        /* word 13-15 */4920};4921#define TXRDY_PAYLOAD_LEN      124922 4923#define CMD_SEND_FRAME	0xE14924 4925struct send_frame_wqe {4926	struct ulp_bde64 bde;          /* words 0-2 */4927	uint32_t frame_len;            /* word 3 */4928	uint32_t fc_hdr_wd0;           /* word 4 */4929	uint32_t fc_hdr_wd1;           /* word 5 */4930	struct wqe_common wqe_com;     /* words 6-11 */4931	uint32_t fc_hdr_wd2;           /* word 12 */4932	uint32_t fc_hdr_wd3;           /* word 13 */4933	uint32_t fc_hdr_wd4;           /* word 14 */4934	uint32_t fc_hdr_wd5;           /* word 15 */4935};4936 4937#define ELS_RDF_REG_TAG_CNT		44938struct lpfc_els_rdf_reg_desc {4939	struct fc_df_desc_fpin_reg	reg_desc;	/* descriptor header */4940	__be32				desc_tags[ELS_RDF_REG_TAG_CNT];4941							/* tags in reg_desc */4942};4943 4944struct lpfc_els_rdf_req {4945	struct fc_els_rdf		rdf;	   /* hdr up to descriptors */4946	struct lpfc_els_rdf_reg_desc	reg_d1;	/* 1st descriptor */4947};4948 4949struct lpfc_els_rdf_rsp {4950	struct fc_els_rdf_resp		rdf_resp;  /* hdr up to descriptors */4951	struct lpfc_els_rdf_reg_desc	reg_d1;	/* 1st descriptor */4952};4953 4954union lpfc_wqe {4955	uint32_t words[16];4956	struct lpfc_wqe_generic generic;4957	struct fcp_icmnd64_wqe fcp_icmd;4958	struct fcp_iread64_wqe fcp_iread;4959	struct fcp_iwrite64_wqe fcp_iwrite;4960	struct abort_cmd_wqe abort_cmd;4961	struct cmf_sync_wqe cmf_sync;4962	struct create_xri_wqe create_xri;4963	struct xmit_bcast64_wqe xmit_bcast64;4964	struct xmit_seq64_wqe xmit_sequence;4965	struct xmit_bls_rsp64_wqe xmit_bls_rsp;4966	struct xmit_els_rsp64_wqe xmit_els_rsp;4967	struct els_request64_wqe els_req;4968	struct gen_req64_wqe gen_req;4969	struct fcp_trsp64_wqe fcp_trsp;4970	struct fcp_tsend64_wqe fcp_tsend;4971	struct fcp_treceive64_wqe fcp_treceive;4972	struct send_frame_wqe send_frame;4973};4974 4975union lpfc_wqe128 {4976	uint32_t words[32];4977	struct lpfc_wqe_generic generic;4978	struct fcp_icmnd64_wqe fcp_icmd;4979	struct fcp_iread64_wqe fcp_iread;4980	struct fcp_iwrite64_wqe fcp_iwrite;4981	struct abort_cmd_wqe abort_cmd;4982	struct cmf_sync_wqe cmf_sync;4983	struct create_xri_wqe create_xri;4984	struct xmit_bcast64_wqe xmit_bcast64;4985	struct xmit_seq64_wqe xmit_sequence;4986	struct xmit_bls_rsp64_wqe xmit_bls_rsp;4987	struct xmit_els_rsp64_wqe xmit_els_rsp;4988	struct els_request64_wqe els_req;4989	struct gen_req64_wqe gen_req;4990	struct fcp_trsp64_wqe fcp_trsp;4991	struct fcp_tsend64_wqe fcp_tsend;4992	struct fcp_treceive64_wqe fcp_treceive;4993	struct send_frame_wqe send_frame;4994};4995 4996#define MAGIC_NUMBER_G6 0xFEAA00034997#define MAGIC_NUMBER_G7 0xFEAA00054998#define MAGIC_NUMBER_G7P 0xFEAA00204999 5000struct lpfc_grp_hdr {5001	uint32_t size;5002	uint32_t magic_number;5003	uint32_t word2;5004#define lpfc_grp_hdr_file_type_SHIFT	245005#define lpfc_grp_hdr_file_type_MASK	0x000000FF5006#define lpfc_grp_hdr_file_type_WORD	word25007#define lpfc_grp_hdr_id_SHIFT		165008#define lpfc_grp_hdr_id_MASK		0x000000FF5009#define lpfc_grp_hdr_id_WORD		word25010	uint8_t rev_name[128];5011	uint8_t date[12];5012	uint8_t revision[32];5013};5014 5015/* Defines for WQE command type */5016#define FCP_COMMAND		0x05017#define NVME_READ_CMD		0x05018#define FCP_COMMAND_DATA_OUT	0x15019#define NVME_WRITE_CMD		0x15020#define COMMAND_DATA_IN		0x05021#define COMMAND_DATA_OUT	0x15022#define FCP_COMMAND_TRECEIVE	0x25023#define FCP_COMMAND_TRSP	0x35024#define FCP_COMMAND_TSEND	0x75025#define OTHER_COMMAND		0x85026#define CMF_SYNC_COMMAND	0xA5027#define ELS_COMMAND_NON_FIP	0xC5028#define ELS_COMMAND_FIP		0xD5029 5030#define LPFC_NVME_EMBED_CMD	0x05031#define LPFC_NVME_EMBED_WRITE	0x15032#define LPFC_NVME_EMBED_READ	0x25033 5034/* WQE Commands */5035#define CMD_ABORT_XRI_WQE       0x0F5036#define CMD_XMIT_SEQUENCE64_WQE 0x825037#define CMD_XMIT_BCAST64_WQE    0x845038#define CMD_ELS_REQUEST64_WQE   0x8A5039#define CMD_XMIT_ELS_RSP64_WQE  0x955040#define CMD_XMIT_BLS_RSP64_WQE  0x975041#define CMD_FCP_IWRITE64_WQE    0x985042#define CMD_FCP_IREAD64_WQE     0x9A5043#define CMD_FCP_ICMND64_WQE     0x9C5044#define CMD_FCP_TSEND64_WQE     0x9F5045#define CMD_FCP_TRECEIVE64_WQE  0xA15046#define CMD_FCP_TRSP64_WQE      0xA35047#define CMD_GEN_REQUEST64_WQE   0xC25048#define CMD_CMF_SYNC_WQE	0xE85049 5050#define CMD_WQE_MASK            0xff5051 5052 5053#define LPFC_FW_DUMP	15054#define LPFC_FW_RESET	25055#define LPFC_DV_RESET	35056 5057/* On some kernels, enum fc_ls_tlv_dtag does not have5058 * these 2 enums defined, on other kernels it does.5059 * To get aound this we need to add these 2 defines here.5060 */5061#ifndef ELS_DTAG_LNK_FAULT_CAP5062#define ELS_DTAG_LNK_FAULT_CAP        0x0001000D5063#endif5064#ifndef ELS_DTAG_CG_SIGNAL_CAP5065#define ELS_DTAG_CG_SIGNAL_CAP        0x0001000F5066#endif5067 5068/*5069 * Initializer useful for decoding FPIN string table.5070 */5071#define FC_FPIN_CONGN_SEVERITY_INIT {				\5072	{ FPIN_CONGN_SEVERITY_WARNING,		"Warning" },	\5073	{ FPIN_CONGN_SEVERITY_ERROR,		"Alarm" },	\5074}5075 5076/* Used for logging FPIN messages */5077#define LPFC_FPIN_WWPN_LINE_SZ  1285078#define LPFC_FPIN_WWPN_LINE_CNT 65079#define LPFC_FPIN_WWPN_NUM_LINE 65080