STRUCT CDNS3_ENDPOINT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 those EP_* 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 send usb_request object 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 exactly 1 - 15.
  • type β€” set to bmAttributes & 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