STRUCT PHY_PACKAGE_SHARED(9)
π struct phy_package_shared(9) π
okay so this is a page straight outta the Kernel API Manual, and it's about struct phy_package_shared β literally the shared info that lives inside PHY packages. bestie, it's giving "group chat for PHYs that live in the same house" energy π β¨
π NAME π
struct phy_package_shared β shared information in PHY packages. no cap, that's the whole name. π«Ά
β¨ SYNOPSIS β¨
here's the struct, character for character, don't @ me:
struct phy_package_shared {
u8 base_addr;
struct device_node *np;
refcount_t refcnt;
unsigned long flags;
size_t priv_size;
void *priv;
};
πΈ Members πΈ
base_addrβ the base PHY address of the PHY package π·οΈ. it's the thing that combines PHYs into one package, and it's also used for the offset calculation inphy_package_read/write. multi-tasking icon.npβ a pointer to the Device Node, but only if the PHY package is defined in DT π³. if it's not in DT, this pointer's just vibing elsewhere.refcntβ the number of PHYs connected to this shared data π’. it's arefcount_tso it's counting who's still here.flagsβ initialization of the PHY package π©. yes queen, set your flags.priv_sizeβ the size of the shared private dataprivπ. it's asize_t, so it's the size of the private data blob.privβ driver private data shared across a PHY package π. this one's avoid *, it's the driver's own stuff, shared with everybody in the package.
π Description π
so the way that this works: it represents a shared structure between different phydev's in the same package β like, for example, a quad PHY π (four PHYs, one package, main character energy). each PHY gets to peek at the same shared data instead of everyone hoarding their own.
if you wanna see the actual join/leave mechanics, peep phy_package_join and phy_package_leave π
.
π¦ SEE ALSO π¦
the kernel file lives at ./drivers/net/phy/phy_package.c and it's lowkey the place to be. also go read:
phy_package_lock(9)phy_package_unlock(9)__phy_package_read_mmd(9)__phy_package_write_mmd(9)phy_package_join(9)of_phy_package_join(9)phy_package_leave(9)devm_phy_package_join(9)devm_of_phy_package_join(9)
and that's the whole page, bestie π§π this one came from ./drivers/net/phy and it's dated October 2026 β so mark your calendars, periodt. πβ
π¦ 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