drivers/scsi/initio.h
Source file repositories/reference/linux-study-clean/drivers/scsi/initio.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/initio.h- Extension
.h- Size
- 29528 bytes
- Lines
- 652
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct sg_entrystruct scsi_ctrl_blkstruct target_controlstruct initio_hoststruct initio_cmd_priv
Annotated Snippet
struct sg_entry {
u32 data; /* Data Pointer */
u32 len; /* Data Length */
};
/***********************************************************************
SCSI Control Block
************************************************************************/
struct scsi_ctrl_blk {
struct scsi_ctrl_blk *next;
u8 status; /*4 */
u8 next_state; /*5 */
u8 mode; /*6 */
u8 msgin; /*7 SCB_Res0 */
u16 sgidx; /*8 */
u16 sgmax; /*A */
#ifdef ALPHA
u32 reserved[2]; /*C */
#else
u32 reserved[3]; /*C */
#endif
u32 xferlen; /*18 Current xfer len */
u32 totxlen; /*1C Total xfer len */
u32 paddr; /*20 SCB phy. Addr. */
u8 opcode; /*24 SCB command code */
u8 flags; /*25 SCB Flags */
u8 target; /*26 Target Id */
u8 lun; /*27 Lun */
u32 bufptr; /*28 Data Buffer Pointer */
u32 buflen; /*2C Data Allocation Length */
u8 sglen; /*30 SG list # */
u8 senselen; /*31 Sense Allocation Length */
u8 hastat; /*32 */
u8 tastat; /*33 */
u8 cdblen; /*34 CDB Length */
u8 ident; /*35 Identify */
u8 tagmsg; /*36 Tag Message */
u8 tagid; /*37 Queue Tag */
u8 cdb[12]; /*38 */
u32 sgpaddr; /*44 SG List/Sense Buf phy. Addr. */
u32 senseptr; /*48 Sense data pointer */
void (*post) (u8 *, u8 *); /*4C POST routine */
struct scsi_cmnd *srb; /*50 SRB Pointer */
struct sg_entry sglist[TOTAL_SG_ENTRY]; /*54 Start of SG list */
};
/* Bit Definition for status */
#define SCB_RENT 0x01
#define SCB_PEND 0x02
#define SCB_CONTIG 0x04 /* Contingent Allegiance */
#define SCB_SELECT 0x08
#define SCB_BUSY 0x10
#define SCB_DONE 0x20
/* Opcodes for opcode */
#define ExecSCSI 0x1
#define BusDevRst 0x2
#define AbortCmd 0x3
/* Bit Definition for mode */
#define SCM_RSENS 0x01 /* request sense mode */
/* Bit Definition for flags */
#define SCF_DONE 0x01
#define SCF_POST 0x02
#define SCF_SENSE 0x04
#define SCF_DIR 0x18
#define SCF_NO_DCHK 0x00
#define SCF_DIN 0x08
#define SCF_DOUT 0x10
#define SCF_NO_XF 0x18
#define SCF_WR_VF 0x20 /* Write verify turn on */
#define SCF_POLL 0x40
#define SCF_SG 0x80
/* Error Codes for SCB_HaStat */
#define HOST_SEL_TOUT 0x11
#define HOST_DO_DU 0x12
#define HOST_BUS_FREE 0x13
#define HOST_BAD_PHAS 0x14
#define HOST_INV_CMD 0x16
#define HOST_ABORTED 0x1A /* 07/21/98 */
#define HOST_SCSI_RST 0x1B
#define HOST_DEV_RST 0x1C
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct sg_entry`, `struct scsi_ctrl_blk`, `struct target_control`, `struct initio_host`, `struct initio_cmd_priv`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.