usb_free_streams(9)
π 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 π
0on 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:
ascii2desc(9)rh_string(9)usb_bus_init(9)usb_register_bus(9)usb_deregister_bus(9)register_root_hub(9)usb_calc_bus_time(9)usb_hcd_link_urb_to_ep(9)usb_hcd_check_unlink_urb(9)usb_hcd_unlink_urb_from_ep(9)usb_hcd_giveback_urb(9)usb_hcd_alloc_bandwidth(9)usb_hcd_reset_endpoint(9)usb_alloc_streams(9)usb_hcd_resume_root_hub(9)usb_bus_start_enum(9)usb_hcd_irq(9)usb_hc_died(9)usb_create_shared_hcd(9)usb_create_hcd(9)usb_stop_hcd(9)usb_add_hcd(9)usb_remove_hcd(9)
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
- 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