STRUCT IUDMA_CH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct iudma_ch(9) 🌸

Kernel API Manual? Yup, bestie β€” this is the group-chat-approved tour of struct iudma_ch, the struct that literally represents the current state of a single IUDMA channel. No cap, it's giving very structured main character energy.


πŸ’– NAME πŸ’–

struct iudma_ch β€” represents the current state of a single IUDMA channel. That's the whole vibe: one channel, one state bundle. 🫢


✨ SYNOPSIS ✨

okay so here is the exact shape, bestie β€” copy it character-for-character, no freestyling:

       struct iudma_ch {
           unsigned int                    ch_idx;
           int ep_num;
           bool enabled;
           int max_pkt;
           bool is_tx;
           struct bcm63xx_ep               *bep;
           struct bcm63xx_udc              *udc;
           struct bcm_enet_desc            *read_bd;
           struct bcm_enet_desc            *write_bd;
           struct bcm_enet_desc            *end_bd;
           int n_bds_used;
           struct bcm_enet_desc            *bd_ring;
           dma_addr_t bd_ring_dma;
           unsigned int                    n_bds;
        };

πŸŽ€ Members πŸŽ€

  • ch_idx β€” the IUDMA channel index, from 0 to BCM63XX_NUM_IUDMA-1. iconic little range.
  • ep_num β€” the USB endpoint number. It's -1 for ep0 RX.
  • enabled β€” whether bcm63xx_ep_enable has been called. vibe check: enabled or not?
  • max_pkt β€” the "Chunk size" on the USB interface. It's based on interface speed.
  • is_tx β€” true for TX, false for RX. simple as that, fr fr.
  • bep β€” pointer to the associated endpoint. NULL for ep0 RX.
  • udc β€” reference to the device controller.
  • read_bd β€” next buffer descriptor to reap from the hardware.
  • write_bd β€” next BD available for a new packet.
  • end_bd β€” points to the final BD in the ring. the end, literally.
  • n_bds_used β€” number of BD entries currently occupied.
  • bd_ring β€” base pointer to the BD ring.
  • bd_ring_dma β€” physical (DMA) address of bd_ring.
  • n_bds β€” total number of BDs in the ring.

🌈 Description 🌈

okay so ep0 is the bidirectional bestie, which is why it has two IUDMA channels: IUDMA_EP0_RXCHAN and IUDMA_EP0_TXCHAN. The struct usb_ep associated with ep0 is for TX (IN) only β€” yes, TX only, that's the whole rule.

Every bulk/intr endpoint has a single IUDMA channel and a single struct usb_ep. That's it, that's the setup. periodt. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/usb/gadget/udc/bcm63xx_udc.c is the home base. The whole linked-bestie list, no skips:


πŸ’… cute little sign-off: source/version is ./drivers/usb/gadget/udc, date is October 2026, and yes bestie we are still talking about struct iudma_ch(9). Stay hydrated and keep your BDs aligned! 🫢✨

πŸ“¦ where this page comes from