phy_package_join(9)
okay so welcome to phy_package_join(9) from the Kernel API Manual β bestie, weβre joining a PHY group and itβs giving shared-storage excellence β¨
πΈ NAME πΈ
phy_package_join β join a common PHY group π«Ά
β¨ SYNOPSIS β¨
int phy_package_join (struct phy_device *phydev , int base_addr , size_t
priv_size );
π ARGUMENTS π
phydevβ the targetphy_devicestruct πbase_addrβ the cookie and base PHY address of the PHY package for offset calculation of global register access. no cap, itβs doing double duty.priv_sizeβ if itβs non-zero, allocate this amount of bytes for private data.
π¦ DESCRIPTION π¦
okay so hereβs the tea: this joins a PHY group and provides a shared storage for all phydevs in this group. Itβs intended for packages which contain more than one PHY β for example a quad PHY transceiver. iconic multi-PHY behavior, honestly π
The base_addr parameter serves as cookie which has to have the same values for all members of one group, and as the base PHY address of the PHY package for offset calculation to access generic registers of a PHY package. Usually, one of the PHY addresses of the different PHYs in the package provides access to these global registers. The address which is given here will be used in the __phy_package_read and __phy_package_write convenience functions as base and added to the passed offset in those functions π₯
This will set the shared pointer of the phydev to the shared storage. If this is the first call for this cookie, the shared storage will be allocated. If priv_size is non-zero, the given amount of bytes are allocated for the priv member π
Return vibe check: Returns < 1 on error, 0 on success.
π¨ error watch: Esp. callingphy_package_joinwith the same cookie but a differentpriv_sizeis an error. donβt do that, bestie π
π SEE ALSO π
- Kernel file
./drivers/net/phy/phy_package.cstruct phy_package_shared(9)phy_package_lock(9)phy_package_unlock(9)__phy_package_read_mmd(9)__phy_package_write_mmd(9)of_phy_package_join(9)phy_package_leave(9)devm_phy_package_join(9)devm_of_phy_package_join(9)
mwah π source/version ./drivers/net/phy, date October 2026, page phy_package_join(9) β slay and goodbye π«Άπ
π¦ 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