STRUCT MEI_DEVICE(9)
πΈ 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:
enum mei_dev_pxp_mode(9)enum mei_dev_reset_to_pxp(9)enum mei_cb_file_ops(9)enum mei_cl_io_mode(9)struct mei_dma_dscr(9)struct mei_me_client(9)struct mei_cl_cb(9)struct mei_cl_vtag(9)struct mei_cl(9)struct mei_hw_ops(9)enum mei_pg_event(9)enum mei_pg_state(9)struct mei_fw_version(9)enum mei_dev_kind(9)mei_data2slots(9)mei_hbm2slots(9)mei_slots2data(9)mei_fw_status_str(9)kind_is_gsc(9)kind_is_gscfi(9)
π«Ά cute sign-off: source/version is./drivers/misc/mei, datedOctober 2026, and this whole page is thestruct mei_device(9)manual. Byeeee, go read some kernel headers π
π¦ 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