Skip to content

Commit b0eae33

Browse files
Russell Kingdavem330
authored andcommitted
net: sfp: add some quirks for GPON modules
Marc Micalizzi reports that Huawei MA5671A and Alcatel/Lucent G-010S-P modules are capable of 2500base-X, but incorrectly report their capabilities in the EEPROM. It seems rather common that GPON modules mis-report. Let's fix these modules by adding some quirks. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b34bb2c commit b0eae33

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

drivers/net/phy/sfp-bus.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,32 @@ struct sfp_bus {
3838
bool started;
3939
};
4040

41+
static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
42+
unsigned long *modes)
43+
{
44+
phylink_set(modes, 2500baseX_Full);
45+
}
46+
4147
static const struct sfp_quirk sfp_quirks[] = {
48+
{
49+
// Alcatel Lucent G-010S-P can operate at 2500base-X, but
50+
// incorrectly report 2500MBd NRZ in their EEPROM
51+
.vendor = "ALCATELLUCENT",
52+
.part = "G010SP",
53+
.modes = sfp_quirk_2500basex,
54+
}, {
55+
// Alcatel Lucent G-010S-A can operate at 2500base-X, but
56+
// report 3.2GBd NRZ in their EEPROM
57+
.vendor = "ALCATELLUCENT",
58+
.part = "3FE46541AA",
59+
.modes = sfp_quirk_2500basex,
60+
}, {
61+
// Huawei MA5671A can operate at 2500base-X, but report 1.2GBd
62+
// NRZ in their EEPROM
63+
.vendor = "HUAWEI",
64+
.part = "MA5671A",
65+
.modes = sfp_quirk_2500basex,
66+
},
4267
};
4368

4469
static size_t sfp_strlen(const char *str, size_t maxlen)

0 commit comments

Comments
 (0)