pcs_config(9)
π pcs_config β the kernel API manual, bestie edition β¨
okay so you're here for pcs_config(9) from the Kernel API Manual and honestly? good choice. this is the little function that tells your PCS how to behave and what to advertise, and we're gonna go through it together, no cap π«Ά
πΈ NAME πΈ
pcs_config β configure the PCS mode and advertisement β¨
π SYNOPSIS π
int pcs_config (struct phylink_pcs *pcs , unsigned int neg_mode ,
phy_interface_t interface , const unsigned long *advertising , bool
permit_pause_to_mac );
like, she takes five things and returns an int, periodt π
π ARGUMENTS π
pcsβ a pointer to astruct phylink_pcs. yes bestie, a pointer, we're doing kernel things now π₯neg_modeβ the link negotiation mode (full breakdown below, keep reading π)interfaceβ the interface mode you want to useadvertisingβ the "adertisement" ethtool link mode mask (that spelling is literally what the doc says, we don't edit history, we just vibe with it ππ)permit_pause_to_macβ says whether it's okay to forward the pause resolution to the MAC π«Ά
π¦ DESCRIPTION π¦
So what does she actually do? She configures the PCS for the operating mode and for the interface mode, and she sets the advertisement mask. That's the whole errand. permit_pause_to_mac is there to tell you whether the hardware is allowed to forward the pause mode resolution to the MAC. simple as π
When you're operating in MLO_AN_INBAND, inband should always be enabled β otherwise inband should be disabled. no in-between, bestie, we love a binary π
For SGMII, there's no advertisement coming from the MAC side, so the PCS should be programmed to acknowledge the inband word from the PHY. that's her job, she's got it π
For 1000BASE-X, the advertisement should be programmed into the PCS. put it in there, fr fr β¨
For most 10GBASE-R, there is no advertisement. none. zero. nada. that's just how it is π
The neg_mode argument should be tested via the phylink_mode_*() family of functions β or, for PCS that set pcs->neg_mode true, it should be tested against the PHYLINK_PCS_NEG_* definitions. pick your lane, both are valid iykyk π
pcs_config will be called when configuration of the PCS is required, or when the advertisement is possibly updated. And here's the important bit: it must not unnecessarily disrupt an established link. like, do not come for a link that's already living its best life, that's so rude ππ
When an autonegotiation restart is required for802.3zmodes,.pcs_configshould return a positive non-zero integer (e.g.1) to indicate to phylink to call thepcs_an_restartmethod. so returning1here is literally you tapping phylink on the shoulder like "hey bestie, restart time" ππ₯
β SEE ALSO β
the whole friend group, gathered for you π:
- Kernel file
./include/linux/phylink.h struct phylink_link_state(9)struct phylink_config(9)struct phylink_mac_ops(9)mac_get_caps(9)mac_select_pcs(9)mac_prepare(9)mac_config(9)mac_finish(9)mac_link_down(9)mac_link_up(9)mac_disable_tx_lpi(9)mac_enable_tx_lpi(9)mac_wol_set(9)struct phylink_pcs(9)struct phylink_pcs_ops(9)pcs_validate(9)pcs_inband_caps(9)pcs_enable(9)pcs_disable(9)pcs_get_state(9)pcs_an_restart(9)pcs_link_up(9)pcs_disable_eee(9)pcs_enable_eee(9)pcs_pre_init(9)phylink_get_link_timer_ns(9)phylink_mac_implements_lpi(9)
and that's the page, bestie π
β¨ this lil gem lives in ./include/linux, it's from October 2026, and it's filed under pcs_config(9). go configure something iconic ππ¦π
π¦ 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