linux/drivers/scsi/lpfc/lpfc_hw.h

/*******************************************************************
 * This file is part of the Emulex Linux Device Driver for         *
 * Fibre Channel Host Bus Adapters.                                *
 * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term *
 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
 * Copyright (C) 2004-2016 Emulex.  All rights reserved.           *
 * EMULEX and SLI are trademarks of Emulex.                        *
 * www.broadcom.com                                                *
 *                                                                 *
 * This program is free software; you can redistribute it and/or   *
 * modify it under the terms of version 2 of the GNU General       *
 * Public License as published by the Free Software Foundation.    *
 * This program is distributed in the hope that it will be useful. *
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
 * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
 * more details, a copy of which can be found in the file COPYING  *
 * included with this package.                                     *
 *******************************************************************/

#define FDMI_DID
#define NameServer_DID
#define Fabric_Cntl_DID
#define Fabric_DID
#define Bcast_DID
#define Mask_DID
#define CT_DID_MASK
#define Fabric_DID_MASK
#define WELL_KNOWN_DID_MASK

#define PT2PT_LocalID
#define PT2PT_RemoteID

#define FF_DEF_EDTOV
#define FF_DEF_ALTOV
#define FF_DEF_RATOV
#define FF_DEF_ARBTOV

#define LPFC_BUF_RING0

#define FCELSSIZE

#define LPFC_FCP_RING
#define LPFC_EXTRA_RING
#define LPFC_ELS_RING

#define SLI2_IOCB_CMD_R0_ENTRIES
#define SLI2_IOCB_RSP_R0_ENTRIES
#define SLI2_IOCB_CMD_R1_ENTRIES
#define SLI2_IOCB_RSP_R1_ENTRIES
#define SLI2_IOCB_CMD_R1XTRA_ENTRIES
#define SLI2_IOCB_RSP_R1XTRA_ENTRIES
#define SLI2_IOCB_CMD_R2_ENTRIES
#define SLI2_IOCB_RSP_R2_ENTRIES
#define SLI2_IOCB_CMD_R3_ENTRIES
#define SLI2_IOCB_RSP_R3_ENTRIES
#define SLI2_IOCB_CMD_R3XTRA_ENTRIES
#define SLI2_IOCB_RSP_R3XTRA_ENTRIES

#define SLI2_IOCB_CMD_SIZE
#define SLI2_IOCB_RSP_SIZE
#define SLI3_IOCB_CMD_SIZE
#define SLI3_IOCB_RSP_SIZE

#define LPFC_UNREG_ALL_RPIS_VPORT
#define LPFC_UNREG_ALL_DFLT_RPIS

/* vendor ID used in SCSI netlink calls */
#define LPFC_NL_VENDOR_ID

#define FW_REV_STR_SIZE
/* Common Transport structures and definitions */

CtRevisionId;

CtCommandResponse;

/* FC4 Feature bits for RFF_ID */
#define FC4_FEATURE_TARGET
#define FC4_FEATURE_INIT
#define FC4_FEATURE_NVME_DISC

enum rft_word0 {};

enum rft_word1 {};

enum rft_word3 {};

struct lpfc_sli_ct_request {};

#define LPFC_MAX_CT_SIZE

#define SLI_CT_REVISION
#define GID_REQUEST_SZ
#define GIDFF_REQUEST_SZ
#define GFF_REQUEST_SZ
#define GFT_REQUEST_SZ
#define RFT_REQUEST_SZ
#define RFF_REQUEST_SZ
#define RNN_REQUEST_SZ
#define RSNN_REQUEST_SZ
#define DA_ID_REQUEST_SZ
#define RSPN_REQUEST_SZ

/*
 * FsType Definitions
 */

#define SLI_CT_MANAGEMENT_SERVICE
#define SLI_CT_TIME_SERVICE
#define SLI_CT_DIRECTORY_SERVICE
#define SLI_CT_FABRIC_CONTROLLER_SERVICE

/*
 * Directory Service Subtypes
 */

#define SLI_CT_DIRECTORY_NAME_SERVER

/*
 * Response Codes
 */

#define SLI_CT_RESPONSE_FS_RJT
#define SLI_CT_RESPONSE_FS_ACC

/*
 * Reason Codes
 */

#define SLI_CT_NO_ADDITIONAL_EXPL
#define SLI_CT_INVALID_COMMAND
#define SLI_CT_INVALID_VERSION
#define SLI_CT_LOGICAL_ERROR
#define SLI_CT_INVALID_IU_SIZE
#define SLI_CT_LOGICAL_BUSY
#define SLI_CT_PROTOCOL_ERROR
#define SLI_CT_UNABLE_TO_PERFORM_REQ
#define SLI_CT_REQ_NOT_SUPPORTED
#define SLI_CT_HBA_INFO_NOT_REGISTERED
#define SLI_CT_MULTIPLE_HBA_ATTR_OF_SAME_TYPE
#define SLI_CT_INVALID_HBA_ATTR_BLOCK_LEN
#define SLI_CT_HBA_ATTR_NOT_PRESENT
#define SLI_CT_PORT_INFO_NOT_REGISTERED
#define SLI_CT_MULTIPLE_PORT_ATTR_OF_SAME_TYPE
#define SLI_CT_INVALID_PORT_ATTR_BLOCK_LEN
#define SLI_CT_VENDOR_UNIQUE

/*
 * Name Server SLI_CT_UNABLE_TO_PERFORM_REQ Explanations
 */

#define SLI_CT_NO_PORT_ID
#define SLI_CT_NO_PORT_NAME
#define SLI_CT_NO_NODE_NAME
#define SLI_CT_NO_CLASS_OF_SERVICE
#define SLI_CT_NO_IP_ADDRESS
#define SLI_CT_NO_IPA
#define SLI_CT_NO_FC4_TYPES
#define SLI_CT_NO_SYMBOLIC_PORT_NAME
#define SLI_CT_NO_SYMBOLIC_NODE_NAME
#define SLI_CT_NO_PORT_TYPE
#define SLI_CT_ACCESS_DENIED
#define SLI_CT_INVALID_PORT_ID
#define SLI_CT_DATABASE_EMPTY
#define SLI_CT_APP_ID_NOT_AVAILABLE

/*
 * Name Server Command Codes
 */

