phy_connect(9)
πΈ 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:
phy_uses_state_machine(9)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_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)
kisses from ./drivers/net/phy π β dated October 2026 β this was phy_connect(9), from the Kernel API Manual. πβ¨
π¦ 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