STRUCT CDNS2_RING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct cdns2_ring(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– β€” this is the page for struct cdns2_ring, aka the transfer ring representation. yes, THE ring. the main character of the USB gadget show πŸ’…


🌸 NAME 🌸

struct cdns2_ring β€” transfer ring representation.

like, it is the ring. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cdns2_ring {
    struct cdns2_trb *trbs;
    dma_addr_t dma;
    int free_trbs;
    u8 pcs;
    u8 ccs;
    int enqueue;
    int dequeue;
 };

not me dropping the whole struct definition like it's a fit pic πŸ“Έ β€” every single field is iconic, let's go through them one by one πŸ‘‘


πŸ’œ Members πŸ’œ

  • trbs β€” pointer to transfer ring. literally where the transfer ring lives, no cap πŸ“
  • dma β€” dma address of transfer ring. the DMA address, bestie β€” because this ring gets accessed by the hardware too, iykyk 🧚
  • free_trbs β€” number of free TRBs in transfer ring. how much room is left in there, fr fr 🫢
  • pcs β€” producer cycle state. the producer cycle state, periodt ✨
  • ccs β€” consumer cycle state. and this one? consumer cycle state. they're a matching set, obsessed πŸ’…
  • enqueue β€” enqueue index in transfer ring. where the next thing goes in, lowkey important πŸ“₯
  • dequeue β€” dequeue index in transfer ring. where things come out. balance. harmony. 🌈
bestie note: nothing here is dangerous or deprecated β€” it's just a struct doing its little struct thing πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/usb/gadget/udc/cdns2/cdns2-gadget.h β€” that's the source of truth, go read it, it ate πŸ’―

and the whole cdns2 fam, all in one group chat:

  • 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_endpoint(9)
  • struct cdns2_request(9)
  • struct cdns2_device(9)

that's the whole squad, no skips 🫑


⭐ and that's the page!! brought to you by the fine people at ./drivers/usb/gadget/udc/cdns2, stamped October 2026, and yes it's still struct cdns2_ring(9) at the bottom, iconic from start to finish πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from