STRUCT XUSB_EP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xusb_ep(9) β€” bestie, this is the USB end point struct

okay so real talk: this is a page from the Kernel API Manual (the struct xusb_ep(9) one, yes), and it's literally just one struct and all its little members. it's giving "character sheet for a USB endpoint" and honestly? we're obsessed. let's go through it field by field, no cap, nothing skipped πŸ’–


✨ NAME ✨

struct xusb_ep β€” the USB end point structure. that's it, that's the whole vibe. periodt.


🌸 SYNOPSIS 🌸

here's the whole thing, copied exactly, because you know I'm not about to paraphrase a struct definition:

struct xusb_ep {
    struct usb_ep ep_usb;
    struct list_head queue;
    struct xusb_udc *udc;
    const struct usb_endpoint_descriptor *desc;
    u32 rambase;
    u32 offset;
    char name[4];
    u16 epnumber;
    u16 maxpacket;
    u16 buffer0count;
    u16 buffer1count;
    u8 curbufnum;
    bool buffer0ready;
    bool buffer1ready;
    bool is_in;
    bool is_iso;
 };

look at her. sixteen fields. main character energy fr fr πŸ‘‘


πŸ¦‹ Members πŸ¦‹

okay this is the part where we meet everyone in the group chat:

  • ep_usb β€” the usb endpoint instance. like, the actual USB-layer self. her public-facing persona ✨
  • queue β€” the endpoint message queue. where the messages line up and wait their turn, patient icons πŸ’…
  • udc β€” a pointer to the xilinx usb peripheral driver instance. so she knows which UDC she belongs to, iykyk
  • desc β€” pointer to the usb endpoint descriptor. her official paperwork πŸŽ€
  • rambase β€” the endpoint buffer address. where her stuff actually lives
  • offset β€” the endpoint register offset value. the little math to find her registers
  • name β€” name of the endpoint. it's a char name[4], so keep it short bestie, four chars and done πŸ™ˆ
  • epnumber β€” endpoint number. her literal ID number
  • maxpacket β€” maximum packet size the endpoint can store. the biggest parcel she'll accept πŸ“¦
  • buffer0count β€” the size of the packet recieved in the first buffer. (yes, the original page spells it "recieved" β€” I'm keeping it exactly, that's her ✨flavor✨)
  • buffer1count β€” the size of the packet received in the second buffer. buffer two, keeping it consistent 🫢
  • curbufnum β€” current buffer of endpoint that will be processed next. she's literally telling you who's up next πŸ‘€
  • buffer0ready β€” the busy state of first buffer. is buffer zero booked or not πŸ’€
  • buffer1ready β€” the busy state of second buffer. same question, second buffer
  • is_in β€” endpoint direction (IN or OUT). which way the data's going, no ambiguity 🌈
  • is_iso β€” endpoint type (isochronous or non isochronous). is she iso or is she not, that's the question ⭐

πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie β€” the whole xilinx USB gadget gang is here, and yes I'm listing every single one because we don't do "etc." in this house:

Kernel file ./drivers/usb/gadget/udc/udc-xilinx.c, plus struct xusb_req(9), struct xusb_udc(9), xudc_write32(9), xudc_read32(9), xudc_write32_be(9), xudc_read32_be(9), xudc_wrstatus(9), xudc_epconfig(9), xudc_start_dma(9), xudc_dma_send(9), xudc_dma_receive(9), xudc_eptxrx(9), xudc_done(9), xudc_read_fifo(9), xudc_write_fifo(9), xudc_nuke(9), xudc_ep_set_halt(9), __xudc_ep_enable(9), xudc_ep_enable(9), xudc_ep_disable(9), xudc_ep_alloc_request(9), xudc_free_request(9), __xudc_ep0_queue(9), xudc_ep0_queue(9), xudc_ep_queue(9), xudc_ep_dequeue(9), xudc_ep0_enable(9), xudc_ep0_disable(9), xudc_get_frame(9), xudc_wakeup(9), xudc_pullup(9), xudc_eps_init(9), xudc_stop_activity(9), xudc_start(9), xudc_stop(9), xudc_clear_stall_all_ep(9), xudc_startup_handler(9), xudc_ep0_stall(9), xudc_setaddress(9), xudc_getstatus(9), xudc_set_clear_feature(9), xudc_handle_setup(9), xudc_ep0_out(9), xudc_ep0_in(9), xudc_ctrl_ep_handler(9), xudc_nonctrl_ep_handler(9), xudc_irq(9), xudc_probe(9), xudc_remove(9).

that's a lot of cross-references and I typed every one of them. you're welcome. πŸ’–

and that's the page!! written by the gang over in ./drivers/usb/gadget/udc, dated October 2026 β€” mwah, luv u, go read xudc_probe(9) next πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from