drivers/scsi/pmcraid.h
Source file repositories/reference/linux-study-clean/drivers/scsi/pmcraid.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/pmcraid.h- Extension
.h- Size
- 35700 bytes
- Lines
- 1048
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/completion.hlinux/list.hscsi/scsi.hscsi/scsi_cmnd.hlinux/cdev.hnet/netlink.hnet/genetlink.hlinux/connector.h
Detected Declarations
struct pmcraid_ioadl_descstruct pmcraid_ioarcb_add_datastruct pmcraid_ioarcbstruct pmcraid_ioasa_vsetstruct pmcraid_ioasastruct pmcraid_config_table_entrystruct pmcraid_config_table_entry_extstruct pmcraid_config_tablestruct pmcraid_hostrcb_errorstruct pmcraid_hcam_hdrstruct pmcraid_hcam_ccnstruct pmcraid_hcam_ccn_extstruct pmcraid_hcam_ldnstruct pmcraid_chip_detailsstruct pmcraid_control_blockstruct pmcraid_sgliststruct pmcraid_inquiry_datastruct pmcraid_timestamp_datastruct pmcraid_cmdstruct pmcraid_interruptsstruct pmcraid_isr_paramstruct pmcraid_aen_msgstruct pmcraid_state_msgstruct pmcraid_hostrcbstruct pmcraid_instancestruct pmcraid_resource_entrystruct pmcraid_ioasc_errorstruct pmcraid_ioctl_header
Annotated Snippet
struct pmcraid_ioadl_desc {
__le64 address;
__le32 data_len;
__u8 reserved[3];
__u8 flags;
} __attribute__((packed, aligned(PMCRAID_IOADL_ALIGNMENT)));
/* pmcraid_ioadl_desc.flags values */
#define IOADL_FLAGS_CHAINED PMC_BIT8(0)
#define IOADL_FLAGS_LAST_DESC PMC_BIT8(1)
#define IOADL_FLAGS_READ_LAST PMC_BIT8(1)
#define IOADL_FLAGS_WRITE_LAST PMC_BIT8(1)
/* additional IOARCB data which can be CDB or additional request parameters
* or list of IOADLs. Firmware supports max of 512 bytes for IOARCB, hence then
* number of IOADLs are limted to 27. In case they are more than 27, they will
* be used in chained form
*/
struct pmcraid_ioarcb_add_data {
union {
struct pmcraid_ioadl_desc ioadl[PMCRAID_IOADLS_INTERNAL];
__u8 add_cmd_params[PMCRAID_ADD_CMD_PARAM_LEN];
} u;
};
/*
* IOA Request Control Block
*/
struct pmcraid_ioarcb {
__le64 ioarcb_bus_addr;
__le32 resource_handle;
__le32 response_handle;
__le64 ioadl_bus_addr;
__le32 ioadl_length;
__le32 data_transfer_length;
__le64 ioasa_bus_addr;
__le16 ioasa_len;
__le16 cmd_timeout;
__le16 add_cmd_param_offset;
__le16 add_cmd_param_length;
__le32 reserved1[2];
__le32 reserved2;
__u8 request_type;
__u8 request_flags0;
__u8 request_flags1;
__u8 hrrq_id;
__u8 cdb[PMCRAID_MAX_CDB_LEN];
struct pmcraid_ioarcb_add_data add_data;
};
/* well known resource handle values */
#define PMCRAID_IOA_RES_HANDLE 0xffffffff
#define PMCRAID_INVALID_RES_HANDLE 0
/* pmcraid_ioarcb.request_type values */
#define REQ_TYPE_SCSI 0x00
#define REQ_TYPE_IOACMD 0x01
#define REQ_TYPE_HCAM 0x02
/* pmcraid_ioarcb.flags0 values */
#define TRANSFER_DIR_WRITE PMC_BIT8(0)
#define INHIBIT_UL_CHECK PMC_BIT8(2)
#define SYNC_OVERRIDE PMC_BIT8(3)
#define SYNC_COMPLETE PMC_BIT8(4)
#define NO_LINK_DESCS PMC_BIT8(5)
/* pmcraid_ioarcb.flags1 values */
#define DELAY_AFTER_RESET PMC_BIT8(0)
#define TASK_TAG_SIMPLE 0x10
#define TASK_TAG_ORDERED 0x20
#define TASK_TAG_QUEUE_HEAD 0x30
/* toggle bit offset in response handle */
#define HRRQ_TOGGLE_BIT 0x01
#define HRRQ_RESPONSE_BIT 0x02
/* IOA Status Area */
struct pmcraid_ioasa_vset {
__le32 failing_lba_hi;
__le32 failing_lba_lo;
__le32 reserved;
} __attribute__((packed, aligned(4)));
struct pmcraid_ioasa {
__le32 ioasc;
__le16 returned_status_length;
__le16 available_status_length;
__le32 residual_data_length;
__le32 ilid;
Annotation
- Immediate include surface: `linux/types.h`, `linux/completion.h`, `linux/list.h`, `scsi/scsi.h`, `scsi/scsi_cmnd.h`, `linux/cdev.h`, `net/netlink.h`, `net/genetlink.h`.
- Detected declarations: `struct pmcraid_ioadl_desc`, `struct pmcraid_ioarcb_add_data`, `struct pmcraid_ioarcb`, `struct pmcraid_ioasa_vset`, `struct pmcraid_ioasa`, `struct pmcraid_config_table_entry`, `struct pmcraid_config_table_entry_ext`, `struct pmcraid_config_table`, `struct pmcraid_hostrcb_error`, `struct pmcraid_hcam_hdr`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.