drivers/scsi/wd719x.h
Source file repositories/reference/linux-study-clean/drivers/scsi/wd719x.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/wd719x.h- Extension
.h- Size
- 9711 bytes
- Lines
- 249
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct wd719x_sgliststruct wd719x_scbstruct wd719xstruct wd719x_eeprom_headerstruct wd719x_host_paramenum wd719x_card_type
Annotated Snippet
struct wd719x_sglist {
__le32 ptr;
__le32 length;
} __packed;
enum wd719x_card_type {
WD719X_TYPE_UNKNOWN = 0,
WD719X_TYPE_7193,
WD719X_TYPE_7197,
WD719X_TYPE_7296,
};
union wd719x_regs {
__le32 all; /* All Status at once */
struct {
u8 OPC; /* Opcode register */
u8 SCSI; /* SCSI Errors */
u8 SUE; /* Spider unique Errors */
u8 INT; /* Interrupt Status */
} bytes;
};
/* Spider Command Block (SCB) */
struct wd719x_scb {
__le32 Int_SCB; /* 00-03 Internal SCB link pointer (must be cleared) */
u8 SCB_opcode; /* 04 SCB Command opcode */
u8 CDB_tag; /* 05 SCSI Tag byte for CDB queues (0 if untagged) */
u8 lun; /* 06 SCSI LUN */
u8 devid; /* 07 SCSI Device ID */
u8 CDB[16]; /* 08-23 SCSI CDB (16 bytes as defined by ANSI spec. */
__le32 data_p; /* 24-27 Data transfer address (or SG list address) */
__le32 data_length; /* 28-31 Data transfer Length (or SG list length) */
__le32 CDB_link; /* 32-35 SCSI CDB Link Ptr */
__le32 sense_buf; /* 36-39 Auto request sense buffer address */
u8 sense_buf_length;/* 40 Auto request sense transfer length */
u8 reserved; /* 41 reserved */
u8 SCB_options; /* 42 SCB-options */
u8 SCB_tag_msg; /* 43 Tagged messages options */
/* Not filled in by host */
__le32 req_ptr; /* 44-47 Ptr to Host Request returned on interrupt */
u8 host_opcode; /* 48 Host Command Opcode (same as AMR_00) */
u8 scsi_stat; /* 49 SCSI Status returned */
u8 ret_error; /* 50 SPIDER Unique Error Code returned (SUE) */
u8 int_stat; /* 51 Message u8 / Interrupt Status byte returned */
__le32 transferred; /* 52-55 Bytes Transferred */
u8 last_trans[3]; /* 56-58 Bytes Transferred in last session */
u8 length; /* 59 SCSI Messages Length (1-8) */
u8 sync_offset; /* 60 Synchronous offset */
u8 sync_rate; /* 61 Synchronous rate */
u8 flags[2]; /* 62-63 SCB specific flags (local to each thread) */
/* everything below is for driver use (not used by card) */
dma_addr_t phys; /* bus address of the SCB */
dma_addr_t dma_handle;
struct scsi_cmnd *cmd; /* a copy of the pointer we were passed */
struct list_head list;
struct wd719x_sglist sg_list[WD719X_SG] __aligned(8); /* SG list */
} __packed;
struct wd719x {
struct Scsi_Host *sh; /* pointer to host structure */
struct pci_dev *pdev;
void __iomem *base;
enum wd719x_card_type type; /* type of card */
void *fw_virt; /* firmware buffer CPU address */
dma_addr_t fw_phys; /* firmware buffer bus address */
size_t fw_size; /* firmware buffer size */
struct wd719x_host_param *params; /* host parameters (EEPROM) */
dma_addr_t params_phys; /* host parameters bus address */
void *hash_virt; /* hash table CPU address */
dma_addr_t hash_phys; /* hash table bus address */
struct list_head active_scbs;
};
/* timeout delays in microsecs */
#define WD719X_WAIT_FOR_CMD_READY 500
#define WD719X_WAIT_FOR_RISC 2000
#define WD719X_WAIT_FOR_SCSI_RESET 3000000
/* All commands except 0x00 generate an interrupt */
#define WD719X_CMD_READY 0x00 /* Command register ready (or noop) */
#define WD719X_CMD_INIT_RISC 0x01 /* Initialize RISC */
/* 0x02 is reserved */
#define WD719X_CMD_BUSRESET 0x03 /* Assert SCSI bus reset */
#define WD719X_CMD_READ_FIRMVER 0x04 /* Read the Firmware Revision */
#define WD719X_CMD_ECHO_BYTES 0x05 /* Echo command bytes (DW) */
/* 0x06 is reserved */
/* 0x07 is reserved */
#define WD719X_CMD_GET_PARAM 0x08 /* Get programmable parameters */
#define WD719X_CMD_SET_PARAM 0x09 /* Set programmable parameters */
#define WD719X_CMD_SLEEP 0x0a /* Put SPIDER to sleep */
Annotation
- Detected declarations: `struct wd719x_sglist`, `struct wd719x_scb`, `struct wd719x`, `struct wd719x_eeprom_header`, `struct wd719x_host_param`, `enum wd719x_card_type`.
- 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.