phylink_mii...cs_get_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're diving into the Kernel API Manual today and honestly? this one's a little gem 🫢 it's the phylink_mii_c22_pcs_get_state page, and yes it does exactly what it says on the tin (read the MAC PCS state, icon behavior only πŸ’…). let's gooo 🌈


🌸 NAME 🌸

phylink_mii_c22_pcs_get_state β€” read the MAC PCS state πŸ‘‘

✨ SYNOPSIS ✨

void phylink_mii_c22_pcs_get_state (struct mdio_device *pcs , unsigned
int neg_mode , struct phylink_link_state *state );

πŸŽ€ ARGUMENTS πŸŽ€

  • pcs β€” literally just a pointer to a struct mdio_device. that's it, that's the whole vibe πŸ¦‹
  • neg_mode β€” the link negotiation mode, aka the PHYLINK_PCS_NEG_xxx fam πŸ‘‘
  • state β€” a pointer to a struct phylink_link_state, where the good stuff lands ✨

πŸ’– DESCRIPTION πŸ’–

so this is a helper β€” a lil support-system main character β€” for a MAC PCS that supports the 802.3 clause 22 register set, for clause 37 negotiation and/or SGMII control πŸ”₯

what it does: reads the MAC PCS state from the MII device configured in config, then parses the Clause 37 or Cisco SGMII link partner negotiation word straight into the phylink state structure. no cap, that's the whole job πŸ’…

and the best part? it's suitable to be directly plugged into the pcs_get_state member of the struct phylink_pcs_ops structure. plug-and-play energy fr fr 🧚✨

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page bestie, we ate and left no crumbs πŸ“πŸ’œ this lil cutie lives in ./drivers/net/phy, dated October 2026, and it's signed off by the Kernel API Manual itself β€” periodt πŸ‘‘πŸŽ€βœ¨

πŸ“¦ where this page comes from