dwc2_queue_transaction(9)
β¨ dwc2_queue_transaction β¨
okay bestie, welcome to the dwc2_queue_transaction(9) page from the Kernel API Manual π
this one's a little kernel function that tries to queue up ONE single transaction request β just one! β for a host channel that's tied to either a periodic or a non-periodic transfer. that's the whole vibe. π
πΈ NAME πΈ
dwc2_queue_transaction β attempts to queue a single transaction request for a host channel associated with either a periodic or non-periodic transfer π¦
β¨ SYNOPSIS β¨
int dwc2_queue_transaction (struct dwc2_hsotg *hsotg , struct
dwc2_host_chan *chan , u16 fifo_dwords_avail );
π ARGUMENTS π
hsotgβ the HCD state structure π«Ά like, the main character state blobchanβ host channel descriptor associated with either a periodic or a non-periodic transferfifo_dwords_availβ number of DWORDs available in the periodic Tx FIFO for periodic transfers, or the non-periodic Tx FIFO for non-periodic transfers π (yes, it's a different FIFO depending on your transfer type, keep up bestie)
β RETURN β
1β a request got queued, and more requests may be needed to complete the transfer π (there's more work to do, slay)0β no more requests are required for this transfer, we're done here periodt-1β there is insufficient space in the Tx FIFO π the vibes are not immaculate, the FIFO said no
π¦ DESCRIPTION π¦
so this function assumes there is space available in the appropriate request queue. like, it's trusting you on that one, no cap. π
for an OUT transfer or a SETUP transaction in Slave mode, it checks whether space is available in the appropriate Tx FIFO. so it does an actual vibe check on the FIFO for those cases π
β οΈ must be called with interrupt disabled AND spinlock held. both. not one, both. this is not optional and I am not joking around about it π₯
π 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_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_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_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)
okay that's the whole page, you ate that fr fr π this iconic little entry lives under ./drivers/usb/dwc2 and it's dated October 2026 β so yeah, mark your calendar bestie, and remember: interrupts off, spinlock held, and the FIFO's the one who decides. π§ββοΈβ¨π«Ά
π¦ 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