STRUCT CDNS2_ENDPOINT(9)
π struct cdns2_endpoint(9) β Kernel API Manual π
okay bestie, welcome to the Kernel API Manual for struct cdns2_endpoint β the extended device side representation of USB endpoint, and it's giving main character energy fr fr. β¨ No cap, this is the whole glow-up.
πΈ NAME πΈ
struct cdns2_endpoint β the extended device side representation of USB endpoint. literally that. π
π¦ SYNOPSIS π¦
struct cdns2_endpoint {
struct usb_ep endpoint;
struct list_head pending_list;
struct list_head deferred_list;
struct cdns2_device *pdev;
char name[20];
struct cdns2_ring ring;
#define EP_ENABLED BIT(0);
#define EP_STALLED BIT(1);
#define EP_STALL_PENDING BIT(2);
#define EP_WEDGE BIT(3);
#define EP_CLAIMED BIT(4);
#define EP_RING_FULL BIT(5);
#define EP_DEFERRED_DRDY BIT(6);
u32 ep_state;
u8 idx;
u8 dir;
u8 num;
u8 type;
int interval;
u8 buffering;
u8 trb_burst_size;
bool skip;
unsigned int wa1_set:1;
struct cdns2_trb *wa1_trb;
unsigned int wa1_trb_index;
unsigned int wa1_cycle_bit:1;
};
the state-bit squad in there is EP_ENABLED, EP_STALLED, EP_STALL_PENDING, EP_WEDGE, EP_CLAIMED, EP_RING_FULL, and EP_DEFERRED_DRDY β all present and accounted for, periodt. π
π§ Members π§
endpointβ the usb endpoint. yes, that's the base one. πpending_listβ list of requests queuing on transfer ring.deferred_listβ list of requests waiting for queuing on transfer ring.pdevβ device associated with endpoint.nameβ a human readable name e.g.ep1out. iconic lil label. π·οΈringβ transfer ring associated with endpoint.ep_stateβ state of endpoint.idxβ index of endpoint inpdev->epstable.dirβ endpoint direction.numβ endpoint number (1 - 15).typeβ set tobmAttributes & USB_ENDPOINT_XFERTYPE_MASK.intervalβ interval between packets used for ISOC and Interrupt endpoint.bufferingβ on-chip buffers assigned to endpoint.trb_burst_sizeβ number of burst used in TRB.skipβ okay so sometimes the controller cannot process isochronous endpoint ring quickly enough π and it will miss some isoc tds on the ring and generateISO transmition error. Driver setsskipflag when receive aISO transmition errorand process the missed TDs on the endpoint ring. that's the whole cautionary tale, bestie.wa1_setβ use WA1.wa1_trbβ TRB assigned to WA1.wa1_trb_indexβ TRB index for WA1.wa1_cycle_bitβ correct cycle bit for WA1.
π₯ SEE ALSO π₯
Kernel file ./drivers/usb/gadget/udc/cdns2/cdns2-gadget.h says hi π β and so do these iconic structs:
struct cdns2_ep0_regs(9)struct cdns2_epx_base(9)struct cdns2_epx_regs(9)struct cdns2_interrupt_regs(9)struct cdns2_usb_regs(9)struct cdns2_adma_regs(9)struct cdns2_trb(9)struct cdns2_ring(9)struct cdns2_request(9)struct cdns2_device(9)
mwah π this page came from source/version ./drivers/usb/gadget/udc/cdns2, dated October 2026 β struct cdns2_endpoint(9), and that's the whole manual, periodt. π«Ά
π¦ 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