phy_uses_state_machine(9)
π phy_uses_state_machine(9) β the "does ur driver even USE the state machine bestie" check β¨
okay so like, this is a kernel API manual page, and we're literally about to vibe check a PHY device to see if its consumer driver is running the PAL state machine π«Ά
πΈ NAME πΈ
phy_uses_state_machine β test whether consumer driver uses PAL state machine
so like, it's a little tester function that tells u if the consumer driver is using the PAL state machine. periodt π
β¨ SYNOPSIS β¨
bool phy_uses_state_machine (struct phy_device *phydev );
π ARGUMENTS π
phydevβ the target PHY device structure π like, this is the PHY device u wanna interrogate, bestie
π¦ DESCRIPTION π¦
Ultimately, this aims to indirectly determine whether the PHY is attached to a consumer which uses the state machine by calling phy_start and phy_stop. no cap, that's the whole vibe π₯
When the PHY driver consumer uses phylib, it must have previously called phy_connect_direct or one of its derivatives, so that phy_prepare_link has set up a hook for monitoring state changes. like, there's a whole setup process that had to happen first, and this function is checking if that happened π
When the PHY driver is used by the MAC driver consumer through phylink (the only other provider of a phy_link_change method), using the PHY state machine is not optional. so like, if it's going through phylink, the state machine is mandatory, not a choice bestie, it's giving main character energy and there's no escaping it π
π RETURN π
trueif consumer callsphy_startandphy_stopfalseotherwise
literally just a bool. slay π
π SEE ALSO π
Kernel file ./drivers/net/phy/phy_device.c β and omg the friend group is extensive, gather round:
phy_register_fixup(9)genphy_match_phy_device(9)get_phy_c45_ids(9)get_phy_c22_id(9)get_phy_device(9)phy_device_register(9)phy_device_remove(9)phy_get_c45_ids(9)phy_find_next(9)phy_prepare_link(9)phy_connect_direct(9)phy_connect(9)phy_disconnect(9)phy_poll_reset(9)phy_sfp_connect_phy(9)phy_sfp_disconnect_phy(9)phy_sfp_attach(9)phy_sfp_detach(9)phy_sfp_probe(9)phy_attach_direct(9)phy_detach(9)phy_reset_after_clk_enable(9)genphy_config_advert(9)genphy_c37_config_advert(9)genphy_setup_forced(9)genphy_restart_aneg(9)genphy_check_and_restart_aneg(9)__genphy_config_aneg(9)genphy_c37_config_aneg(9)genphy_aneg_done(9)genphy_update_link(9)genphy_read_status_fixed(9)genphy_read_status(9)genphy_c37_read_status(9)genphy_soft_reset(9)genphy_read_abilities(9)phy_remove_link_mode(9)phy_advertise_supported(9)phy_advertise_eee_all(9)phy_support_eee(9)phy_disable_eee(9)phy_support_sym_pause(9)phy_support_asym_pause(9)phy_set_sym_pause(9)phy_set_asym_pause(9)phy_validate_pause(9)phy_get_pause(9)phy_get_internal_delay(9)phy_get_tx_amplitude_gain(9)phy_get_mac_termination(9)phy_get_sfp_port(9)fwnode_mdio_find_device(9)fwnode_phy_find_device(9)fwnode_get_phy_node(9)phy_probe(9)phy_driver_register(9)
like i said, big friend group. iykyk π§π
okay that's the whole page bestie, go forth and vibe check ur PHYs π₯π
β with love from ./drivers/net/phy, October 2026, from ur favorite manual page phy_uses_state_machine(9) πΈβ¨π
π¦ 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