phy_get_internal_delay(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the phy_device struct, 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 🫢:


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