STRUCT XHCI_CONTAINER_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct xhci_container_ctx ✨

okay bestie, welcome to the Kernel API Manual, section 9 β€” we're looking at struct xhci_container_ctx today and honestly? it's giving "small struct, big responsibilities" πŸ’…

πŸŽ€ NAME πŸŽ€

struct xhci_container_ctx β€” and that's literally it, the NAME section gave us nothing else, no cap. it's just the struct name hanging out by itself like the main character it is 🫢

🌸 SYNOPSIS 🌸

here's the whole vibe, character for character:

struct xhci_container_ctx {
    unsigned type;
  #define XHCI_CTX_TYPE_DEVICE  0x1;
  #define XHCI_CTX_TYPE_INPUT   0x2;
    int size;
    u8 *bytes;
    dma_addr_t dma;
 };

πŸ¦‹ Members πŸ¦‹

  • type β€” what kind of context this is, bestie. it's used to calculate the offsets to the contexts contained inside. that's its whole job and it does it slayfully.
  • size β€” the size of the context data. how much data? this much. iconic.
  • bytes β€” the raw context data that gets handed to the hardware. raw. unfiltered. no editing. πŸ’€
  • dma β€” the dma address of bytes, duh.

πŸ’– Description πŸ’–

so what is this thing fr fr? it represents either a Device or an Input context β€” one struct, two possible identities, very versatile of it ✨

it holds a pointer to the raw memory used for the context (that's bytes, iykyk) and the dma address of it (that's dma, yes we already said that, but it's important okay 😭).

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/usb/host/xhci.h
  • struct xhci_cap_regs(9)
  • struct xhci_op_regs(9)
  • struct xhci_intr_reg(9)
  • struct xhci_run_regs(9)
  • struct xhci_slot_ctx(9)
  • struct xhci_ep_ctx(9)
  • struct xhci_device_context_array(9)

like. go read those too, the whole xhci friend group is there and they all ate πŸ‘‘


alright that's the whole page, hope you understood it bestie, mwah πŸ“ this one came out of ./drivers/usb/host back in October 2026, and it's struct xhci_container_ctx(9) forever and always πŸ’œπŸ§š

πŸ“¦ where this page comes from