dwc2_hc_write_packet(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Bestie, welcome to the Kernel API Manual page for dwc2_hc_write_packet(9) β€” manual name folded in near the top, exactly as promised. πŸ’–

dwc2_hc_write_packet β€” Writes a packet into the Tx FIFO associated with the Host Channel.


✨ SYNOPSIS ✨

void dwc2_hc_write_packet (struct dwc2_hsotg *hsotg , struct
       dwc2_host_chan *chan );

🫢 ARGUMENTS 🫢

  • hsotg β€” Programming view of DWC_otg controller. That's the whole vibe: it's the programming view of the controller, periodt.
  • chan β€” Information needed to initialize the host channel. Everything you need to get that channel set up. πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

Okay so hear me out, bestie: this function should only be called in Slave mode. Not optional, not a suggestion β€” that's the rule. 🫑

For a channel associated with a non-periodic EP, the non-periodic Tx FIFO is written. For a channel associated with a periodic EP, the periodic Tx FIFO is written. The way it picks the right FIFO based on the EP type? Highkey iconic. ✨

Upon return, the xfer_buf and xfer_count fields in chan are incremented by the number of bytes written to the Tx FIFO. So yes, those fields get updated β€” literally incremented by the byte count. πŸ’…

Bestie, do not come at this function outside Slave mode. It's giving "read the description first" energy. 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/usb/dwc2/hcd.c β€” and now the whole squad, all referenced exactly, no skips:


This page's source/version is ./drivers/usb/dwc2, and it's dated October 2026 β€” bye bestie, drink water, check your FIFOs, and slay the host channel πŸ’–πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from