genphy_soft_reset(9)
π genphy_soft_reset β from the Kernel API Manual, bestie
okay so real talk, this is genphy_soft_reset(9) and it's honestly one of the simpler little icons in the whole PHY universe. no cap. let's get into it π«Ά
β¨ NAME β¨
genphy_soft_reset β software reset the PHY via BMCR_RESET bit
likeβ¦ the name is the plot, fr fr. you're doing a soft reset on the PHY and the star of the show is that BMCR_RESET bit π
πΈ SYNOPSIS πΈ
int genphy_soft_reset (struct phy_device *phydev );
look at her. one struct, one return type. clean. minimal. main character energy π₯
π ARGUMENTS π
phydevβ targetphy_devicestruct. yeah that's it, that's the whole vibe. she takes the phy_device you want to reset and gets to work π¦
β DESCRIPTION β
so what she actually does: perform a software PHY reset using the standard BMCR_RESET bit, then poll for that reset bit to be cleared. π
that's the whole thing. poke the bit, then wait around, checking and checking until it clears itself. it's giving "texting your bestie and refreshing the chat until she replies" energy honestly π but like, in a hardware way. iconic.
π RETURN π
0on success π< 0on failure π
that's it, that's the contract. zero is the slay outcome, anything negative means nope π
π SEE ALSO π
bestie there are SO many of these and I'm listing every single one because I would never do you dirty like that. go read them all, iykyk π
also! Kernel file ./drivers/net/phy/phy_device.c β that's where she lives π
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_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_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)
okay and one final thing before you go β this page is stamped from ./drivers/net/phy and dated October 2026 in the Kernel API Manual, so there's your credit line bestie π§ thank you for coming to my TED talk, go reset a PHY, and remember: the bit clears itself eventually. slay π
β¨
π¦ 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