STRUCT MPI3MR_IOC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

struct mpi3mr_ioc β€” the adapter anchor structure that lives in shost private data, bestie. That's the whole vibe. This is the Kernel API Manual entry for it (section 9, obviously πŸ’…), and honestly? She's a big girl. Grab a snack. πŸ“


✨ SYNOPSIS ✨

okay so here's the entire struct, and I mean entire β€” no skipping, no "you get the idea", we're reading the whole thing together like a group chat at 2am 🫢

struct mpi3mr_ioc {
    struct list_head list;
    struct pci_dev *pdev;
    struct Scsi_Host *shost;
    u8 id;
    int cpu_count;
    bool enable_segqueue;
    u32 irqpoll_sleep;
    char name[MPI3MR_NAME_LENGTH];
    char driver_name[MPI3MR_NAME_LENGTH];
    struct mpi3_sysif_registers __iomem *sysif_regs;
    resource_size_t sysif_regs_phys;
    int bars;
    u64 dma_mask;
    u16 msix_count;
    u8 intr_enabled;
    u16 num_admin_req;
    u32 admin_req_q_sz;
    u16 admin_req_pi;
    u16 admin_req_ci;
    void *admin_req_base;
    dma_addr_t admin_req_dma;
    spinlock_t admin_req_lock;
    u16 num_admin_replies;
    u32 admin_reply_q_sz;
    u16 admin_reply_ci;
    u8 admin_reply_ephase;
    void *admin_reply_base;
    dma_addr_t admin_reply_dma;
    atomic_t admin_reply_q_in_use;
    atomic_t admin_pend_isr;
    u32 ready_timeout;
    struct mpi3mr_intr_info *intr_info;
    u16 intr_info_count;
    bool is_intr_info_set;
    u16 num_queues;
    u16 num_op_req_q;
    struct op_req_qinfo *req_qinfo;
    u16 num_op_reply_q;
    struct op_reply_qinfo *op_reply_qinfo;
    struct mpi3mr_drv_cmd init_cmds;
    struct mpi3mr_drv_cmd cfg_cmds;
    struct mpi3mr_ioc_facts facts;
    u16 op_reply_desc_sz;
    u32 num_reply_bufs;
    struct dma_pool *reply_buf_pool;
    u8 *reply_buf;
    dma_addr_t reply_buf_dma;
    dma_addr_t reply_buf_dma_max_address;
    u16 reply_free_qsz;
    u16 reply_sz;
    struct dma_pool *reply_free_q_pool;
    __le64 *reply_free_q;
    dma_addr_t reply_free_q_dma;
    spinlock_t reply_free_queue_lock;
    u32 reply_free_queue_host_index;
    u32 num_sense_bufs;
    struct dma_pool *sense_buf_pool;
    u8 *sense_buf;
    dma_addr_t sense_buf_dma;
    u16 sense_buf_q_sz;
    struct dma_pool *sense_buf_q_pool;
    __le64 *sense_buf_q;
    dma_addr_t sense_buf_q_dma;
    spinlock_t sbq_lock;
    u32 sbq_host_index;
    u32 event_masks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS];
    struct workqueue_struct *fwevt_worker_thread;
    spinlock_t fwevt_lock;
    struct list_head fwevt_list;
    struct workqueue_struct *watchdog_work_q;
    struct delayed_work watchdog_work;
    spinlock_t watchdog_lock;
    u8 is_driver_loading;
    u8 scan_started;
    u16 scan_failed;
    u8 stop_drv_processing;
    u8 device_refresh_on;
    u16 max_host_ios;
    spinlock_t tgtdev_lock;
    struct list_head tgtdev_list;
    u16 max_sgl_entries;
    u32 chain_buf_count;
    struct dma_pool *chain_buf_pool;
    struct chain_element *chain_sgl_list;
    unsigned long *chain_bitmap;
    spinlock_t chain_buf_lock;
    struct mpi3mr_drv_cmd bsg_cmds;
    struct mpi3mr_drv_cmd host_tm_cmds;
    struct mpi3mr_drv_cmd dev_rmhs_cmds[MPI3MR_NUM_DEVRMCMD];
    struct mpi3mr_drv_cmd evtack_cmds[MPI3MR_NUM_EVTACKCMD];
    unsigned long *devrem_bitmap;
    u16 dev_handle_bitmap_bits;
    unsigned long *removepend_bitmap;
    struct list_head delayed_rmhs_list;
    unsigned long *evtack_cmds_bitmap;
    struct list_head delayed_evtack_cmds_list;
    u16 ts_update_counter;
    u16 ts_update_interval;
    u8 reset_in_progress;
    u8 unrecoverable;
    u8 io_admin_reset_sync;
    int prev_reset_result;
    struct mutex reset_mutex;
    wait_queue_head_t reset_waitq;
    u8 prepare_for_reset;
    u16 prepare_for_reset_timeout_counter;
    void *prp_list_virt;
    dma_addr_t prp_list_dma;
    u32 prp_sz;
    u16 diagsave_timeout;
    int logging_level;
    u16 flush_io_count;
    struct mpi3mr_fwevt *current_event;
    struct mpi3_driver_info_layout driver_info;
    u16 change_count;
    u8 pel_enabled;
    u8 pel_abort_requested;
    u8 pel_class;
    u16 pel_locale;
    struct mpi3mr_drv_cmd pel_cmds;
    struct mpi3mr_drv_cmd pel_abort_cmd;
    u32 pel_newest_seqnum;
    void *pel_seqnum_virt;
    dma_addr_t pel_seqnum_dma;
    u32 pel_seqnum_sz;
    u16 op_reply_q_offset;
    u16 default_qcount;
    u16 active_poll_qcount;
    u16 requested_poll_qcount;
    u8 fault_during_init;
    u32 saved_fault_code;
    u32 saved_fault_info[3];
    u64 fwfault_counter;
    struct device bsg_dev;
    struct request_queue *bsg_queue;
    u8 stop_bsgs;
    u8 *logdata_buf;
    u16 logdata_buf_idx;
    u16 logdata_entry_sz;
    spinlock_t adm_req_q_bar_writeq_lock;
    spinlock_t adm_reply_q_bar_writeq_lock;
    atomic_t pend_large_data_sz;
    u32 io_throttle_data_length;
    u32 io_throttle_high;
    u32 io_throttle_low;
    u16 num_io_throttle_group;
    struct mpi3mr_throttle_group_info *throttle_groups;
    u8 sas_transport_enabled;
    u8 scsi_device_channel;
    struct mpi3mr_drv_cmd transport_cmds;
    struct mpi3mr_sas_node sas_hba;
    struct list_head sas_expander_list;
    spinlock_t sas_node_lock;
    struct list_head hba_port_table_list;
    struct list_head enclosure_list;
    struct dma_pool *ioctl_dma_pool;
    struct dma_memory_desc ioctl_sge[MPI3MR_NUM_IOCTL_SGE];
    struct dma_memory_desc ioctl_chain_sge;
    struct dma_memory_desc ioctl_resp_sge;
    bool ioctl_sges_allocated;
    bool reply_trigger_present;
    bool event_trigger_present;
    bool scsisense_trigger_present;
    struct diag_buffer_desc diag_buffers[MPI3MR_MAX_NUM_HDB];
    struct mpi3_driver_page2 *driver_pg2;
    spinlock_t trigger_lock;
    bool snapdump_trigger_active;
    bool trace_release_trigger_active;
    bool fw_release_trigger_active;
    bool pci_err_recovery;
    bool block_on_pci_err;
    atomic_t reply_qfull_count;
    bool prevent_reply_qfull;
    bool seg_tb_support;
    u32 num_tb_segs;
    struct dma_pool *trace_buf_pool;
    struct segments *trace_buf;
    u8 invalid_io_comp;
};

