dwc2_hcd_disconnect(9)
π dwc2_hcd_disconnect(9) β the Kernel API Manual page, bestie edition π
okay so this is a page from the Kernel API Manual (yes that's the manual name, we're not copying the header line, we're folding it in like a lil name tag at the party) and it's all about dwc2_hcd_disconnect, one of the USB DWC2 host controller driver girlies. let's get into it β¨
β¨ NAME β¨
dwc2_hcd_disconnect β handles the disconnect of the HCD. that's it, that's the job. it shows up when the HCD gotta disconnect and it handles it, no cap π
π¦ SYNOPSIS π¦
void dwc2_hcd_disconnect (struct dwc2_hsotg *hsotg , bool force );
like, it returns void (it gives nothing back, it's not about that life) and it takes two lil arguments. slay.
πΈ ARGUMENTS πΈ
hsotgβ a pointer tostruct dwc2_hsotg. it's giving "the main character struct" fr fr, everything gets passed through here.forceβ abool. if it's true, we won't try to reconnect even if we see a device connected. like we're being SO serious about leaving. no take-backs, we said what we said π
π DESCRIPTION π
okay here's the important bit, bestie, and it is NOT optional:
must be called with interrupts disabled and the spinlock held. both. at the same time. this is a vibe check you cannot fail π
that's literally the whole description and honestly it's enough β respect the locking rules or the kernel will humble you. periodt.
π SEE ALSO π
the kernel file is ./drivers/usb/dwc2/hcd.c and it's got a whole friend group, iykyk:
dwc2_enable_common_interrupts(9)dwc2_enable_host_interrupts(9)dwc2_disable_host_interrupts(9)dwc2_calc_frame_interval(9)dwc2_read_packet(9)dwc2_dump_channel_info(9)dwc2_hc_init(9)dwc2_hc_halt(9)dwc2_hc_cleanup(9)dwc2_hc_set_even_odd_frame(9)dwc2_hc_write_packet(9)dwc2_hc_do_ping(9)dwc2_hc_start_transfer(9)dwc2_hc_start_transfer_ddma(9)dwc2_hc_continue_transfer(9)dwc2_hcd_start(9)dwc2_hcd_connect(9)dwc2_hcd_rem_wakeup(9)dwc2_hcd_stop(9)dwc2_core_init(9)dwc2_core_host_init(9)dwc2_assign_and_init_hc(9)dwc2_hcd_select_transactions(9)dwc2_queue_transaction(9)dwc2_hcd_queue_transactions(9)dwc2_port_suspend(9)dwc2_port_resume(9)dwc2_host_get_tt_info(9)dwc2_host_put_tt_info(9)dwc2_backup_host_registers(9)dwc2_restore_host_registers(9)dwc2_host_enter_hibernation(9)dwc2_host_enter_partial_power_down(9)dwc2_host_enter_clock_gating(9)dwc2_host_exit_clock_gating(9)
and that's the whole page, bestie, you ate that π«Ά go forth, hold that spinlock, disable those interrupts, and remember: this came from ./drivers/usb/dwc2, dated October 2026, and it lives at section dwc2_hcd_disconnect(9) forever and ever π β¨ π§
π¦ 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