of_pci_get_max_link_speed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, this one lives in the Kernel API Manual and it's genuinely such a little icon β€” short, sweet, does exactly one thing. no cap. ✨


🌸 NAME 🌸

of_pci_get_max_link_speed β€” find the maximum link speed of the given device node. that's it, that's the whole vibe 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int of_pci_get_max_link_speed (struct device_node *node );

literally one argument, one int coming back. immaculate energy. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • node β€” the device tree node that's holding the maximum link speed information. like, that's where the tea is stored πŸ“

✨ DESCRIPTION ✨

so here's what she does: this function will try to read the "max-link-speed" property of the device tree node you hand her. lowkey a read-only girlie. πŸ“–

⚠️ heads up bestie β€” it does NOT validate the value of the property. she reads it, she hands it back, she does not judge. no vibe check, no fact check, nothing. if the property is cursed, that's between you and the device tree πŸ’€

πŸ”₯ RETURN πŸ”₯

  • max link speed value on success πŸŽ‰
  • errno on failure 😭

that's the whole trade-off. either you get a number or you get a bad time. fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/pci/of.c β€” plus her whole friend group, all linked up:

the whole squad, main character energy across the board πŸŒˆπŸ’–


mwah πŸ’‹ that's the page! sourced straight from ./drivers/pci, dated October 2026 β€” go read it again if you forgot anything, i'll wait πŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from