phy_uses_state_machine(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

  • true if consumer calls phy_start and phy_stop
  • false otherwise

literally just a bool. slay πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/phy/phy_device.c β€” and omg the friend group is extensive, gather round:

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