[PATCH v1] net: sfp: add quirks for ODI DFP-34X-2C2

From: Shengyu Qu
Date: Mon Feb 26 2024 - 08:24:46 EST


ODI DFP-34X-2C2 is capable of 2500base-X, but incorrectly report its
capabilities in the EEPROM.
So use sfp_quirk_2500basex for this module to allow 2500Base-X mode.

Signed-off-by: Shengyu Qu <wiagn233@xxxxxxxxxxx>
---
drivers/net/phy/sfp.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index f75c9eb3958e..2021cb4ff2f6 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -495,6 +495,13 @@ static const struct sfp_quirk sfp_quirks[] = {
// 2500MBd NRZ in their EEPROM
SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex),

+ // ODI DFP-34X-2C2 can operate at 2500base-X, but incorrectly report 1300MBd
+ // NRZ in the EEPROM.
+ // Besides, In early batches, vendor id is set to OEM, but that is fixed in
+ // newer batches.
+ SFP_QUIRK_M("ODI", "DFP-34X-2C2", sfp_quirk_2500basex),
+ SFP_QUIRK_M("OEM", "DFP-34X-2C2", sfp_quirk_2500basex),
+
SFP_QUIRK_M("UBNT", "UF-INSTANT", sfp_quirk_ubnt_uf_instant),

// Walsun HXSX-ATR[CI]-1 don't identify as copper, and use the
--
2.39.2