STRUCT DWC2_HSOTG_EP(9)
π NAME π
okay so bestie, welcome to the struct dwc2_hsotg_ep(9) page from the Kernel API Manual β¨ this whole thing is the driver endpoint definition, and we're gonna walk through every single member like it's a group-chat recap. no skipping, no cap π
β¨ SYNOPSIS β¨
here's the struct in all its iconic glory, copied exactly β she's sensitive about formatting, so don't touch:
struct dwc2_hsotg_ep {
struct usb_ep ep;
struct list_head queue;
struct dwc2_hsotg *parent;
struct dwc2_hsotg_req *req;
struct dentry *debugfs;
unsigned long total_data;
unsigned int size_loaded;
unsigned int last_load;
unsigned int fifo_load;
unsigned short fifo_size;
unsigned short fifo_index;
unsigned char dir_in;
unsigned char map_dir;
unsigned char index;
unsigned char mc;
u16 interval;
unsigned int halted:1;
unsigned int periodic:1;
unsigned int isochronous:1;
unsigned int send_zlp:1;
unsigned int wedged:1;
unsigned int target_frame;
#define TARGET_FRAME_INITIAL 0xFFFFFFFF;
bool frame_overrun;
dma_addr_t desc_list_dma;
struct dwc2_dma_desc *desc_list;
u8 desc_count;
unsigned int next_desc;
unsigned int compl_desc;
char name[10];
};
literally every field is right there. periodt π«Ά
π§ Members π§
epβ the gadget-layer representation of the endpoint. main character energy.queueβ the queue of requests for this endpoint. it's giving "line starts here" πparentβ a reference back to the parent device structure. gotta know where you came from.reqβ the current request that the endpoint is processing. this is used to indicate a request has been loaded onto the endpoint and has yet to be completed β maybe because data still needs to move, or simply because we're awaiting an ack from the core that all the data has been completed. lowkey suspenseful πdebugfsβ the file entry for the debugfs file for this endpoint. debug girlie representation β¨total_dataβ the total number of data bytes done. she's counting.size_loadedβ the last loaded size forDxEPTSIZEfor periodic IN.last_loadβ the offset of data for the last start of request.fifo_loadβ the amount of data loaded into the FIFO (periodic IN).fifo_sizeβ the size of the FIFO (for periodic IN endpoints).fifo_indexβ for Dedicated FIFO operation, onlyFIFO0can be used forEP0. noted.dir_inβ set to true if this endpoint is of the IN direction, which means it is sending data to the Host.map_dirβ set to the value ofdir_inwhen the DMA buffer is mapped.indexβ the index for the endpoint registers.mcβ Multi Count β number of transactions per microframe.intervalβ interval for periodic endpoints, in frames or microframes.haltedβ set if the endpoint has been halted. πperiodicβ set if this is a periodic ep, such as Interrupt.isochronousβ set if this is a isochronous ep.send_zlpβ set if we need to send a zero-length packet. tiny but powerful.wedgedβ set if ep is wedged. oh no πtarget_frameβ targeted frame num to setup next ISOC transfer. also, the struct carries#define TARGET_FRAME_INITIAL 0xFFFFFFFF;right there in the synopsis, iconic.frame_overrunβ indicates SOF number overrun inDSTS.desc_list_dmaβ the DMA address of descriptor chain currently in use.desc_listβ pointer to descriptor DMA chain head currently in use.desc_countβ count of entries within the DMA descriptor chain of EP.next_descβ index of next free descriptor in the ISOC chain under SW control.compl_descβ index of next descriptor to be completed byxFerComplete.nameβ the name array passed to the USB core.char name[10], bestie β ten characters of pure identity π
πΈ Description πΈ
so this is the driver's state for each registered endpoint, allowing it to keep track of transactions that need doing. each endpoint has a lock to protect the state, to try and avoid using an overall lock for the host controller as much as possible. slay for not making everything one giant lock, honestly π
for periodic IN endpoints, we have fifo_size and fifo_load to try and keep track of the amount of data in the periodic FIFO for each of these β because we don't have a status register that tells us how much is in each of them. π and yes, the original note says this may actually be useless information, as in shared-fifo mode periodic IN acts like a single-frame packet buffer than a fifo. we respect the source's exact vibe.
π SEE ALSO π
- Kernel file
./drivers/usb/dwc2/core.h struct dwc2_hsotg_req(9)struct dwc2_core_params(9)struct dwc2_hw_params(9)struct dwc2_gregs_backup(9)struct dwc2_dregs_backup(9)struct dwc2_hregs_backup(9)struct dwc2_hsotg(9)
mwah π this page lives at ./drivers/usb/dwc2, dated October 2026, and it's all about struct dwc2_hsotg_ep(9) β bye bestie, go read some endpoint registers for me π«Άβ¨
π¦ 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