JFIF$        dd7 

Viewing File: /usr/src/kernels/5.14.0-570.32.1.el9_6.x86_64/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  __attribute__ ((__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 {
	__u8	ssb_seq_id;		/* sequence ID */
	__u8	_ssb_resvd;
	__be16	ssb_low_seq_cnt;	/* lowest SEQ_CNT */

	__be16	ssb_high_seq_cnt;	/* highest SEQ_CNT */
	__be16	ssb_s_stat;		/* sequence status flags */

	__be16	ssb_err_seq_cnt;	/* error SEQ_CNT */
	__u8	ssb_fh_cs_ctl;		/* frame header CS_CTL */
	__be16	ssb_fh_ox_id;		/* frame header OX_ID */
	__be16	ssb_rx_id;		/* responder's exchange ID */
	__u8	_ssb_resvd2[2];
} 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         17          /* length of fc_ssb for assert */

/*
 * ssb_s_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
 */
#define SSB_ST_RESP         (1 << 15)   /* sequence responder */
#define SSB_ST_ACTIVE       (1 << 14)   /* sequence is active */
#define SSB_ST_ABNORMAL     (1 << 12)   /* abnormal ending condition */

#define SSB_ST_REQ_MASK     (3 << 10)   /* ACK, abort sequence condition */
#define SSB_ST_REQ_CONT     (0 << 10)
#define SSB_ST_REQ_ABORT    (1 << 10)
#define SSB_ST_REQ_STOP     (2 << 10)
#define SSB_ST_REQ_RETRANS  (3 << 10)

#define SSB_ST_ABTS         (1 << 9)    /* ABTS protocol completed */
#define SSB_ST_RETRANS      (1 << 8)    /* retransmission completed */
#define SSB_ST_TIMEOUT      (1 << 7)    /* sequence timed out by recipient */
#define SSB_ST_P_RJT        (1 << 6)    /* P_RJT transmitted */

#define SSB_ST_CLASS_BIT    4           /* class of service field LSB */
#define SSB_ST_CLASS_MASK   3           /* class of service mask */
#define SSB_ST_ACK          (1 << 3)    /* ACK (EOFt or EOFdt) transmitted */

/*
 * 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 {
	__u8	esb_cs_ctl;		/* CS_CTL for frame header */
	__be16	esb_ox_id;		/* originator exchange ID */
	__be16	esb_rx_id;		/* responder exchange ID */
	__be32	esb_orig_fid;		/* fabric ID of originator */
	__be32	esb_resp_fid;		/* fabric ID of responder */
	__be32	esb_e_stat;		/* status */
	__u8	_esb_resvd[4];
	__u8	esb_service_params[112]; /* TBD */
	__u8	esb_seq_status[8];	/* sequence statuses, 8 bytes each */
} __attribute__((packed));

/*
 * Define expected size for ASSERTs.
 * See comments on FC_SSB_SIZE.
 */
#define FC_ESB_SIZE         (1 + 5*4 + 112 + 8)     /* expected size */

/*
 * esb_e_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
 */
#define ESB_ST_RESP         (1 << 31)   /* responder to exchange */
#define ESB_ST_SEQ_INIT     (1 << 30)   /* port holds sequence initiative */
#define ESB_ST_COMPLETE     (1 << 29)   /* exchange is complete */
#define ESB_ST_ABNORMAL     (1 << 28)   /* abnormal ending condition */
#define ESB_ST_REC_QUAL     (1 << 26)   /* recovery qualifier active */

#define ESB_ST_ERRP_BIT     24          /* LSB for error policy */
#define ESB_ST_ERRP_MASK    (3 << 24)   /* mask for error policy */
#define ESB_ST_ERRP_MULT    (0 << 24)   /* abort, discard multiple sequences */
#define ESB_ST_ERRP_SING    (1 << 24)   /* abort, discard single sequence */
#define ESB_ST_ERRP_INF     (2 << 24)   /* process with infinite buffers */
#define ESB_ST_ERRP_IMM     (3 << 24)   /* discard mult. with immed. retran. */

#define ESB_ST_OX_ID_INVL   (1 << 23)   /* originator XID invalid */
#define ESB_ST_RX_ID_INVL   (1 << 22)   /* responder XID invalid */
#define ESB_ST_PRI_INUSE    (1 << 21)   /* priority / preemption in use */

#endif /* _FC_FC2_H_ */
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?/8w#[)L7+6〼T ATg!%5MmZ/c-{1_Je"|^$'O&ޱմTrb$w)R$& N1EtdU3Uȉ1pM"N*(DNyd96.(jQ)X 5cQɎMyW?Q*!R>6=7)Xj5`J]e8%t!+'!1Q5 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