STRUCT CDNSP_CONTAINER_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct cdnsp_container_ctx(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual ✨ today we're looking at struct cdnsp_container_ctx(9) and honestly? she's the blueprint for every context in the CDNSP gadget stack. no cap. πŸ’…


🌸 NAME 🌸

struct cdnsp_container_ctx β€” literally the container for context data. that's the whole vibe 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cdnsp_container_ctx {
    unsigned int type;
  #define CDNSP_CTX_TYPE_DEVICE   0x1;
  #define CDNSP_CTX_TYPE_INPUT    0x2;
    int size;
    int ctx_size;
    dma_addr_t dma;
    u8 *bytes;
 };

like, look at her. iconic. πŸ‘‘


πŸ’– Members πŸ’–

  • type β€” what kind of context this is. it's used to calculate the offsets to the contexts contained inside. main character energy for real πŸ”₯
  • size β€” the size of the context data.
  • ctx_size β€” the size of the context data structure β€” either 64 or 32 bits.
  • dma β€” the DMA address of bytes. 🧚
  • bytes β€” the raw context data handed over to the HW. yes, raw. we respect her 🫢

🌈 Description 🌈

so what is she, actually? she represents either a Device or Input context β€” pick your fighter πŸ’… and she holds a pointer to the raw memory used for the context (bytes) plus the DMA address of it (dma). that's it, that's the whole personality, and she ate. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/usb/cdns3/cdnsp-gadget.h β€” and honestly the whole friend group is in here, go say hi:

  • 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_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_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)

ngl, that's a lot of friends, but they're all slaying in ./drivers/usb/cdns3, so it's fine πŸ’œ

πŸ₯Ί and that's the page! brought to you by ./drivers/usb/cdns3, dated October 2026 β€” struct cdnsp_container_ctx(9) out, love u, bye bestie! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from