#define SLI_CTNS_GA_NXT
#define SLI_CTNS_GPN_ID
#define SLI_CTNS_GNN_ID
#define SLI_CTNS_GCS_ID
#define SLI_CTNS_GFT_ID
#define SLI_CTNS_GSPN_ID
#define SLI_CTNS_GPT_ID
#define SLI_CTNS_GFF_ID
#define SLI_CTNS_GID_PN
#define SLI_CTNS_GID_NN
#define SLI_CTNS_GIP_NN
#define SLI_CTNS_GIPA_NN
#define SLI_CTNS_GSNN_NN
#define SLI_CTNS_GNN_IP
#define SLI_CTNS_GIPA_IP
#define SLI_CTNS_GID_FT
#define SLI_CTNS_GID_FF
#define SLI_CTNS_GID_PT
#define SLI_CTNS_RPN_ID
#define SLI_CTNS_RNN_ID
#define SLI_CTNS_RCS_ID
#define SLI_CTNS_RFT_ID
#define SLI_CTNS_RSPN_ID
#define SLI_CTNS_RPT_ID
#define SLI_CTNS_RFF_ID
#define SLI_CTNS_RIP_NN
#define SLI_CTNS_RIPA_NN
#define SLI_CTNS_RSNN_NN
#define SLI_CTNS_DA_ID

/*
 * Port Types
 */

#define SLI_CTPT_N_PORT
#define SLI_CTPT_NL_PORT
#define SLI_CTPT_FNL_PORT
#define SLI_CTPT_IP
#define SLI_CTPT_FCP
#define SLI_CTPT_NVME
#define SLI_CTPT_NX_PORT
#define SLI_CTPT_F_PORT
#define SLI_CTPT_FL_PORT
#define SLI_CTPT_E_PORT

#define SLI_CT_LAST_ENTRY

/* Fibre Channel Service Parameter definitions */

#define FC_PH_4_0
#define FC_PH_4_1
#define FC_PH_4_2
#define FC_PH_4_3

#define FC_PH_LOW
#define FC_PH_HIGH
#define FC_PH3

#define FF_FRAME_SIZE

struct lpfc_name {};

struct csp {};

struct class_parms {};

struct serv_parm {};

/*
 * Virtual Fabric Tagging Header
 */
struct fc_vft_header {};

#include <uapi/scsi/fc/fc_els.h>

/*
 *  Extended Link Service LS_COMMAND codes (Payload Word 0)
 */
#ifdef __BIG_ENDIAN_BITFIELD
#define ELS_CMD_MASK
#define ELS_RSP_MASK
#define ELS_CMD_LS_RJT
#define ELS_CMD_ACC
#define ELS_CMD_PLOGI
#define ELS_CMD_FLOGI
#define ELS_CMD_LOGO
#define ELS_CMD_ABTX
#define ELS_CMD_RCS
#define ELS_CMD_RES
#define ELS_CMD_RSS
#define ELS_CMD_RSI
#define ELS_CMD_ESTS
#define ELS_CMD_ESTC
#define ELS_CMD_ADVC
#define ELS_CMD_RTV
#define ELS_CMD_RLS
#define ELS_CMD_ECHO
#define ELS_CMD_TEST
#define ELS_CMD_RRQ
#define ELS_CMD_REC
#define ELS_CMD_RDP
#define ELS_CMD_RDF
#define ELS_CMD_PRLI
#define ELS_CMD_NVMEPRLI
#define ELS_CMD_PRLO
#define ELS_CMD_PRLO_ACC
#define ELS_CMD_PDISC
#define ELS_CMD_FDISC
#define ELS_CMD_ADISC
#define ELS_CMD_FARP
#define ELS_CMD_FARPR
#define ELS_CMD_RPL
#define ELS_CMD_FAN
#define ELS_CMD_RSCN
#define ELS_CMD_RSCN_XMT
#define ELS_CMD_SCR
#define ELS_CMD_RNID
#define ELS_CMD_LIRR
#define ELS_CMD_LCB
#define ELS_CMD_FPIN
#define ELS_CMD_EDC
#define ELS_CMD_QFPA
#define ELS_CMD_UVEM
#else	/*  __LITTLE_ENDIAN_BITFIELD */
#define ELS_CMD_MASK
#define ELS_RSP_MASK
#define ELS_CMD_LS_RJT
#define ELS_CMD_ACC
#define ELS_CMD_PLOGI
#define ELS_CMD_FLOGI
#define ELS_CMD_LOGO
#define ELS_CMD_ABTX
#define ELS_CMD_RCS
#define ELS_CMD_RES
#define ELS_CMD_RSS
#define ELS_CMD_RSI
#define ELS_CMD_ESTS
#define ELS_CMD_ESTC
#define ELS_CMD_ADVC
#define ELS_CMD_RTV
#define ELS_CMD_RLS
#define ELS_CMD_ECHO
#define ELS_CMD_TEST
#define ELS_CMD_RRQ
#define ELS_CMD_REC
#define ELS_CMD_RDP
#define ELS_CMD_RDF
#define ELS_CMD_PRLI
#define ELS_CMD_NVMEPRLI
#define ELS_CMD_PRLO
#define ELS_CMD_PRLO_ACC
#define ELS_CMD_PDISC
#define ELS_CMD_FDISC
#define ELS_CMD_ADISC
#define ELS_CMD_FARP
#define ELS_CMD_FARPR
#define ELS_CMD_RPL
#define ELS_CMD_FAN
#define ELS_CMD_RSCN
#define ELS_CMD_RSCN_XMT
#define ELS_CMD_SCR
#define ELS_CMD_RNID
#define ELS_CMD_LIRR
#define ELS_CMD_LCB
#define ELS_CMD_FPIN
#define ELS_CMD_EDC
#define ELS_CMD_QFPA
#define ELS_CMD_UVEM
#endif

/*
 *  LS_RJT Payload Definition
 */

struct ls_rjt {};

/*
 *  N_Port Login (FLOGO/PLOGO Request) Payload Definition
 */

LOGO;

/*
 *  FCP Login (PRLI Request / ACC) Payload Definition
 */

#define PRLX_PAGE_LEN
#define TPRLO_PAGE_LEN

PRLI;

/*
 *  FCP Logout (PRLO Request / ACC) Payload Definition
 */

PRLO;

ADISC;

FARP;

FAN;

SCR;

RNID_TOP_DISC;

RNID;

struct RLS {};

struct  RLS_RSP {};

struct RRQ {};

#define LPFC_MAX_VFN_PER_PFN
#define LPFC_DEF_VFN_PER_PFN

struct RTV_RSP {};


RPL;

PORT_NUM_BLK;

RPL_RSP;

/* This is used for RSCN command */
D_ID;

#define RSCN_ADDRESS_FORMAT_PORT
#define RSCN_ADDRESS_FORMAT_AREA
#define RSCN_ADDRESS_FORMAT_DOMAIN
#define RSCN_ADDRESS_FORMAT_FABRIC
#define RSCN_ADDRESS_FORMAT_MASK

/*
 *  Structure to define all ELS Payload types
 */

ELS_PKT;

/*
 * Link Cable Beacon (LCB) ELS Frame
 */

struct fc_lcb_request_frame {};

/*
 * Link Cable Beacon (LCB) ELS Response Frame
 */
struct fc_lcb_res_frame {};

/*
 * Read Diagnostic Parameters (RDP) ELS frame.
 */
#define SFF_PG0_IDENT_SFP

