set_link_state_by_speed(9)
π set_link_state_by_speed β the kernel API manual (section 9, bestie)
okay so hi!! you're looking at set_link_state_by_speed, a lil kernel function from the section 9 manual pages (that's the kernel API girlies, not the user-command ones, iykyk). she's not famous, she's not flashy, but she does exactly one thing and she does it correctly. main character energy honestly π
β¨ NAME β¨
set_link_state_by_speed β sets the current state of the link according to the hcd speed π¦
like literally what it says. link state? set. based on speed? yes ma'am. no cap.
πΈ SYNOPSIS πΈ
void set_link_state_by_speed (struct dummy_hcd *dum_hcd );
yes that's the whole signature, she's a void, she returns nothing, she just does π
π ARGUMENTS π
dum_hcdβ pointer to thestruct dummy_hcdstructure you want to update the link state for π«Ά
that's it. one argument. one job. lowkey iconic.
π₯ DESCRIPTION π₯
okay so here's the vibe check: this function updates the port_status according to the link state and the speed of the hcd. both of them. together. it's giving teamwork, it's giving attention to detail β¨
so like, no surprises, no weird side quests β she looks at the link state, she looks at the hcd's speed, and she makes port_status match. periodt. π
ngl this is the kind of function you read once and immediately get, which is honestly a slay in kernel land.
π SEE ALSO π
- Kernel file
./drivers/usb/gadget/udc/dummy_hcd.cβ go read the source bestie, she lives there π handle_control_request(9)β her friend, also worth a read β
and that's the page!! mwah π
sign-off: this one came out of ./drivers/usb/gadget/udc (that's the source, she's a local girlie), dated October 2026, and it's set_link_state_by_speed(9) all the way down. go touch some USB gadget code, love u, bye π§π
π¦ 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