lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Nov 2020 11:06:42 +0100
From:   Bjarni Jonasson <bjarni.jonasson@...rochip.com>
To:     Russell King <linux@...linux.org.uk>, Andrew Lunn <andrew@...n.ch>,
        "Heiner Kallweit" <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
CC:     Bjarni Jonasson <bjarni.jonasson@...rochip.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        UNGLinuxDriver <UNGLinuxDriver@...rochip.com>
Subject: [PATCH] phy: phylink: Fix CuSFP issue in phylink

There is an issue with the current phylink driver and CuSFPs which
results in a callback to the phylink validate function without any
advertisement capabilities.  The workaround (in this changeset)
is to assign capabilities if a 1000baseT SFP is identified.

Signed-off-by: Bjarni Jonasson <bjarni.jonasson@...rochip.com>
---
 drivers/net/phy/phylink.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 32f4e8ec96cf..76e25f7f6934 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -2196,6 +2196,14 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy)
 		mode = MLO_AN_INBAND;
 
 	/* Do the initial configuration */
+	if (phylink_test(pl->sfp_support, 1000baseT_Full)) {
+		pr_info("%s:%d: adding 1000baseT to PHY\n", __func__, __LINE__);
+		phylink_set(phy->supported, 1000baseT_Half);
+		phylink_set(phy->supported, 1000baseT_Full);
+		phylink_set(phy->advertising, 1000baseT_Half);
+		phylink_set(phy->advertising, 1000baseT_Full);
+	}
+
 	ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising);
 	if (ret < 0)
 		return ret;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