like… look at her. 😭 She starts off so innocent with a lil struct list_head list; and then just keeps going β€” pdev, shost, id, cpu_count, enable_segqueue, irqpoll_sleep, then name[MPI3MR_NAME_LENGTH] and driver_name[MPI3MR_NAME_LENGTH], and that's literally just the first few lines, bestie, we haven't even gotten to the admin queues yet πŸ’€

it's giving "main character energy" the way she's got an admin_req_* block and an admin_reply_* block, then req_qinfo, op_reply_qinfo, init_cmds, cfg_cmds, facts, and the whole reply_buf / sense_buf situation with their pools and dmAs β€” no cap, it's a lot πŸ’…

the vibe check: this is one struct and it is long. Do not skim. Do not assume. Every field above is exactly as written, character for character, and we are not skipping a single one 🫢

btw we're nowhere near done β€” there's more coming, so don't close the tab, iykyk 🌸

πŸ’– Members πŸ’–

okay bestie, buckle up β€” this is the full member list of struct mpi3mr_ioc, and it is long. every single field is here, no skips, no "etc." we don't do that here πŸ’…

  • list β€” List pointer
  • pdev β€” PCI device pointer
  • shost β€” Scsi_Host pointer
  • id β€” Controller ID
  • cpu_count β€” Number of online CPUs
  • irqpoll_sleep β€” usleep unit used in threaded isr irqpoll
  • name β€” Controller ASCII name
  • driver_name β€” Driver ASCII name
  • sysif_regs β€” System interface registers virtual address
  • sysif_regs_phys β€” System interface registers physical address
  • bars β€” PCI BARS
  • dma_mask β€” DMA mask
  • msix_count β€” Number of MSIX vectors used
  • intr_enabled β€” Is interrupts enabled
  • num_admin_req β€” Number of admin requests
  • admin_req_q_sz β€” Admin request queue size
  • admin_req_pi β€” Admin request queue producer index
  • admin_req_ci β€” Admin request queue consumer index
  • admin_req_base β€” Admin request queue base virtual address
  • admin_req_dma β€” Admin request queue base dma address
  • admin_req_lock β€” Admin queue access lock
  • num_admin_replies β€” Number of admin replies
  • admin_reply_q_sz β€” Admin reply queue size
  • admin_reply_ci β€” Admin reply queue consumer index
  • admin_reply_ephase β€” Admin reply queue expected phase
  • admin_reply_base β€” Admin reply queue base virtual address
  • admin_reply_dma β€” Admin reply queue base dma address
  • admin_reply_q_in_use β€” Queue is handled by poll/ISR
  • admin_pend_isr β€” Count of unprocessed admin ISR/poll calls due to another thread processing replies
  • ready_timeout β€” Controller ready timeout
  • intr_info β€” Interrupt cookie pointer
  • intr_info_count β€” Number of interrupt cookies
  • is_intr_info_set β€” Flag to indicate intr info is setup
  • num_queues β€” Number of operational queues
  • num_op_req_q β€” Number of operational request queues
  • req_qinfo β€” Operational request queue info pointer
  • num_op_reply_q β€” Number of operational reply queues
  • op_reply_qinfo β€” Operational reply queue info pointer
  • init_cmds β€” Command tracker for initialization commands
  • cfg_cmds β€” Command tracker for configuration requests
  • facts β€” Cached IOC facts data
  • op_reply_desc_sz β€” Operational reply descriptor size
  • num_reply_bufs β€” Number of reply buffers allocated
  • reply_buf_pool β€” Reply buffer pool
  • reply_buf β€” Reply buffer base virtual address
  • reply_buf_dma β€” Reply buffer DMA address
  • reply_buf_dma_max_address β€” Reply DMA address max limit
  • reply_free_qsz β€” Reply free queue size
  • reply_free_q_pool β€” Reply free queue pool
  • reply_free_q β€” Reply free queue base virtual address
  • reply_free_q_dma β€” Reply free queue base DMA address
  • reply_free_queue_lock β€” Reply free queue lock
  • reply_free_queue_host_index β€” Reply free queue host index
  • num_sense_bufs β€” Number of sense buffers
  • sense_buf_pool β€” Sense buffer pool
  • sense_buf β€” Sense buffer base virtual address
  • sense_buf_dma β€” Sense buffer base DMA address
  • sense_buf_q_sz β€” Sense buffer queue size
  • sense_buf_q_pool β€” Sense buffer queue pool
  • sense_buf_q β€” Sense buffer queue virtual address
  • sense_buf_q_dma β€” Sense buffer queue DMA address
  • sbq_lock β€” Sense buffer queue lock
  • sbq_host_index β€” Sense buffer queuehost index
  • event_masks β€” Event mask bitmap
  • fwevt_worker_thread β€” Firmware event worker thread
  • fwevt_lock β€” Firmware event lock
  • fwevt_list β€” Firmware event list
  • watchdog_work_q β€” Fault watchdog worker thread
  • watchdog_work β€” Fault watchdog work
  • watchdog_lock β€” Fault watchdog lock
  • is_driver_loading β€” Is driver still loading
  • scan_started β€” Async scan started
  • scan_failed β€” Asycn scan failed
  • stop_drv_processing β€” Stop all command processing
  • device_refresh_on β€” Don't process the events until devices are refreshed
  • max_host_ios β€” Maximum host I/O count
  • max_sgl_entries β€” Max SGL entries per I/O
  • chain_buf_count β€” Chain buffer count
  • chain_buf_pool β€” Chain buffer pool
  • chain_sgl_list β€” Chain SGL list
  • chain_bitmap β€” Chain buffer allocator bitmap
  • chain_buf_lock β€” Chain buffer list lock
  • bsg_cmds β€” Command tracker for BSG command
  • host_tm_cmds β€” Command tracker for task management commands
  • dev_rmhs_cmds β€” Command tracker for device removal commands
  • evtack_cmds β€” Command tracker for event ack commands
  • devrem_bitmap β€” Device removal bitmap
  • dev_handle_bitmap_bits β€” Number of bits in device handle bitmap
  • removepend_bitmap β€” Remove pending bitmap
  • delayed_rmhs_list β€” Delayed device removal list
  • evtack_cmds_bitmap β€” Event Ack bitmap
  • delayed_evtack_cmds_list β€” Delayed event acknowledgment list
  • ts_update_counter β€” Timestamp update counter
  • ts_update_interval β€” Timestamp update interval
  • reset_in_progress β€” Reset in progress flag
  • unrecoverable β€” Controller unrecoverable flag
  • io_admin_reset_sync β€” Manage state of I/O ops during an admin reset process
  • prev_reset_result β€” Result of previous reset
  • reset_mutex β€” Controller reset mutex
  • reset_waitq β€” Controller reset wait queue
  • prepare_for_reset β€” Prepare for reset event received
  • prepare_for_reset_timeout_counter β€” Prepare for reset timeout
  • prp_list_virt β€” NVMe encapsulated PRP list virtual base
  • prp_list_dma β€” NVMe encapsulated PRP list DMA
  • prp_sz β€” NVME encapsulated PRP list size
  • diagsave_timeout β€” Diagnostic information save timeout
  • logging_level β€” Controller debug logging level
  • flush_io_count β€” I/O count to flush after reset
  • current_event β€” Firmware event currently in process
  • driver_info β€” Driver, Kernel, OS information to firmware
  • change_count β€” Topology change count
  • pel_enabled β€” Persistent Event Log(PEL) enabled or not
  • pel_abort_requested β€” PEL abort is requested or not
  • pel_class β€” PEL Class identifier
  • pel_locale β€” PEL Locale identifier
  • pel_cmds β€” Command tracker for PEL wait command
  • pel_abort_cmd β€” Command tracker for PEL abort command
  • pel_newest_seqnum β€” Newest PEL sequenece number
  • pel_seqnum_virt β€” PEL sequence number virtual address
  • pel_seqnum_dma β€” PEL sequence number DMA address
  • pel_seqnum_sz β€” PEL sequenece number size
  • op_reply_q_offset β€” Operational reply queue offset with MSIx
  • default_qcount β€” Total Default queues
  • active_poll_qcount β€” Currently active poll queue count
  • requested_poll_qcount β€” User requested poll queue count
  • fault_during_init β€” Indicates a firmware fault occurred during initialization
  • saved_fault_code β€” Firmware fault code captured at the time of failure
  • saved_fault_info β€” Additional firmware-provided fault information
  • fwfault_counter β€” Count of firmware faults detected by the driver
  • bsg_dev β€” BSG device structure
  • bsg_queue β€” Request queue for BSG device
  • stop_bsgs β€” Stop BSG request flag
  • logdata_buf β€” Circular buffer to store log data entries
  • logdata_buf_idx β€” Index of entry in buffer to store
  • logdata_entry_sz β€” log data entry size
  • adm_req_q_bar_writeq_lock β€” Admin request queue lock
  • adm_reply_q_bar_writeq_lock β€” Admin reply queue lock
  • pend_large_data_sz β€” Counter to track pending large data
  • io_throttle_data_length β€” I/O size to track in 512b blocks
  • io_throttle_high β€” I/O size to start throttle in 512b blocks
  • io_throttle_low β€” I/O size to stop throttle in 512b blocks
  • num_io_throttle_group β€” Maximum number of throttle groups
  • throttle_groups β€” Pointer to throttle group info structures
  • sas_transport_enabled β€” SAS transport enabled or not
  • scsi_device_channel β€” Channel ID for SCSI devices
  • transport_cmds β€” Command tracker for SAS transport commands
  • sas_hba β€” SAS node for the controller
  • sas_expander_list β€” SAS node list of expanders
  • sas_node_lock β€” Lock to protect SAS node list
  • hba_port_table_list β€” List of HBA Ports
  • enclosure_list β€” List of Enclosure objects
  • ioctl_dma_pool β€” DMA pool for IOCTL data buffers
  • ioctl_sge β€” DMA buffer descriptors for IOCTL data
  • ioctl_chain_sge β€” DMA buffer descriptor for IOCTL chain
  • ioctl_resp_sge β€” DMA buffer descriptor for Mgmt cmd response
  • ioctl_sges_allocated β€” Flag for IOCTL SGEs allocated or not
  • reply_trigger_present β€” Reply trigger present flag
  • event_trigger_present β€” Event trigger present flag
  • scsisense_trigger_present β€” Scsi sense trigger present flag
  • diag_buffers β€” Host diagnostic buffers
  • driver_pg2 β€” Driver page 2 pointer
  • snapdump_trigger_active β€” Snapdump trigger active flag
  • trace_release_trigger_active β€” Trace trigger active flag
  • fw_release_trigger_active β€” Fw release trigger active flag
  • pci_err_recovery β€” PCI error recovery in progress
  • block_on_pci_err β€” Block IO during PCI error recovery
  • reply_qfull_count β€” Occurences of reply queue full avoidance kicking-in
  • prevent_reply_qfull β€” Enable reply queue prevention
  • seg_tb_support β€” Segmented trace buffer support
  • num_tb_segs β€” Number of Segments in Trace buffer
  • trace_buf_pool β€” DMA pool for Segmented trace buffer segments
  • trace_buf β€” Trace buffer segments memory descriptor
  • invalid_io_comp β€” Invalid IO completion

