phylink_pcs_neg_mode(9)
π phylink_pcs_neg_mode(9) β the Kernel API Manual, but make it make sense π
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 astruct phylinkthat came back fromphylink_create, the main character of this whole operation πpcsβ a pointer tostruct 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 validPHYLINK_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:
phylink_set_port_modes(9)phylink_interface_max_speed(9)phylink_caps_to_link_caps(9)phylink_caps_to_linkmodes(9)phylink_limit_mac_speed(9)phylink_cap_from_speed_duplex(9)phylink_get_capabilities(9)phylink_validate_mask_caps(9)phylink_set_fixed_link(9)phylink_create(9)phylink_destroy(9)phylink_expects_phy(9)phylink_connect_phy(9)phylink_of_phy_connect(9)phylink_fwnode_phy_connect(9)phylink_disconnect_phy(9)phylink_mac_change(9)phylink_pcs_change(9)phylink_start(9)phylink_stop(9)phylink_rx_clk_stop_block(9)phylink_rx_clk_stop_unblock(9)phylink_suspend(9)phylink_prepare_resume(9)phylink_resume(9)phylink_ethtool_get_wol(9)phylink_ethtool_set_wol(9)phylink_ethtool_ksettings_get(9)phylink_ethtool_ksettings_set(9)phylink_ethtool_nway_reset(9)phylink_ethtool_get_pauseparam(9)phylink_ethtool_set_pauseparam(9)phylink_get_eee_err(9)phylink_ethtool_get_eee(9)phylink_ethtool_set_eee(9)phylink_mii_ioctl(9)phylink_speed_down(9)phylink_speed_up(9)phylink_decode_usxgmii_word(9)phylink_decode_usgmii_word(9)phylink_mii_c22_pcs_decode_state(9)phylink_mii_c22_pcs_get_state(9)phylink_mii_c22_pcs_encode_advertisement(9)phylink_mii_c22_pcs_config(9)phylink_mii_c22_pcs_an_restart(9)phylink_replay_link_begin(9)phylink_replay_link_end(9)
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
- 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