STRUCT DWC2_QTD(9)
β¨ NAME β¨
okay so bestie, this page lives in the Kernel API Manual, and it's all about struct dwc2_qtd β aka the Software queue transfer descriptor (QTD). That's the whole vibe. π
πΈ SYNOPSIS πΈ
here's the struct in all its main-character glory, no cap:
struct dwc2_qtd {
enum dwc2_control_phase control_phase;
u8 in_process;
u8 data_toggle;
u8 complete_split;
u8 isoc_split_pos;
u16 isoc_frame_index;
u16 isoc_split_offset;
u16 isoc_td_last;
u16 isoc_td_first;
u32 ssplit_out_xfer_count;
u8 error_count;
u8 n_desc;
u16 isoc_frame_index_last;
u16 num_naks;
struct dwc2_hcd_urb *urb;
struct dwc2_qh *qh;
struct list_head qtd_list_entry;
};
π Members π
okay these are the fields, and yes we're going through every single one because that's the assignment π
control_phaseβ Current phase for control transfers (Setup, Data, or Status). Literally the phase moment.in_processβ Indicates if this QTD is currently processed by HW.data_toggleβ Determines the PID of the next data packet for the data phase of control transfers. Ignored for other transfer types. One of the following values:DWC2_HC_PID_DATA0DWC2_HC_PID_DATA1
complete_splitβ Keeps track of the current split type for FS/LS endpoints on a HS Hub.isoc_split_posβ Position of the ISOC split in full/low speed.isoc_frame_indexβ Index of the next frame descriptor for an isochronous transfer. A frame descriptor describes the buffer position and length of the data to be transferred in the next scheduled (micro)frame of an isochronous transfer. It also holds status for that transaction. The frame index starts at 0.isoc_split_offsetβ Position of the ISOC split in the buffer for the current frame.isoc_td_lastβ Index of last activated isochronous transfer descriptor in Descriptor DMA mode.isoc_td_firstβ Index of first activated isochronous transfer descriptor in Descriptor DMA mode.ssplit_out_xfer_countβ How many bytes transferred during SSPLIT OUT.error_countβ Holds the number of bus errors that have occurred for a transaction within this transfer.n_descβ Number of DMA descriptors for this QTD.isoc_frame_index_lastβ Last activated frame (packet) index, used in descriptor DMA mode only.num_naksβ Number of NAKs received on this QTD.urbβ URB for this transfer.qhβ Queue head for this QTD.qtd_list_entryβ For linking to the QH's list of QTDs.
π¦ Description π¦
So a Queue Transfer Descriptor (QTD) holds the state of a bulk, control, interrupt, or isochronous transfer. A single QTD is created for each URB (of one of these types) submitted to the HCD. The transfer associated with a QTD may require one or multiple transactions. Periodt. β¨
A QTD is linked to a Queue Head, which is entered in either the non-periodic or periodic schedule for execution. When a QTD is chosen for execution, some or all of its transactions may be executed. After execution, the state of the QTD is updated. The QTD may be retired if all its transactions are complete or if an error occurred. Otherwise, it remains in the schedule so more transactions can be executed later. π«Ά
π SEE ALSO π
Kernel file ./drivers/usb/dwc2/hcd.h is the spot, and these are the linked besties:
struct dwc2_host_chan(9)struct dwc2_tt(9)struct dwc2_hs_transfer_time(9)struct dwc2_qh(9)dwc2_handle_hcd_intr(9)dwc2_hcd_stop(9)dwc2_hcd_is_b_host(9)dwc2_hcd_dump_state(9)
source/version: ./drivers/usb/dwc2 Β· date: October 2026 Β· page: struct dwc2_qtd(9) β mwah, that's the whole page, bestie πβ¨
π¦ 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