phy_sanitize_settings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ phy_sanitize_settings ✨

okay so real talk, this one's from the Kernel API Manual β€” yes bestie, we're in the kernel now, put your big-girl hat on πŸŽ€

πŸ’– NAME πŸ’–

phy_sanitize_settings β€” the little function whose entire job is making sure the PHY is set to a speed and duplex it can actually handle. no cap, that's it, that's the whole vibe check πŸ¦‹


🌸 SYNOPSIS 🌸

void phy_sanitize_settings (struct phy_device *phydev );

it returns nothing (void, she gives nothing and takes nothing πŸ’…) and it takes exactly one thing, which we're about to talk about πŸ‘‡

🫢 ARGUMENTS 🫢

  • phydev β€” the target phy_device struct. your main character. the PHY we're about to sanitize, bestie 🧚

πŸ”₯ DESCRIPTION πŸ”₯

okay so picture this: the PHY needs to be set to speeds and duplexes that are actually supported. phy_sanitize_settings makes sure of that ✨

and if it has to drop down a level? it does it in this exact order, no skipping, no jumping around the queue:

  • 1000/FULL
  • 1000/HALF
  • 100/FULL
  • 100/HALF
  • 10/FULL
  • 10/HALF

it's giving "we go down the list one at a time, in order, periodt" πŸ“‰πŸ’€ like a very polite staircase of network speeds. iconic behaviour honestly πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

okay this list is LONG, grab a snack πŸ“ β€” everything here lives in the kernel file ./drivers/net/phy/phy.c:

like I said. a LOT. iykyk πŸ˜­πŸ’œ


ngl this page is short but she's doing her job and she's doing it well. lowkey obsessed with the tiny functions 🫢

and that's a wrap, bestie! this lil page came from ./drivers/net/phy, dated October 2026 β€” go forth and sanitize those settings responsibly πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from