STRUCT CDNS2_EP0_REGS(9)
π 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
- 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