STRUCT MPT3SAS_ADAPTER(9)
π struct MPT3SAS_ADAPTER(9) π
okay bestie, welcome to the Kernel API Manual β¨ this page is all about struct MPT3SAS_ADAPTER, and it is lowkey the main character. no cap, every field stays exactly as written, so the compiler and the vibe check both pass π«Ά
πΈ NAME πΈ
struct MPT3SAS_ADAPTER β the per adapter struct. that's the whole name, and yes, it's giving "one struct to hold the whole adapter situation" energy π
π¦ SYNOPSIS π¦
here's the full struct, bestie β every field, every type, every bracket, exactly as written. it's giving "long receipt" energy but we are not skipping a single line π€
struct MPT3SAS_ADAPTER {
struct list_head list;
struct Scsi_Host *shost;
u8 id;
int cpu_count;
char name[MPT_NAME_LENGTH];
char driver_name[MPT_NAME_LENGTH - 8];
char tmp_string[MPT_STRING_LENGTH];
struct pci_dev *pdev;
Mpi2SystemInterfaceRegs_t __iomem *chip;
phys_addr_t chip_phys;
int logging_level;
int fwfault_debug;
u8 ir_firmware;
int bars;
u8 mask_interrupts;
struct workqueue_struct *fault_reset_work_q;
struct delayed_work fault_reset_work;
struct workqueue_struct *firmware_event_thread;
spinlock_t fw_event_lock;
struct list_head fw_event_list;
struct fw_event_work *current_event;
u8 fw_events_cleanup;
int aen_event_read_flag;
u8 broadcast_aen_busy;
u16 broadcast_aen_pending;
u8 shost_recovery;
u8 got_task_abort_from_ioctl;
struct mutex reset_in_progress_mutex;
struct mutex hostdiag_unlock_mutex;
spinlock_t ioc_reset_in_progress_lock;
u8 ioc_link_reset_in_progress;
u8 ignore_loginfos;
u8 remove_host;
u8 pci_error_recovery;
u8 wait_for_discovery_to_complete;
u8 is_driver_loading;
u8 port_enable_failed;
u8 start_scan;
u16 start_scan_failed;
u8 msix_enable;
u16 msix_vector_count;
u8 *cpu_msix_table;
u16 cpu_msix_table_sz;
resource_size_t __iomem **reply_post_host_index;
u32 ioc_reset_count;
MPT3SAS_FLUSH_RUNNING_CMDS schedule_dead_ioc_flush_running_cmds;
u32 non_operational_loop;
u8 ioc_coredump_loop;
u32 timestamp_update_count;
u32 time_sync_interval;
atomic64_t total_io_cnt;
atomic64_t high_iops_outstanding;
bool msix_load_balance;
u16 thresh_hold;
u8 high_iops_queues;
u8 iopoll_q_start_index;
u32 drv_internal_flags;
u32 drv_support_bitmap;
u32 dma_mask;
bool enable_sdev_max_qd;
bool use_32bit_dma;
struct io_uring_poll_queue *io_uring_poll_queues;
u8 scsi_io_cb_idx;
u8 tm_cb_idx;
u8 transport_cb_idx;
u8 scsih_cb_idx;
u8 ctl_cb_idx;
u8 base_cb_idx;
u8 port_enable_cb_idx;
u8 config_cb_idx;
u8 tm_tr_cb_idx;
u8 tm_tr_volume_cb_idx;
u8 tm_sas_control_cb_idx;
struct _internal_cmd base_cmds;
struct _internal_cmd port_enable_cmds;
struct _internal_cmd transport_cmds;
struct _internal_cmd scsih_cmds;
struct _internal_cmd tm_cmds;
struct _internal_cmd ctl_cmds;
struct _internal_cmd config_cmds;
MPT_ADD_SGE base_add_sg_single;
MPT_BUILD_SG_SCMD build_sg_scmd;
MPT_BUILD_SG build_sg;
MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge;
u16 sge_size_ieee;
u16 hba_mpi_version_belonged;
MPT_BUILD_SG build_sg_mpi;
MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge_mpi;
NVME_BUILD_PRP build_nvme_prp;
u32 event_type[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
u32 event_context;
void *event_log;
u32 event_masks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
u8 tm_custom_handling;
u8 nvme_abort_timeout;
u16 max_shutdown_latency;
u16 max_wideport_qd;
u16 max_narrowport_qd;
u16 max_nvme_qd;
u8 max_sata_qd;
struct mpt3sas_facts facts;
struct mpt3sas_facts prev_fw_facts;
struct mpt3sas_port_facts *pfacts;
Mpi2ManufacturingPage0_t manu_pg0;
struct Mpi2ManufacturingPage10_t manu_pg10;
struct Mpi2ManufacturingPage11_t manu_pg11;
Mpi2BiosPage2_t bios_pg2;
Mpi2BiosPage3_t bios_pg3;
Mpi2IOCPage8_t ioc_pg8;
Mpi2IOUnitPage0_t iounit_pg0;
Mpi2IOUnitPage1_t iounit_pg1;
Mpi2IOCPage1_t ioc_pg1_copy;
struct _boot_device req_boot_device;
struct _boot_device req_alt_boot_device;
struct _boot_device current_boot_device;
struct _sas_node sas_hba;
struct list_head sas_expander_list;
struct list_head enclosure_list;
spinlock_t sas_node_lock;
struct list_head sas_device_list;
struct list_head sas_device_init_list;
spinlock_t sas_device_lock;
struct list_head pcie_device_list;
struct list_head pcie_device_init_list;
spinlock_t pcie_device_lock;
struct list_head raid_device_list;
spinlock_t raid_device_lock;
u8 io_missing_delay;
u16 device_missing_delay;
int sas_id;
int pcie_target_id;
void *blocking_handles;
void *pd_handles;
u16 pd_handles_sz;
void *pend_os_device_add;
u16 pend_os_device_add_sz;
u16 config_page_sz;
void *config_page;
dma_addr_t config_page_dma;
void *config_vaddr;
u16 hba_queue_depth;
u16 sge_size;
u16 scsiio_depth;
u16 request_sz;
u8 *request;
dma_addr_t request_dma;
u32 request_dma_sz;
struct pcie_sg_list *pcie_sg_lookup;
spinlock_t scsi_lookup_lock;
int pending_io_count;
wait_queue_head_t reset_wq;
u16 *io_queue_num;
struct dma_pool *pcie_sgl_dma_pool;
u32 page_size;
struct chain_lookup *chain_lookup;
struct list_head free_chain_list;
struct dma_pool *chain_dma_pool;
ulong chain_pages;
u16 max_sges_in_main_message;
u16 max_sges_in_chain_message;
u16 chains_needed_per_io;
u32 chain_depth;
u16 chain_segment_sz;
u16 chains_per_prp_buffer;
u16 hi_priority_smid;
u8 *hi_priority;
dma_addr_t hi_priority_dma;
u16 hi_priority_depth;
struct request_tracker *hpr_lookup;
struct list_head hpr_free_list;
u16 internal_smid;
u8 *internal;
dma_addr_t internal_dma;
u16 internal_depth;
struct request_tracker *internal_lookup;
struct list_head internal_free_list;
u8 *sense;
dma_addr_t sense_dma;
struct dma_pool *sense_dma_pool;
u16 reply_sz;
u8 *reply;
dma_addr_t reply_dma;
u32 reply_dma_max_address;
u32 reply_dma_min_address;
struct dma_pool *reply_dma_pool;
u16 reply_free_queue_depth;
__le32 *reply_free;
dma_addr_t reply_free_dma;
struct dma_pool *reply_free_dma_pool;
u32 reply_free_host_index;
u16 reply_post_queue_depth;
struct reply_post_struct *reply_post;
u8 rdpq_array_capable;
u8 rdpq_array_enable;
u8 rdpq_array_enable_assigned;
struct dma_pool *reply_post_free_dma_pool;
struct dma_pool *reply_post_free_array_dma_pool;
Mpi2IOCInitRDPQArrayEntry *reply_post_free_array;
dma_addr_t reply_post_free_array_dma;
u8 reply_queue_count;
struct list_head reply_queue_list;
u8 combined_reply_queue;
u8 combined_reply_index_count;
u8 smp_affinity_enable;
resource_size_t __iomem **replyPostRegisterIndex;
struct list_head delayed_tr_list;
struct list_head delayed_tr_volume_list;
struct list_head delayed_sc_list;
struct list_head delayed_event_ack_list;
u8 temp_sensors_count;
struct mutex pci_access_mutex;
u8 *diag_buffer[MPI2_DIAG_BUF_TYPE_COUNT];
u32 diag_buffer_sz[MPI2_DIAG_BUF_TYPE_COUNT];
dma_addr_t diag_buffer_dma[MPI2_DIAG_BUF_TYPE_COUNT];
u8 diag_buffer_status[MPI2_DIAG_BUF_TYPE_COUNT];
u32 unique_id[MPI2_DIAG_BUF_TYPE_COUNT];
u32 product_specific[MPI2_DIAG_BUF_TYPE_COUNT][23];
u32 diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT];
u32 ring_buffer_offset;
u32 ring_buffer_sz;
struct htb_rel_query htb_rel;
u8 reset_from_user;
u8 is_warpdrive;
u8 is_mcpu_endpoint;
u8 hide_ir_msg;
u8 mfg_pg10_hide_flag;
u8 hide_drives;
spinlock_t diag_trigger_lock;
u8 diag_trigger_active;
u8 atomic_desc_capable;
BASE_READ_REG base_readl;
BASE_READ_REG base_readl_ext_retry;
struct SL_WH_MASTER_TRIGGER_T diag_trigger_master;
struct SL_WH_EVENT_TRIGGERS_T diag_trigger_event;
struct SL_WH_SCSI_TRIGGERS_T diag_trigger_scsi;
struct SL_WH_MPI_TRIGGERS_T diag_trigger_mpi;
u8 supports_trigger_pages;
void *device_remove_in_progress;
u16 device_remove_in_progress_sz;
u8 is_gen35_ioc;
u8 is_aero_ioc;
struct dentry *debugfs_root;
struct dentry *ioc_dump;
#if IS_REACHABLE(CONFIG_HWMON);
struct mpt3sas_hwmon *hwmon;
#endif;
PUT_SMID_IO_FP_HIP put_smid_scsi_io;
PUT_SMID_IO_FP_HIP put_smid_fast_path;
PUT_SMID_IO_FP_HIP put_smid_hi_priority;
PUT_SMID_DEFAULT put_smid_default;
GET_MSIX_INDEX get_msix_index_for_smlio;
u8 multipath_on_hba;
struct list_head port_table_list;
};
π« Members π«
okay bestie, grab a snack because this is the full roster of struct members and there are a lot of them. every single one, in order, no skipping, we are nothing if not thorough π
listβ theioc_list. iconic little linked-list moment.shostβ the shost object πidβ unique adapter id, everyone gets a name tagcpu_countβ number of online cpusnameβ generic ioc string, kinda the nickname of the whole thingtmp_stringβ tmp string used for logging β¨pdevβ pci pdev objectchipβ memory mapped register space, the actual vibes of the hardwarechip_physβ physical address prior to mappinglogging_levelβ seempt3sas_debug.h(go look, i'll wait π«Ά)fwfault_debugβ debugging FW timeoutsir_firmwareβ IR firmware presentbarsβ bitmask of BAR's that must be configuredmask_interruptsβ ignore interrupt πfault_reset_work_qβ fw fault workqueuefault_reset_workβ fw fault workfirmware_event_threadβ fw event work queuefw_event_lockβ no description given, she's mysterious and we respect it πfw_event_listβ list of fw eventsaen_event_read_flagβ event log was readbroadcast_aen_busyβ broadcast aen waiting to be servicedshost_recoveryβ host reset in progress, do not disturb π§ioc_reset_in_progress_lockβ (again, no notes, just pure presence)ioc_link_reset_in_progressβ phy/hard reset in progressignore_loginfosβ ignore loginfos during task managementremove_hostβ flag for when driver unloads, to avoid sending dev resetspci_error_recoveryβ flag to prevent ioc access until slot reset completeswait_for_discovery_to_completeβ flag set at driver load time when waiting on reporting devicesis_driver_loadingβ flag set at driver load timeport_enable_failedβ flag set when port enable has failed πstart_scanβ flag set from scan_start callback, cleared from_mpt3sas_fw_workstart_scan_failedβ means port enable failed, return's the ioc_statusmsix_enableβ flag indicating msix is enabledmsix_vector_countβ number msix vectorscpu_msix_tableβ table for mapping cpus to msix indexcpu_msix_table_szβ table sizeschedule_dead_ioc_flush_running_cmdsβ callback to flush pending commandsioc_coredump_loopβ will have non-zero value when FW is in CoreDump statetimestamp_update_countβ Counter to firetimeSynccommand. also hanging out here:time_sync_intervalβ Time sync interval read from man page 11 β¨total_io_cntβ Gives total IO count, used to load balance the interruptshigh_iops_outstandingβ used to load balance the interrupts within high iops reply queuesmsix_load_balanceβ Enables load balancing of interrupts across the multiple MSIXsthresh_holdβ Max number of reply descriptors processed before updating Host Indexiopoll_q_start_indexβ starting index of io_uring poll queues in reply queue listdrv_internal_flagsβ Bit map internal to driverdrv_support_bitmapβ driver's supported feature bit mapuse_32bit_dmaβ Flag to use 32 bit consistent dma maskscsi_io_cb_idxβ shost generated commandstm_cb_idxβ task management commandstransport_cb_idxβ transport internal commandsscsih_cb_idxβ scsih internal commandsctl_cb_idxβ ctl internal commandsbase_cb_idxβ base internal commandsconfig_cb_idxβ base internal commandstm_tr_cb_idxβ device removal target reset handshaketm_tr_volume_cb_idxβ volume removal target resetbase_cmdsβ name only, no description, still slaying π«Άtransport_cmdsβ name only, same energyscsih_cmdsβ name onlytm_cmdsβ name onlyctl_cmdsβ name onlyconfig_cmdsβ name onlybase_add_sg_singleβ handler for either 32/64 bit sgl'sevent_typeβ bits indicating which events to logevent_contextβ unique id for each logged eventevent_logβ event log pointerevent_masksβ events that are maskedmax_shutdown_latencyβ timeout value for NVMe shutdown operation, which is equal that NVMe drive's RTD3 Entry Latency which has reported maximum RTD3 Entry Latency value among attached NVMe drives.factsβ static facts dataprev_fw_factsβ previous fw facts datapfactsβ static port facts datamanu_pg0β static manufacturing page 0manu_pg10β static manufacturing page 10manu_pg11β static manufacturing page 11bios_pg2β static bios page 2bios_pg3β static bios page 3ioc_pg8β static ioc page 8iounit_pg0β static iounit page 0iounit_pg1β static iounit page 1sas_hbaβ sas host object π¦sas_expander_listβ expander object listenclosure_listβ enclosure object listsas_node_lockβ no notes needed, she lockssas_device_listβ sas device object listsas_device_init_listβ sas device object list (used only at init time)sas_device_lockβ yes queen, lock it downpcie_device_listβ pcie device object listpcie_device_init_listβ pcie device object list (used only at init time)pcie_device_lockβ another lock, another slayio_missing_delayβ time for IO completed by fw when PDR enableddevice_missing_delayβ time for device missing by fw when PDR enabledsas_idβ used for setting volume target IDspcie_target_idβ used for setting pcie target IDsblocking_handlesβ bitmask used to identify which devices need blockingpd_handlesβ bitmask for PD handlespd_handles_szβ size of pd_handle bitmaskconfig_page_szβ config page sizeconfig_pageβ reserve memory for config page payloadconfig_page_dmaβ name only, keeping it lowkeyhba_queue_depthβ hba request queue depthsge_sizeβ sg element size for either 32/64 bitscsiio_depthβ SCSI_IO queue depthrequest_szβ per request frame sizerequestβ pool of request framesrequest_dmaβ name onlyrequest_dma_szβ name onlyscsi_lookup_lockβ name only, a lock, we stanpending_io_countβ name onlyreset_wqβ name onlymax_sges_in_main_messageβ number sg elements in main messagemax_sges_in_chain_messageβ number sg elements per chainchains_needed_per_ioβ max chains per iochain_depthβ total chains allocatedchain_segment_szβ gives the max number of SGEs accommodate on single chain bufferhi_priority_smidβ name onlyhi_priorityβ name onlyhi_priority_dmaβ name onlyhi_priority_depthβ name onlyhpr_lookupβ name onlyhpr_free_listβ name onlyinternal_smidβ name onlyinternalβ name onlyinternal_dmaβ name onlyinternal_depthβ name onlyinternal_lookupβ name onlyinternal_free_listβ name onlysenseβ pool of sensesense_dmaβ name onlysense_dma_poolβ name onlyreply_szβ per reply frame size:replyβ pool of replys:reply_dmaβ name onlyreply_dma_poolβ name onlyreply_free_queue_depthβ reply free depthreply_freeβ pool for reply free queue (32 bit addr)reply_free_dmaβ name onlyreply_free_dma_poolβ name onlyreply_free_host_indexβ tail index in pool to insert free replysreply_post_queue_depthβ reply post queue depthrdpq_array_capableβ FW supports multiple reply queue addresses in ioc_initrdpq_array_enableβ rdpq_array support is enabled in the driverrdpq_array_enable_assignedβ this ensures that rdpq_array_enable flag is assigned only onesreply_queue_countβ number of reply queue'sreply_queue_listβ link list contaning the reply queue inforeplyPostRegisterIndexβ index of next position in Reply Desc Post Queuedelayed_tr_listβ target reset link listdelayed_tr_volume_listβ volume target reset link listdelayed_sc_listβ name only πdelayed_event_ack_listβ name onlytemp_sensors_countβ flag to carry the number of temperature sensorspci_access_mutexβ Mutex to synchronize ioctl, sysfs show path and pci resource handling. PCI resource freeing will lead to free vital hardware/memory resource, which might be in use by cli/sysfs path functions resulting in Null pointer reference followed by kernel crash. To avoid the above race condition we use mutex syncrhonization which ensures the syncrhonization between cli/sysfs_show path.
bestie that last one is not a vibe to mess with β the whole point is avoiding a Null pointer reference followed by kernel crash, so respect the mutex fr fr π
atomic_desc_capableβ Atomic Request Descriptor support.multipath_on_hbaβ flag to determine multipath on hba is enabled or notport_table_listβ list containing HBA's wide/narrow port's info π
πΈ SEE ALSO πΈ
go read these next, the lore is deep and they all live in the kernel file ./drivers/scsi/mpt3sas/mpt3sas_base.h:
struct MPT3SAS_TARGET(9)struct MPT3SAS_DEVICE(9)struct _internal_cmd(9)struct _sas_device(9)pcie_device_get(9)pcie_device_free(9)pcie_device_put(9)struct _boot_device(9)struct _sas_port(9)struct _sas_phy(9)struct _sas_node(9)struct _enclosure_node(9)enum reset_type(9)struct pcie_sg_list(9)struct chain_tracker(9)struct scsiio_tracker(9)struct request_tracker(9)struct _tr_list(9)struct _sc_list(9)struct _event_ack_list(9)struct adapter_reply_queue(9)struct io_uring_poll_queue(9)struct virtual_phy(9)struct hba_port(9)struct htb_rel_query(9)
and that's the whole struct, no cap π«Ά this page lives at ./drivers/scsi/mpt3sas, dated October 2026, and yes it's about struct MPT3SAS_ADAPTER(9) β go forth and read kernel source, you're gonna do amazing bestie πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms