dwc2_hc_halt(9)
π dwc2_hc_halt(9) β the Kernel API Manual, bestie edition
okay so this is a page from the Kernel API Manual, and we're talking about dwc2_hc_halt(9) β no cap, it's the whole "please stop, bestie" button for a host channel. Let's go π
β¨ NAME β¨
dwc2_hc_halt β literally attempts to halt a host channel π
πΈ SYNOPSIS πΈ
void dwc2_hc_halt (struct dwc2_hsotg *hsotg , struct dwc2_host_chan
*chan , enum dwc2_halt_status halt_status );
π ARGUMENTS π
hsotgβ the controller register interface. your main character, the hardware itself π«Άchanβ the host channel you're about to halt. bye queen πhalt_statusβ the reason for halting the channel. spill the receipts, why are we stopping π
π₯ DESCRIPTION π₯
Heads up, bestie, this one has rules: this function should only be called in Slave mode, or to abort a transfer in either Slave mode or DMA mode. Under normal circumstances in DMA mode, the controller is the one who halts the channel β it does that when the transfer is complete, or when some condition pops up that requires the application to step in. so like, don't just call it whenever, iykyk π
In slave mode, it first checks whether there's a free request queue entry, then sets the Channel Enable and Channel Disable bits of the Host Channel Characteristics register of the specified channel to initiate the halt. iconic behavior β¨
But wait β if there is no free request queue entry, it sets only the Channel Disable bit of the HCCHARn register to flush requests for this channel. In that latter case, it sets a flag to indicate that the host channel needs to be halted once a request queue slot opens up. patient queen β³
In DMA mode, it always sets the Channel Enable and Channel Disable bits of the HCCHARn register. The controller makes sure there's space in the request queue before it goes ahead and submits the halt request. no cap, it checks first π§
giant mood: some time may elapse before the core actually flushes any posted requests for this host channel and halts. The Channel Halted interrupt handler is the one that completes the deactivation of the host channel β so don't be out here thinking it's instant π
π SEE ALSO π
Kernel file ./drivers/usb/dwc2/hcd.c β and honestly the whole friend group:
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_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_disconnect(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 page, bestie π«Ά this lil' entry lives over in ./drivers/usb/dwc2, and the version we're all reading is dated October 2026 β screenshot it, cite it, slay it π
β¨
π¦ 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