STRUCT PCH_UDC_REQUEST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct pch_udc_request(9)

okay so bestie, welcome to the Kernel API Manual (section 9, the good section πŸ’–) β€” today's main character is struct pch_udc_request, the structure holding a PCH USB device request packet. yes it's a struct. yes it's iconic. let's get into it ✨


πŸŽ€ SYNOPSIS πŸŽ€

copy this exactly, do not improvise, i'm watching πŸ‘€

struct pch_udc_request {
    struct usb_request              req;
    dma_addr_t td_data_phys;
    struct pch_udc_data_dma_desc    *td_data;
    struct pch_udc_data_dma_desc    *td_data_last;
    struct list_head                queue;
    unsigned dma_going:1, dma_done:1;
    unsigned chain_len;
 };

🌸 Members 🌸

okay here's the cast, each one gets their moment:

  • req β€” the embedded ep request. it lives inside the struct, it's nested, it's cozy 🫢
  • td_data_phys β€” the phys. address. that's it, that's the whole vibe.
  • td_data β€” first dma desc. of chain. the opening act ⭐
  • td_data_last β€” last dma desc. of chain. the finale, the closing number πŸ’…
  • queue β€” the associated queue. it's giving "you're in my contacts list" energy.
  • dma_going β€” DMA in progress for request. it's happening, bestie, it's literally happening right now πŸ”₯
  • dma_done β€” DMA completed for request. we ate and left no crumbs ✨
  • chain_len β€” chain length. how long is the chain? this long. πŸ“
ngl dma_going and dma_done are bitfields (:1 each) up in the unsigned declaration, so they're squished in together β€” that's the code, not me being weird, i promise πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

the whole extended universe, no cap. it all lives in the kernel file ./drivers/usb/gadget/udc/pch_udc.c β€” start there, then fall down this rabbit hole 🌈

the structs first, they're the popular kids:

  • struct pch_udc_data_dma_desc(9)
  • struct pch_udc_stp_dma_desc(9)
  • struct pch_udc_cfg_data(9)
  • struct pch_udc_ep(9)
  • struct pch_vbus_gpio_data(9)
  • struct pch_udc_dev(9)

and then the function cinematic universe, deep breath, here we go:


and that's the page, bestie 🧚 no cap, you're now officially a struct pch_udc_request girlie. slay πŸ’œ

🌸 cute lil sign-off: this one's filed under ./drivers/usb/gadget/udc, dated October 2026, and yes it's still struct pch_udc_request(9) β€” the icon, the legend, the moment. bye pookie πŸŽ€πŸ’–
πŸ“¦ where this page comes from