/* 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 {
ELS_LS_RJT = 0x01, /* ESL reject */
ELS_LS_ACC = 0x02, /* ESL Accept */
ELS_PLOGI = 0x03, /* N_Port login */
ELS_FLOGI = 0x04, /* F_Port login */
ELS_LOGO = 0x05, /* Logout */
ELS_ABTX = 0x06, /* Abort exchange - obsolete */
ELS_RCS = 0x07, /* read connection status */
ELS_RES = 0x08, /* read exchange status block */
ELS_RSS = 0x09, /* read sequence status block */
ELS_RSI = 0x0a, /* read sequence initiative */
ELS_ESTS = 0x0b, /* establish streaming */
ELS_ESTC = 0x0c, /* estimate credit */
ELS_ADVC = 0x0d, /* advise credit */
ELS_RTV = 0x0e, /* read timeout value */
ELS_RLS = 0x0f, /* read link error status block */
ELS_ECHO = 0x10, /* echo */
ELS_TEST = 0x11, /* test */
ELS_RRQ = 0x12, /* reinstate recovery qualifier */
ELS_REC = 0x13, /* read exchange concise */
ELS_SRR = 0x14, /* sequence retransmission request */
ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */
ELS_EDC = 0x17, /* Exchange Diagnostic Capabilities */
ELS_RDP = 0x18, /* Read Diagnostic Parameters */
ELS_RDF = 0x19, /* Register Diagnostic Functions */
ELS_PRLI = 0x20, /* process login */
ELS_PRLO = 0x21, /* process logout */
ELS_SCN = 0x22, /* state change notification */
ELS_TPLS = 0x23, /* test process login state */
ELS_TPRLO = 0x24, /* third party process logout */
ELS_LCLM = 0x25, /* login control list mgmt (obs) */
ELS_GAID = 0x30, /* get alias_ID */
ELS_FACT = 0x31, /* fabric activate alias_id */
ELS_FDACDT = 0x32, /* fabric deactivate alias_id */
ELS_NACT = 0x33, /* N-port activate alias_id */
ELS_NDACT = 0x34, /* N-port deactivate alias_id */
ELS_QOSR = 0x40, /* quality of service request */
ELS_RVCS = 0x41, /* read virtual circuit status */
ELS_PDISC = 0x50, /* discover N_port service params */
ELS_FDISC = 0x51, /* discover F_port service params */
ELS_ADISC = 0x52, /* discover address */
ELS_RNC = 0x53, /* report node cap (obs) */
ELS_FARP_REQ = 0x54, /* FC ARP request */
ELS_FARP_REPL = 0x55, /* FC ARP reply */
ELS_RPS = 0x56, /* read port status block */
ELS_RPL = 0x57, /* read port list */
ELS_RPBC =