STRUCT CDNS3_ENDPOINT(9)
πΈ NAME πΈ
okay so bestie, welcome to struct cdns3_endpoint β it's literally the extended device side representation of USB endpoint. that's the whole vibe. it's giving "the endpoint, but make it extra" π
β¨ SYNOPSIS β¨
like, here's the whole fit, no cap:
struct cdns3_endpoint {
struct usb_ep endpoint;
struct list_head pending_req_list;
struct list_head deferred_req_list;
struct list_head wa2_descmiss_req_list;
int wa2_counter;
struct cdns3_trb *trb_pool;
dma_addr_t trb_pool_dma;
struct cdns3_device *cdns3_dev;
char name[20];
#define EP_ENABLED BIT(0);
#define EP_STALLED BIT(1);
#define EP_STALL_PENDING BIT(2);
#define EP_WEDGE BIT(3);
#define EP_TRANSFER_STARTED BIT(4);
#define EP_UPDATE_EP_TRBADDR BIT(5);
#define EP_PENDING_REQUEST BIT(6);
#define EP_RING_FULL BIT(7);
#define EP_CLAIMED BIT(8);
#define EP_DEFERRED_DRDY BIT(9);
#define EP_QUIRK_ISO_OUT_EN BIT(10);
#define EP_QUIRK_END_TRANSFER BIT(11);
#define EP_QUIRK_EXTRA_BUF_DET BIT(12);
#define EP_QUIRK_EXTRA_BUF_EN BIT(13);
#define EP_TDLCHK_EN BIT(15);
#define EP_CONFIGURED BIT(16);
u32 flags;
struct cdns3_request *descmis_req;
u8 dir;
u8 num;
u8 type;
u8 mult;
u8 bMaxBurst;
u16 wMaxPacketSize;
int interval;
int free_trbs;
int num_trbs;
int alloc_ring_size;
u8 pcs;
u8 ccs;
int enqueue;
int dequeue;
u8 trb_burst_size;
unsigned int wa1_set:1;
struct cdns3_trb *wa1_trb;
unsigned int wa1_trb_index;
unsigned int wa1_cycle_bit:1;
unsigned int use_streams:1;
unsigned int prime_flag:1;
u32 ep_sts_pending;
u16 last_stream_id;
u16 pending_tdl;
unsigned int stream_sg_idx;
};
π Members π
bestie. buckle up. we're going member by member and i'm gonna make it make sense π«Ά
endpointβ the usb endpoint. yeah. that's it. the actual endpoint, in the flesh.pending_req_listβ the list of requests that are queuing on the transfer ring. they're in line, they're waiting, they're being patient πdeferred_req_listβ the list of requests waiting for queuing on the transfer ring. so not even in line yet β they're in the waiting room of the waiting room πwa2_descmiss_req_listβ the list of requests internally allocated by the driver. house-made, not user-submitted, iykyk.trb_poolβ the transfer ring, aka an array of transaction buffers. it's the whole pool, babes πtrb_pool_dmaβ the dma address of that transfer ring. the pool's mailing address, basically.cdns3_devβ the device associated with this endpoint. they're linked. main character and their plus-one πnameβ a human readable name, e.g.ep1out. cute little nametag energy πflagsβ specify the current state of endpoint. it's the mood ring. it's the vibe check. (all thoseEP_*defines up there? yeah, that's this.)descmis_reqβ internal transfer object used for getting data from on-chip buffer. heads up tho: it can happen only if the function driver doesn't sendusb_requestobject on time. so like, this is the driver's backup plan. not the ideal timeline πdirβ endpoint direction. which way we goin'.numβ endpoint number, and the range is exactly1 - 15.typeβ set tobmAttributes & USB_ENDPOINT_XFERTYPE_MASK. yes, keep the exact expression, it's load-bearing β¨intervalβ interval between packets, used for ISOC endpoint. the rhythm section.free_trbsβ number of free TRBs in transfer ring. how much room is left in the pool.num_trbsβ number of all TRBs in transfer ring. the total headcount, not just the available ones.alloc_ring_sizeβ size of the allocated TRB ring.pcsβ producer cycle state.ccsβ consumer cycle state. (pcs's other half, they're a duo π¦)enqueueβ enqueue index in transfer ring.dequeueβ dequeue index in transfer ring. (they're literally the in-and-out of the same ring, obsessed.)trb_burst_sizeβ number of burst used in trb.
ngl bestie, some of the members in that struct above don't get their own blurb in this section β that's just how the page is, so i'm not gonna make stuff up about them. the facts stay facts, periodt π
π¦ SEE ALSO π¦
go read these next, they're all in the kernel file ./drivers/usb/cdns3/cdns3-gadget.h:
struct cdns3_usb_regs(9)struct cdns3_trb(9)struct cdns3_aligned_buf(9)struct cdns3_request(9)struct cdns3_device(9)
okay that's the whole page!! this one came from ./drivers/usb/cdns3, it's dated October 2026, and it lives in the Kernel API Manual as struct cdns3_endpoint(9). slay, you read the whole thing, i'm so proud of you π₯Ήπβ¨
π¦ 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