linux/drivers/scsi/bfa/bfa_fc.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014- QLogic Corporation.
 * All rights reserved
 * www.qlogic.com
 *
 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
 */

#ifndef __BFA_FC_H__
#define __BFA_FC_H__

#include "bfad_drv.h"

wwn_t;

#define WWN_NULL
#define FC_SYMNAME_MAX
#define FC_ALPA_MAX

#pragma pack(1)

#define MAC_ADDRLEN
struct mac_s {};
#define mac_t

/*
 * generic SCSI cdb definition
 */
#define SCSI_MAX_CDBLEN
struct scsi_cdb_s {};

#define SCSI_MAX_ALLOC_LEN

/*
 * Fibre Channel Header Structure (FCHS) definition
 */
struct fchs_s {};

/*
 * routing bit definitions
 */
enum {};

/*
 * information category for extended link data and FC-4 Link Data
 */
enum {};

/*
 * information category for extended headers (VFT, IFR or encapsulation)
 */
enum {};

/*
 * information category for FC-4 device data
 */
enum {};

/*
 * Type Field Definitions. FC-PH Section 18.5 pg. 165
 */
enum {};

/*
 * Frame Control Definitions. FC-PH Table-45. pg. 168
 */
enum {};

/*
 * Fabric Well Known Addresses
 */
enum {};

/*
 * domain/area/port defines
 */
#define FC_DOMAIN_MASK
#define FC_DOMAIN_SHIFT
#define FC_AREA_MASK
#define FC_AREA_SHIFT
#define FC_PORT_MASK
#define FC_PORT_SHIFT

#define FC_GET_DOMAIN(p)
#define FC_GET_AREA(p)
#define FC_GET_PORT(p)

#define FC_DOMAIN_CTRLR(p)

enum {};

/*
 * generic ELS command
 */
struct fc_els_cmd_s {};

/*
 * ELS Command Codes. FC-PH Table-75. pg. 223
 */
enum {};

/*
 *  Version numbers for FC-PH standards,
 *  used in login to indicate what port
 *  supports. See FC-PH-X table 158.
 */
enum {};

/*
 * PDU size defines
 */
enum {};

/*
 * N_Port PLOGI Common Service Parameters.
 * FC-PH-x. Figure-76. pg. 308.
 */
struct fc_plogi_csp_s {};

/*
 * N_Port PLOGI Class Specific Parameters.
 * FC-PH-x. Figure 78. pg. 318.
 */
struct fc_plogi_clp_s {};

/* ASCII value for each character in string "BRCD" */
#define FLOGI_VVL_BRCD

/*
 * PLOGI els command and reply payload
 */
struct fc_logi_s {};

/*
 * LOGO els command payload
 */
struct fc_logo_s {};

/*
 * ADISC els command payload
 */
struct fc_adisc_s {};

/*
 * Exchange status block
 */
struct fc_exch_status_blk_s {};

/*
 * RES els command payload
 */
struct fc_res_s {};

/*
 * RES els accept payload
 */
struct fc_res_acc_s {};

/*
 * REC els command payload
 */
struct fc_rec_s {};

#define FC_REC_ESB_OWN_RSP
#define FC_REC_ESB_SI
#define FC_REC_ESB_COMP
#define FC_REC_ESB_ENDCOND_ABN
#define FC_REC_ESB_RQACT
#define FC_REC_ESB_ERRP_MSK
#define FC_REC_ESB_OXID_INV
#define FC_REC_ESB_RXID_INV
#define FC_REC_ESB_PRIO_INUSE

/*
 * REC els accept payload
 */
struct fc_rec_acc_s {};

/*
 * RSI els payload
 */
struct fc_rsi_s {};

/*
 * structure for PRLI paramater pages, both request & response
 * see FC-PH-X table 113 & 115 for explanation also FCP table 8
 */
struct fc_prli_params_s {};

/*
 * valid values for rspcode in PRLI ACC payload
 */
enum {};

struct fc_prli_params_page_s {};

/*
 * PRLI request and accept payload, FC-PH-X tables 112 & 114
 */
struct fc_prli_s {};

/*
 * PRLO logout params page
 */
struct fc_prlo_params_page_s {};

/*
 * PRLO els command payload
 */
struct fc_prlo_s {};

/*
 * PRLO Logout response parameter page
 */
struct fc_prlo_acc_params_page_s {};

/*
 * PRLO els command ACC payload
 */
struct fc_prlo_acc_s {};

/*
 * SCR els command payload
 */
enum {};

/* SCR VU registrations */
enum {};

struct fc_scr_s {};

/*
 * Information category for Basic link data
 */
enum {};

/*
 * LS_RJT els reply payload
 */
struct fc_ls_rjt_s {};

/*
 * LS_RJT reason codes
 */
enum {};

/*
 * LS_RJT reason code explanation
 */
enum {};

/*
 * RRQ els command payload
 */
struct fc_rrq_s {};

