mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
7e94a02cbe
It was reported on Turris forum [1] that HALNy HL-GSFP module does not work as it should with kernel 5.15. Russell King prepared this patch series, which fixes broken SFP module to work. Compile and run tested with Turris Omnia. [1] https://forum.turris.cz/t/hbl-turrisos-6-0-alpha2-halny-hl-gsfp-sfp-gpon-stick-problems/17547 Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
From 4c9d8c654827ef42da702c5b6c3392e8ac0bc60a Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Fri, 26 Aug 2022 08:43:40 +0100
|
|
Subject: [PATCH 3/6] net: sfp: move Huawei MA5671A fixup
|
|
|
|
Move this module over to the new fixup mechanism.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
---
|
|
drivers/net/phy/sfp.c | 12 +++++++-----
|
|
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/phy/sfp.c
|
|
+++ b/drivers/net/phy/sfp.c
|
|
@@ -315,6 +315,11 @@ static void sfp_fixup_long_startup(struc
|
|
sfp->module_t_start_up = T_START_UP_BAD_GPON;
|
|
}
|
|
|
|
+static void sfp_fixup_ignore_tx_fault(struct sfp *sfp)
|
|
+{
|
|
+ sfp->tx_fault_ignore = true;
|
|
+}
|
|
+
|
|
static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
|
|
unsigned long *modes)
|
|
{
|
|
@@ -352,6 +357,7 @@ static const struct sfp_quirk sfp_quirks
|
|
.vendor = "HUAWEI",
|
|
.part = "MA5671A",
|
|
.modes = sfp_quirk_2500basex,
|
|
+ .fixup = sfp_fixup_ignore_tx_fault,
|
|
}, {
|
|
// Lantech 8330-262D-E can operate at 2500base-X, but
|
|
// incorrectly report 2500MBd NRZ in their EEPROM
|
|
@@ -2037,11 +2043,7 @@ static int sfp_sm_mod_probe(struct sfp *
|
|
|
|
sfp->module_t_start_up = T_START_UP;
|
|
|
|
- if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
|
|
- !memcmp(id.base.vendor_pn, "MA5671A ", 16))
|
|
- sfp->tx_fault_ignore = true;
|
|
- else
|
|
- sfp->tx_fault_ignore = false;
|
|
+ sfp->tx_fault_ignore = false;
|
|
|
|
sfp->quirk = sfp_lookup_quirk(&id);
|
|
if (sfp->quirk && sfp->quirk->fixup)
|