STRUCT MHI_EVENT_CONFIG(9)
π struct mhi_event_config β the event ring config glow-up π
okay so this is from the Kernel API Manual (section 9, bestie, the kernel section), and it's literally the blueprint for a controller's event ring. it's giving "settings page for one very specific ring" and honestly? iconic. let's get into it π
β¨ NAME β¨
struct mhi_event_config β the event ring configuration structure for controller π¦
like, this whole struct is the vibe check for how an event ring behaves. num_elements, irqs, priorities, the works. no cap, every field matters.
πΈ SYNOPSIS πΈ
struct mhi_event_config {
u32 num_elements;
u32 irq_moderation_ms;
u32 irq;
u32 channel;
u32 priority;
enum mhi_db_brst_mode mode;
enum mhi_er_data_type data_type;
bool hardware_event;
bool client_managed;
bool offload_channel;
};
look at her. ten fields. every single one of them copy-pasted exactly, because we do not mess with kernel structs π
π«Ά Members π«Ά
the big four (numbers & irqs)
num_elementsβ literally how many elements can be queued to this ring. that's the capacity, bestie. that's how much room she has to hold stuff π¦irq_moderation_msβ delays the irq so extra events can get aggregated together. yes, it's a delay, it's on purpose, it's batching π§ this is a "wait a sec, let more of them pile up" situation.irqβ the IRQ that's associated with this ring. the actual interrupt line, fr fr β‘channelβ the dedicated channel number. and here's the fun part:U32_MAXmeans it's a non-dedicated ring. so if you seeU32_MAXchilling there, she's not tied to any one channel πpriorityβ priority of this ring. and the manpage literally says "Use 1 for now" π so yeah, just put 1. it's giving placeholder-that-became-canon.
the enum girlies
modeβ the doorbell mode. that'senum mhi_db_brst_modeterritory, iykyk πdata_typeβ the type of data this ring will process. that'senum mhi_er_data_type. she's picky about what she handles π
the three bool besties (all bool, all lowercase, all important)
hardware_eventβ this ring is associated with hardware channels. so: yes she is a hardware event ring, or no she isn't π₯οΈclient_managedβ this ring is client managed. the client's got the aux, she's running her own show πoffload_channelβ this ring is associated with an offloaded channel. omg offload, we love a delegating queen π
lowkey the whole point: you fill out this struct so the controller knows exactly what kind of event ring it's dealing with. flags on, flags off, numbers in the right slots. that's the gig π«‘
π SEE ALSO π
the whole friend group, no one left out π«Ά the source of truth here is Kernel file ./include/linux/mhi.h, and here's literally all of it:
enum mhi_callback(9)enum mhi_flags(9)enum mhi_device_type(9)enum mhi_ch_type(9)struct mhi_buf(9)struct image_info(9)struct mhi_link_info(9)enum mhi_ee_type(9)enum mhi_state(9)enum mhi_ch_ee_mask(9)enum mhi_er_data_type(9)enum mhi_db_brst_mode(9)struct mhi_channel_config(9)struct mhi_controller_config(9)struct mhi_controller(9)struct mhi_device(9)struct mhi_result(9)struct mhi_driver(9)mhi_alloc_controller(9)mhi_free_controller(9)mhi_register_controller(9)mhi_unregister_controller(9)__mhi_driver_register(9)mhi_driver_unregister(9)mhi_set_mhi_state(9)mhi_notify(9)mhi_get_free_desc_count(9)mhi_prepare_for_power_up(9)mhi_async_power_up(9)mhi_sync_power_up(9)mhi_power_down(9)mhi_power_down_keep_dev(9)mhi_unprepare_after_power_down(9)mhi_pm_suspend(9)mhi_pm_resume(9)mhi_pm_resume_force(9)mhi_download_rddm_image(9)mhi_force_rddm_mode(9)mhi_get_exec_env(9)mhi_get_mhi_state(9)mhi_soc_reset(9)mhi_device_get_sync(9)mhi_device_put(9)mhi_prepare_for_transfer(9)mhi_unprepare_from_transfer(9)mhi_queue_buf(9)mhi_queue_skb(9)mhi_queue_is_full(9)mhi_get_channel_doorbell_offset(9)
k that's the page!! π
this came out of ./include/linux, dated October 2026 β so yes, future-dated manpage energy, we stan a timeless icon β go configure your event rings responsibly bestie, and remember: priority stays at 1 for now. periodt. ππ
π¦ 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