STRUCT HOTPLUG_SLOT_OPS(9)
β¨ struct hotplug_slot_ops(9) β¨
okay bestie, gather round, because this is the kernel API manual page for struct hotplug_slot_ops and it's literally the plug-and-play blueprint for hotplug PCI slay π
π NAME π
struct hotplug_slot_ops β the callbacks that the hotplug pci core can use π«Ά
πΈ SYNOPSIS πΈ
no cap, here's the struct in all its glory, every pointer exactly as it lives in the header:
struct hotplug_slot_ops {
int (*enable_slot) (struct hotplug_slot *slot);
int (*disable_slot) (struct hotplug_slot *slot);
int (*set_attention_status) (struct hotplug_slot *slot, u8
value);
int (*hardware_test) (struct hotplug_slot *slot, u32
value);
int (*get_power_status) (struct hotplug_slot *slot, u8
*value);
int (*get_attention_status) (struct hotplug_slot *slot, u8
*value);
int (*get_latch_status) (struct hotplug_slot *slot, u8
*value);
int (*get_adapter_status) (struct hotplug_slot *slot, u8
*value);
int (*reset_slot) (struct hotplug_slot *slot, bool
probe);
};
π¦ Members π¦
enable_slotβ called when the user wants to enable a specific pci slot. it's giving "turn it on bestie" energy β¨disable_slotβ called when the user wants to disable a specific pci slot. the opposite vibe, also iconic π«Άset_attention_statusβ called to set the specific slot's attention LED to the specified value. yes, there's a whole callback just for the blinkenlight π‘hardware_testβ called to run a specified hardware test on the specified slot. science time, no cap π₯get_power_statusβ called to get the current power status of a slot. is it fed or is it starving, we must know β‘get_attention_statusβ called to get the current attention status of a slot. checking the LED's vibe πget_latch_statusβ called to get the current latch status of a slot. the little mechanical gate's whole deal πget_adapter_statusβ called to get see if an adapter is present in the slot or not. (fr fr that's the original wording, we keep it verbatim: "get see") πreset_slotβ optional interface to allow override of a bus reset for the slot for cases where a secondary bus reset can result in spurious hotplug events or where a slot can be reset independent of the bus. optional, but highkey main character behavior π
π Description π
so basically this is the table of function pointers that is passed to the hotplug pci core by a hotplug pci driver. these functions are called by the hotplug pci core when the user wants to do something to a specific slot β like query it for information, set an LED, enable / disable power, etc. it's giving "the driver hands the core a whole menu of things it can do," and honestly? obsessed π§
β SEE ALSO β
- Kernel file
./include/linux/pci_hotplug.hstructhotplug_slot(9)
bestie reminder: reset_slot is the only optional one in this table, and it exists for exactly those two cases listed above. don't invent extra behavior, the manpage is not the vibe, the facts are π
that's the whole page, periodt π from ./include/linux, dated October 2026 β signed off with the source path and version, slay ππ¦π
π¦ 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