dwc2_hc_start_transfer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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: the xfer_len value may be reduced to accommodate the max widths of the XferSize and PktCnt fields in the HCTSIZn register, and the multi_count value may be changed to reflect the final xfer_len value. 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:


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