phylink_create(9)
π phylink_create(9) β the Kernel API Manual glow-up β¨
okay so first things first, bestie: this page lives in the Kernel API Manual, it's phylink_create(9), and it's literally the birth certificate for a phylink instance. let's get into it π
β¨ NAME β¨
phylink_create β create a phylink instance π¦ (yes that's the whole name section, she's simple and she's iconic)
πΈ SYNOPSIS πΈ
struct phylink * phylink_create (struct phylink_config *config , const
struct fwnode_handle *fwnode , phy_interface_t iface , const struct
phylink_mac_ops *mac_ops );
four arguments, one pointer out, no cap π
π«Ά ARGUMENTS π«Ά
configβ a pointer to the targetstruct phylink_config. that's the config bestie, it's giving "here's my whole personality" πfwnodeβ a pointer to astruct fwnode_handledescribing the network interface πifaceβ the desired link mode, defined bytypedef phy_interface_tβmac_opsβ a pointer to astruct phylink_mac_opsfor the MAC π
π DESCRIPTION π
okay so this is the main character function: it creates a new phylink instance, and it parses the link parameters found in np. like, all of them. this will parse in-band modes, fixed-link or SFP configuration β the whole vibe check π₯
π NOTE π
bestie. listen. the rtnl lock must not be held when calling this function. like, do not. π that's a hard no.
it returns a pointer to a struct phylink, or an error-pointer value. users must use IS_ERR to check for errors from this function β don't skip the vibe check on the return value, fr fr π
β SEE ALSO β
the whole friend group, in order, no one left out π§:
- Kernel file
./drivers/net/phy/phylink.c struct phylink(9)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_pcs_neg_mode(9)phylink_set_fixed_link(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)
and that's the page, periodt π this lil masterpiece comes from ./drivers/net/phy, dated October 2026, and it's filed under phylink_create(9) β go create something iconic, 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