STRUCT NPEM(9)
π struct npem(9) β the NPEM device properties glow-up π
okay so bestie, this is a page from the Kernel API Manual and honestly? it's giving "the blueprint for every NPEM LED in your box." let's get into it π§
β¨ NAME β¨
struct npem β NPEM device properties, aka the whole personality of an NPEM device in one struct π«Ά
πΈ SYNOPSIS πΈ
struct npem {
struct pci_dev *dev;
const struct npem_ops *ops;
struct mutex lock;
u16 pos;
u32 supported_indications;
u32 active_indications;
unsigned int active_inds_initialized:1;
int led_cnt;
struct npem_led leds[];
};
look at her. she's structured. she's iconic. π
π MEMBERS π
devβ the PCI device this driver is attached to. like, the whole reason she's here πopsβ backend specific callbacks. the pluggable vibe layer, iykyk πlockβ serializes concurrent access to the NPEM device by multiple LED devices. one at a time, bestie, we do not let the LEDs talk over each other π¦posβ cached offset of the NPEM Capability Register in Configuration Space; only used if NPEM registers are accessed directly and not through_DSM. a little cached shortcut, no cap πsupported_indicationsβ cached bit mask of supported indications; non-indication and reserved bits in the NPEM Capability Register are cleared in this bit mask. so what's actually supported gets to stay in the mask, the rest gets politely β¨ yeeted β¨active_indicationsβ cached bit mask of active indications; non-indication and reserved bits in the NPEM Control Register are cleared in this bit mask. same deal, but for what's lit up rn π₯active_inds_initializedβ whetheractive_indicationshas been initialized; lowkey the messiest member and honestly the most interesting, so listen up:
On Dell platforms, it is required that IPMI drivers are loaded before the GET_STATE_DSM method is invoked: they use an IPMI OpRegion to get/set the active LEDs. By initializing active_indications lazily (on first access to an LED), IPMI drivers are given a chance to load. If they are not loaded in time, users will see various errors on LED access in dmesg. Once they are loaded, the errors go away and LED access becomes possible.
so tl;dr: the laziness is on purpose. it's not a bug, it's a scheduling strategy. if you're seeing LED errors in dmesg right after boot, that's just the IPMI drivers being fashionably late. they show up, the errors dip, and everything slays. πβ¨
led_cntβ size of theledsarray. she counts. she's organized. she ate πledsβ array containing LED class devices of all supported LEDs. the whole squad, all in one array π
π SEE ALSO π
- Kernel file
./drivers/pci/npem.c struct npem_led(9)struct npem_ops(9)dsm_evaluate(9)
go read them, they're all friends, it's a whole friend group π«Ά
and that's the page, bestie! π this little masterpiece lives under ./drivers/pci and it's dated October 2026 β so mark your calendar, <rainbow>struct npem(9) is coming for you` πβ see you there ππ
π¦ 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