STRUCT PCH_UDC_REQUEST(9)
π 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. π
ngldma_goinganddma_doneare bitfields (:1each) up in theunsigneddeclaration, 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:
pch_udc_csr_busy(9)pch_udc_write_csr(9)pch_udc_read_csr(9)pch_udc_rmt_wakeup(9)pch_udc_get_frame(9)pch_udc_clear_selfpowered(9)pch_udc_set_selfpowered(9)pch_udc_set_disconnect(9)pch_udc_clear_disconnect(9)pch_udc_reconnect(9)pch_udc_vbus_session(9)pch_udc_ep_set_stall(9)pch_udc_ep_clear_stall(9)pch_udc_ep_set_trfr_type(9)pch_udc_ep_set_bufsz(9)pch_udc_ep_set_maxpkt(9)pch_udc_ep_set_subptr(9)pch_udc_ep_set_ddptr(9)pch_udc_ep_set_pd(9)pch_udc_ep_set_rrdy(9)pch_udc_ep_clear_rrdy(9)pch_udc_set_dma(9)pch_udc_clear_dma(9)pch_udc_set_csr_done(9)pch_udc_disable_interrupts(9)pch_udc_enable_interrupts(9)pch_udc_disable_ep_interrupts(9)pch_udc_enable_ep_interrupts(9)pch_udc_read_device_interrupts(9)pch_udc_write_device_interrupts(9)pch_udc_read_ep_interrupts(9)pch_udc_write_ep_interrupts(9)pch_udc_read_device_status(9)pch_udc_read_ep_control(9)pch_udc_clear_ep_control(9)pch_udc_read_ep_status(9)pch_udc_clear_ep_status(9)pch_udc_ep_set_nak(9)pch_udc_ep_clear_nak(9)pch_udc_ep_fifo_flush(9)pch_udc_ep_enable(9)pch_udc_ep_disable(9)pch_udc_wait_ep_stall(9)pch_udc_init(9)pch_udc_exit(9)pch_udc_pcd_get_frame(9)pch_udc_pcd_wakeup(9)pch_udc_pcd_selfpowered(9)pch_udc_pcd_pullup(9)pch_udc_pcd_vbus_session(9)pch_udc_pcd_vbus_draw(9)pch_vbus_gpio_get_value(9)pch_vbus_gpio_work_fall(9)pch_vbus_gpio_work_rise(9)pch_vbus_gpio_irq(9)pch_vbus_gpio_init(9)pch_vbus_gpio_free(9)complete_req(9)empty_req_queue(9)pch_udc_free_dma_chain(9)pch_udc_create_dma_chain(9)prepare_dma(9)process_zlp(9)pch_udc_start_rxrequest(9)pch_udc_pcd_ep_enable(9)pch_udc_pcd_ep_disable(9)pch_udc_alloc_request(9)pch_udc_free_request(9)pch_udc_pcd_queue(9)pch_udc_pcd_dequeue(9)pch_udc_pcd_set_halt(9)pch_udc_pcd_set_wedge(9)pch_udc_pcd_fifo_flush(9)pch_udc_init_setup_buff(9)pch_udc_start_next_txrequest(9)pch_udc_complete_transfer(9)pch_udc_complete_receiver(9)pch_udc_svc_data_in(9)pch_udc_svc_data_out(9)pch_udc_svc_control_in(9)pch_udc_svc_control_out(9)pch_udc_postsvc_epinters(9)pch_udc_read_all_epstatus(9)pch_udc_activate_control_ep(9)pch_udc_svc_ur_interrupt(9)pch_udc_svc_enum_interrupt(9)pch_udc_svc_intf_interrupt(9)pch_udc_svc_cfg_interrupt(9)pch_udc_dev_isr(9)pch_udc_isr(9)pch_udc_setup_ep0(9)pch_udc_pcd_reinit(9)pch_udc_pcd_init(9)init_dma_pools(9)
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 stillstruct pch_udc_request(9)β the icon, the legend, the moment. bye pookie ππ
π¦ 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