dwc2_hc_start_transfer(9)
π dwc2_hc_start_transfer(9) π
okay bestie, welcome to the Kernel API Manual entry for dwc2_hc_start_transfer β the host-channel transfer setup function that is genuinely doing the most so your data transfer can simply exist. Itβs giving βsmall function, big USB energyβ β¨.
πΈ NAME πΈ
dwc2_hc_start_transfer β does the setup for a data transfer for a host channel and starts the transfer. Like, it preps the whole situation and then hits go. No cap. π
β¨ SYNOPSIS β¨
void dwc2_hc_start_transfer (struct dwc2_hsotg *hsotg , struct
dwc2_host_chan *chan );
π ARGUMENTS π
hsotgβ the programming view of the DWC_otg controller. Thatβs the controllerβs main-character data, iykyk. πchanβ the information needed to initialize the host channel. Heads up: thexfer_lenvalue may be reduced to accommodate the max widths of theXferSizeandPktCntfields in theHCTSIZnregister, and themulti_countvalue may be changed to reflect the finalxfer_lenvalue. The way thatβs a whole little fine-print moment π.
π¦ DESCRIPTION π¦
This function may be called in either Slave mode or DMA mode. In Slave mode, the caller must ensure that there is sufficient space in the request queue and Tx Data FIFO. Like, actually ensure it β no vibes-only checking, bestie π.
For an OUT transfer in Slave mode, it loads a data packet into the appropriate FIFO. If necessary, additional data packets are loaded in the Host ISR. Slay, but make it FIFO π.
For an IN transfer in Slave mode, a data packet is requested. The data packets are unloaded from the Rx FIFO in the Host ISR. If necessary, additional data packets are requested in the Host ISR. The Host ISR is lowkey doing the most here π .
For a PING transfer in Slave mode, the Do Ping bit is set in the HCTSIZ register along with a packet count of 1 and the channel is enabled. This causes a single PING transaction to occur. Other fields in HCTSIZ are simply set to 0 since no data transfer occurs in this case. Iconic little ping-only moment β¨.
For a PING transfer in DMA mode, the HCTSIZ register is initialized with all the information required to perform the subsequent data transfer. In addition, the Do Ping bit is set in the HCTSIZ register. In this case, the controller performs the entire PING protocol, then starts the data transfer. Itβs giving βping first, transfer later,β and honestly? Obsessed π₯.
π SEE ALSO π
Kernel file ./drivers/usb/dwc2/hcd.c β go read these too, bestie:
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_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)
xoxo, your Kernel API Manual bestie π«Ά β this cutie is the dwc2_hc_start_transfer(9) page from source/version ./drivers/usb/dwc2, dated October 2026. Bye bestie, go start that transfer responsibly ππ
π¦ 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