diff options
author | 2025-09-02 16:23:16 -0700 | |
---|---|---|
committer | 2025-09-02 16:23:16 -0700 | |
commit | c06ca8ce90bae91744ac93c7e09ebeec6ac3df90 (patch) | |
tree | be44bf0ab2384d34220e1c9681e64aa8fccaa29f /include/linux/phy.h | |
parent | net/tcp: Fix socket memory leak in TCP-AO failure handling for IPv6 (diff) | |
parent | net: phylink: disable autoneg for interfaces that have no inband (diff) | |
download | wireguard-linux-c06ca8ce90bae91744ac93c7e09ebeec6ac3df90.tar.xz wireguard-linux-c06ca8ce90bae91744ac93c7e09ebeec6ac3df90.zip |
Merge branch 'net-fix-optical-sfp-failures'
Russell King says:
====================
net: fix optical SFP failures
A regression was reported back in April concerning pcs-lynx and 10G
optical SFPs. This patch series addresses that regression, and likely
similar unreported regressions.
These patches:
- Add phy_interface_weight() which will be used in the solution.
- Split out the code that determines the inband "type" for an
interface mode.
- Clear the Autoneg bit in the advertising mask, or the Autoneg bit
in the support mask and the entire advertising mask if the selected
interface mode has no inband capabilties.
Tested with the mvpp2 patch posted earlier today.
====================
Link: https://patch.msgid.link/aLSHmddAqiCISeK3@shell.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@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 4c2b8b6e7187..bb45787d8684 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -169,6 +169,11 @@ static inline bool phy_interface_empty(const unsigned long *intf) return bitmap_empty(intf, PHY_INTERFACE_MODE_MAX); } +static inline unsigned int phy_interface_weight(const unsigned long *intf) +{ + return bitmap_weight(intf, PHY_INTERFACE_MODE_MAX); +} + static inline void phy_interface_and(unsigned long *dst, const unsigned long *a, const unsigned long *b) { |