mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
3887a55909
Removed upstreamed: backport-5.15/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1] backport-5.15/612-v6.3-skbuff-Fix-a-race-between-coalescing-and-releasing-S.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=85d7a7044b759d865d10395a357632af00de5867 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=906a6689bb0191ad2a44131a3377006aa098af59 Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
70 lines
2.2 KiB
Diff
70 lines
2.2 KiB
Diff
From 275416754e9a262c97a1ad6f806a4bc6e0464aa2 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Tue, 13 Sep 2022 20:06:37 +0100
|
|
Subject: [PATCH 1/1] net: sfp: move Alcatel Lucent 3FE46541AA fixup
|
|
|
|
Add a new fixup mechanism to the SFP quirks, and use it for this
|
|
module.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/phy/sfp.c | 14 +++++++++-----
|
|
drivers/net/phy/sfp.h | 1 +
|
|
2 files changed, 10 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/phy/sfp.c
|
|
+++ b/drivers/net/phy/sfp.c
|
|
@@ -317,6 +317,11 @@ static const struct of_device_id sfp_of_
|
|
};
|
|
MODULE_DEVICE_TABLE(of, sfp_of_match);
|
|
|
|
+static void sfp_fixup_long_startup(struct sfp *sfp)
|
|
+{
|
|
+ sfp->module_t_start_up = T_START_UP_BAD_GPON;
|
|
+}
|
|
+
|
|
static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
|
|
unsigned long *modes)
|
|
{
|
|
@@ -347,6 +352,7 @@ static const struct sfp_quirk sfp_quirks
|
|
.vendor = "ALCATELLUCENT",
|
|
.part = "3FE46541AA",
|
|
.modes = sfp_quirk_2500basex,
|
|
+ .fixup = sfp_fixup_long_startup,
|
|
}, {
|
|
// Huawei MA5671A can operate at 2500base-X, but report 1.2GBd
|
|
// NRZ in their EEPROM
|
|
@@ -2043,11 +2049,7 @@ static int sfp_sm_mod_probe(struct sfp *
|
|
if (sfp->gpio[GPIO_LOS])
|
|
sfp->state_hw_mask |= SFP_F_LOS;
|
|
|
|
- if (!memcmp(id.base.vendor_name, "ALCATELLUCENT ", 16) &&
|
|
- !memcmp(id.base.vendor_pn, "3FE46541AA ", 16))
|
|
- sfp->module_t_start_up = T_START_UP_BAD_GPON;
|
|
- else
|
|
- sfp->module_t_start_up = T_START_UP;
|
|
+ sfp->module_t_start_up = T_START_UP;
|
|
|
|
if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
|
|
!memcmp(id.base.vendor_pn, "MA5671A ", 16))
|
|
@@ -2056,6 +2058,8 @@ static int sfp_sm_mod_probe(struct sfp *
|
|
sfp->tx_fault_ignore = false;
|
|
|
|
sfp->quirk = sfp_lookup_quirk(&id);
|
|
+ if (sfp->quirk && sfp->quirk->fixup)
|
|
+ sfp->quirk->fixup(sfp);
|
|
|
|
return 0;
|
|
}
|
|
--- a/drivers/net/phy/sfp.h
|
|
+++ b/drivers/net/phy/sfp.h
|
|
@@ -10,6 +10,7 @@ struct sfp_quirk {
|
|
const char *vendor;
|
|
const char *part;
|
|
void (*modes)(const struct sfp_eeprom_id *id, unsigned long *modes);
|
|
+ void (*fixup)(struct sfp *sfp);
|
|
};
|
|
|
|
struct sfp_socket_ops {
|