dwc2_hcd_qtd_add(9)
β¨ dwc2_hcd_qtd_add(9) β¨
okay bestie, welcome to the Kernel API Manual β this one's from the DWC2 USB driver and it's honestly kinda iconic π
πΈ NAME πΈ
dwc2_hcd_qtd_add β adds a QTD to the QTD-list of a QH. also, and this is the part everyone forgets: the caller must hold the driver lock π no cap, that's not optional.
π SYNOPSIS π
int dwc2_hcd_qtd_add (struct dwc2_hsotg *hsotg , struct dwc2_qtd *qtd ,
struct dwc2_qh *qh );
π¦ ARGUMENTS π¦
hsotgβ the DWC HCD structure, your main character struct πqtdβ the QTD you're adding, the whole point of the function fr frqhβ the queue head to add the qtd to, its new home π
β RETURN β
0 if it worked (slay), and a negative error code otherwise (π). that's the whole vibe check.
π DESCRIPTION π
so here's the tea: if the QH that this QTD is being added to is not currently scheduled, it gets placed into the proper schedule based on its EP type. like, it finds its little friend group automatically, we love that for it π«Ά
π₯ SEE ALSO π₯
kernel file ./drivers/usb/dwc2/hcd_queue.c β that's where all the lore lives, iykyk:
dwc2_periodic_channel_available(9), dwc2_check_periodic_bandwidth(9), pmap_schedule(9), pmap_unschedule(9), dwc2_get_ls_map(9), dwc2_qh_print(9), dwc2_qh_schedule_print(9), dwc2_ls_pmap_schedule(9), dwc2_ls_pmap_unschedule(9), dwc2_hs_pmap_schedule(9), dwc2_hs_pmap_unschedule(9), dwc2_uframe_schedule_split(9), dwc2_uframe_schedule_hs(9), dwc2_uframe_schedule_ls(9), dwc2_uframe_schedule(9), dwc2_uframe_unschedule(9), dwc2_pick_first_frame(9), dwc2_do_reserve(9), dwc2_do_unreserve(9), dwc2_unreserve_timer_fn(9), dwc2_check_max_xfer_size(9), dwc2_schedule_periodic(9), dwc2_deschedule_periodic(9), dwc2_wait_timer_fn(9), dwc2_qh_init(9), dwc2_hcd_qh_create(9), dwc2_hcd_qh_free(9), dwc2_hcd_qh_add(9), dwc2_hcd_qh_unlink(9), dwc2_next_for_periodic_split(9), dwc2_next_periodic_start(9), dwc2_hcd_qtd_init(9)
quick reminder bestie: lock held, or you're gonna have a bad time π
and that's the page!! brought to you by the fine folks over at ./drivers/usb/dwc2, dated October 2026, manual name dwc2_hcd_qtd_add(9) β bye luv u, go hold that driver lock ππ§ββοΈ
π¦ 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