#define SFP_FLAG_PT_OPTICAL
#define SFP_FLAG_PT_SWLASER
#define SFP_FLAG_PT_LWLASER_LC1310
#define SFP_FLAG_PT_LWLASER_LL1550
#define SFP_FLAG_PT_MASK
#define SFP_FLAG_PT_SHIFT

#define SFP_FLAG_IS_OPTICAL_PORT
#define SFP_FLAG_IS_OPTICAL_MASK
#define SFP_FLAG_IS_OPTICAL_SHIFT

#define SFP_FLAG_IS_DESC_VALID
#define SFP_FLAG_IS_DESC_VALID_MASK
#define SFP_FLAG_IS_DESC_VALID_SHIFT

#define SFP_FLAG_CT_UNKNOWN
#define SFP_FLAG_CT_SFP_PLUS
#define SFP_FLAG_CT_MASK
#define SFP_FLAG_CT_SHIFT

struct fc_rdp_port_name_info {};


/*
 * Link Error Status Block Structure (FC-FS-3) for RDP
 * This similar to RPS ELS
 */
struct fc_link_status {};

#define RDP_PORT_NAMES_DESC_TAG
struct fc_rdp_port_name_desc {};


struct fc_rdp_fec_info {};

#define RDP_FEC_DESC_TAG
struct fc_fec_rdp_desc {};

struct fc_rdp_link_error_status_payload_info {};

#define RDP_LINK_ERROR_STATUS_DESC_TAG
struct fc_rdp_link_error_status_desc {};

#define VN_PT_PHY_UNKNOWN
#define VN_PT_PHY_PF_PORT
#define VN_PT_PHY_ETH_MAC
#define VN_PT_PHY_SHIFT

#define RDP_PS_1GB
#define RDP_PS_2GB
#define RDP_PS_4GB
#define RDP_PS_10GB
#define RDP_PS_8GB
#define RDP_PS_16GB
#define RDP_PS_32GB
#define RDP_PS_64GB
#define RDP_PS_128GB
#define RDP_PS_256GB

#define RDP_CAP_USER_CONFIGURED
#define RDP_CAP_UNKNOWN
#define RDP_PS_UNKNOWN
#define RDP_PS_NOT_ESTABLISHED

struct fc_rdp_port_speed {};

struct fc_rdp_port_speed_info {};

#define RDP_PORT_SPEED_DESC_TAG
struct fc_rdp_port_speed_desc {};

#define RDP_NPORT_ID_SIZE
#define RDP_N_PORT_DESC_TAG
struct fc_rdp_nport_desc {};


struct fc_rdp_link_service_info {};

#define RDP_LINK_SERVICE_DESC_TAG
struct fc_rdp_link_service_desc {};

struct fc_rdp_sfp_info {};

#define RDP_SFP_DESC_TAG
struct fc_rdp_sfp_desc {};

/* Buffer Credit Descriptor */
struct fc_rdp_bbc_info {};
#define RDP_BBC_DESC_TAG
struct fc_rdp_bbc_desc {};

/* Optical Element Type Transgression Flags */
#define RDP_OET_LOW_WARNING
#define RDP_OET_HIGH_WARNING
#define RDP_OET_LOW_ALARM
#define RDP_OET_HIGH_ALARM

#define RDP_OED_TEMPERATURE
#define RDP_OED_VOLTAGE
#define RDP_OED_TXBIAS
#define RDP_OED_TXPOWER
#define RDP_OED_RXPOWER

#define RDP_OED_TYPE_SHIFT
/* Optical Element Data descriptor */
struct fc_rdp_oed_info {};
#define RDP_OED_DESC_TAG
struct fc_rdp_oed_sfp_desc {};

/* Optical Product Data descriptor */
struct fc_rdp_opd_sfp_info {};

#define RDP_OPD_DESC_TAG
struct fc_rdp_opd_sfp_desc {};

struct fc_rdp_req_frame {};


struct fc_rdp_res_frame {};


/* UVEM */

#define LPFC_UVEM_SIZE
#define LPFC_UVEM_VEM_ID_DESC_SIZE
#define LPFC_UVEM_VE_MAP_DESC_SIZE

#define VEM_ID_DESC_TAG
struct lpfc_vem_id_desc {};

#define LPFC_QFPA_SIZE

#define INSTANTIATED_VE_DESC_TAG
struct instantiated_ve_desc {};

#define DEINSTANTIATED_VE_DESC_TAG
struct deinstantiated_ve_desc {};

/* Query Fabric Priority Allocation Response */
#define LPFC_PRIORITY_RANGE_DESC_SIZE

struct priority_range_desc {};

struct fc_qfpa_res {};

/* Application Server command code */
/* VMID               */

#define SLI_CT_APP_SEV_Subtypes

#define SLI_CTAS_GAPPIA_ENT
#define SLI_CTAS_GALLAPPIA
#define SLI_CTAS_GALLAPPIA_ID
					/* for Nport */
#define SLI_CTAS_GAPPIA_IDAPP
					/* for Nport */
#define SLI_CTAS_RAPP_IDENT
#define SLI_CTAS_DAPP_IDENT
					/* Identifier */
#define SLI_CTAS_DALLAPP_ID
					/* Identifier */

struct entity_id_object {};

struct app_id_object {};

struct lpfc_vmid_rapp_ident_list {};

struct lpfc_vmid_dapp_ident_list {};

#define GALLAPPIA_ID_LAST
struct lpfc_vmid_gallapp_ident_list {};

#define RAPP_IDENT_OFFSET
#define DAPP_IDENT_OFFSET
#define GALLAPPIA_ID_SIZE
#define DALLAPP_ID_SIZE

/******** FDMI ********/

/* lpfc_sli_ct_request defines the CT_IU preamble for FDMI commands */
#define SLI_CT_FDMI_Subtypes

/* Definitions for HBA / Port attribute entries */

/* Attribute Entry Structures */

struct lpfc_fdmi_attr_u32 {};

struct lpfc_fdmi_attr_wwn {};

struct lpfc_fdmi_attr_fullwwn {};

struct lpfc_fdmi_attr_fc4types {};

struct lpfc_fdmi_attr_string {};

/* Maximum FDMI attribute length is Type+Len (4 bytes) + 256 byte string */
#define FDMI_MAX_ATTRLEN

/*
 * HBA Attribute Block
 */
struct lpfc_fdmi_attr_block {};

/*
 * Port Entry
 */
struct lpfc_fdmi_port_entry {};

/*
 * HBA Identifier
 */
struct lpfc_fdmi_hba_ident {};

/*
 * Registered Port List Format
 */
struct lpfc_fdmi_reg_port_list {};

/*
 * Register HBA(RHBA)
 */
struct lpfc_fdmi_reg_hba {};

/******** MI MIB ********/
#define SLI_CT_MIB_Subtypes

/*
 * Register HBA Attributes (RHAT)
 */
