phy_connect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 phy_connect(9) 🌸

okay bestie, welcome to the Kernel API Manual β€” this is phy_connect(9), and we're gonna make it make sense. No cap. πŸ’…


πŸ’– NAME πŸ’–

phy_connect β€” connect an ethernet device to a PHY device. That's the whole vibe: matchmaker for your ethernet device and its PHY. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the signature, copied verbatim so nobody gets ~creative~ with it:

struct phy_device * phy_connect (struct net_device *dev , const char
       *bus_id , void (*handler)(struct net_device *) , phy_interface_t
       interface );

πŸŽ€ ARGUMENTS πŸŽ€

okay so the parameters are literally:

  • dev β€” the network device to connect. πŸ’–
  • bus_id β€” the id string of the PHY device to connect. It's giving PHY name tag. 🏷️
  • handler β€” callback function for state change notifications. πŸ“£
  • interface β€” PHY device's interface. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

phy_connect is the convenience function for connecting ethernet devices to PHY devices β€” it's the shortcut bestie, the main-character helper. ✨ The default behavior is that the PHY infrastructure handles everything and only notifies the connected driver when the link status changes. That's the standard setup, no cap.

If you don't want that, or you can't use the provided functionality, you may choose to call only the subset of functions which provide the desired functionality. Lowkey build-your-own-vibe. 🫢


πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./drivers/net/phy/phy_device.c β€” that's the source file, bestie. The related-call roster, in original order, is:


kisses from ./drivers/net/phy πŸ’‹ β€” dated October 2026 β€” this was phy_connect(9), from the Kernel API Manual. πŸ’–βœ¨

πŸ“¦ where this page comes from