linux/include/scsi/fc/fc_fc2.h

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

#ifndef _FC_FC2_H_
#define _FC_FC2_H_

/*
 * Fibre Channel Exchanges and Sequences.
 */
#ifndef PACKED
#define PACKED
#endif /* PACKED */


/*
 * Sequence Status Block.
 * This format is set by the FC-FS standard and is sent over the wire.
 * Note that the fields aren't all naturally aligned.
 */
struct fc_ssb {} PACKED;

/*
 * The SSB should be 17 bytes.  Since it's layout is somewhat strange,
 * we define the size here so that code can ASSERT that the size comes out
 * correct.
 */
#define FC_SSB_SIZE

/*
 * ssb_s_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
 */
#define SSB_ST_RESP
#define SSB_ST_ACTIVE
#define SSB_ST_ABNORMAL

#define SSB_ST_REQ_MASK
#define SSB_ST_REQ_CONT
#define SSB_ST_REQ_ABORT
#define SSB_ST_REQ_STOP
#define SSB_ST_REQ_RETRANS

#define SSB_ST_ABTS
#define SSB_ST_RETRANS
#define SSB_ST_TIMEOUT
#define SSB_ST_P_RJT

#define SSB_ST_CLASS_BIT
#define SSB_ST_CLASS_MASK
#define SSB_ST_ACK

/*
 * Exchange Status Block.
 * This format is set by the FC-FS standard and is sent over the wire.
 * Note that the fields aren't all naturally aligned.
 */
struct fc_esb {} __attribute__((packed));

/*
 * Define expected size for ASSERTs.
 * See comments on FC_SSB_SIZE.
 */
#define FC_ESB_SIZE

/*
 * esb_e_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
 */
#define ESB_ST_RESP
#define ESB_ST_SEQ_INIT
#define ESB_ST_COMPLETE
#define ESB_ST_ABNORMAL
#define ESB_ST_REC_QUAL

#define ESB_ST_ERRP_BIT
#define ESB_ST_ERRP_MASK
#define ESB_ST_ERRP_MULT
#define ESB_ST_ERRP_SING
#define ESB_ST_ERRP_INF
#define ESB_ST_ERRP_IMM

#define ESB_ST_OX_ID_INVL
#define ESB_ST_RX_ID_INVL
#define ESB_ST_PRI_INUSE

#endif /* _FC_FC2_H_ */