struct lpfc_fdmi_reg_hbaattr {};

/*
 * Register Port Attributes (RPA)
 */
struct lpfc_fdmi_reg_portattr {};

/*
 * HBA MAnagement Operations Command Codes
 */
#define SLI_MGMT_GRHL
#define SLI_MGMT_GHAT
#define SLI_MGMT_GRPL
#define SLI_MGMT_GPAT
#define SLI_MGMT_GPAS
#define SLI_MGMT_RHBA
#define SLI_MGMT_RHAT
#define SLI_MGMT_RPRT
#define SLI_MGMT_RPA
#define SLI_MGMT_DHBA
#define SLI_MGMT_DHAT
#define SLI_MGMT_DPRT
#define SLI_MGMT_DPA

#define LPFC_FDMI_MAX_RETRY

/*
 * HBA Attribute Types
 */
#define RHBA_NODENAME
#define RHBA_MANUFACTURER
#define RHBA_SERIAL_NUMBER
#define RHBA_MODEL
#define RHBA_MODEL_DESCRIPTION
#define RHBA_HARDWARE_VERSION
#define RHBA_DRIVER_VERSION
#define RHBA_OPTION_ROM_VERSION
#define RHBA_FIRMWARE_VERSION
#define RHBA_OS_NAME_VERSION
#define RHBA_MAX_CT_PAYLOAD_LEN
#define RHBA_SYM_NODENAME
#define RHBA_VENDOR_INFO
#define RHBA_NUM_PORTS
#define RHBA_FABRIC_WWNN
#define RHBA_BIOS_VERSION
#define RHBA_BIOS_STATE
#define RHBA_VENDOR_ID

/* Bit mask for all individual HBA attributes */
#define LPFC_FDMI_HBA_ATTR_wwnn
#define LPFC_FDMI_HBA_ATTR_manufacturer
#define LPFC_FDMI_HBA_ATTR_sn
#define LPFC_FDMI_HBA_ATTR_model
#define LPFC_FDMI_HBA_ATTR_description
#define LPFC_FDMI_HBA_ATTR_hdw_ver
#define LPFC_FDMI_HBA_ATTR_drvr_ver
#define LPFC_FDMI_HBA_ATTR_rom_ver
#define LPFC_FDMI_HBA_ATTR_fmw_ver
#define LPFC_FDMI_HBA_ATTR_os_ver
#define LPFC_FDMI_HBA_ATTR_ct_len
#define LPFC_FDMI_HBA_ATTR_symbolic_name
#define LPFC_FDMI_HBA_ATTR_vendor_info
#define LPFC_FDMI_HBA_ATTR_num_ports
#define LPFC_FDMI_HBA_ATTR_fabric_wwnn
#define LPFC_FDMI_HBA_ATTR_bios_ver
#define LPFC_FDMI_HBA_ATTR_bios_state
#define LPFC_FDMI_HBA_ATTR_vendor_id

/* Bit mask for FDMI-1 defined HBA attributes */
#define LPFC_FDMI1_HBA_ATTR

/* Bit mask for FDMI-2 defined HBA attributes */
/* Skip vendor_info and bios_state */
#define LPFC_FDMI2_HBA_ATTR

/*
 * Port Attribute Types
 */
#define RPRT_SUPPORTED_FC4_TYPES
#define RPRT_SUPPORTED_SPEED
#define RPRT_PORT_SPEED
#define RPRT_MAX_FRAME_SIZE
#define RPRT_OS_DEVICE_NAME
#define RPRT_HOST_NAME
#define RPRT_NODENAME
#define RPRT_PORTNAME
#define RPRT_SYM_PORTNAME
#define RPRT_PORT_TYPE
#define RPRT_SUPPORTED_CLASS
#define RPRT_FABRICNAME
#define RPRT_ACTIVE_FC4_TYPES
#define RPRT_PORT_STATE
#define RPRT_DISC_PORT
#define RPRT_PORT_ID
#define RPRT_VENDOR_MI
#define RPRT_SMART_SERVICE
#define RPRT_SMART_GUID
#define RPRT_SMART_VERSION
#define RPRT_SMART_MODEL
#define RPRT_SMART_PORT_INFO
#define RPRT_SMART_QOS
#define RPRT_SMART_SECURITY

/* Bit mask for all individual PORT attributes */
#define LPFC_FDMI_PORT_ATTR_fc4type
#define LPFC_FDMI_PORT_ATTR_support_speed
#define LPFC_FDMI_PORT_ATTR_speed
#define LPFC_FDMI_PORT_ATTR_max_frame
#define LPFC_FDMI_PORT_ATTR_os_devname
#define LPFC_FDMI_PORT_ATTR_host_name
#define LPFC_FDMI_PORT_ATTR_wwnn
#define LPFC_FDMI_PORT_ATTR_wwpn
#define LPFC_FDMI_PORT_ATTR_symbolic_name
#define LPFC_FDMI_PORT_ATTR_port_type
#define LPFC_FDMI_PORT_ATTR_class
#define LPFC_FDMI_PORT_ATTR_fabric_wwpn
#define LPFC_FDMI_PORT_ATTR_port_state
#define LPFC_FDMI_PORT_ATTR_active_fc4type
#define LPFC_FDMI_PORT_ATTR_num_disc
#define LPFC_FDMI_PORT_ATTR_nportid
#define LPFC_FDMI_SMART_ATTR_service
#define LPFC_FDMI_SMART_ATTR_guid
#define LPFC_FDMI_SMART_ATTR_version
#define LPFC_FDMI_SMART_ATTR_model
#define LPFC_FDMI_SMART_ATTR_port_info
#define LPFC_FDMI_SMART_ATTR_qos
#define LPFC_FDMI_SMART_ATTR_security
#define LPFC_FDMI_VENDOR_ATTR_mi

/* Bit mask for FDMI-1 defined PORT attributes */
#define LPFC_FDMI1_PORT_ATTR

/* Bit mask for FDMI-2 defined PORT attributes */
#define LPFC_FDMI2_PORT_ATTR

/* Bit mask for Smart SAN defined PORT attributes */
#define LPFC_FDMI2_SMART_ATTR

/* Defines for PORT port state attribute */
#define LPFC_FDMI_PORTSTATE_UNKNOWN
#define LPFC_FDMI_PORTSTATE_ONLINE

/* Defines for PORT port type attribute */
#define LPFC_FDMI_PORTTYPE_UNKNOWN
#define LPFC_FDMI_PORTTYPE_NPORT
#define LPFC_FDMI_PORTTYPE_NLPORT

/*
 *  Begin HBA configuration parameters.
 *  The PCI configuration register BAR assignments are:
 *  BAR0, offset 0x10 - SLIM base memory address
 *  BAR1, offset 0x14 - SLIM base memory high address
 *  BAR2, offset 0x18 - REGISTER base memory address
 *  BAR3, offset 0x1c - REGISTER base memory high address
 *  BAR4, offset 0x20 - BIU I/O registers
 *  BAR5, offset 0x24 - REGISTER base io high address
 */

