usb_root_hub_lost_power(9)
β¨ usb_root_hub_lost_power(9) β¨
okay so bestie, this one's a Kernel API Manual moment, and it's honestly giving "quietly important" energy π it's all about what happens when a root hub loses its Vbus power and somebody has to deal with the fallout. no cap.
π NAME π
usb_root_hub_lost_power β the function the HCD calls when the root hub lost Vbus power π«Ά
πΈ SYNOPSIS πΈ
void usb_root_hub_lost_power (struct usb_device *rhdev );
π¦ ARGUMENTS π¦
rhdevβ thestruct usb_devicefor the root hub, literally the main character here π
π DESCRIPTION π
so here's the vibe: the USB host controller driver calls this function when its root hub is resumed and Vbus power has been interrupted, or the controller has been reset. π messy, i know.
what the routine does is mark rhdev as having lost power. periodt. that's the whole assignment, and it does it flawlessly π
then, when the hub driver is resumed, it will take notice π and carry out power-session recovery for all the "USB-PERSIST"-enabled child devices. the others? not so lucky β they will be disconnected π
ngl bestie, that last bit is the important part: if a device isn't "USB-PERSIST"-enabled, it does not get recovered. it gets disconnected. no exceptions mentioned, so don't go making any up π
π₯ SEE ALSO π₯
and now for the friend group β the Kernel file ./drivers/usb/core/hub.c plus literally this whole roster of related functions, all iconic in their own right:
usb_hub_set_port_power(9)usb_hub_clear_tt_buffer(9)usb_remove_device(9)usb_set_device_state(9)usb_disconnect(9)usb_enumerate_device_otg(9)usb_enumerate_device(9)usb_new_device(9)usb_deauthorize_device(9)get_port_ssp_rate(9)hub_hc_release_resources(9)usb_reset_and_verify_device(9)usb_reset_device(9)usb_queue_reset_device(9)usb_hub_find_child(9)usb_get_hub_port_acpi_handle(9)
and that's the whole page, bestie, we ate and left zero crumbs π this lil gem lives in ./drivers/usb/core, it's dated October 2026, and it comes from the Kernel API Manual β so go forth and be the person who actually knows what usb_root_hub_lost_power(9) does πβ¨π
π¦ 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