STRUCT CDNSP_EP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, this is struct cdnsp_ep(9) β€” the extended device side representation of a USB endpoint. It’s giving kernel API manual, section 9, and we’re about to unpack every field like it’s the group chat screenshot everyone keeps asking for πŸ’…βœ¨


✨ SYNOPSIS ✨

the whole struct, no cap:

struct cdnsp_ep {
    struct usb_ep endpoint;
    struct list_head pending_list;
    struct cdnsp_device *pdev;
    u8 number;
    u8 idx;
    u32 interval;
    char name[20];
    u8 direction;
    u8 buffering;
    u8 buffering_period;
    struct cdnsp_ep_ctx *in_ctx;
    struct cdnsp_ep_ctx *out_ctx;
    struct cdnsp_ring *ring;
    struct cdnsp_stream_info stream_info;
    unsigned int ep_state;
  #define EP_ENABLED              BIT(0);
  #define EP_DIS_IN_RROGRESS      BIT(1);
  #define EP_HALTED               BIT(2);
  #define EP_STOPPED              BIT(3);
  #define EP_WEDGE                BIT(4);
  #define EP0_HALTED_STATUS       BIT(5);
  #define EP_HAS_STREAMS          BIT(6);
  #define EP_UNCONFIGURED         BIT(7);
    bool skip;
    union cdnsp_trb  *wa1_nop_trb;
 };

also pending_list is up there living its truth β€” the Members list below doesn’t give it its own blurb, so no invented lore from me 🫢


πŸ‘‘ Members πŸ‘‘

  • endpoint β€” the usb endpoint. literally the USB endpoint part of this whole situation πŸ¦‹
  • pdev β€” the device associated with this endpoint. main character energy, honestly.
  • number β€” endpoint number (1 - 15). yes bestie, that range is exact.
  • idx β€” the device context index (DCI). iykyk.
  • interval β€” interval between packets used for ISOC endpoint.
  • name β€” a human readable name, e.g. ep1out. cute.
  • direction β€” endpoint direction.
  • buffering β€” number of on-chip buffers related to endpoint.
  • buffering_period β€” number of on-chip buffers related to periodic endpoint.
  • in_ctx β€” pointer to input endpoint context structure.
  • out_ctx β€” pointer to output endpoint context structure.
  • ring β€” pointer to transfer ring.
  • stream_info β€” holds stream information.
  • ep_state β€” current state of endpoint. the bit flags are up in the synopsis, bestie.
  • skip β€” sometimes the controller can not process isochronous endpoint ring quickly enough, and it will miss some isoc tds on the ring and generate Missed Service Error Event. set the skip flag when you receive a Missed Service Error Event and process the missed tds on the endpoint ring. highkey important 😭
  • wa1_nop_trb β€” hold pointer to NOP trb. periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/usb/cdns3/cdnsp-gadget.h is the home base, and here’s the whole reference squad:

  • struct cdnsp_cap_regs(9)
  • struct cdnsp_op_regs(9)
  • struct cdnsp_port_regs(9)
  • struct cdnsp_intr_reg(9)
  • struct cdnsp_run_regs(9)
  • struct cdnsp_rev_cap(9)
  • struct cdnsp_doorbell_array(9)
  • struct cdnsp_container_ctx(9)
  • struct cdnsp_slot_ctx(9)
  • struct cdnsp_ep_ctx(9)
  • struct cdnsp_stream_info(9)
  • struct cdnsp_device_context_array(9)
  • struct cdnsp_transfer_event(9)
  • struct cdnsp_link_trb(9)
  • struct cdnsp_event_cmd(9)
  • struct cdnsp_segment(9)
  • struct cdnsp_td(9)
  • struct cdnsp_dequeue_state(9)
  • struct cdnsp_ring(9)
  • struct cdnsp_erst_entry(9)
  • struct cdnsp_erst(9)
  • struct cdnsp_request(9)
  • struct cdnsp_port(9)
  • struct cdnsp_device(9)
  • next_request(9)

okay bye bestie πŸ’… this one came from ./drivers/usb/cdns3, stamped October 2026, and it’s all about struct cdnsp_ep(9). slay.

πŸ“¦ where this page comes from