mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-09 14:33:00 +00:00
generic: add patch for GPON-ONU-34-20BI quirk
Backport patch merged upstream adding quirk for SFP GPON-ONU-34-20BI. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
91d2ead3c3
commit
86dadeba48
@ -0,0 +1,34 @@
|
|||||||
|
From d387e34fec407f881fdf165b5d7ec128ebff362f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Tue, 19 Sep 2023 14:47:20 +0200
|
||||||
|
Subject: [PATCH] net: sfp: add quirk for Fiberstone GPON-ONU-34-20BI
|
||||||
|
|
||||||
|
Fiberstone GPON-ONU-34-20B can operate at 2500base-X, but report 1.2GBd
|
||||||
|
NRZ in their EEPROM.
|
||||||
|
|
||||||
|
The module also require the ignore tx fault fixup similar to Huawei MA5671A
|
||||||
|
as it gets disabled on error messages with serial redirection enabled.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Link: https://lore.kernel.org/r/20230919124720.8210-1-ansuelsmth@gmail.com
|
||||||
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
---
|
||||||
|
drivers/net/phy/sfp.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/net/phy/sfp.c
|
||||||
|
+++ b/drivers/net/phy/sfp.c
|
||||||
|
@@ -368,6 +368,13 @@ static const struct sfp_quirk sfp_quirks
|
||||||
|
.modes = sfp_quirk_2500basex,
|
||||||
|
.fixup = sfp_fixup_long_startup,
|
||||||
|
}, {
|
||||||
|
+ // Fiberstore GPON-ONU-34-20BI can operate at 2500base-X, but report 1.2GBd
|
||||||
|
+ // NRZ in their EEPROM
|
||||||
|
+ .vendor = "FS",
|
||||||
|
+ .part = "GPON-ONU-34-20BI",
|
||||||
|
+ .modes = sfp_quirk_2500basex,
|
||||||
|
+ .fixup = sfp_fixup_ignore_tx_fault,
|
||||||
|
+ }, {
|
||||||
|
.vendor = "HALNy",
|
||||||
|
.part = "HL-GSFP",
|
||||||
|
.fixup = sfp_fixup_halny_gsfp,
|
@ -0,0 +1,32 @@
|
|||||||
|
From d387e34fec407f881fdf165b5d7ec128ebff362f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Tue, 19 Sep 2023 14:47:20 +0200
|
||||||
|
Subject: [PATCH] net: sfp: add quirk for Fiberstone GPON-ONU-34-20BI
|
||||||
|
|
||||||
|
Fiberstone GPON-ONU-34-20B can operate at 2500base-X, but report 1.2GBd
|
||||||
|
NRZ in their EEPROM.
|
||||||
|
|
||||||
|
The module also require the ignore tx fault fixup similar to Huawei MA5671A
|
||||||
|
as it gets disabled on error messages with serial redirection enabled.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Link: https://lore.kernel.org/r/20230919124720.8210-1-ansuelsmth@gmail.com
|
||||||
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
---
|
||||||
|
drivers/net/phy/sfp.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/net/phy/sfp.c
|
||||||
|
+++ b/drivers/net/phy/sfp.c
|
||||||
|
@@ -393,6 +393,11 @@ static const struct sfp_quirk sfp_quirks
|
||||||
|
SFP_QUIRK("ALCATELLUCENT", "3FE46541AA", sfp_quirk_2500basex,
|
||||||
|
sfp_fixup_long_startup),
|
||||||
|
|
||||||
|
+ // Fiberstore GPON-ONU-34-20BI can operate at 2500base-X, but report 1.2GBd
|
||||||
|
+ // NRZ in their EEPROM
|
||||||
|
+ SFP_QUIRK("FS", "GPON-ONU-34-20BI", sfp_quirk_2500basex,
|
||||||
|
+ sfp_fixup_ignore_tx_fault),
|
||||||
|
+
|
||||||
|
SFP_QUIRK_F("HALNy", "HL-GSFP", sfp_fixup_halny_gsfp),
|
||||||
|
|
||||||
|
// HG MXPD-483II-F 2.5G supports 2500Base-X, but incorrectly reports
|
@ -26,7 +26,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/sfp.c
|
--- a/drivers/net/phy/sfp.c
|
||||||
+++ b/drivers/net/phy/sfp.c
|
+++ b/drivers/net/phy/sfp.c
|
||||||
@@ -383,6 +383,11 @@ static const struct sfp_quirk sfp_quirks
|
@@ -390,6 +390,11 @@ static const struct sfp_quirk sfp_quirks
|
||||||
.modes = sfp_quirk_2500basex,
|
.modes = sfp_quirk_2500basex,
|
||||||
.fixup = sfp_fixup_ignore_tx_fault,
|
.fixup = sfp_fixup_ignore_tx_fault,
|
||||||
}, {
|
}, {
|
||||||
@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
// Lantech 8330-262D-E can operate at 2500base-X, but
|
// Lantech 8330-262D-E can operate at 2500base-X, but
|
||||||
// incorrectly report 2500MBd NRZ in their EEPROM
|
// incorrectly report 2500MBd NRZ in their EEPROM
|
||||||
.vendor = "Lantech",
|
.vendor = "Lantech",
|
||||||
@@ -2312,7 +2317,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
@@ -2319,7 +2324,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||||
* or t_start_up, so assume there is a fault.
|
* or t_start_up, so assume there is a fault.
|
||||||
*/
|
*/
|
||||||
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
||||||
@ -48,7 +48,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
|
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
|
||||||
init_done:
|
init_done:
|
||||||
sfp->sm_phy_retries = R_PHY_RETRY;
|
sfp->sm_phy_retries = R_PHY_RETRY;
|
||||||
@@ -2535,10 +2541,12 @@ static void sfp_check_state(struct sfp *
|
@@ -2542,10 +2548,12 @@ static void sfp_check_state(struct sfp *
|
||||||
mutex_lock(&sfp->st_mutex);
|
mutex_lock(&sfp->st_mutex);
|
||||||
state = sfp_get_state(sfp);
|
state = sfp_get_state(sfp);
|
||||||
changed = state ^ sfp->state;
|
changed = state ^ sfp->state;
|
||||||
|
@ -26,7 +26,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/sfp.c
|
--- a/drivers/net/phy/sfp.c
|
||||||
+++ b/drivers/net/phy/sfp.c
|
+++ b/drivers/net/phy/sfp.c
|
||||||
@@ -404,6 +404,9 @@ static const struct sfp_quirk sfp_quirks
|
@@ -409,6 +409,9 @@ static const struct sfp_quirk sfp_quirks
|
||||||
SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex,
|
SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex,
|
||||||
sfp_fixup_ignore_tx_fault),
|
sfp_fixup_ignore_tx_fault),
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
// Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report
|
// Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report
|
||||||
// 2500MBd NRZ in their EEPROM
|
// 2500MBd NRZ in their EEPROM
|
||||||
SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex),
|
SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex),
|
||||||
@@ -2339,7 +2342,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
@@ -2344,7 +2347,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||||
* or t_start_up, so assume there is a fault.
|
* or t_start_up, so assume there is a fault.
|
||||||
*/
|
*/
|
||||||
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
||||||
@ -46,7 +46,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||||||
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
|
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
|
||||||
init_done:
|
init_done:
|
||||||
/* Create mdiobus and start trying for PHY */
|
/* Create mdiobus and start trying for PHY */
|
||||||
@@ -2568,10 +2572,12 @@ static void sfp_check_state(struct sfp *
|
@@ -2573,10 +2577,12 @@ static void sfp_check_state(struct sfp *
|
||||||
mutex_lock(&sfp->st_mutex);
|
mutex_lock(&sfp->st_mutex);
|
||||||
state = sfp_get_state(sfp);
|
state = sfp_get_state(sfp);
|
||||||
changed = state ^ sfp->state;
|
changed = state ^ sfp->state;
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/sfp.c
|
--- a/drivers/net/phy/sfp.c
|
||||||
+++ b/drivers/net/phy/sfp.c
|
+++ b/drivers/net/phy/sfp.c
|
||||||
@@ -2153,6 +2153,13 @@ static void sfp_sm_module(struct sfp *sf
|
@@ -2160,6 +2160,13 @@ static void sfp_sm_module(struct sfp *sf
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
|||||||
|
|
||||||
--- a/drivers/net/phy/sfp.c
|
--- a/drivers/net/phy/sfp.c
|
||||||
+++ b/drivers/net/phy/sfp.c
|
+++ b/drivers/net/phy/sfp.c
|
||||||
@@ -549,32 +549,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
@@ -556,32 +556,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||||
return ret == ARRAY_SIZE(msgs) ? len : 0;
|
return ret == ARRAY_SIZE(msgs) ? len : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user