STRUCT EDAC_ECS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct edac_ecs_ops(9) β€” Kernel API Manual

okay bestie, welcome to the ECS device operations vibe check ✨ this is struct edac_ecs_ops, and the headline is: every single element is optional. no cap. all of them. it's giving "choose your own adventure" but make it kernel πŸ’–


✨ SYNOPSIS ✨

struct edac_ecs_ops {
    int (*get_log_entry_type)(struct device *dev, void *drv_data, int fru_id, u32 *val);
    int (*set_log_entry_type)(struct device *dev, void *drv_data, int fru_id, u32 val);
    int (*get_mode)(struct device *dev, void *drv_data, int fru_id, u32 *val);
    int (*set_mode)(struct device *dev, void *drv_data, int fru_id, u32 val);
    int (*reset)(struct device *dev, void *drv_data, int fru_id, u32 val);
    int (*get_threshold)(struct device *dev, void *drv_data, int fru_id, u32 *threshold);
    int (*set_threshold)(struct device *dev, void *drv_data, int fru_id, u32 threshold);
};

like, look at that. a whole little squad of function pointers, all riding the same struct device *dev, void *drv_data, int fru_id trio 🫢 iconic.


πŸŽ€ Members πŸŽ€

okay so here's the roster, one by one, and yes they're all optional so don't come for me πŸ’…

  • get_log_entry_type β€” reads the log entry type value. that's it, that's the whole job 🌸
  • set_log_entry_type β€” sets the log entry type value. the setter to the getter's getter, if you will ✨
  • get_mode β€” reads the mode value πŸ‘‘
  • set_mode β€” sets the mode value πŸ’œ
  • reset β€” resets the ECS counter. clean slate energy, we love a fresh start πŸ¦‹
  • get_threshold β€” reads the threshold count per gigabits of memory cells. yes, per gigabits, that's the unit, don't @ me πŸ“
  • set_threshold β€” sets the threshold count per gigabits of memory cells. same unit, different direction πŸ’«

🌈 SEE ALSO 🌈

if you're the kind of bestie who likes to click through the whole friend group, here's everybody πŸ‘‘

Kernel file ./include/linux/edac.h:

  • enum dev_type(9)
  • enum hw_event_mc_err_type(9)
  • enum mem_type(9)
  • enum edac_type(9)
  • enum scrub_type(9)
  • enum edac_mc_layer_type(9)
  • struct edac_mc_layer(9)
  • struct rank_info(9)
  • struct edac_raw_error_desc(9)
  • edac_get_dimm(9)
  • struct edac_scrub_ops(9)
  • struct edac_mem_repair_ops(9)

ngl the fact that literally every element here is optional is the whole personality of this struct. it's a menu, bestie, not a contract πŸ’€

fr fr that's the whole page 🫢 source lives in ./include/linux, dated October 2026, and it's filed under struct edac_ecs_ops(9) β€” go read the real thing when you need the deep lore, mwah πŸ’‹ periodt.

πŸ“¦ where this page comes from