STRUCT MEI_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct mei_device β€” MEI private device struct. This is the struct mei_device(9) page from the Kernel API Manual, bestie, and it's literally the home of MEI's private device struct. ✨

✨ SYNOPSIS ✨

Here's the whole struct, copied exactly β€” we do not play with code in this house πŸ’…:

       struct mei_device {
           struct device *parent;
           struct device dev;
           struct cdev *cdev;
           int minor;
           struct list_head write_list;
           struct list_head write_waiting_list;
           struct list_head ctrl_wr_list;
           struct list_head ctrl_rd_list;
           u8 tx_queue_limit;
           struct list_head file_list;
           long open_handle_count;
           struct mutex device_lock;
           struct delayed_work timer_work;
           bool recvd_hw_ready;
           bool pg_blocked;
           bool read_fws_need_resume;
           wait_queue_head_t wait_hw_ready;
           wait_queue_head_t wait_pg;
           wait_queue_head_t wait_hbm_start;
           unsigned long reset_count;
           enum mei_dev_state dev_state;
           wait_queue_head_t wait_dev_state;
           enum mei_hbm_state hbm_state;
           enum mei_dev_pxp_mode pxp_mode;
           u16 init_clients_timer;
           enum mei_pg_event pg_event;
         #ifdef CONFIG_PM;
           struct dev_pm_domain pg_domain;
         #endif ;
           unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE];
           u32 rd_msg_hdr[MEI_RD_MSG_BUF_SIZE];
           int rd_msg_hdr_count;
           bool hbuf_is_ready;
           struct mei_dma_dscr dr_dscr[DMA_DSCR_NUM];
           struct hbm_version version;
           unsigned int hbm_f_pg_supported:1;
           unsigned int hbm_f_dc_supported:1;
           unsigned int hbm_f_dot_supported:1;
           unsigned int hbm_f_ev_supported:1;
           unsigned int hbm_f_fa_supported:1;
           unsigned int hbm_f_ie_supported:1;
           unsigned int hbm_f_os_supported:1;
           unsigned int hbm_f_dr_supported:1;
           unsigned int hbm_f_vt_supported:1;
           unsigned int hbm_f_cap_supported:1;
           unsigned int hbm_f_cd_supported:1;
           unsigned int hbm_f_gsc_supported:1;
           struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS];
           unsigned int fw_f_fw_ver_supported:1;
           unsigned int fw_ver_received:1;
           struct rw_semaphore me_clients_rwsem;
           struct list_head me_clients;
           unsigned long me_clients_map[BITS_TO_LONGS( MEI_CLIENTS_MAX)];
           unsigned long host_clients_map[BITS_TO_LONGS( MEI_CLIENTS_MAX)];
           bool allow_fixed_address;
           bool override_fixed_address;
           struct mei_dev_timeouts timeouts;
           struct work_struct reset_work;
           struct work_struct bus_rescan_work;
           struct list_head device_list;
           struct mutex cl_bus_lock;
           enum mei_dev_kind kind;
         #if IS_ENABLED(CONFIG_DEBUG_FS);
           struct dentry *dbgfs_dir;
         #endif ;
           enum mei_dev_reset_to_pxp gsc_reset_to_pxp;
           const struct mei_hw_ops *ops;
           char hw[];
        };

🫢 Members 🫢

Member-by-member vibe check, no skips, no cap:

  • parent β€” device on a bus.
  • dev β€” device object.
  • cdev β€” character device pointer.
  • minor β€” minor number allocated for device.
  • write_list β€” write pending list.
  • write_waiting_list β€” write completion list.
  • ctrl_wr_list β€” pending control write list.
  • ctrl_rd_list β€” pending control read list.
  • tx_queue_limit β€” tx queues per client linit.
  • file_list β€” list of opened handles.
  • open_handle_count β€” number of opened handles.
  • device_lock β€” big device lock.
  • timer_work β€” MEI timer delayed work (timeouts).
  • recvd_hw_ready β€” hw ready message received flag.
  • pg_blocked β€” low power mode is not allowed.
  • read_fws_need_resume β€” the FW status handler needs HW woken from sleep.
  • wait_hw_ready β€” wait queue for receive HW ready message form FW.
  • wait_pg β€” wait queue for receive PG message from FW.
  • wait_hbm_start β€” wait queue for receive HBM start message from FW.
  • reset_count β€” number of consecutive resets.
  • dev_state β€” device state.
  • wait_dev_state β€” wait queue for device state change.
  • hbm_state β€” state of host bus message protocol.
  • pxp_mode β€” PXP device mode.
  • init_clients_timer β€” HBM init handshake timeout.
  • pg_event β€” power gating event.
  • pg_domain β€” runtime PM domain.
  • rd_msg_buf β€” control messages buffer.
  • rd_msg_hdr β€” read message header storage.
  • rd_msg_hdr_count β€” how many dwords were already read from header.
  • hbuf_is_ready β€” query if the host host/write buffer is ready.
  • dr_dscr β€” DMA ring descriptors: TX, RX, and CTRL.
  • version β€” HBM protocol version in use.
  • hbm_f_pg_supported β€” hbm feature pgi protocol.
  • hbm_f_dc_supported β€” hbm feature dynamic clients.
  • hbm_f_dot_supported β€” hbm feature disconnect on timeout.
  • hbm_f_ev_supported β€” hbm feature event notification.
  • hbm_f_fa_supported β€” hbm feature fixed address client.
  • hbm_f_ie_supported β€” hbm feature immediate reply to enum request.
  • hbm_f_os_supported β€” hbm feature support OS ver message.
  • hbm_f_dr_supported β€” hbm feature dma ring supported.
  • hbm_f_vt_supported β€” hbm feature vtag supported.
  • hbm_f_cap_supported β€” hbm feature capabilities message supported.
  • hbm_f_cd_supported β€” hbm feature client dma supported.
  • hbm_f_gsc_supported β€” hbm feature gsc supported.
  • fw_ver β€” FW versions.
  • fw_f_fw_ver_supported β€” fw feature: fw version supported.
  • fw_ver_received β€” fw version received.
  • me_clients_rwsem β€” rw lock over me_clients list.
  • me_clients β€” list of FW clients.
  • me_clients_map β€” FW clients bit map.
  • host_clients_map β€” host clients id pool.
  • allow_fixed_address β€” allow user space to connect a fixed client.
  • override_fixed_address β€” force allow fixed address behavior.
  • timeouts β€” actual timeout values.
  • reset_work β€” work item for the device reset.
  • bus_rescan_work β€” work item for the bus rescan.
  • device_list β€” mei client bus list.
  • cl_bus_lock β€” client bus list lock.
  • kind β€” kind of mei device.
  • dbgfs_dir β€” debugfs mei root directory.
  • gsc_reset_to_pxp β€” state of reset to the PXP mode.
  • ops β€” : hw specific operations.
  • hw β€” hw specific data.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./drivers/misc/mei/mei_dev.h, plus the whole cross-reference squad:

🫢 cute sign-off: source/version is ./drivers/misc/mei, dated October 2026, and this whole page is the struct mei_device(9) manual. Byeeee, go read some kernel headers πŸ’–
πŸ“¦ where this page comes from