dwc2_check_...ic_bandwidth(9)
π dwc2_check_periodic_bandwidth(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to the Linux kernel API manual, DWC2 edition π this one's a function page from ./drivers/usb/dwc2, and honestly it's doing exactly what it says on the tin. let's get into it π¦
πΈ NAME πΈ
dwc2_check_periodic_bandwidth β lowkey does a vibe check on the periodic schedule to make sure there's actually enough bandwidth for the QH you're trying to slide in there π
β¨ SYNOPSIS β¨
int dwc2_check_periodic_bandwidth (struct dwc2_hsotg *hsotg , struct dwc2_qh *qh );
like yes, that's the whole signature, no cap π«Ά
π§ ARGUMENTS π§
hsotgβ the HCD state structure for the DWC OTG controller. it's giving main character energy, it's the whole controller's state bestie πqhβ the QH that's carrying the periodic bandwidth you need. this one's the diva asking for space on the schedule π
β RETURN β
Returns 0 if it all works out (slay β¨), otherwise a negative error code β so if you get a negative back, that's your sign the bandwidth check did not eat π
π DESCRIPTION π
okay so for simplicity, this calculation assumes that all the transfers in the periodic schedule may occur in the same (micro)frame. that's the whole assumption, fr fr β it keeps the math from becoming a whole situation π
π¦ SEE ALSO π¦
the source lives in the kernel file ./drivers/usb/dwc2/hcd_queue.c β go read it, iykyk π
and here's the full friend group, no one left out π«Ά
dwc2_periodic_channel_available(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)dwc2_hcd_qtd_add(9)
π reminder bestie: this page is from the./drivers/usb/dwc2corner of the kernel, and it's the October 2026 edition of the Kernel API Manual'sdwc2_check_...ic_bandwidth(9)page. go off, read the source, and may your bandwidth always be sufficient πβ¨π₯
π¦ 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