/* Number of rings currently used and available. */
#define MAX_SLI3_CONFIGURED_RINGS
#define MAX_SLI3_RINGS

/* IOCB / Mailbox is owned by FireFly */
#define OWN_CHIP

/* IOCB / Mailbox is owned by Host */
#define OWN_HOST

/* Number of 4-byte words in an IOCB. */
#define IOCB_WORD_SZ

/* network headers for Dfctl field */
#define FC_NET_HDR

/* Start FireFly Register definitions */
#define PCI_VENDOR_ID_EMULEX
#define PCI_DEVICE_ID_FIREFLY
#define PCI_DEVICE_ID_PROTEUS_VF
#define PCI_DEVICE_ID_BALIUS
#define PCI_DEVICE_ID_PROTEUS_PF
#define PCI_DEVICE_ID_LANCER_FC
#define PCI_DEVICE_ID_LANCER_FC_VF
#define PCI_DEVICE_ID_LANCER_FCOE
#define PCI_DEVICE_ID_LANCER_FCOE_VF
#define PCI_DEVICE_ID_LANCER_G6_FC
#define PCI_DEVICE_ID_LANCER_G7_FC
#define PCI_DEVICE_ID_LANCER_G7P_FC
#define PCI_DEVICE_ID_SAT_SMB
#define PCI_DEVICE_ID_SAT_MID
#define PCI_DEVICE_ID_RFLY
#define PCI_DEVICE_ID_PFLY
#define PCI_DEVICE_ID_LP101
#define PCI_DEVICE_ID_TFLY
#define PCI_DEVICE_ID_BSMB
#define PCI_DEVICE_ID_BMID
#define PCI_DEVICE_ID_ZSMB
#define PCI_DEVICE_ID_ZMID
#define PCI_DEVICE_ID_NEPTUNE
#define PCI_DEVICE_ID_NEPTUNE_SCSP
#define PCI_DEVICE_ID_NEPTUNE_DCSP
#define PCI_DEVICE_ID_SAT
#define PCI_DEVICE_ID_SAT_SCSP
#define PCI_DEVICE_ID_SAT_DCSP
#define PCI_DEVICE_ID_FALCON
#define PCI_DEVICE_ID_SUPERFLY
#define PCI_DEVICE_ID_DRAGONFLY
#define PCI_DEVICE_ID_CENTAUR
#define PCI_DEVICE_ID_PEGASUS
#define PCI_DEVICE_ID_THOR
#define PCI_DEVICE_ID_VIPER
#define PCI_DEVICE_ID_LP10000S
#define PCI_DEVICE_ID_LP11000S
#define PCI_DEVICE_ID_LPE11000S
#define PCI_DEVICE_ID_SAT_S
#define PCI_DEVICE_ID_PROTEUS_S
#define PCI_DEVICE_ID_HELIOS
#define PCI_DEVICE_ID_HELIOS_SCSP
#define PCI_DEVICE_ID_HELIOS_DCSP
#define PCI_DEVICE_ID_ZEPHYR
#define PCI_DEVICE_ID_ZEPHYR_SCSP
#define PCI_DEVICE_ID_ZEPHYR_DCSP
#define PCI_VENDOR_ID_SERVERENGINE
#define PCI_DEVICE_ID_TIGERSHARK
#define PCI_DEVICE_ID_TOMCAT
#define PCI_DEVICE_ID_SKYHAWK
#define PCI_DEVICE_ID_SKYHAWK_VF
#define PCI_VENDOR_ID_ATTO
#define PCI_DEVICE_ID_CLRY_16XE
#define PCI_DEVICE_ID_CLRY_161E
#define PCI_DEVICE_ID_CLRY_162E
#define PCI_DEVICE_ID_CLRY_164E
#define PCI_DEVICE_ID_CLRY_16XP
#define PCI_DEVICE_ID_CLRY_161P
#define PCI_DEVICE_ID_CLRY_162P
#define PCI_DEVICE_ID_CLRY_164P
#define PCI_DEVICE_ID_CLRY_32XE
#define PCI_DEVICE_ID_CLRY_321E
#define PCI_DEVICE_ID_CLRY_322E
#define PCI_DEVICE_ID_CLRY_324E
#define PCI_DEVICE_ID_CLRY_32XP
#define PCI_DEVICE_ID_CLRY_321P
#define PCI_DEVICE_ID_CLRY_322P
#define PCI_DEVICE_ID_CLRY_324P
#define PCI_DEVICE_ID_TLFC_2
#define PCI_DEVICE_ID_TLFC_2XX2
#define PCI_DEVICE_ID_TLFC_3
#define PCI_DEVICE_ID_TLFC_3162
#define PCI_DEVICE_ID_TLFC_3322

#define JEDEC_ID_ADDRESS
#define FIREFLY_JEDEC_ID
#define SUPERFLY_JEDEC_ID
#define DRAGONFLY_JEDEC_ID
#define DRAGONFLY_V2_JEDEC_ID
#define CENTAUR_2G_JEDEC_ID
#define CENTAUR_1G_JEDEC_ID
#define PEGASUS_ORION_JEDEC_ID
#define PEGASUS_JEDEC_ID
#define THOR_JEDEC_ID
#define HELIOS_JEDEC_ID
#define ZEPHYR_JEDEC_ID
#define VIPER_JEDEC_ID
#define SATURN_JEDEC_ID

#define JEDEC_ID_MASK
#define JEDEC_ID_SHIFT
#define FC_JEDEC_ID(id)

FF_REGS;

/* IO Register size in bytes */
#define FF_REG_AREA_SIZE

/* Host Attention Register */

#define HA_REG_OFFSET

#define HA_R0RE_REQ
#define HA_R0CE_RSP
#define HA_R0ATT
#define HA_R1RE_REQ
#define HA_R1CE_RSP
#define HA_R1ATT
#define HA_R2RE_REQ
#define HA_R2CE_RSP
#define HA_R2ATT
#define HA_R3RE_REQ
#define HA_R3CE_RSP
#define HA_R3ATT
#define HA_LATT
#define HA_MBATT
#define HA_ERATT

#define HA_RXRE_REQ
#define HA_RXCE_RSP
#define HA_RXATT
#define HA_RXMASK

#define HA_R0_CLR_MSK
#define HA_R1_CLR_MSK
#define HA_R2_CLR_MSK
#define HA_R3_CLR_MSK

#define HA_R0_POS
#define HA_R1_POS
#define HA_R2_POS
#define HA_R3_POS
#define HA_LE_POS
#define HA_MB_POS
#define HA_ER_POS
/* Chip Attention Register */

#define CA_REG_OFFSET

