linux/include/scsi/fc/fc_fcp.h

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

#ifndef _FC_FCP_H_
#define _FC_FCP_H_

#include <scsi/scsi.h>

/*
 * Fibre Channel Protocol for SCSI.
 * From T10 FCP-3, T10 project 1560-D Rev 4, Sept. 13, 2005.
 */

/*
 * fc/fs.h defines FC_TYPE_FCP.
 */

/*
 * Service parameter page parameters (word 3 bits) for Process Login.
 */
#define FCP_SPPF_TASK_RETRY_ID
#define FCP_SPPF_RETRY
#define FCP_SPPF_CONF_COMPL
#define FCP_SPPF_OVLY_ALLOW
#define FCP_SPPF_INIT_FCN
#define FCP_SPPF_TARG_FCN
#define FCP_SPPF_RD_XRDY_DIS
#define FCP_SPPF_WR_XRDY_DIS

/*
 * FCP_CMND IU Payload.
 */
struct fcp_cmnd {};

#define FCP_CMND_LEN

struct fcp_cmnd32 {};

#define FCP_CMND32_LEN
#define FCP_CMND32_ADD_LEN

/*
 * fc_pri_ta.
 */
#define FCP_PTA_SIMPLE
#define FCP_PTA_HEADQ
#define FCP_PTA_ORDERED
#define FCP_PTA_ACA
#define FCP_PTA_MASK
#define FCP_PRI_SHIFT
#define FCP_PRI_RESVD_MASK

/*
 * fc_tm_flags - task management flags field.
 */
#define FCP_TMF_CLR_ACA
#define FCP_TMF_TGT_RESET
#define FCP_TMF_LUN_RESET
#define FCP_TMF_CLR_TASK_SET
#define FCP_TMF_ABT_TASK_SET

/*
 * fc_flags.
 *  Bits 7:2 are the additional FCP_CDB length / 4.
 */
#define FCP_CFL_LEN_MASK
#define FCP_CFL_LEN_SHIFT
#define FCP_CFL_RDDATA
#define FCP_CFL_WRDATA

/*
 * FCP_TXRDY IU - transfer ready payload.
 */
struct fcp_txrdy {};

#define FCP_TXRDY_LEN

/*
 * FCP_RESP IU - response payload.
 *
 * The response payload comes in three parts: the flags/status, the
 * sense/response lengths and the sense data/response info section.
 *
 * From FCP3r04, note 6 of section 9.5.13:
 *
 * Some early implementations presented the FCP_RSP IU without the FCP_RESID,
 * FCP_SNS_LEN, and FCP_RSP_LEN fields if the FCP_RESID_UNDER, FCP_RESID_OVER,
 * FCP_SNS_LEN_VALID, and FCP_RSP_LEN_VALID bits were all set to zero. This
 * non-standard behavior should be tolerated.
 *
 * All response frames will always contain the fcp_resp template.  Some
 * will also include the fcp_resp_len template.
 *
 * From Table 23, the FCP_RSP_INFO can either be 4 bytes or 8 bytes, both
 * are valid length.
 */
struct fcp_resp {};

#define FCP_RESP_LEN

struct fcp_resp_ext {};

#define FCP_RESP_EXT_LEN

struct fcp_resp_rsp_info {};

#define FCP_RESP_RSP_INFO_LEN4
#define FCP_RESP_RSP_INFO_LEN8

struct fcp_resp_with_ext {};

#define FCP_RESP_WITH_EXT

/*
 * fr_flags.
 */
#define FCP_BIDI_RSP
#define FCP_BIDI_READ_UNDER
#define FCP_BIDI_READ_OVER
#define FCP_CONF_REQ
#define FCP_RESID_UNDER
#define FCP_RESID_OVER
#define FCP_SNS_LEN_VAL
#define FCP_RSP_LEN_VAL

/*
 * rsp_codes
 */
enum fcp_resp_rsp_codes {};

/*
 * FCP SRR Link Service request - Sequence Retransmission Request.
 */
struct fcp_srr {};

/*
 * Feature bits in name server FC-4 Features object.
 */
#define FCP_FEAT_TARG
#define FCP_FEAT_INIT

#endif /* _FC_FCP_H_ */