phylink_expects_phy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so this is a page from the Kernel API Manual (phylink_expects_phy(9)) and bestie, it is literally a one-question wonder. sit down, we're doing this 🫢


🌸 NAME 🌸

phylink_expects_phy β€” determine if phylink expects a phy to be attached πŸ’…

yes that's it. that's the whole vibe check. it asks the universe (well, asks phylink) whether a PHY is even invited to this party.


πŸŽ€ SYNOPSIS πŸŽ€

bool phylink_expects_phy (struct phylink *pl );

return type is bool (so: true or false, no in-between, no "it's complicated"), and it takes exactly one (1) argument. so slay for that honestly.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pl β€” a pointer to a struct phylink returned from phylink_create πŸ‘‘ like, it has to come from there, that's the whole pedigree. don't be out here passing random pointers, that's not the move.

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” there are modes where you just don't need a PHY at all:

  • fixed-link mode β€” no PHY needed πŸŽ€
  • in-band mode with 1000base-X β€” no PHY needed πŸ¦‹
  • in-band mode with 2500base-X β€” also no PHY needed 🌸

so in those cases phylink is chill, it's not waiting on anybody.

this function returns true if phylink will be expecting a PHY ✨ β€” like, it's holding a little seat at the table and there better be a PHY sitting in it. and false if not. main character energy: it just tells you the truth and moves on 😌

ngl it's giving "quick yes/no check before you do something dumber." use it, don't skip it, periodt.

🌈 SEE ALSO 🌈

literally the entire phylink friend group, no cap. every single one:

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_create(9), phylink_destroy(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)

like I said. the whole group chat πŸ’œ forty-seven entries and every one of them ate.


<div align="center">πŸŽ€ ✨ πŸŽ€</div>

and that's the page bestie!! 🫢 this lil gem lives over in ./drivers/net/phy and it's dated October 2026 β€” so yes, it's from the future, we stan a time traveler πŸ‘‘πŸ’«

bye!! go check your PHYs!! πŸ¦‹πŸ’–

πŸ“¦ where this page comes from