dwc2_next_fo...riodic_split(9)
π dwc2_next_for_periodic_split(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this one's a little function with a big job and honestly the name alone is giving final boss energy π
πΈ NAME πΈ
dwc2_next_for_periodic_split β sets next_active_frame midway thru a split. yes that's the whole vibe. mid-split. halfway. iconic behavior only π
β¨ SYNOPSIS β¨
int dwc2_next_for_periodic_split (struct dwc2_hsotg *hsotg , struct
dwc2_qh *qh , u16 frame_number );
like, it returns an int, it takes three things, and it's dwc2_next_for_periodic_split fr fr π«Ά
π ARGUMENTS π
hsotgβ the HCD state structure π like the main character of this whole situationqhβ the QH for the periodic transfer π¦frame_numberβ the current frame number β the now. the present. the moment.
π DESCRIPTION π
okay so here's the tea π: this function gets called to set next_active_frame for periodic splits β but only for all but the first packet of the split. "Confusing?" the original literally says "I thought so..." and honestly? same bestie, same ππ
So let me break down periodic splits for you, because this part lowkey slaps:
Periodic splits are single low/full speed transfers that we end up splitting up into several high speed transfers. the way that works is genuinely wild. They always fit into one full (1 ms) frame π― but might get split over several microframes (125 us each) β yes, microframes. tiny. baby frames. π§
We've gotta put each of the parts on a very specific high speed frame. no cap. precision is everything here.
And this function? it figures out where the next active uFrame needs to be. that's it. that's the job. main character energy, minimal dialogue π β¨
π₯ RETURN π₯
number missed by β or 0 if we didn't miss ππ
π SEE ALSO π
Kernel file ./drivers/usb/dwc2/hcd_queue.c π
and the whole friend group, in order, no gatekeeping:
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_periodic_start(9)dwc2_hcd_qtd_init(9)dwc2_hcd_qtd_add(9)
lowkey a whole syllabus, but that's the whole list, bestie β nothing skipped, nothing merged, we ate and left no crumbs π½οΈπ
kisses and microframes, babe πβ¨ this page came from ./drivers/usb/dwc2, dated October 2026, and it's dwc2_next_for_periodic_split(9) forever and always ππ«ΆπΈ
π¦ 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