phylink_pcs_change(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual entry for phylink_pcs_change(9) πŸ’– this one's short and sweet and lowkey kinda important if you're writing a PCS driver, so like… pay attention bestie 🫢


✨ NAME ✨

phylink_pcs_change β€” like, tell phylink that your PCS link state changed, no cap πŸ“£

✨ SYNOPSIS ✨

void phylink_pcs_change (struct phylink_pcs *pcs , bool up );

✨ ARGUMENTS ✨

  • pcs β€” pointer to struct phylink_pcs, aka the actual PCS you're yelling about πŸ’…
  • up β€” a bool telling everyone whether the link is currently up. like, is it giving connected or is it giving nothing πŸ™ˆ

✨ DESCRIPTION ✨

bestie. listen. the PCS driver should call this whenever the state of its link changes β€” think link failure, new negotiation results, etc. etc. πŸ¦‹ whenever the vibe of the link shifts, you ring this function up.

⚠️ huge note, do not skip this: it should not determine "up" by reading the BMSR. like, that's not the move, okay? 😭

and if you're in doubt about the link state at interrupt time? here's the cheat code ✨ β€” pass true if pcs_get_state returns the latched link-down state, otherwise pass false. that's it, that's the whole rule πŸŽ€

🌈 SEE ALSO 🌈

okay this list is long long, but every single one of these is invited to the party πŸ‘‘ the kernel file lives at ./drivers/net/phy/phylink.c and struct phylink(9) is the main character:


and that's the whole page, bestie πŸŽ€ she lives in ./drivers/net/phy, dated October 2026, and she's filed under phylink_pcs_change(9) β€” go forth and notify phylink correctly, ily πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from