STRUCT PHY_PACKAGE_SHARED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 in phy_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 a refcount_t so 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 data priv πŸ“. it's a size_t, so it's the size of the private data blob.
  • priv β€” driver private data shared across a PHY package πŸ”. this one's a void *, 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:


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