pcs_validate(9)
π
pcs_validate β validate the link configuration β¨
okay bestie, so we're in the kernel API manual today and the page is literally called pcs_validate(9) β say it with me, pcs_validate, section 9, we love a numbered section π«Ά
β¨ NAME β¨
pcs_validate β validate the link configuration. that's it, that's the whole vibe check π
πΈ SYNOPSIS πΈ
int pcs_validate (struct phylink_pcs *pcs , unsigned long *supported ,
const struct phylink_link_state *state );
no cap, it returns an int, takes a pointer to a struct phylink_pcs, an unsigned long * for supported, and a const struct phylink_link_state * for state. three args, one function, iconic π
π ARGUMENTS π
pcsβ a pointer to astruct phylink_pcs. like, the actual PCS thing we're checking, bestie πΈsupportedβ the ethtool bitmask for supported link modes. this is the mask that's gonna get edited, so pay attention πstateβ aconstpointer to astruct phylink_link_state. const means hands off, we're just reading her π«Ά
π¦ DESCRIPTION π¦
so here's what she does: she validates the interface mode, and she validates the advertising's autoneg bit, and then she removes any media ethtool link modes that would not be supportable from the supported mask. literally a little cleanup fairy π§
and then β this is the cute part β Phylink will propagate the changes to the advertising mask. she doesn't just tidy up, she tells everyone else about it. main character energy fr fr π
also go see the struct phylink_mac_ops validate method, it's giving sibling energy.
now the return values, because this is where it gets real:
- Returns
-EINVALif the interface mode/autoneg mode is not supported. so like, invalid, rejected, not today π - Returns non-zero positive if the link state can be supported. slay, she ate, we move π
ngl bestie, remember which is which β negative means no, positive means yes. do not mix those up, that's a whole mess π
π SEE ALSO π
and now the group chat roll call, everybody's here, all of them, no one gets left out:
Kernel file ./include/linux/phylink.h plus 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_inband_caps(9), pcs_enable(9), pcs_disable(9), pcs_get_state(9), pcs_config(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)
like I said. every single one. the whole squad π«Άπ
β sign-off β
she lives in ./include/linux, the date on the page is October 2026, and she's part of the Kernel API Manual β that's the source, that's the version, that's the date, all accounted for, no details dropped periodt π
β¨
go read your phylink.h and hydrate bestie ππ
π¦ 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