#define CA_R0CE_REQ
#define CA_R0RE_RSP
#define CA_R0ATT
#define CA_R1CE_REQ
#define CA_R1RE_RSP
#define CA_R1ATT
#define CA_R2CE_REQ
#define CA_R2RE_RSP
#define CA_R2ATT
#define CA_R3CE_REQ
#define CA_R3RE_RSP
#define CA_R3ATT
#define CA_MBATT

/* Host Status Register */

#define HS_REG_OFFSET

#define HS_MBRDY
#define HS_FFRDY
#define HS_FFER8
#define HS_FFER7
#define HS_FFER6
#define HS_FFER5
#define HS_FFER4
#define HS_FFER3
#define HS_FFER2
#define HS_FFER1
#define HS_CRIT_TEMP
#define HS_FFERM
#define UNPLUG_ERR
/* Host Control Register */

#define HC_REG_OFFSET

#define HC_MBINT_ENA
#define HC_R0INT_ENA
#define HC_R1INT_ENA
#define HC_R2INT_ENA
#define HC_R3INT_ENA
#define HC_INITHBI
#define HC_INITMB
#define HC_INITFF
#define HC_LAINT_ENA
#define HC_ERINT_ENA

/* Message Signaled Interrupt eXtension (MSI-X) message identifiers */
#define MSIX_DFLT_ID
#define MSIX_RNG0_ID
#define MSIX_RNG1_ID
#define MSIX_RNG2_ID
#define MSIX_RNG3_ID

#define MSIX_LINK_ID
#define MSIX_MBOX_ID

#define MSIX_SPARE0_ID
#define MSIX_SPARE1_ID

/* Mailbox Commands */
#define MBX_SHUTDOWN
#define MBX_LOAD_SM
#define MBX_READ_NV
#define MBX_WRITE_NV
#define MBX_RUN_BIU_DIAG
#define MBX_INIT_LINK
#define MBX_DOWN_LINK
#define MBX_CONFIG_LINK
#define MBX_CONFIG_RING
#define MBX_RESET_RING
#define MBX_READ_CONFIG
#define MBX_READ_RCONFIG
#define MBX_READ_SPARM
#define MBX_READ_STATUS
#define MBX_READ_RPI
#define MBX_READ_XRI
#define MBX_READ_REV
#define MBX_READ_LNK_STAT
#define MBX_REG_LOGIN
#define MBX_UNREG_LOGIN
#define MBX_CLEAR_LA
#define MBX_DUMP_MEMORY
#define MBX_DUMP_CONTEXT
#define MBX_RUN_DIAGS
#define MBX_RESTART
#define MBX_UPDATE_CFG
#define MBX_DOWN_LOAD
#define MBX_DEL_LD_ENTRY
#define MBX_RUN_PROGRAM
#define MBX_SET_MASK
#define MBX_SET_VARIABLE
#define MBX_UNREG_D_ID
#define MBX_KILL_BOARD
#define MBX_CONFIG_FARP
#define MBX_BEACON
#define MBX_CONFIG_MSI
#define MBX_HEARTBEAT
#define MBX_WRITE_VPARMS
#define MBX_ASYNCEVT_ENABLE
#define MBX_READ_EVENT_LOG_STATUS
#define MBX_READ_EVENT_LOG
#define MBX_WRITE_EVENT_LOG

#define MBX_PORT_CAPABILITIES
#define MBX_PORT_IOV_CONTROL

#define MBX_CONFIG_HBQ
#define MBX_LOAD_AREA
#define MBX_RUN_BIU_DIAG64
#define MBX_CONFIG_PORT
#define MBX_READ_SPARM64
#define MBX_READ_RPI64
#define MBX_REG_LOGIN64
#define MBX_READ_TOPOLOGY
#define MBX_REG_VPI
#define MBX_UNREG_VPI

#define MBX_WRITE_WWN
#define MBX_SET_DEBUG
#define MBX_LOAD_EXP_ROM
#define MBX_SLI4_CONFIG
#define MBX_SLI4_REQ_FTRS
#define MBX_MAX_CMDS
#define MBX_RESUME_RPI
#define MBX_SLI2_CMD_MASK
#define MBX_REG_VFI
#define MBX_REG_FCFI
#define MBX_UNREG_VFI
#define MBX_UNREG_FCFI
#define MBX_INIT_VFI
#define MBX_INIT_VPI
#define MBX_ACCESS_VDATA
#define MBX_REG_FCFI_MRQ

#define MBX_AUTH_PORT
#define MBX_SECURITY_MGMT

/* IOCB Commands */

#define CMD_RCV_SEQUENCE_CX
#define CMD_XMIT_SEQUENCE_CR
#define CMD_XMIT_SEQUENCE_CX
#define CMD_XMIT_BCAST_CN
#define CMD_XMIT_BCAST_CX
#define CMD_QUE_RING_BUF_CN
#define CMD_QUE_XRI_BUF_CX
#define CMD_IOCB_CONTINUE_CN
#define CMD_RET_XRI_BUF_CX
#define CMD_ELS_REQUEST_CR
#define CMD_ELS_REQUEST_CX
#define CMD_RCV_ELS_REQ_CX
#define CMD_ABORT_XRI_CN
#define CMD_ABORT_XRI_CX
#define CMD_CLOSE_XRI_CN
#define CMD_CLOSE_XRI_CX
#define CMD_CREATE_XRI_CR
#define CMD_CREATE_XRI_CX
#define CMD_GET_RPI_CN
#define CMD_XMIT_ELS_RSP_CX
#define CMD_GET_RPI_CR
#define CMD_XRI_ABORTED_CX
#define CMD_FCP_IWRITE_CR
#define CMD_FCP_IWRITE_CX
#define CMD_FCP_IREAD_CR
#define CMD_FCP_IREAD_CX
#define CMD_FCP_ICMND_CR
#define CMD_FCP_ICMND_CX
#define CMD_FCP_TSEND_CX
#define CMD_FCP_TRECEIVE_CX
#define CMD_FCP_TRSP_CX
#define CMD_FCP_AUTO_TRSP_CX

#define CMD_ADAPTER_MSG
#define CMD_ADAPTER_DUMP

/*  SLI_2 IOCB Command Set */

#define CMD_ASYNC_STATUS
#define CMD_RCV_SEQUENCE64_CX
#define CMD_XMIT_SEQUENCE64_CR
#define CMD_XMIT_SEQUENCE64_CX
#define CMD_XMIT_BCAST64_CN
#define CMD_XMIT_BCAST64_CX
#define CMD_QUE_RING_BUF64_CN
#define CMD_QUE_XRI_BUF64_CX
#define CMD_IOCB_CONTINUE64_CN
#define CMD_RET_XRI_BUF64_CX
#define CMD_ELS_REQUEST64_CR
#define CMD_ELS_REQUEST64_CX
#define CMD_ABORT_MXRI64_CN
#define CMD_RCV_ELS_REQ64_CX
#define CMD_XMIT_ELS_RSP64_CX
#define CMD_XMIT_BLS_RSP64_CX
#define CMD_FCP_IWRITE64_CR
#define CMD_FCP_IWRITE64_CX
#define CMD_FCP_IREAD64_CR
#define CMD_FCP_IREAD64_CX
#define CMD_FCP_ICMND64_CR
#define CMD_FCP_ICMND64_CX
#define CMD_FCP_TSEND64_CX
#define CMD_FCP_TRECEIVE64_CX
#define CMD_FCP_TRSP64_CX

