linux/include/uapi/scsi/fc/fc_els.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * Copyright(c) 2007 Intel Corporation. All rights reserved.
 *
 * Maintained at www.Open-FCoE.org
 */

#ifndef _FC_ELS_H_
#define _FC_ELS_H_

#include <linux/types.h>
#include <asm/byteorder.h>

/*
 * Fibre Channel Switch - Enhanced Link Services definitions.
 * From T11 FC-LS Rev 1.2 June 7, 2005.
 */

/*
 * ELS Command codes - byte 0 of the frame payload
 */
enum fc_els_cmd {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_ELS_CMDS_INIT

/*
 * LS_ACC payload.
 */
struct fc_els_ls_acc {};

/*
 * ELS reject payload.
 */
struct fc_els_ls_rjt {};

/*
 * ELS reject reason codes (er_reason).
 */
enum fc_els_rjt_reason {};


/*
 * reason code explanation (er_explan).
 */
enum fc_els_rjt_explan {};

/*
 * Link Service TLV Descriptor Tag Values
 */
enum fc_ls_tlv_dtag {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_LS_TLV_DTAG_INIT


/*
 * Generic Link Service TLV Descriptor format
 *
 * This structure, as it defines no payload, will also be referred to
 * as the "tlv header" - which contains the tag and len fields.
 */
struct fc_tlv_desc {};

/* Descriptor tag and len fields are considered the mandatory header
 * for a descriptor
 */
#define FC_TLV_DESC_HDR_SZ

/*
 * Macro, used when initializing payloads, to return the descriptor length.
 * Length is size of descriptor minus the tag and len fields.
 */
#define FC_TLV_DESC_LENGTH_FROM_SZ(desc)

/* Macro, used on received payloads, to return the descriptor length */
#define FC_TLV_DESC_SZ_FROM_LENGTH(tlv)

/*
 * This helper is used to walk descriptors in a descriptor list.
 * Given the address of the current descriptor, which minimally contains a
 * tag and len field, calculate the address of the next descriptor based
 * on the len field.
 */
static inline void *fc_tlv_next_desc(void *desc)
{}


/*
 * Link Service Request Information Descriptor
 */
struct fc_els_lsri_desc {};


/*
 * Common service parameters (N ports).
 */
struct fc_els_csp {};
#define sp_tot_seq
#define sp_rel_off
#define sp_r_a_tov

#define FC_SP_BB_DATA_MASK

/*
 * Minimum and maximum values for max data field size in service parameters.
 */
#define FC_SP_MIN_MAX_PAYLOAD
#define FC_SP_MAX_MAX_PAYLOAD

/*
 * sp_features
 */
#define FC_SP_FT_NPIV
#define FC_SP_FT_CIRO
#define FC_SP_FT_CLAD
#define FC_SP_FT_RAND
#define FC_SP_FT_VAL
#define FC_SP_FT_NPIV_ACC
#define FC_SP_FT_FPORT
#define FC_SP_FT_ABB
#define FC_SP_FT_EDTR
#define FC_SP_FT_MCAST
#define FC_SP_FT_BCAST
#define FC_SP_FT_HUNT
#define FC_SP_FT_SIMP
#define FC_SP_FT_SEC
#define FC_SP_FT_CSYN
#define FC_SP_FT_RTTOV
#define FC_SP_FT_HALF
#define FC_SP_FT_SEQC
#define FC_SP_FT_PAYL

/*
 * Class-specific service parameters.
 */
struct fc_els_cssp {};

/*
 * cp_class flags.
 */
#define FC_CPC_VALID
#define FC_CPC_IMIX
#define FC_CPC_SEQ
#define FC_CPC_CAMP
#define FC_CPC_PRI

/*
 * cp_init flags.
 * (TBD: not all flags defined here).
 */
#define FC_CPI_CSYN

/*
 * cp_recip flags.
 */
#define FC_CPR_CSYN

/*
 * NFC_ELS_FLOGI: Fabric login request.
 * NFC_ELS_PLOGI: Port login request (same format).
 */
struct fc_els_flogi {} __attribute__((packed));

/*
 * Process login service parameter page.
 */
struct fc_els_spp {};

/*
 * spp_flags.
 */
#define FC_SPP_OPA_VAL
#define FC_SPP_RPA_VAL
#define FC_SPP_EST_IMG_PAIR
#define FC_SPP_RESP_MASK

/*
 * SPP response code in spp_flags - lower 4 bits.
 */
enum fc_els_spp_resp {};

/*
 * ELS_RRQ - Reinstate Recovery Qualifier
 */
struct fc_els_rrq {};

/*
 * ELS_REC - Read exchange concise.
 */
struct fc_els_rec {};

/*
 * ELS_REC LS_ACC payload.
 */
struct fc_els_rec_acc {};

/*
 * ELS_PRLI - Process login request and response.
 */
struct fc_els_prli {};

/*
 * ELS_PRLO - Process logout request and response.
 */
struct fc_els_prlo {};

/*
 * ELS_ADISC payload
 */
struct fc_els_adisc {} __attribute__((packed));

/*
 * ELS_LOGO - process or fabric logout.
 */
struct fc_els_logo {};

/*
 * ELS_RTV - read timeout value.
 */
struct fc_els_rtv {};

/*
 * LS_ACC for ELS_RTV - read timeout value.
 */
struct fc_els_rtv_acc {};

/*
 * rtv_toq bits.
 */
#define FC_ELS_RTV_EDRES
#define FC_ELS_RTV_RTTOV

/*
 * ELS_SCR - state change registration payload.
 */
struct fc_els_scr {};

enum fc_els_scr_func {};

/*
 * ELS_RSCN - registered state change notification payload.
 */
struct fc_els_rscn {};

struct fc_els_rscn_page {};

#define ELS_RSCN_EV_QUAL_BIT
#define ELS_RSCN_EV_QUAL_MASK
#define ELS_RSCN_ADDR_FMT_BIT
#define ELS_RSCN_ADDR_FMT_MASK

enum fc_els_rscn_ev_qual {};

enum fc_els_rscn_addr_fmt {};

/*
 * ELS_RNID - request Node ID.
 */
struct fc_els_rnid {};

/*
 * Node Identification Data formats (rnid_fmt)
 */
enum fc_els_rnid_fmt {};

/*
 * ELS_RNID response.
 */
struct fc_els_rnid_resp {};

struct fc_els_rnid_cid {};

struct fc_els_rnid_gen {};

enum fc_els_rnid_atype {};

enum fc_els_rnid_mgmt {};

enum fc_els_rnid_ipver {};

/*
 * ELS RPL - Read Port List.
 */
struct fc_els_rpl {};

/*
 * Port number block in RPL response.
 */
struct fc_els_pnb {};

/*
 * RPL LS_ACC response.
 */
struct fc_els_rpl_resp {};

/*
 * Link Error Status Block.
 */
struct fc_els_lesb {};

/*
 * ELS RPS - Read Port Status Block request.
 */
struct fc_els_rps {};

enum fc_els_rps_flag {};

/*
 * ELS RPS LS_ACC response.
 */
struct fc_els_rps_resp {};

enum fc_els_rps_resp_flag {};

enum fc_els_rps_resp_status {};

/*
 * ELS LIRR - Link Incident Record Registration request.
 */
struct fc_els_lirr {};

enum fc_els_lirr_func {};

/*
 * ELS SRL - Scan Remote Loop request.
 */
struct fc_els_srl {};

enum fc_els_srl_flag {};

/*
 * ELS RLS - Read Link Error Status Block request.
 */
struct fc_els_rls {};

/*
 * ELS RLS LS_ACC Response.
 */
struct fc_els_rls_resp {};

/*
 * ELS RLIR - Registered Link Incident Report.
 * This is followed by the CLIR and the CLID, described below.
 */
struct fc_els_rlir {};

/*
 * CLIR - Common Link Incident Record Data. - Sent via RLIR.
 */
struct fc_els_clir {};

/*
 * CLIR clir_ts_fmt - time stamp format values.
 */
enum fc_els_clir_ts_fmt {};

/*
 * Common Link Incident Descriptor - sent via RLIR.
 */
struct fc_els_clid {};

/*
 * CLID incident qualifier flags.
 */
enum fc_els_clid_iq {};

/*
 * CLID incident code.
 */
enum fc_els_clid_ic {};

/*
 * Link Integrity event types
 */
enum fc_fpin_li_event_types {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_FPIN_LI_EVT_TYPES_INIT

/*
 * Delivery event types
 */
enum fc_fpin_deli_event_types {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_FPIN_DELI_EVT_TYPES_INIT

/*
 * Congestion event types
 */
enum fc_fpin_congn_event_types {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_FPIN_CONGN_EVT_TYPES_INIT

enum fc_fpin_congn_severity_types {};

/*
 * Link Integrity Notification Descriptor
 */
struct fc_fn_li_desc {};

/*
 * Delivery Notification Descriptor
 */
struct fc_fn_deli_desc {};

/*
 * Peer Congestion Notification Descriptor
 */
struct fc_fn_peer_congn_desc {};

/*
 * Congestion Notification Descriptor
 */
struct fc_fn_congn_desc {};

/*
 * ELS_FPIN - Fabric Performance Impact Notification
 */
struct fc_els_fpin {};

/* Diagnostic Function Descriptor - FPIN Registration */
struct fc_df_desc_fpin_reg {};

/*
 * ELS_RDF - Register Diagnostic Functions
 */
struct fc_els_rdf {};

/*
 * ELS RDF LS_ACC Response.
 */
struct fc_els_rdf_resp {};


/*
 * Diagnostic Capability Descriptors for EDC ELS
 */

/*
 * Diagnostic: Link Fault Capability Descriptor
 */
struct fc_diag_lnkflt_desc {};

enum fc_edc_cg_signal_cap_types {};

/*
 * Initializer useful for decoding table.
 * Please keep this in sync with the above definitions.
 */
#define FC_EDC_CG_SIGNAL_CAP_TYPES_INIT

enum fc_diag_cg_sig_freq_types {};

struct fc_diag_cg_sig_freq {};

/*
 * Diagnostic: Congestion Signaling Capability Descriptor
 */
struct fc_diag_cg_sig_desc {};

/*
 * ELS_EDC - Exchange Diagnostic Capabilities
 */
struct fc_els_edc {};

/*
 * ELS EDC LS_ACC Response.
 */
struct fc_els_edc_resp {};


#endif /* _FC_ELS_H_ */