include/scsi/scsi_proto.h
Source file repositories/reference/linux-study-clean/include/scsi/scsi_proto.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/scsi_proto.h- Extension
.h- Size
- 12858 bytes
- Lines
- 439
- 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
linux/build_bug.hlinux/types.h
Detected Declarations
struct scsi_varlen_cdb_hdrstruct scsi_lunstruct scsi_io_group_descriptorstruct scsi_stream_statusstruct scsi_stream_status_headerenum sam_statusenum scsi_protocolenum zbc_zone_reporting_optionsenum zbc_zone_typeenum zbc_zone_condenum zbc_zone_alignment_methodenum scsi_version_descriptorenum scsi_support_opcode
Annotated Snippet
struct scsi_varlen_cdb_hdr {
__u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */
__u8 control;
__u8 misc[5];
__u8 additional_cdb_length; /* total cdb length - 8 */
__be16 service_action;
/* service specific data follows */
};
/*
* SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
* T10/1561-D Revision 4 Draft dated 7th November 2002.
*/
enum sam_status {
SAM_STAT_GOOD = 0x00,
SAM_STAT_CHECK_CONDITION = 0x02,
SAM_STAT_CONDITION_MET = 0x04,
SAM_STAT_BUSY = 0x08,
SAM_STAT_INTERMEDIATE = 0x10,
SAM_STAT_INTERMEDIATE_CONDITION_MET = 0x14,
SAM_STAT_RESERVATION_CONFLICT = 0x18,
SAM_STAT_COMMAND_TERMINATED = 0x22, /* obsolete in SAM-3 */
SAM_STAT_TASK_SET_FULL = 0x28,
SAM_STAT_ACA_ACTIVE = 0x30,
SAM_STAT_TASK_ABORTED = 0x40,
};
#define STATUS_MASK 0xfe
/*
* SENSE KEYS
*/
#define NO_SENSE 0x00
#define RECOVERED_ERROR 0x01
#define NOT_READY 0x02
#define MEDIUM_ERROR 0x03
#define HARDWARE_ERROR 0x04
#define ILLEGAL_REQUEST 0x05
#define UNIT_ATTENTION 0x06
#define DATA_PROTECT 0x07
#define BLANK_CHECK 0x08
#define VENDOR_SPECIFIC 0x09
#define COPY_ABORTED 0x0a
#define ABORTED_COMMAND 0x0b
#define VOLUME_OVERFLOW 0x0d
#define MISCOMPARE 0x0e
#define COMPLETED 0x0f
/*
* DEVICE TYPES
* Please keep them in 0x%02x format for $MODALIAS to work
*/
#define TYPE_DISK 0x00
#define TYPE_TAPE 0x01
#define TYPE_PRINTER 0x02
#define TYPE_PROCESSOR 0x03 /* HP scanners use this */
#define TYPE_WORM 0x04 /* Treated as ROM by our system */
#define TYPE_ROM 0x05
#define TYPE_SCANNER 0x06
#define TYPE_MOD 0x07 /* Magneto-optical disk -
* - treated as TYPE_DISK */
#define TYPE_MEDIUM_CHANGER 0x08
#define TYPE_COMM 0x09 /* Communications device */
#define TYPE_RAID 0x0c
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RBC 0x0e
#define TYPE_OSD 0x11
#define TYPE_ZBC 0x14
#define TYPE_WLUN 0x1e /* well-known logical unit */
#define TYPE_NO_LUN 0x7f
/* SCSI protocols; these are taken from SPC-3 section 7.5 */
enum scsi_protocol {
SCSI_PROTOCOL_FCP = 0, /* Fibre Channel */
SCSI_PROTOCOL_SPI = 1, /* parallel SCSI */
SCSI_PROTOCOL_SSA = 2, /* Serial Storage Architecture - Obsolete */
SCSI_PROTOCOL_SBP = 3, /* firewire */
SCSI_PROTOCOL_SRP = 4, /* Infiniband RDMA */
SCSI_PROTOCOL_ISCSI = 5,
SCSI_PROTOCOL_SAS = 6,
SCSI_PROTOCOL_ADT = 7, /* Media Changers */
SCSI_PROTOCOL_ATA = 8,
SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
};
/*
* ScsiLun: 8 byte LUN.
*/
struct scsi_lun {
Annotation
- Immediate include surface: `linux/build_bug.h`, `linux/types.h`.
- Detected declarations: `struct scsi_varlen_cdb_hdr`, `struct scsi_lun`, `struct scsi_io_group_descriptor`, `struct scsi_stream_status`, `struct scsi_stream_status_header`, `enum sam_status`, `enum scsi_protocol`, `enum zbc_zone_reporting_options`, `enum zbc_zone_type`, `enum zbc_zone_cond`.
- 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.