include/scsi/fc/fc_fcp.h
Source file repositories/reference/linux-study-clean/include/scsi/fc/fc_fcp.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/fc/fc_fcp.h- Extension
.h- Size
- 6483 bytes
- Lines
- 205
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
scsi/scsi.h
Detected Declarations
struct fcp_cmndstruct fcp_cmnd32struct fcp_txrdystruct fcp_respstruct fcp_resp_extstruct fcp_resp_rsp_infostruct fcp_resp_with_extstruct fcp_srrenum fcp_resp_rsp_codes
Annotated Snippet
struct fcp_cmnd {
struct scsi_lun fc_lun; /* logical unit number */
__u8 fc_cmdref; /* command reference number */
__u8 fc_pri_ta; /* priority and task attribute */
__u8 fc_tm_flags; /* task management flags */
__u8 fc_flags; /* additional len & flags */
__u8 fc_cdb[16]; /* base CDB */
__be32 fc_dl; /* data length (must follow fc_cdb) */
};
#define FCP_CMND_LEN 32 /* expected length of structure */
struct fcp_cmnd32 {
struct scsi_lun fc_lun; /* logical unit number */
__u8 fc_cmdref; /* command reference number */
__u8 fc_pri_ta; /* priority and task attribute */
__u8 fc_tm_flags; /* task management flags */
__u8 fc_flags; /* additional len & flags */
__u8 fc_cdb[32]; /* base CDB */
__be32 fc_dl; /* data length (must follow fc_cdb) */
};
#define FCP_CMND32_LEN 48 /* expected length of structure */
#define FCP_CMND32_ADD_LEN (16 / 4) /* Additional cdb length */
/*
* fc_pri_ta.
*/
#define FCP_PTA_SIMPLE 0 /* simple task attribute */
#define FCP_PTA_HEADQ 1 /* head of queue task attribute */
#define FCP_PTA_ORDERED 2 /* ordered task attribute */
#define FCP_PTA_ACA 4 /* auto. contingent allegiance */
#define FCP_PTA_MASK 7 /* mask for task attribute field */
#define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */
#define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */
/*
* fc_tm_flags - task management flags field.
*/
#define FCP_TMF_CLR_ACA 0x40 /* clear ACA condition */
#define FCP_TMF_TGT_RESET 0x20 /* target reset task management,
deprecated as of FCP-3 */
#define FCP_TMF_LUN_RESET 0x10 /* logical unit reset task management */
#define FCP_TMF_CLR_TASK_SET 0x04 /* clear task set */
#define FCP_TMF_ABT_TASK_SET 0x02 /* abort task set */
/*
* fc_flags.
* Bits 7:2 are the additional FCP_CDB length / 4.
*/
#define FCP_CFL_LEN_MASK 0xfc /* mask for additional length */
#define FCP_CFL_LEN_SHIFT 2 /* shift bits for additional length */
#define FCP_CFL_RDDATA 0x02 /* read data */
#define FCP_CFL_WRDATA 0x01 /* write data */
/*
* FCP_TXRDY IU - transfer ready payload.
*/
struct fcp_txrdy {
__be32 ft_data_ro; /* data relative offset */
__be32 ft_burst_len; /* burst length */
__u8 _ft_resvd[4]; /* reserved */
};
#define FCP_TXRDY_LEN 12 /* expected length of structure */
/*
* 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 {
__u8 _fr_resvd[8]; /* reserved */
__be16 fr_retry_delay; /* retry delay timer */
__u8 fr_flags; /* flags */
__u8 fr_status; /* SCSI status code */
Annotation
- Immediate include surface: `scsi/scsi.h`.
- Detected declarations: `struct fcp_cmnd`, `struct fcp_cmnd32`, `struct fcp_txrdy`, `struct fcp_resp`, `struct fcp_resp_ext`, `struct fcp_resp_rsp_info`, `struct fcp_resp_with_ext`, `struct fcp_srr`, `enum fcp_resp_rsp_codes`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.