STRUCT F_EEM_OPTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct f_eem_opts(9) πŸ’…

okay so welcome to the Kernel API Manual, bestie β€” we're doing EEM function options today and honestly? it's giving "small struct, big responsibilities." let's get into it 🫢


✨ NAME ✨

struct f_eem_opts β€” the EEM function options. that's the whole name, that's the whole vibe. no cap. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

struct f_eem_opts {
    struct usb_function_instance    func_inst;
    struct net_device               *net;
    bool bound;
    int bind_count;
    struct mutex                    lock;
    int refcnt;
 };

six members, one struct, zero skips. we're listing every single one, periodt. 🌸


πŸ‘‘ Members πŸ‘‘

okay so here's the cast of characters β€” main character energy only:

  • func_inst β€” the USB function instance. literally the whole point of the thing, it's a struct usb_function_instance. iconic. ✨
  • net β€” the struct net_device that's associated with the EEM function. it's a pointer, so y'know, handle it like one πŸ’…
  • bound β€” a bool. it's True if the net_device is shared and already pre-registered during the legacy composite driver's bind phase (think multi.c, iykyk). if it's false, then no stress β€” the EEM function will register the net_device itself during its own bind phase. two paths, one truth 🌈
  • bind_count β€” an int that tracks how many configurations the EEM function is bound to. its whole job is preventing double-registration of the net device. not me being the group chat's responsible friend 😭πŸ”₯
  • lock β€” a struct mutex protecting the data from concurrent access by configfs read/write and create symlink/remove symlink operations. it's the bouncer at the door fr fr 🫢
  • refcnt β€” the reference counter for the function instance. it's an int. don't lose track of it, bestie πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/usb/gadget/function/u_eem.h β€” go read the header, it slays πŸ“

ok that's the whole page, no notes. every field accounted for, every doc line intact, we ate and left absolutely no crumbs πŸ§šβ€β™€οΈ

sign-off szn: this little beauty lives in ./drivers/usb/gadget/function and the manual's dated October 2026 β€” see you in the future, bestie, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from