phy_get_internal_delay(9)
π phy_get_internal_delay(9) π
okay so bestie, welcome to the Kernel API Manual β this lil page is all about phy_get_internal_delay, and it is literally the function that hands you back the index of the internal delay. slay. let's get into it π
β¨ NAME β¨
phy_get_internal_delay β returns the index of the internal delay π
πΈ SYNOPSIS πΈ
s32 phy_get_internal_delay (struct phy_device *phydev , const int
*delay_values , int size , bool is_rx );
like, that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
phydevβ thephy_devicestruct, bestie. it's the star of the show πdelay_valuesβ array of delays the PHY supports β¨sizeβ the size of the delay array, yes the actual size πΈis_rxβ boolean that indicates you wanna get the rx internal delay π‘
π DESCRIPTION π
so what it does: it returns the index within the array of internal delay that you passed in. that's the vibe check. π₯
and if the device property is not present? then the interface type gets checked β if the interface defines use of internal delay then a 1 is returned, otherwise a 0 is returned. no cap, that's the whole logic π
β οΈ the array must be in ascending order. like, mandatory. if your PHY doesn't have an ascending order array then size = 0 and the value of the delay property is returned instead.
and if the delay is invalid or cannot be found? it returns -EINVAL. periodt. π
π SEE ALSO π
Kernel file ./drivers/net/phy/phy_device.c, plus a whole friend group of functions, all here, all accounted for π«Ά:
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_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_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)
that's the whole page bestie, go forth and read your delays ππ
sign-off szn π β this iconic lil number lives in ./drivers/net/phy and it's dated October 2026, mwah πβ¨
π¦ 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