aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch
diff options
context:
space:
mode:
authorRussell King <linux@armlinux.org.uk>2019-11-27 11:45:25 +0000
committerJonas Gorski <jonas.gorski@gmail.com>2020-01-21 22:32:48 +0100
commit1c16b574c4f77a30a0268acee30be96ae0dc5948 (patch)
tree716fd94ee81e332ba19e1af7bf98371120ea1856 /target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch
parenta07638eb24b8310a35ea6c3b09f6db59bb31cd68 (diff)
downloadupstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.tar.gz
upstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.tar.bz2
upstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.zip
kernel: add backported phy/phylink/sfp patches
Backport the phy/phylink/sfp patches currently queued in netdev or in mainline necessary to support GPON popular modules, specifically to support Huawei and Nokia GPON modules. Signed-off-by: Russell King <linux@armlinux.org.uk> [jonas.gorski: include kernel version in file names, refresh patches] Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch')
-rw-r--r--target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch b/target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch
new file mode 100644
index 0000000000..e0c35feea3
--- /dev/null
+++ b/target/linux/generic/backport-4.19/724-v5.5-net-sfp-rename-T_PROBE_WAIT-to-T_SERIAL.patch
@@ -0,0 +1,51 @@
+From 615090acb3c0b41691f3a03522ea38350387c0e4 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@armlinux.org.uk>
+Date: Tue, 15 Oct 2019 10:54:15 +0100
+Subject: [PATCH 622/660] net: sfp: rename T_PROBE_WAIT to T_SERIAL
+
+SFF-8472 rev 12.2 defines the time for the serial bus to become ready
+using t_serial. Use this as our identifier for this timeout to make
+it clear what we are referring to.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+---
+ drivers/net/phy/sfp.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -147,11 +147,10 @@ static const enum gpiod_flags gpio_flags
+ * the same length on the PCB, which means it's possible for MOD DEF 0 to
+ * connect before the I2C bus on MOD DEF 1/2.
+ *
+- * The SFP MSA specifies 300ms as t_init (the time taken for TX_FAULT to
+- * be deasserted) but makes no mention of the earliest time before we can
+- * access the I2C EEPROM. However, Avago modules require 300ms.
++ * The SFF-8472 specifies t_serial ("Time from power on until module is
++ * ready for data transmission over the two wire serial bus.") as 300ms.
+ */
+-#define T_PROBE_INIT msecs_to_jiffies(300)
++#define T_SERIAL msecs_to_jiffies(300)
+ #define T_HPOWER_LEVEL msecs_to_jiffies(300)
+ #define T_PROBE_RETRY msecs_to_jiffies(100)
+
+@@ -1495,8 +1494,8 @@ static void sfp_sm_device(struct sfp *sf
+ }
+ }
+
+-/* This state machine tracks the insert/remove state of
+- * the module, and handles probing the on-board EEPROM.
++/* This state machine tracks the insert/remove state of the module, probes
++ * the on-board EEPROM, and sets up the power level.
+ */
+ static void sfp_sm_module(struct sfp *sfp, unsigned int event)
+ {
+@@ -1512,7 +1511,7 @@ static void sfp_sm_module(struct sfp *sf
+ default:
+ if (event == SFP_E_INSERT && sfp->attached) {
+ sfp_module_tx_disable(sfp);
+- sfp_sm_mod_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT);
++ sfp_sm_mod_next(sfp, SFP_MOD_PROBE, T_SERIAL);
+ }
+ break;
+