drivers/scsi/mpt3sas/mpt3sas_ctl.h
Source file repositories/reference/linux-study-clean/drivers/scsi/mpt3sas/mpt3sas_ctl.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/mpt3sas/mpt3sas_ctl.h- Extension
.h- Size
- 15643 bytes
- Lines
- 509
- 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/miscdevice.hmpt3sas_base.h
Detected Declarations
struct mpt3_ioctl_headerstruct mpt3_ioctl_diag_resetstruct mpt3_ioctl_pci_infostruct mpt3_ioctl_iocinfostruct mpt3_ioctl_eventquerystruct mpt3_ioctl_eventenablestruct MPT3_IOCTL_EVENTSstruct mpt3_ioctl_eventreportstruct mpt3_ioctl_commandstruct mpt3_ioctl_command32struct mpt3_ioctl_btdh_mappingstruct mpt3_diag_registerstruct mpt3_diag_unregisterstruct mpt3_diag_querystruct mpt3_diag_releasestruct mpt3_diag_read_bufferstruct mpt3_addnl_diag_querystruct mpt3_enable_diag_sbr_reloadstruct mpt3_passthru_command
Annotated Snippet
struct mpt3_ioctl_header {
uint32_t ioc_number;
uint32_t port_number;
uint32_t max_data_size;
};
/**
* struct mpt3_ioctl_diag_reset - diagnostic reset
* @hdr - generic header
*/
struct mpt3_ioctl_diag_reset {
struct mpt3_ioctl_header hdr;
};
/**
* struct mpt3_ioctl_pci_info - pci device info
* @device - pci device id
* @function - pci function id
* @bus - pci bus id
* @segment_id - pci segment id
*/
struct mpt3_ioctl_pci_info {
union {
struct {
uint32_t device:5;
uint32_t function:3;
uint32_t bus:24;
} bits;
uint32_t word;
} u;
uint32_t segment_id;
};
#define MPT2_IOCTL_INTERFACE_SCSI (0x00)
#define MPT2_IOCTL_INTERFACE_FC (0x01)
#define MPT2_IOCTL_INTERFACE_FC_IP (0x02)
#define MPT2_IOCTL_INTERFACE_SAS (0x03)
#define MPT2_IOCTL_INTERFACE_SAS2 (0x04)
#define MPT2_IOCTL_INTERFACE_SAS2_SSS6200 (0x05)
#define MPT3_IOCTL_INTERFACE_SAS3 (0x06)
#define MPT3_IOCTL_INTERFACE_SAS35 (0x07)
#define MPT2_IOCTL_VERSION_LENGTH (32)
/* Bits set for mpt3_ioctl_iocinfo.driver_cap */
#define MPT3_IOCTL_IOCINFO_DRIVER_CAP_MCTP_PASSTHRU 0x1
/**
* struct mpt3_ioctl_iocinfo - generic controller info
* @hdr - generic header
* @adapter_type - type of adapter (spi, fc, sas)
* @port_number - port number
* @pci_id - PCI Id
* @hw_rev - hardware revision
* @sub_system_device - PCI subsystem Device ID
* @sub_system_vendor - PCI subsystem Vendor ID
* @rsvd0 - reserved
* @firmware_version - firmware version
* @bios_version - BIOS version
* @driver_version - driver version - 32 ASCII characters
* @rsvd1 - reserved
* @scsi_id - scsi id of adapter 0
* @driver_capability - driver capabilities
* @rsvd2 - reserved
* @pci_information - pci info (2nd revision)
*/
struct mpt3_ioctl_iocinfo {
struct mpt3_ioctl_header hdr;
uint32_t adapter_type;
uint32_t port_number;
uint32_t pci_id;
uint32_t hw_rev;
uint32_t subsystem_device;
uint32_t subsystem_vendor;
uint32_t rsvd0;
uint32_t firmware_version;
uint32_t bios_version;
uint8_t driver_version[MPT2_IOCTL_VERSION_LENGTH];
uint8_t rsvd1;
uint8_t scsi_id;
uint8_t driver_capability;
uint8_t rsvd2;
struct mpt3_ioctl_pci_info pci_information;
};
/* number of event log entries */
#define MPT3SAS_CTL_EVENT_LOG_SIZE (200)
Annotation
- Immediate include surface: `linux/miscdevice.h`, `mpt3sas_base.h`.
- Detected declarations: `struct mpt3_ioctl_header`, `struct mpt3_ioctl_diag_reset`, `struct mpt3_ioctl_pci_info`, `struct mpt3_ioctl_iocinfo`, `struct mpt3_ioctl_eventquery`, `struct mpt3_ioctl_eventenable`, `struct MPT3_IOCTL_EVENTS`, `struct mpt3_ioctl_eventreport`, `struct mpt3_ioctl_command`, `struct mpt3_ioctl_command32`.
- 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.