Skip to content

Commit 5dceccc

Browse files
hkallweitopsiff
authored andcommitted
net: phy: add phy_set_eee_broken
mainline inclusion from mainline-v6.13-rc1 category: bugfix Add an accessor for eee_broken_modes, so that drivers don't have to deal with phylib internals. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/0f8ee279-d40d-4489-a3b0-d993472d744a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> (cherry picked from commit ed623fb) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent f075752 commit 5dceccc

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

include/linux/phy.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,16 @@ void of_set_phy_supported(struct phy_device *phydev);
13101310
void of_set_phy_eee_broken(struct phy_device *phydev);
13111311
int phy_speed_down_core(struct phy_device *phydev);
13121312

1313+
/**
1314+
* phy_set_eee_broken - Mark an EEE mode as broken so that it isn't advertised.
1315+
* @phydev: The phy_device struct
1316+
* @link_mode: The broken EEE mode
1317+
*/
1318+
static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode)
1319+
{
1320+
linkmode_set_bit(link_mode, phydev->eee_broken_modes);
1321+
}
1322+
13131323
/**
13141324
* phy_is_started - Convenience function to check whether PHY is started
13151325
* @phydev: The phy_device struct

0 commit comments

Comments
 (0)