lre_update_link(9)
π lre_update_link(9) β the Kernel API Manual glow-up π
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 targetphy_devicestruct π like, this is the phy device we're messing with, iykyk
β RETURN β
0on success π₯³< 0on 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 π
- Kernel file
./drivers/net/phy/broadcom.c bcm5481x_read_abilities(9)
π«Ά 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
- 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