diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-09-17 00:46:36 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-11 15:40:25 +0300 |
| commit | ecd57017429e3f5c07928fb7ca01c8c67066ed2f (patch) | |
| tree | 5a849aec51d67b151c61a92e5cf7a2f92a1f1062 /include/linux/phy.h | |
| parent | 4dc7b69bca8ef6b932a7c6bea63450796b1146ce (diff) | |
| download | linux-ecd57017429e3f5c07928fb7ca01c8c67066ed2f.tar.xz | |
net: phy: add phy_interface_copy()
[ Upstream commit a571f08d3db215dd6ec294d8faac8cc4184bc4e4 ]
Add a helper for copying PHY interface bitmasks. This will be used by
the SFP bus code, which will then be moved to phylink in the subsequent
patches.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1uydVU-000000061W8-2IDT@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: adcbadfd8e05 ("net: sfp: Fix quirk for Ubiquiti U-Fiber Instant SFP module")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/phy.h')
| -rw-r--r-- | include/linux/phy.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 6fe5d564beed..49283facf932 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -187,6 +187,11 @@ static inline bool phy_interface_empty(const unsigned long *intf) return bitmap_empty(intf, PHY_INTERFACE_MODE_MAX); } +static inline void phy_interface_copy(unsigned long *d, const unsigned long *s) +{ + bitmap_copy(d, s, PHY_INTERFACE_MODE_MAX); +} + static inline unsigned int phy_interface_weight(const unsigned long *intf) { return bitmap_weight(intf, PHY_INTERFACE_MODE_MAX); |
