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]
Message-Id: <20200507132135.316-1-marek.behun@nic.cz>
Date:   Thu,  7 May 2020 15:21:35 +0200
From:   Marek Behún <marek.behun@....cz>
To:     netdev@...r.kernel.org
Cc:     Marek Behún <marek.behun@....cz>,
        Russell King <rmk+kernel@...linux.org.uk>
Subject: [PATCH net-next] net: sfp: add some quirks for FreeTel direct attach modules

FreeTel P.C30.2 and P.C30.3 may fail to report anything useful from
their EEPROM. They report correct nominal bitrate of 10300 MBd, but do
not report sfp_ct_passive nor sfp_ct_active in their ERPROM.

These modules can also operate at 1000baseX and 2500baseX.

Signed-off-by: Marek Behún <marek.behun@....cz>
Cc: Russell King <rmk+kernel@...linux.org.uk>
---
 drivers/net/phy/sfp-bus.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 6900c68260e0..f021709bedcc 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -44,6 +44,14 @@ static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
 	phylink_set(modes, 2500baseX_Full);
 }
 
+static void sfp_quirk_direct_attach_10g(const struct sfp_eeprom_id *id,
+					unsigned long *modes)
+{
+	phylink_set(modes, 10000baseCR_Full);
+	phylink_set(modes, 2500baseX_Full);
+	phylink_set(modes, 1000baseX_Full);
+}
+
 static const struct sfp_quirk sfp_quirks[] = {
 	{
 		// Alcatel Lucent G-010S-P can operate at 2500base-X, but
@@ -63,6 +71,18 @@ static const struct sfp_quirk sfp_quirks[] = {
 		.vendor = "HUAWEI",
 		.part = "MA5671A",
 		.modes = sfp_quirk_2500basex,
+	}, {
+		// FreeTel P.C30.2 is a SFP+ direct attach that can operate at
+		// at 1000baseX, 2500baseX and 10000baseCR, but may report none
+		// of these in their EEPROM
+		.vendor = "FreeTel",
+		.part = "P.C30.2",
+		.modes = sfp_quirk_direct_attach_10g,
+	}, {
+		// same as previous
+		.vendor = "FreeTel",
+		.part = "P.C30.3",
+		.modes = sfp_quirk_direct_attach_10g,
 	},
 };
 
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