bos_desc(9)
π bos_desc(9) β a Kernel API Manual moment π
okay so this is bos_desc, bestie, from the Kernel API Manual, and it's literally about descriptors, so buckle up β¨
πΈ NAME πΈ
bos_desc β the girl whose whole job is preparing the BOS descriptor. that's it. that's the function. iconic behavior fr π
β¨ SYNOPSIS β¨
int bos_desc (struct usb_composite_dev *cdev );
like. she takes one thing and she gives you back an int. no cap. π«Ά
π¦ ARGUMENTS π¦
cdevβ pointer to the usb_composite device you want the bos descriptor generated for. so you gotta hand her the composite device, she's not gonna go find it herself π
π DESCRIPTION π
so here's the tea, bestie π: this function generates the BOS (Binary Device Object) descriptor and its device capabilities descriptors. the way that it handles both the descriptor and the device capabilities descriptors in one go?? highkey convenient.
and the vibe check on BOS itself: the BOS descriptor should be supported by a SuperSpeed device. that's the rule. SuperSpeed devices, this is your moment, main character energy only πβ
ngl if you're not on a SuperSpeed device this whole thing is giving "not applicable" energy β the manual says the BOS descriptor should be supported by a SuperSpeed device, so keep that in mind π§
π₯ SEE ALSO π₯
the whole group chat, assembled π:
- Kernel file
./drivers/usb/gadget/composite.c struct usb_os_string(9)function_descriptors(9)next_desc(9)config_ep_by_speed_and_alt(9)config_ep_by_speed(9)usb_add_function(9)usb_function_deactivate(9)usb_function_activate(9)usb_interface_id(9)usb_func_wakeup(9)usb_add_config(9)usb_string_id(9)usb_string_ids_tab(9)usb_gstrings_attach(9)usb_string_ids_n(9)usb_composite_probe(9)usb_composite_unregister(9)usb_composite_setup_continue(9)
that's the whole page, bestie, you ate it up π mwah π
this little love letter lives in ./drivers/usb/gadget and it's dated October 2026 β so yeah, she's from the future, we don't ask questions, we just slay ππ¦π
π¦ 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