/*
 * ABTS BA_ACC reply payload
 */
struct fc_ba_acc_s {};

/*
 * ABTS BA_RJT reject payload
 */
struct fc_ba_rjt_s {};

/*
 * TPRLO logout parameter page
 */
struct fc_tprlo_params_page_s {};

/*
 * TPRLO ELS command payload
 */
struct fc_tprlo_s {};

enum fc_tprlo_type {};

/*
 * TPRLO els command ACC payload
 */
struct fc_tprlo_acc_s {};

/*
 * RSCN els command req payload
 */
#define FC_RSCN_PGLEN

enum fc_rscn_format {};

struct fc_rscn_event_s {};

struct fc_rscn_pl_s {};

/*
 * ECHO els command req payload
 */
struct fc_echo_s {};

/*
 * RNID els command
 */
#define RNID_NODEID_DATA_FORMAT_COMMON
#define RNID_NODEID_DATA_FORMAT_FCP3
#define RNID_NODEID_DATA_FORMAT_DISCOVERY

#define RNID_ASSOCIATED_TYPE_UNKNOWN
#define RNID_ASSOCIATED_TYPE_OTHER
#define RNID_ASSOCIATED_TYPE_HUB
#define RNID_ASSOCIATED_TYPE_SWITCH
#define RNID_ASSOCIATED_TYPE_GATEWAY
#define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE
#define RNID_ASSOCIATED_TYPE_HOST
#define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM
#define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE
#define RNID_ASSOCIATED_TYPE_NAS_SERVER
#define RNID_ASSOCIATED_TYPE_BRIDGE
#define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE
#define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE

/*
 * RNID els command payload
 */
struct fc_rnid_cmd_s {};

/*
 * RNID els response payload
 */

struct fc_rnid_common_id_data_s {};

struct fc_rnid_general_topology_data_s {};

struct fc_rnid_acc_s {};

#define RNID_ASSOCIATED_TYPE_UNKNOWN
#define RNID_ASSOCIATED_TYPE_OTHER
#define RNID_ASSOCIATED_TYPE_HUB
#define RNID_ASSOCIATED_TYPE_SWITCH
#define RNID_ASSOCIATED_TYPE_GATEWAY
#define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE
#define RNID_ASSOCIATED_TYPE_HOST
#define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM
#define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE
#define RNID_ASSOCIATED_TYPE_NAS_SERVER
#define RNID_ASSOCIATED_TYPE_BRIDGE
#define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE
#define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE

enum fc_rpsc_speed_cap {};

enum fc_rpsc_op_speed {};

struct fc_rpsc_speed_info_s {};

/*
 * If RPSC request is sent to the Domain Controller, the request is for
 * all the ports within that domain.
 */
struct fc_rpsc_cmd_s {};

/*
 * RPSC Acc
 */
struct fc_rpsc_acc_s {};

/*
 * If RPSC2 request is sent to the Domain Controller,
 */
#define FC_BRCD_TOKEN

struct fc_rpsc2_cmd_s {};

enum fc_rpsc2_port_type {};

/*
 * RPSC2 portInfo entry structure
 */
struct fc_rpsc2_port_info_s {};

/*
 * RPSC2 Accept payload
 */
struct fc_rpsc2_acc_s {};

/*
 * bit fields so that multiple classes can be specified
 */
enum fc_cos {};

/*
 * symbolic name
 */
struct fc_symname_s {};

struct fc_alpabm_s {};

/*
 * protocol default timeout values
 */
#define FC_ED_TOV
#define FC_REC_TOV
#define FC_RA_TOV
#define FC_ELS_TOV
#define FC_FCCT_TOV

/*
 * virtual fabric related defines
 */
#define FC_VF_ID_NULL
#define FC_VF_ID_MIN
#define FC_VF_ID_MAX
#define FC_VF_ID_CTL

/*
 * Virtual Fabric Tagging header format
 * @caution This is defined only in BIG ENDIAN format.
 */
struct fc_vft_s {};

/*
 * FCP_CMND definitions
 */
#define FCP_CMND_CDB_LEN
#define FCP_CMND_LUN_LEN

struct fcp_cmnd_s {};

#define fcp_cmnd_cdb_len(_cmnd)
#define fcp_cmnd_fcpdl(_cmnd)

/*
 * struct fcp_cmnd_s .iodir field values
 */
enum fcp_iodir {};

/*
 * Task management flags field - only one bit shall be set
 */
enum fcp_tm_cmnd {};

/*
 * FCP_RSP residue flags
 */
enum fcp_residue {};

struct fcp_rspinfo_s {};

struct fcp_resp_s {};

#define fcp_snslen(__fcprsp)
#define fcp_rsplen(__fcprsp)
#define fcp_rspinfo(__fcprsp)
#define fcp_snsinfo(__fcprsp)
/*
 * CT
 */
struct ct_hdr_s {};

/*
 * defines for the Revision
 */
enum {};

