drivers/message/fusion/mptbase.h
Source file repositories/reference/linux-study-clean/drivers/message/fusion/mptbase.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/message/fusion/mptbase.h- Extension
.h- Size
- 32004 bytes
- Lines
- 1004
- Domain
- Driver Families
- Bucket
- drivers/message
- 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/kernel.hlinux/pci.hlinux/mutex.hlsi/mpi_type.hlsi/mpi.hlsi/mpi_ioc.hlsi/mpi_cnfg.hlsi/mpi_init.hlsi/mpi_lan.hlsi/mpi_raid.hlsi/mpi_fc.hlsi/mpi_targ.hlsi/mpi_tool.hlsi/mpi_sas.hlinux/proc_fs.hmptdebug.h
Detected Declarations
struct mpt_pci_driverstruct inactive_raid_component_infostruct mptfc_rport_infostruct scsi_cmnd
Annotated Snippet
struct mpt_pci_driver{
int (*probe) (struct pci_dev *dev);
void (*remove) (struct pci_dev *dev);
};
/*
* MPT adapter / port / bus / device info structures...
*/
typedef union _MPT_FRAME_TRACKER {
struct {
struct list_head list;
u32 arg1;
u32 pad;
void *argp1;
} linkage;
/*
* NOTE: When request frames are free, on the linkage structure
* contents are valid. All other values are invalid.
* In particular, do NOT reply on offset [2]
* (in words) being the * message context.
* The message context must be reset (computed via base address
* + an offset) prior to issuing any command.
*
* NOTE2: On non-32-bit systems, where pointers are LARGE,
* using the linkage pointers destroys our sacred MsgContext
* field contents. But we don't care anymore because these
* are now reset in mpt_put_msg_frame() just prior to sending
* a request off to the IOC.
*/
struct {
u32 __hdr[2];
/*
* The following _MUST_ match the location of the
* MsgContext field in the MPT message headers.
*/
union {
u32 MsgContext;
struct {
u16 req_idx; /* Request index */
u8 cb_idx; /* callback function index */
u8 rsvd;
} fld;
} msgctxu;
} hwhdr;
/*
* Remark: 32 bit identifier:
* 31-24: reserved
* 23-16: call back index
* 15-0 : request index
*/
} MPT_FRAME_TRACKER;
/*
* We might want to view/access a frame as:
* 1) generic request header
* 2) SCSIIORequest
* 3) SCSIIOReply
* 4) MPIDefaultReply
* 5) frame tracker
*/
typedef struct _MPT_FRAME_HDR {
union {
MPIHeader_t hdr;
SCSIIORequest_t scsireq;
SCSIIOReply_t sreply;
ConfigReply_t configreply;
MPIDefaultReply_t reply;
MPT_FRAME_TRACKER frame;
} u;
} MPT_FRAME_HDR;
#define MPT_REQ_MSGFLAGS_DROPME 0x80
typedef struct _MPT_SGL_HDR {
SGESimple32_t sge[1];
} MPT_SGL_HDR;
typedef struct _MPT_SGL64_HDR {
SGESimple64_t sge[1];
} MPT_SGL64_HDR;
/*
* System interface register set
*/
typedef struct _SYSIF_REGS
{
u32 Doorbell; /* 00 System<->IOC Doorbell reg */
u32 WriteSequence; /* 04 Write Sequence register */
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/pci.h`, `linux/mutex.h`, `lsi/mpi_type.h`, `lsi/mpi.h`, `lsi/mpi_ioc.h`, `lsi/mpi_cnfg.h`, `lsi/mpi_init.h`.
- Detected declarations: `struct mpt_pci_driver`, `struct inactive_raid_component_info`, `struct mptfc_rport_info`, `struct scsi_cmnd`.
- Atlas domain: Driver Families / drivers/message.
- 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.