lre_update_link(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the lre_update_link page of the Kernel API Manual ✨ this one's short and sweet but she's important, so let's get into it πŸ’–


🌸 NAME 🌸

lre_update_link β€” update link status in @phydev πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

int lre_update_link (struct phy_device *phydev );

πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” the target phy_device struct πŸ’… like, this is the phy device we're messing with, iykyk

⭐ RETURN ⭐

  • 0 on success πŸ₯³
  • < 0 on error 😭 (yeah, negative means something went wrong, no cap)

πŸ”₯ DESCRIPTION πŸ”₯

So what she does is update the value in phydev->link so it actually reflects the current link value 🌈 like a little reality check for the link status, fr fr.

The way she pulls this off is kinda iconic: she needs to read the status register twice, and keep the second value πŸ‘€ (yes, twice β€” it's giving thorough, it's giving careful, we love a queen who double-checks herself πŸ’…).

Also important: this is a genphy_update_link modified to work on LRE registers of BroadR-Reach PHY 🧚 so like, she's genphy's cousin but with a specific job, periodt ✨

πŸ‘‘ SEE ALSO πŸ‘‘


🫢 quick vibe check bestie: read the status register twice, keep the second one. don't skip the double read, that's literally the whole point πŸ˜­πŸ’€

mwah πŸ’‹ that's the whole page! shoutout to the source tree at ./drivers/net/phy and the October 2026 version of this lil doc β€” go off, kernel docs, you ate 🌟

πŸ“¦ where this page comes from