/*
 * defines for gs_type
 */
enum {};

/*
 * defines for gs_sub_type for gs type directory service
 */
enum {};

/*
 * defines for gs_sub_type for gs type management service
 */
enum {};

/*
 * defines for CT response code field
 */
enum {};

/*
 * definitions for CT reason code
 */
enum {};

/*
 * definitions for explanations code for Name server
 */
enum {};

/*
 * definitions for the explanation code for all servers
 */
enum {};

/*
 * Command codes for Name server
 */
enum {};

struct fcgs_id_req_s {};
#define fcgs_gpnid_req_t
#define fcgs_gnnid_req_t
#define fcgs_gspnid_req_t

struct fcgs_gidpn_req_s {};

struct fcgs_gidpn_resp_s {};

/*
 * RFT_ID
 */
struct fcgs_rftid_req_s {};

/*
 * RFF_ID : Register FC4 features.
 */
#define FC_GS_FCP_FC4_FEATURE_INITIATOR
#define FC_GS_FCP_FC4_FEATURE_TARGET

struct fcgs_rffid_req_s {};

/*
 * GID_FT Request
 */
struct fcgs_gidft_req_s {};

/*
 * GID_FT Response
 */
struct fcgs_gidft_resp_s {};

/*
 * RSPN_ID
 */
struct fcgs_rspnid_req_s {};

/*
 * RSNN_NN
 */
struct fcgs_rsnn_nn_req_s {};

/*
 * RPN_ID
 */
struct fcgs_rpnid_req_s {};

/*
 * RNN_ID
 */
struct fcgs_rnnid_req_s {};

/*
 * RCS_ID
 */
struct fcgs_rcsid_req_s {};

/*
 * RPT_ID
 */
struct fcgs_rptid_req_s {};

/*
 * GA_NXT Request
 */
struct fcgs_ganxt_req_s {};

/*
 * GA_NXT Response
 */
struct fcgs_ganxt_rsp_s {};

/*
 * Command codes for Fabric Configuration Server
 */
enum {};

/*
 * GMAL Command ( Get ( interconnect Element) Management Address List)
 * To retrieve the IP Address of a Switch.
 */
#define CT_GMAL_RESP_PREFIX_TELNET
#define CT_GMAL_RESP_PREFIX_HTTP

/*  GMAL/GFN request */
struct fcgs_req_s {};

#define fcgs_gmal_req_t
#define fcgs_gfn_req_t

/* Accept Response to GMAL */
struct fcgs_gmal_resp_s {};

struct fcgs_gmal_entry_s {};

/*
 * FDMI Command Codes
 */
#define FDMI_GRHL
#define FDMI_GHAT
#define FDMI_GRPL
#define FDMI_GPAT
#define FDMI_RHBA
#define FDMI_RHAT
#define FDMI_RPRT
#define FDMI_RPA
#define FDMI_DHBA
#define FDMI_DPRT

/*
 * FDMI reason codes
 */
#define FDMI_NO_ADDITIONAL_EXP
#define FDMI_HBA_ALREADY_REG
#define FDMI_HBA_ATTRIB_NOT_REG
#define FDMI_HBA_ATTRIB_MULTIPLE
#define FDMI_HBA_ATTRIB_LENGTH_INVALID
#define FDMI_HBA_ATTRIB_NOT_PRESENT
#define FDMI_PORT_ORIG_NOT_IN_LIST
#define FDMI_PORT_HBA_NOT_IN_LIST
#define FDMI_PORT_ATTRIB_NOT_REG
#define FDMI_PORT_NOT_REG
#define FDMI_PORT_ATTRIB_MULTIPLE
#define FDMI_PORT_ATTRIB_LENGTH_INVALID
#define FDMI_PORT_ALREADY_REGISTEREED

/*
 * FDMI Transmission Speed Mask values
 */
#define FDMI_TRANS_SPEED_1G
#define FDMI_TRANS_SPEED_2G
#define FDMI_TRANS_SPEED_10G
#define FDMI_TRANS_SPEED_4G
#define FDMI_TRANS_SPEED_8G
#define FDMI_TRANS_SPEED_16G
#define FDMI_TRANS_SPEED_UNKNOWN

/*
 * FDMI HBA attribute types
 */
enum fdmi_hba_attribute_type {};

/*
 * FDMI Port attribute types
 */
enum fdmi_port_attribute_type {};

/*
 * FDMI attribute
 */
struct fdmi_attr_s {};

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

/*
 * Registered Port List
 */
struct fdmi_port_list_s {};

/*
 * Port Attribute Block
 */
struct fdmi_port_attr_s {};

/*
 * FDMI Register HBA Attributes
 */
struct fdmi_rhba_s {};

/*
 * FDMI Register Port
 */
struct fdmi_rprt_s {};

/*
 * FDMI Register Port Attributes
 */
struct fdmi_rpa_s {};

#pragma pack()

#endif	/* __BFA_FC_H__ */