STRUCT XHCI_EP_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual ✨ β€” and today’s main character is struct xhci_ep_ctx πŸ’… no cap. This is the endpoint context struct and we’re about to break it all the way down, so stay with me.


✨ NAME ✨

struct xhci_ep_ctx β€” that’s the name, periodt. The dash is just sitting there because there’s no extra description, and honestly same.


πŸ¦‹ SYNOPSIS πŸ¦‹

       struct xhci_ep_ctx {
           __le32 ep_info;
           __le32 ep_info2;
           __le64 deq;
           __le32 tx_info;
           __le32 reserved[3];
        };

πŸ’– Members πŸ’–

  • ep_info β€” this one’s holding the endpoint state, streams, mult, and interval information. Like it’s the whole vibe check for the endpoint.
  • ep_info2 β€” here’s where you get the info on endpoint type, max packet size, max burst size, error count, and whether the HC is gonna force an event for all transactions. So it’s giving all the details, fr fr.
  • deq β€” this is a 64-bit ring dequeue pointer address. If the endpoint only defines one stream, it points to the endpoint transfer ring. But if it’s not just one stream, it points to a stream context array, which has a ring pointer for each flow. Slay.
  • tx_info β€” this bad boy has the average TRB lengths for the endpoint ring and the max payload within an Endpoint Service Interval Time (ESIT). Keep that acronym, bestie.

🌸 Description 🌸

so this is the Endpoint Context, and it’s literally section 6.2.1.2. The assumption here is that the HC is using 32-byte context structures β€” that’s the default vibe. But if the HC is on that 64-byte context life, then there’s an additional 32 bytes reserved at the end of the endpoint context for HC internal use. So keep that in mind, no cap.

This assumes the HC uses 32-byte context structures. If the HC uses 64-byte contexts, there is an additional 32 bytes reserved at the end of the endpoint context for HC internal use.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./drivers/usb/host/xhci.h

  • struct xhci_cap_regs(9) β€” iconic.
  • struct xhci_op_regs(9) β€” also iconic.
  • struct xhci_intr_reg(9) β€” yup.
  • struct xhci_run_regs(9) β€” you know it.
  • struct xhci_container_ctx(9) β€” main character energy.
  • struct xhci_slot_ctx(9) β€” slay.
  • struct xhci_device_context_array(9) β€” periodt.

kisses and good vibes from ./drivers/usb/host, October 2026, and this has been struct xhci_ep_ctx(9) πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from