summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-05-17 10:14:45 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2019-07-09 11:44:26 +0100
commit5ac328986fd39c83571dd0c9840dea63c70b0658 (patch)
treea9587a7240cc4ed99621f40ff3c1c5ab6000a96b
parentb8c7060d1b26cd2f5e1c579852bb575f4eda32fc (diff)
net: sfp: add quirks for two GPON modules
Marc Micalizzi reports that Huawei MA5671A and Alcatel/Lucent G010SP modules are capable of 2500base-X, but incorrectly report their capabilities in the EEPROM. Let's fix these modules by adding some quirks. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/phy/sfp-bus.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 11cb98fa66f4..99fdf35f9362 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -37,7 +37,26 @@ struct sfp_bus {
bool started;
};
+static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
+ unsigned long *modes)
+{
+ phylink_set(modes, 2500baseX_Full);
+}
+
static const struct sfp_quirk sfp_quirks[] = {
+ {
+ // Alcatel Lucent G010SP can operate at 2500base-X, but
+ // incorrectly report 2500MBd NRZ in their EEPROM
+ .vendor = "ALCATELLUCENT",
+ .part = "G010SP",
+ .modes = sfp_quirk_2500basex,
+ }, {
+ // Huawei MA5671A can operate at 2500base-X, but
+ // incorrectly report 2500MBd NRZ in their EEPROM
+ .vendor = "HUAWEI",
+ .part = "MA5671A",
+ .modes = sfp_quirk_2500basex,
+ },
};
static size_t sfp_strlen(const char *str, size_t maxlen)