#define CMD_QUE_XRI64_CX
#define CMD_IOCB_RCV_SEQ64_CX
#define CMD_IOCB_RCV_ELS64_CX
#define CMD_IOCB_RET_XRI64_CX
#define CMD_IOCB_RCV_CONT64_CX

#define CMD_GEN_REQUEST64_CR
#define CMD_GEN_REQUEST64_CX

/* Unhandled SLI-3 Commands */
#define CMD_IOCB_XMIT_MSEQ64_CR
#define CMD_IOCB_XMIT_MSEQ64_CX
#define CMD_IOCB_RCV_SEQ_LIST64_CX
#define CMD_IOCB_RCV_ELS_LIST64_CX
#define CMD_IOCB_CLOSE_EXTENDED_CN
#define CMD_IOCB_ABORT_EXTENDED_CN
#define CMD_IOCB_RET_HBQE64_CN
#define CMD_IOCB_FCP_IBIDIR64_CR
#define CMD_IOCB_FCP_IBIDIR64_CX
#define CMD_IOCB_FCP_ITASKMGT64_CX
#define CMD_IOCB_LOGENTRY_CN
#define CMD_IOCB_LOGENTRY_ASYNC_CN

/* Data Security SLI Commands */
#define DSSCMD_IWRITE64_CR
#define DSSCMD_IWRITE64_CX
#define DSSCMD_IREAD64_CR
#define DSSCMD_IREAD64_CX

#define CMD_MAX_IOCB_CMD
#define CMD_IOCB_MASK

#define MAX_MSG_DATA
#define LPFC_MAX_ADPTMSG
/*
 *  Define Status
 */
#define MBX_SUCCESS
#define MBXERR_NUM_RINGS
#define MBXERR_NUM_IOCBS
#define MBXERR_IOCBS_EXCEEDED
#define MBXERR_BAD_RING_NUMBER
#define MBXERR_MASK_ENTRIES_RANGE
#define MBXERR_MASKS_EXCEEDED
#define MBXERR_BAD_PROFILE
#define MBXERR_BAD_DEF_CLASS
#define MBXERR_BAD_MAX_RESPONDER
#define MBXERR_BAD_MAX_ORIGINATOR
#define MBXERR_RPI_REGISTERED
#define MBXERR_RPI_FULL
#define MBXERR_NO_RESOURCES
#define MBXERR_BAD_RCV_LENGTH
#define MBXERR_DMA_ERROR
#define MBXERR_ERROR
#define MBXERR_LINK_DOWN
#define MBXERR_SEC_NO_PERMISSION
#define MBX_NOT_FINISHED

#define MBX_BUSY
#define MBX_TIMEOUT

#define TEMPERATURE_OFFSET

/*
 * return code Fail
 */
#define FAILURE

/*
 *    Begin Structure Definitions for Mailbox Commands
 */

RR_REG;

struct ulp_bde {};

ULP_BDL;

/*
 * BlockGuard Definitions
 */

enum lpfc_protgrp_type {};

/* PDE Descriptors */
#define LPFC_PDE5_DESCRIPTOR
#define LPFC_PDE6_DESCRIPTOR
#define LPFC_PDE7_DESCRIPTOR

/* BlockGuard Opcodes */
#define BG_OP_IN_NODIF_OUT_CRC
#define BG_OP_IN_CRC_OUT_NODIF
#define BG_OP_IN_NODIF_OUT_CSUM
#define BG_OP_IN_CSUM_OUT_NODIF
#define BG_OP_IN_CRC_OUT_CRC
#define BG_OP_IN_CSUM_OUT_CSUM
#define BG_OP_IN_CRC_OUT_CSUM
#define BG_OP_IN_CSUM_OUT_CRC
#define BG_OP_RAW_MODE

struct lpfc_pde5 {};

struct lpfc_pde6 {};

struct lpfc_pde7 {};

/* Structure for MB Command LOAD_SM and DOWN_LOAD */

LOAD_SM_VAR;

/* Structure for MB Command READ_NVPARM (02) */

READ_NV_VAR;

/* Structure for MB Command WRITE_NVPARMS (03) */

WRITE_NV_VAR;

/* Structure for MB Command RUN_BIU_DIAG (04) */
/* Structure for MB Command RUN_BIU_DIAG64 (0x84) */

BIU_DIAG_VAR;

/* Structure for MB command READ_EVENT_LOG (0x38) */
struct READ_EVENT_LOG_VAR {};

/* Structure for MB Command INIT_LINK (05) */

INIT_LINK_VAR;

/* Structure for MB Command DOWN_LINK (06) */

DOWN_LINK_VAR;

/* Structure for MB Command CONFIG_LINK (07) */

CONFIG_LINK;

/* Structure for MB Command PART_SLIM (08)
 * will be removed since SLI1 is no longer supported!
 */
RING_DEF;

PART_SLIM_VAR;

/* Structure for MB Command CONFIG_RING (09) */

CONFIG_RING_VAR;

/* Structure for MB Command RESET_RING (10) */

RESET_RING_VAR;

/* Structure for MB Command READ_CONFIG (11) */

READ_CONFIG_VAR;

/* Structure for MB Command READ_RCONFIG (12) */

READ_RCONF_VAR;

/* Structure for MB Command READ_SPARM (13) */
/* Structure for MB Command READ_SPARM64 (0x8D) */

READ_SPARM_VAR;

/* Structure for MB Command READ_STATUS (14) */
enum read_status_word1 {};

enum read_status_word17 {};

enum read_status_word18 {};

READ_STATUS_VAR;

/* Structure for MB Command READ_RPI (15) */
/* Structure for MB Command READ_RPI64 (0x8F) */

READ_RPI_VAR;

/* Structure for MB Command READ_XRI (16) */

READ_XRI_VAR;

/* Structure for MB Command READ_REV (17) */

READ_REV_VAR;

/* Structure for MB Command READ_LINK_STAT (18) */

READ_LNK_VAR;

/* Structure for MB Command REG_LOGIN (19) */
/* Structure for MB Command REG_LOGIN64 (0x93) */

REG_LOGIN_VAR;

/* Word 30 contents for REG_LOGIN */
REG_WD30;

/* Structure for MB Command UNREG_LOGIN (20) */

UNREG_LOGIN_VAR;

