STRUCT CDNS2_EP0_REGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct cdns2_ep0_regs(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, welcome to the Kernel API Manual for struct cdns2_ep0_regs, and trust me when I say this one is literally the main character of endpoint 0 πŸ’…


✨ NAME ✨

struct cdns2_ep0_regs β€” the endpoint 0 related registers, all cozy in one struct 🫢


🌸 SYNOPSIS 🌸

bestie. look at this layout. it's giving memory-mapped register realness ✨ copy it exactly, no edits, no cap:

struct cdns2_ep0_regs {
    __u8 rxbc;
    __u8 txbc;
    __u8 cs;
    __u8 reserved1[4];
    __u8 fifo;
    __le32 reserved2[94];
    __u8 setupdat[8];
    __u8 reserved4[88];
    __u8 maxpack;
 };

πŸ¦‹ Members πŸ¦‹

okay so let's do a little member-by-member vibe check, one at a time, because every single one matters πŸ’–

  • rxbc β€” the receive (OUT) 0 endpoint byte count register. how many bytes came in? it knows. πŸ‘‘
  • txbc β€” the transmit (IN) 0 endpoint byte count register. how many bytes are headed out? also knows. πŸ’«
  • cs β€” the 0 endpoint control and status register. the drama. the state. the icon. πŸ”₯
  • reserved1 β€” reserved πŸ™ˆ hands off, bestie.
  • fifo β€” the 0 endpoint fifo register. data goes in, data comes out, iconic behavior πŸ“
  • reserved2 β€” reserved πŸ™ˆ again. like, __le32 reserved2[94] worth of "not for you."
  • setupdat β€” the SETUP data register. setupdat[8], eight glorious bytes of setup-ness ✨
  • reserved4 β€” reserved πŸ™ˆ (yes, it skipped 3 in the name, no we will not be fixing it, we love her exactly as she is πŸ’…)
  • maxpack β€” the 0 endpoint max packet size. the limit. the boundary. the moment of truth 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, fr fr, they're all in the kernel file ./drivers/usb/gadget/udc/cdns2/cdns2-gadget.h and they're all besties:

  • struct cdns2_epx_base(9)
  • struct cdns2_epx_regs(9)
  • struct cdns2_interrupt_regs(9)
  • struct cdns2_usb_regs(9)
  • struct cdns2_adma_regs(9)
  • struct cdns2_trb(9)
  • struct cdns2_ring(9)
  • struct cdns2_endpoint(9)
  • struct cdns2_request(9)
  • struct cdns2_device(9)

🫢 a lil reminder: the reserved members are reserved for a reason β€” don't go poking them and pretending you didn't, bestie 😭

and that's the page!! slay πŸ’– this whole thing lives over in ./drivers/usb/gadget/udc/cdns2, dated October 2026, and yes she's still called struct cdns2_ep0_regs(9) β€” periodt βœ¨πŸŽ€

πŸ“¦ where this page comes from