phylink_pcs_neg_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual corner of the universe ✨ this one's about the lil helper that figures out what negotiation mode your PCS should be in, and honestly? it's giving "small function, big responsibility" πŸ‘‘


✨ NAME ✨

phylink_pcs_neg_mode β€” the helper that decides your PCS's inband mode πŸ’« literally just a mode-picker, but make it networking.


πŸ¦‹ SYNOPSIS πŸ¦‹

void phylink_pcs_neg_mode (struct phylink *pl , struct phylink_pcs *pcs
, phy_interface_t interface , const unsigned long *advertising );

no cap, that's the whole signature 🫢


🌸 ARGUMENTS 🌸

  • pl β€” a pointer to a struct phylink that came back from phylink_create, the main character of this whole operation πŸ’–
  • pcs β€” a pointer to struct phylink_pcs, the actual piece of hardware we're negotiating on behalf of 🧚
  • interface β€” the interface mode you wanna use, like, the vibe you're going for ✨
  • advertising β€” the ethtool link mode mask you're advertising πŸŽ€ (the og page spells it "adertisement" and honestly? iconic typo, we stan a legend with quirks 🫢 β€” anyway it's the advertisement mask, you get it)

πŸ”₯ DESCRIPTION πŸ”₯

So what does this lil function do? It determines the negotiation mode that the PCS is gonna use, and then returns one of these bad boys πŸ‘‡

  • PHYLINK_PCS_NEG_NONE β€” the interface mode straight up does not support inband, bestie. not today. πŸ’€
  • PHYLINK_PCS_NEG_OUTBAND β€” an out of band mode is getting used instead (think reading the PHY, that kind of thing) πŸ™ˆ
  • PHYLINK_PCS_NEG_INBAND_DISABLED β€” inband mode got selected, but autoneg is disabled 😭 sad but valid
  • PHYLINK_PCS_NEG_INBAND_ENABLED β€” inband mode selected and autoneg enabled πŸ”₯ we love a fully turned-on situation

⭐ NOTE ⭐

heads up bestie: this function is for cases where the PCS itself is involved in negotiation (like Clause 37, SGMII and similar situations πŸ¦‹) β€” it is not for Clause 73. keep that distinction close to your heart, fr fr πŸ’œ

🌈 SEE ALSO 🌈

the whole phylink extended universe, and yes you will be reading all of it πŸ’… starting with the kernel file ./drivers/net/phy/phylink.c, then struct phylink(9), and the rest of the gang:


that's the whole page, bestie, you ate that πŸ“βœ¨ this cutie lives in ./drivers/net/phy, dated October 2026, and it's brought to you by the Kernel API Manual β€” phylink_pcs_neg_mode(9) out πŸ’…πŸ’–

πŸ“¦ where this page comes from