STRUCT CDNSP_RING(9)
π struct cdnsp_ring(9) β Kernel API Manual, but make it make sense π
okay so bestie, welcome to the struct cdnsp_ring glow-up β¨ β this is the kernel API manual page, and honestly? she's the blueprint for describing a transfer, command or event ring. literally the ring's whole personality in one struct π¦
πΈ NAME πΈ
struct cdnsp_ring β the tea on describing a transfer, command or event ring. periodt π
β¨ SYNOPSIS β¨
the vibes, verbatim π
struct cdnsp_ring {
struct cdnsp_segment *first_seg;
struct cdnsp_segment *last_seg;
union cdnsp_trb *enqueue;
struct cdnsp_segment *enq_seg;
union cdnsp_trb *dequeue;
struct cdnsp_segment *deq_seg;
struct list_head td_list;
u32 cycle_state;
unsigned int stream_id;
unsigned int stream_active;
unsigned int stream_rejected;
int num_tds;
unsigned int num_segs;
unsigned int num_trbs_free;
unsigned int bounce_buf_len;
enum cdnsp_ring_type type;
bool last_td_was_short;
struct radix_tree_root *trb_address_map;
};
π«Ά MEMBERS π«Ά
every single field, none skipped, we do not ghost members in this house π€
first_segβ the first segment on the transfer ring. first in line, main character energy πlast_segβ the last segment on the transfer ring. closing the group chat πenqueueβ the SW enqueue pointer address.enq_segβ the SW enqueue segment address.dequeueβ the SW dequeue pointer address.deq_segβ the SW dequeue segment address.td_listβ the transfer descriptor list associated with this ring. it's giving "organized bestie" πcycle_stateβ the current cycle bit. so here's the lore: you write the cycle state into the TRB cycle field to hand ownership of the TRB over to the device controller (that's if we're the producer), or to check whether we own the TRB (that's if we're the consumer). lowkey the whole trust fall of the ring π«±stream_idβ the stream id.stream_activeβ the stream is active β a PRIME packet has been detected β¨stream_rejectedβ this ring has been rejected by host π not the rejection arcnum_tdsβ number of TDs associated with the ring.num_segsβ number of segments.num_trbs_freeβ number of free TRBs on the ring.bounce_buf_lenβ length of the bounce buffer.typeβ ring type: event, transfer, or command ring. (and yeah, the original page also tuckslast_td_was_shortβ TD is short TD β onto this very line, so here it is, no gatekeeping π)last_td_was_shortβ TD is short TD. that's the description, and yes it's the field that lives in the struct β the manpage just glued its description onto thetypeentry above. told you, iykyk πtrb_address_mapβ for mapping physical TRB addresses to segments in stream rings. the matchmaker of the struct, fr fr π§
π SEE ALSO π
all her friends, and we are not leaving anyone out of the group chat π«Ά
Kernel file ./drivers/usb/cdns3/cdnsp-gadget.hstruct 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_ep(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_erst_entry(9)struct cdnsp_erst(9)struct cdnsp_request(9)struct cdnsp_port(9)struct cdnsp_device(9)next_request(9)
and that's the whole page bestie, ate and left no crumbs π this little love letter lives over in ./drivers/usb/cdns3, dated October 2026, and it's filed under struct cdnsp_ring(9) β go be iconic with it πβ¨
π¦ 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