drivers/scsi/ipr.h
Source file repositories/reference/linux-study-clean/drivers/scsi/ipr.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/ipr.h- Extension
.h- Size
- 50707 bytes
- Lines
- 1930
- 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/unaligned.hlinux/types.hlinux/completion.hlinux/list.hlinux/kref.hlinux/irq_poll.hscsi/scsi.hscsi/scsi_cmnd.h
Detected Declarations
struct ipr_res_addrstruct ipr_std_inq_vpidsstruct ipr_vpdstruct ipr_ext_vpdstruct ipr_ext_vpd64struct ipr_std_inq_datastruct ipr_config_table_entrystruct ipr_config_table_entry64struct ipr_config_table_hdrstruct ipr_config_table_hdr64struct ipr_config_tablestruct ipr_config_table64struct ipr_config_table_entry_wrapperstruct ipr_hostrcb_cfg_ch_notstruct ipr_supported_devicestruct ipr_hrr_queuestruct ipr_cmd_pktstruct ipr_ioadl_descstruct ipr_ioadl64_descstruct ipr_ioarcb_add_datastruct ipr_ioarcb_sis64_add_addr_ecbstruct ipr_ioarcbstruct ipr_ioasa_vsetstruct ipr_ioasa_af_dasdstruct ipr_ioasa_gpddstruct ipr_auto_sensestruct ipr_ioasa_hdrstruct ipr_ioasastruct ipr_ioasa64struct ipr_mode_parm_hdrstruct ipr_mode_pagesstruct ipr_mode_page_hdrstruct ipr_dev_bus_entrystruct ipr_mode_page28struct ipr_mode_page24struct ipr_ioa_vpdstruct ipr_inquiry_page3struct ipr_inquiry_capstruct ipr_inquiry_page0struct ipr_inquiry_pageC4struct ipr_hostrcb_device_data_entrystruct ipr_hostrcb_device_data_entry_enhancedstruct ipr_hostrcb64_device_data_entry_enhancedstruct ipr_hostrcb_array_data_entrystruct ipr_hostrcb64_array_data_entrystruct ipr_hostrcb_array_data_entry_enhancedstruct ipr_hostrcb_type_ff_errorstruct ipr_hostrcb_type_01_error
Annotated Snippet
struct ipr_res_addr {
u8 reserved;
u8 bus;
u8 target;
u8 lun;
#define IPR_GET_PHYS_LOC(res_addr) \
(((res_addr).bus << 16) | ((res_addr).target << 8) | (res_addr).lun)
}__attribute__((packed, aligned (4)));
struct ipr_std_inq_vpids {
u8 vendor_id[IPR_VENDOR_ID_LEN];
u8 product_id[IPR_PROD_ID_LEN];
}__attribute__((packed));
struct ipr_vpd {
struct ipr_std_inq_vpids vpids;
u8 sn[IPR_SERIAL_NUM_LEN];
}__attribute__((packed));
struct ipr_ext_vpd {
struct ipr_vpd vpd;
__be32 wwid[2];
}__attribute__((packed));
struct ipr_ext_vpd64 {
struct ipr_vpd vpd;
__be32 wwid[4];
}__attribute__((packed));
struct ipr_std_inq_data {
u8 peri_qual_dev_type;
#define IPR_STD_INQ_PERI_QUAL(peri) ((peri) >> 5)
#define IPR_STD_INQ_PERI_DEV_TYPE(peri) ((peri) & 0x1F)
u8 removeable_medium_rsvd;
#define IPR_STD_INQ_REMOVEABLE_MEDIUM 0x80
#define IPR_IS_DASD_DEVICE(std_inq) \
((IPR_STD_INQ_PERI_DEV_TYPE((std_inq).peri_qual_dev_type) == TYPE_DISK) && \
!(((std_inq).removeable_medium_rsvd) & IPR_STD_INQ_REMOVEABLE_MEDIUM))
#define IPR_IS_SES_DEVICE(std_inq) \
(IPR_STD_INQ_PERI_DEV_TYPE((std_inq).peri_qual_dev_type) == TYPE_ENCLOSURE)
u8 version;
u8 aen_naca_fmt;
u8 additional_len;
u8 sccs_rsvd;
u8 bq_enc_multi;
u8 sync_cmdq_flags;
struct ipr_std_inq_vpids vpids;
u8 ros_rsvd_ram_rsvd[4];
u8 serial_num[IPR_SERIAL_NUM_LEN];
}__attribute__ ((packed));
#define IPR_RES_TYPE_AF_DASD 0x00
#define IPR_RES_TYPE_GENERIC_SCSI 0x01
#define IPR_RES_TYPE_VOLUME_SET 0x02
#define IPR_RES_TYPE_REMOTE_AF_DASD 0x03
#define IPR_RES_TYPE_GENERIC_ATA 0x04
#define IPR_RES_TYPE_ARRAY 0x05
#define IPR_RES_TYPE_IOAFP 0xff
struct ipr_config_table_entry {
u8 proto;
#define IPR_PROTO_SATA 0x02
#define IPR_PROTO_SATA_ATAPI 0x03
#define IPR_PROTO_SAS_STP 0x06
#define IPR_PROTO_SAS_STP_ATAPI 0x07
u8 array_id;
u8 flags;
#define IPR_IS_IOA_RESOURCE 0x80
u8 rsvd_subtype;
#define IPR_QUEUEING_MODEL(res) ((((res)->flags) & 0x70) >> 4)
#define IPR_QUEUE_FROZEN_MODEL 0
#define IPR_QUEUE_NACA_MODEL 1
struct ipr_res_addr res_addr;
__be32 res_handle;
__be32 lun_wwn[2];
struct ipr_std_inq_data std_inq_data;
}__attribute__ ((packed, aligned (4)));
struct ipr_config_table_entry64 {
u8 res_type;
u8 proto;
Annotation
- Immediate include surface: `linux/unaligned.h`, `linux/types.h`, `linux/completion.h`, `linux/list.h`, `linux/kref.h`, `linux/irq_poll.h`, `scsi/scsi.h`, `scsi/scsi_cmnd.h`.
- Detected declarations: `struct ipr_res_addr`, `struct ipr_std_inq_vpids`, `struct ipr_vpd`, `struct ipr_ext_vpd`, `struct ipr_ext_vpd64`, `struct ipr_std_inq_data`, `struct ipr_config_table_entry`, `struct ipr_config_table_entry64`, `struct ipr_config_table_hdr`, `struct ipr_config_table_hdr64`.
- 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.