set_link_state_by_speed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 the struct dummy_hcd structure 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