usb_free_streams(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… usb_free_streams(9) β€” the Kernel API Manual page, bestie edition ✨

okay so you found the usb_free_streams(9) page in the Kernel API Manual and you're like "what does this even do" β€” don't worry, i got you 🫢


✨ NAME ✨

usb_free_streams β€” free bulk endpoint stream IDs. that's the whole vibe. it's the cleanup girlie πŸ’–


🌸 SYNOPSIS 🌸

int usb_free_streams (struct usb_interface *interface , struct
       usb_host_endpoint **eps , unsigned int num_eps , gfp_t mem_flags );

like. look at that signature. four args. int return. she's giving "i've done this before" πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • interface β€” the alternate setting that includes all the endpoints. like, every single one. she's the group chat admin of this operation πŸ’…
  • eps β€” an array of endpoints to remove streams from. the ones getting un-streamed, if you will πŸ¦‹
  • num_eps β€” number of endpoints in that array. yes you have to count them yourself, no she will not do it for you πŸ™ˆ
  • mem_flags β€” flags the hcd should use to allocate memory. hand her the allocation vibes and she'll run with them ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so what she actually does: reverts a group of bulk endpoints back to not using stream IDs. it's the undo button for streams, the "we're so back to normal" moment 😌

lowkey it can fail tho β€” if we are given bad arguments, or if the HCD is broken. broken HCD is not a vibe, bestie. fr fr πŸ’€

🌈 RETURN 🌈

  • 0 on success πŸŽ‰ slay, we're free
  • on failure, a negative error code 😭 it's giving "something went wrong and she's telling you in the negative"

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/usb/core/hcd.c β€” and honestly the whole friend group:

like, that's the whole squad right there. usb_alloc_streams(9) is literally her sister function btw β€” iykyk πŸ’œ


and that's the page!! πŸŽ€ mwah πŸ’‹

shoutout to the fine people at ./drivers/usb/core who shipped this in October 2026 β€” iconic of them honestly, we stan β­πŸŒΈπŸ’–

πŸ“¦ where this page comes from