__phy_package_read_mmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __phy_package_read_mmd

ok so real talk, this is a page from the Kernel API Manual and honestly? it's a little guy that does one job and does it cute. bestie, let's get into it 🫢


✨ NAME ✨

__phy_package_read_mmd β€” read an MMD reg, but like... relative to the PHY package base addr πŸ’«


🌸 SYNOPSIS 🌸

int __phy_package_read_mmd (struct phy_device *phydev , unsigned int
addr_offset , int devad , u32 regnum );

like, it takes four things and gives you back an int. no cap. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • phydev β€” the phy_device struct πŸ’– the main character of this whole situation, honestly.
  • addr_offset β€” the offset that gets added onto the PHY package base_addr. yes, added. math is happening. iykyk πŸ”₯
  • devad β€” which MMD you're reading from. pick your fighter ✨
  • regnum β€” the register on that MMD you wanna read. this is u32, respect the width πŸ’…

🌈 DESCRIPTION 🌈

okay so picture this: it's a convenience helper for reading a register of an MMD on a given PHY, and it does it using the PHY package base address. iconic behaviour, truly. 🌟

the base address gets added to the addr_offset value β€” so base_addr + addr_offset, every single time, that's the whole vibe. 🧚

and here's the part where i need you to pay attention bestie: same calling rules as for __phy_read β€” literally fr fr, don't get creative with it πŸ™ˆ


⭐ NOTE ⭐

it's assumed that the entire PHY package is either C22 or C45. one or the other, queen. don't be messy about it πŸ’€

no cap, this is an assumption β€” so if your package is some cursed mix, that's on you, not on the helper πŸ“

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/net/phy/phy_package.c (yes, the struct lives there, go look πŸŽ€), plus the whole squad:


and that's the page!! sourced from ./drivers/net/phy, dated October 2026, and honestly this doc ate and left no crumbs πŸ‘‘ mwah πŸ’‹

πŸ“¦ where this page comes from