dwc2_check_...ic_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🫢


πŸ’œ reminder bestie: this page is from the ./drivers/usb/dwc2 corner of the kernel, and it's the October 2026 edition of the Kernel API Manual's dwc2_check_...ic_bandwidth(9) page. go off, read the source, and may your bandwidth always be sufficient πŸŽ€βœ¨πŸ”₯
πŸ“¦ where this page comes from