shutdown_device(9)
π shutdown_device(9) β like, the "everybody chill" button
okay bestie, welcome to the kernel API manual π this one's shutdown_device(9), and it's genuinely one of the more chill pages in here β short, sweet, and it does exactly what it says on the tin. no cap.
β¨ NAME β¨
shutdown_device β shut down a device π«Ά
like... that's it. that's the whole name. iconic behaviour honestly.
πΈ SYNOPSIS πΈ
void shutdown_device (struct hfi1_devdata *dd );
no return value, so don't go looking for one β she gives you nothing back except a quieter device π
π¦ ARGUMENTS π¦
ddβ thehfi1_ibdevice. that's the one you're telling to go to sleep π
β DESCRIPTION β
so here's the vibe π you call this when you're about to unload the driver, and you need the device to please stop making noise. also called when the device gets administratively disabled β same energy, different reason.
π¨ important bestie detail: it does not free any data structures. zero. none. it's not a cleanup function, it's a "quiet down" function. do not conflate them, i am begging π
and because nothing actually gets torn down, everything it does has to be set up again by hfi1_init(dd, 1). so if you're planning to keep using this device afterwards, that call is not optional β it's the whole bit π₯
π SEE ALSO π
go read the kernel file ./drivers/infiniband/hw/hfi1/init.c β that's where the actual lore lives π and while you're in the neighborhood, these fine functions are all linked up:
hfi1_rcd_free(9)hfi1_rcd_put(9)hfi1_rcd_get(9)allocate_rcd_index(9)hfi1_rcd_get_by_index_safe(9)hfi1_rcd_get_by_index(9)hfi1_free_ctxt(9)init_after_reset(9)create_workqueues(9)destroy_workqueues(9)enable_general_intr(9)hfi1_init(9)hfi1_free_ctxtdata(9)hfi1_free_devdata(9)hfi1_alloc_devdata(9)hfi1_create_rcvhdrq(9)hfi1_setup_eagerbufs(9)
and that's the whole page, bestie π
signed off from ./drivers/infiniband/hw/hfi1, dated October 2026, and we are out β mwah πβ¨π¦
π¦ 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