/* Structure for MB Command REG_VPI (0x96) */
REG_VPI_VAR;

/* Structure for MB Command UNREG_VPI (0x97) */
UNREG_VPI_VAR;

/* Structure for MB Command UNREG_D_ID (0x23) */

UNREG_D_ID_VAR;

/* Structure for MB Command READ_TOPOLOGY (0x95) */
struct lpfc_mbx_read_top {};

/* Structure for MB Command CLEAR_LA (22) */

CLEAR_LA_VAR;

/* Structure for MB Command DUMP */

DUMP_VAR;

#define DMP_MEM_REG
#define DMP_NV_PARAMS
#define DMP_LMSD
#define DMP_WELL_KNOWN

#define DMP_REGION_VPD
#define DMP_VPD_SIZE
#define DMP_RSP_OFFSET
#define DMP_RSP_SIZE

#define DMP_REGION_VPORT
#define DMP_VPORT_REGION_SIZE
#define DMP_MBOX_OFFSET_WORD

#define DMP_REGION_23
#define DMP_RGN23_SIZE

#define WAKE_UP_PARMS_REGION_ID
#define WAKE_UP_PARMS_WORD_SIZE

struct vport_rec {};

#define VPORT_INFO_SIG
#define VPORT_INFO_REV_MASK
#define VPORT_INFO_REV
#define MAX_STATIC_VPORT_COUNT
struct static_vport_info {};

/* Option rom version structure */
struct prog_id {};

/* Structure for MB Command UPDATE_CFG (0x1B) */

struct update_cfg_var {};

struct hbq_mask {};


/* Structure for MB Command CONFIG_HBQ (7c) */

struct config_hbq_var {};



/* Structure for MB Command CONFIG_PORT (0x88) */
CONFIG_PORT_VAR;

/* Structure for MB Command CONFIG_MSI (0x30) */
struct config_msi_var {};

/* SLI-2 Port Control Block */

/* SLIM POINTER */
#define SLIMOFF

SLI2_RDSC;

PCB_t;

/* NEW_FEATURE */
CONFIG_FARP_VAR;

/* Structure for MB Command MBX_ASYNCEVT_ENABLE (0x33) */

ASYNCEVT_ENABLE_VAR;

/* Union of all Mailbox Command types */
#define MAILBOX_CMD_WSIZE
#define MAILBOX_CMD_SIZE
/* ext_wsize times 4 bytes should not be greater than max xmit size */
#define MAILBOX_EXT_WSIZE
#define MAILBOX_EXT_SIZE
#define MAILBOX_HBA_EXT_OFFSET
/* max mbox xmit size is a page size for sysfs IO operations */
#define MAILBOX_SYSFS_MAX

MAILVARIANTS;

/*
 * SLI-2 specific structures
 */

struct lpfc_hgp {};

struct lpfc_pgp {};

struct sli2_desc {};

struct sli3_desc {};

struct sli3_pgp {};

sli_var;

MAILBOX_t;

/*
 *    Begin Structure Definitions for IOCB Commands
 */

PARM_ERR;

WORD5;

/* IOCB Command template for a generic response */
GENERIC_RSP;

/* IOCB Command template for XMIT / XMIT_BCAST / RCV_SEQUENCE / XMIT_ELS */
XR_SEQ_FIELDS;

/* IOCB Command template for ELS_REQUEST */
ELS_REQUEST;

/* IOCB Command template for RCV_ELS_REQ */
RCV_ELS_REQ;

/* IOCB Command template for ABORT / CLOSE_XRI */
AC_XRI;

/* IOCB Command template for ABORT_MXRI64 */
A_MXRI64;

/* IOCB Command template for GET_RPI */
GET_RPI;

/* IOCB Command template for all FCP Initiator commands */
FCPI_FIELDS;

/* IOCB Command template for all FCP Target commands */
FCPT_FIELDS;

/* SLI-2 IOCB structure definitions */

/* IOCB Command template for 64 bit XMIT / XMIT_BCAST / XMIT_ELS */
XMT_SEQ_FIELDS64;

/* This word is remote ports D_ID for XMIT_ELS_RSP64 */
#define xmit_els_remoteID

/* IOCB Command template for 64 bit RCV_SEQUENCE64 */
RCV_SEQ_FIELDS64;

/* IOCB Command template for ELS_REQUEST64 */
ELS_REQUEST64;

/* IOCB Command template for GEN_REQUEST64 */
GEN_REQUEST64;

/* IOCB Command template for RCV_ELS_REQ64 */
RCV_ELS_REQ64;

/* IOCB Command template for RCV_SEQ64 */
struct rcv_seq64 {};

/* IOCB Command template for all 64 bit FCP Initiator commands */
FCPI_FIELDS64;

/* IOCB Command template for all 64 bit FCP Target commands */
FCPT_FIELDS64;

/* IOCB Command template for Async Status iocb commands */
ASYNCSTAT_FIELDS;
#define ASYNC_TEMP_WARN
#define ASYNC_TEMP_SAFE
#define ASYNC_STATUS_CN

/* IOCB Command template for CMD_IOCB_RCV_ELS64_CX (0xB7)
   or CMD_IOCB_RCV_SEQ64_CX (0xB5) */

struct rcv_sli3 {};

/* Structure used for a single HBQ entry */
struct lpfc_hbq_entry {};

/* IOCB Command template for QUE_XRI64_CX (0xB3) command */
QUE_XRI64_CX_FIELDS;

struct que_xri64cx_ext_fields {};

struct sli3_bg_fields {};

static inline uint32_t
lpfc_bgs_get_bidir_bg_prof(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_bidir_err_cond(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_bg_prof(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_invalid_prof(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_uninit_dif_block(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_hi_water_mark_present(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_reftag_err(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_apptag_err(uint32_t bgstat)
{}

static inline uint32_t
lpfc_bgs_get_guard_err(uint32_t bgstat)
{}

#define LPFC_EXT_DATA_BDE_COUNT
struct fcp_irw_ext {};

IOCB_t;


#define SLI1_SLIM_SIZE

/* Up to 498 IOCBs will fit into 16k
 * 256 (MAILBOX_t) + 140 (PCB_t) + ( 32 (IOCB_t) * 498 ) = < 16384
 */
#define SLI2_SLIM_SIZE

/* Maximum IOCBs that will fit in SLI2 slim */
#define MAX_SLI2_IOCB
#define MAX_SLIM_IOCB_SIZE

/* HBQ entries are 4 words each = 4k */
#define LPFC_TOTAL_HBQ_SIZE

struct lpfc_sli2_slim {};

/*
 * This function checks PCI device to allow special handling for LC HBAs.
 *
 * Parameters:
 * device : struct pci_dev 's device field
 *
 * return 1 => TRUE
 *        0 => FALSE
 */
static inline int
lpfc_is_LC_HBA(unsigned short device)
{}

#define BPL_ALIGN_SZ