like, that's a lot of fields and every one of them matters, ok? 🫢 next up, more of the page β€” stay tuned bestie ✨

✨ SEE ALSO ✨

okay bestie, you made it to the cross-refs β€” this is the little friend group of pages and kernel bits that live near struct mpi3mr_ioc(9) 🫢

Kernel file ./drivers/scsi/mpi3mr/mpi3mr.h is right there in the mix too πŸ’…

  • struct mpi3mr_nvme_pt_sge(9)
  • struct mpi3mr_buf_map(9)
  • struct mpi3mr_compimg_ver(9)
  • struct segments(9)
  • struct op_req_qinfo(9)
  • struct op_reply_qinfo(9)
  • struct mpi3mr_intr_info(9)
  • struct mpi3mr_throttle_group_info(9)
  • struct mpi3mr_hba_port(9)
  • struct mpi3mr_sas_port(9)
  • struct mpi3mr_sas_phy(9)
  • struct mpi3mr_sas_node(9)
  • struct mpi3mr_enclosure_node(9)
  • struct tgt_dev_sas_sata(9)
  • struct tgt_dev_pcie(9)
  • struct tgt_dev_vd(9)
  • union _form_spec_inf(9)
  • struct mpi3mr_tgt_dev(9)
  • mpi3mr_tgtdev_get(9)
  • mpi3mr_free_tgtdev(9)
  • mpi3mr_tgtdev_put(9)
  • struct mpi3mr_stgt_priv_data(9)
  • struct mpi3mr_drv_cmd(9)
  • union mpi3mr_trigger_data(9)
  • struct trigger_event_data(9)
  • struct diag_buffer_desc(9)
  • struct dma_memory_desc(9)
  • struct chain_element(9)
  • struct scmd_priv(9)
  • struct mpi3mr_fwevt(9)
  • struct delayed_dev_rmhs_node(9)
  • struct delayed_evt_ack_node(9)

no cap, that's the whole list β€” go forth and read, icon behavior only ✨


this page came from ./drivers/scsi/mpi3mr, dated October 2026, and it's all about struct mpi3mr_ioc(9) πŸ’–πŸŽ€

πŸ“¦ where this page comes from