STRUCT CDNS2_ENDPOINT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 in pdev->eps table.
  • dir β€” endpoint direction.
  • num β€” endpoint number (1 - 15).
  • type β€” set to bmAttributes & 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 generate ISO transmition error. Driver sets skip flag when receive a ISO transmition error and 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