usb_stop_hcd(9)
π usb_stop_hcd β the Kernel API Manual, bestie edition β¨
okay so we're in the Kernel API Manual today, and the star of the show is usb_stop_hcd(9). she's short, she's sweet, she's the one who turns the lights off π―οΈ
πΈ NAME πΈ
usb_stop_hcd β literally just halt the HCD, no cap π
π¦ SYNOPSIS π¦
void usb_stop_hcd (struct usb_hcd *hcd );
that's it. that's the whole vibe check. she takes one pointer and returns nothing (void), periodt π
π ARGUMENTS π
hcdβ thestruct usb_hcdthat has to be halted π«Ά like, the actual host controller thing you're putting to sleep. this is the one thing you gotta hand her.
β¨ DESCRIPTION β¨
okay so here's what she does, and it's honestly iconic in how simple it is:
- she stops the root-hub polling timer β° β no more polling, we're done here
- then she invokes the HCD's
->stopcallback π₯ β handing the actual shutdown off to the driver's own stop routine
that's the whole function. two things. very main character energy for such a tiny amount of code π ngl, sometimes the smallest functions ate the hardest.
π SEE ALSO π
if you wanna go deeper (and you know you do, iykyk), the kernel file ./drivers/usb/core/hcd.c is where it all lives π and here's the whole friend group, all present and accounted for:
ascii2desc(9)rh_string(9)usb_bus_init(9)usb_register_bus(9)usb_deregister_bus(9)register_root_hub(9)usb_calc_bus_time(9)usb_hcd_link_urb_to_ep(9)usb_hcd_check_unlink_urb(9)usb_hcd_unlink_urb_from_ep(9)usb_hcd_giveback_urb(9)usb_hcd_alloc_bandwidth(9)usb_hcd_reset_endpoint(9)usb_alloc_streams(9)usb_free_streams(9)usb_hcd_resume_root_hub(9)usb_bus_start_enum(9)usb_hcd_irq(9)usb_hc_died(9)usb_create_shared_hcd(9)usb_create_hcd(9)usb_add_hcd(9)usb_remove_hcd(9)
like a whole group chat of USB core functions, and usb_stop_hcd is the one who says "okay guys, wrap it up" ππ«Ά
reminder bestie: this page is straight out of ./drivers/usb/core, dated October 2026 π
β¨ so go forth, halt that HCD, and slay the shutdown π
ππ·
π¦ 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