diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-06-16 18:15:19 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-06-16 18:15:20 -0700 |
| commit | 3bfec3827b045766258927c252bc0c53baefad78 (patch) | |
| tree | efe0d6474259e848047988f372c3da88d5275e9d /include/linux | |
| parent | c1864b2eb202c7bddfb381f4bb3547627967f4f4 (diff) | |
| parent | 42ed7f7e94da01391d3519ffb5747698d2be0a67 (diff) | |
Merge branch 'net-phy-remove-phy_driver_is_genphy-and-phy_driver_is_genphy_10g'
Heiner Kallweit says:
====================
net: phy: remove phy_driver_is_genphy and phy_driver_is_genphy_10g
Replace phy_driver_is_genphy() and phy_driver_is_genphy_10g()
with a new flag in struct phy_device.
====================
Link: https://patch.msgid.link/5778e86e-dd54-4388-b824-6132729ad481@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/phy.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 8e2e4fcd050e..b037aab7b71d 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -528,6 +528,7 @@ struct macsec_ops; * @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY * @wol_enabled: Set to true if the PHY or the attached MAC have Wake-on-LAN * enabled. + * @is_genphy_driven: PHY is driven by one of the generic PHY drivers * @state: State of the PHY for management purposes * @dev_flags: Device-specific flags used by the PHY driver. * @@ -631,6 +632,7 @@ struct phy_device { unsigned is_on_sfp_module:1; unsigned mac_managed_pm:1; unsigned wol_enabled:1; + unsigned is_genphy_driven:1; unsigned autoneg:1; /* The most recently read link state */ @@ -1294,6 +1296,17 @@ static inline bool phy_is_started(struct phy_device *phydev) } /** + * phy_driver_is_genphy - Convenience function to check whether PHY is driven + * by one of the generic PHY drivers + * @phydev: The phy_device struct + * Return: true if PHY is driven by one of the genphy drivers + */ +static inline bool phy_driver_is_genphy(struct phy_device *phydev) +{ + return phydev->is_genphy_driven; +} + +/** * phy_disable_eee_mode - Don't advertise an EEE mode. * @phydev: The phy_device struct * @link_mode: The EEE mode to be disabled @@ -2095,7 +2108,4 @@ module_exit(phy_module_exit) #define module_phy_driver(__phy_drivers) \ phy_module_driver(__phy_drivers, ARRAY_SIZE(__phy_drivers)) -bool phy_driver_is_genphy(struct phy_device *phydev); -bool phy_driver_is_genphy_10g(struct phy_device *phydev); - #endif /* __PHY_H */ |
