STRUCT CDNS2_RING(9)
β¨ 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
- 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