STRUCT XHCI_OP_REGS(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual β¨ β this one's struct xhci_op_regs, aka the xHCI Host Controller Operational Registers π
. yes it's a struct, yes it's in a kernel, yes you're gonna slay it.
πΈ SYNOPSIS πΈ
struct xhci_op_regs {
__le32 command;
__le32 status;
__le32 page_size;
__le32 reserved1;
__le32 reserved2;
__le32 dev_notification;
__le64 cmd_ring;
__le32 reserved3[4];
__le64 dcbaa_ptr;
__le32 config_reg;
__le32 reserved4[241];
struct xhci_port_regs port_regs[];
};
like, look at her. main character struct energy fr fr π β she's got the little registers up top, a couple of big 64-bit pointers in the middle, and a whole wall of reserved space because sometimes you just need room π«Ά
π¦ Members π¦
commandβ this isUSBCMD, the xHC command register π« the "do the thing" button, basically.statusβ this one'sUSBSTS, the xHC status register π the "what's the tea, is it working" register.page_sizeβ tells you what page size the host controller supports β¨ and here's the deets: if bit n is set, the HC supports a page size of2^(n+12), all the way up to a 128MB page size π«§ and the minimum page size is 4K. no cap, that's the floor.cmd_ringβCRP, the 64-bit Command Ring Pointer πdcbaa_ptrβDCBAAP, the 64-bit Device Context Base Address Array Pointer π (yes that's a lot of words, yes it's one pointer, we move)config_regβCONFIG, the Configure Register βport_regsβ the Port Register Sets π and there's one for each port, from 1 to MaxPorts, where MaxPorts is defined byHCSPARAMS1. iconic array energy.
not me noticing the struct also carriesreserved1,reserved2,dev_notification,reserved3[4]andreserved4[241]β the page doesn't give them their own little blurbs, so I'm not gonna invent any π they're just sitting there being reserved, and we respect their privacy.
β SEE ALSO β
the whole friend group, in the kernel file ./drivers/usb/host/xhci.h π:
struct xhci_cap_regs(9)struct xhci_intr_reg(9)struct xhci_run_regs(9)struct xhci_container_ctx(9)struct xhci_slot_ctx(9)struct xhci_ep_ctx(9)struct xhci_device_context_array(9)
okay that's the whole page, you ate that π mwah π
sign-off time cuties: this one lives in ./drivers/usb/host, dated October 2026, and it's struct xhci_op_regs(9) β go be the main character of your own register set π§π
π¦ 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