All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1478190980.6632.26.camel@baylibre.com>

diff --git a/a/1.txt b/N1/1.txt
index 9aa3da9..03ff32e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -4,9 +4,9 @@ On Sat, 2016-10-01 at 17:58 +0200, Martin Blumenstingl wrote:
 > On Mon, Sep 26, 2016 at 8:17 AM, Giuseppe CAVALLARO
 > <peppe.cavallaro@st.com> wrote:
 > > 
-> > Hello Andr?
+> > Hello André
 > > 
-> > On 9/17/2016 11:23 PM, Andr? Roth wrote:
+> > On 9/17/2016 11:23 PM, André Roth wrote:
 > > > 
 > > > 
 > > > 
@@ -49,15 +49,15 @@ On Sat, 2016-10-01 at 17:58 +0200, Martin Blumenstingl wrote:
 Hi all,
 
 I did several tests on this issue with amlogic's S905 SoC (Synopsys MAC
-- user ID: 0x11, Synopsys ID: 0x37.)?
+- user ID: 0x11, Synopsys ID: 0x37.) 
 
 With the OdroidC2 (PHY Realtek RTL8211F), EEE is on by default.
 Just before launching iperf3, here are the ethtool stats regarding LPI:
-? ? ?irq_tx_path_in_lpi_mode_n: 6
-?????irq_tx_path_exit_lpi_mode_n: 5
-?????irq_rx_path_in_lpi_mode_n: 76
-?????irq_rx_path_exit_lpi_mode_n: 75
-?????phy_eee_wakeup_error_n: 0
+     irq_tx_path_in_lpi_mode_n: 6
+     irq_tx_path_exit_lpi_mode_n: 5
+     irq_rx_path_in_lpi_mode_n: 76
+     irq_rx_path_exit_lpi_mode_n: 75
+     phy_eee_wakeup_error_n: 0
 
 Sending data with iperf usually works for little while (between 0 and
 10s)
@@ -65,32 +65,32 @@ Sending data with iperf usually works for little while (between 0 and
 # iperf3 -c 192.168.1.170 -p12345
 Connecting to host 192.168.1.170, port 12345
 local 192.168.1.30 port 54450 connected to 192.168.1.170 port 12345
-Interval???????????Transfer?????Bandwidth???????Retr??Cwnd
-0.00-1.00???sec???112 MBytes???938 Mbits/sec????0????409 KBytes???????
-1.00-2.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes ? ? ??
-2.00-3.00???sec???112 MBytes???939 Mbits/sec????0????426 KBytes???????
-3.00-4.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes???????
-4.00-5.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes???????
-5.00-6.00???sec???112 MBytes???939 Mbits/sec????0????426 KBytes???????
-6.00-7.00???sec??9.26 MBytes??77.6 Mbits/sec????2???1.41 KBytes???????
-7.00-8.00???sec??0.00 Bytes??0.00 bits/sec????1???1.41 KBytes???????
-8.00-9.00???sec??0.00 Bytes??0.00 bits/sec????0???1.41 KBytes???????
-^C10.00-13.58??sec??0.00 Bytes??0.00 bits/sec????1???1.41 KBytes???????
+Interval           Transfer     Bandwidth       Retr  Cwnd
+0.00-1.00   sec   112 MBytes   938 Mbits/sec    0    409 KBytes       
+1.00-2.00   sec   112 MBytes   940 Mbits/sec    0    426 KBytes       
+2.00-3.00   sec   112 MBytes   939 Mbits/sec    0    426 KBytes       
+3.00-4.00   sec   112 MBytes   940 Mbits/sec    0    426 KBytes       
+4.00-5.00   sec   112 MBytes   940 Mbits/sec    0    426 KBytes       
+5.00-6.00   sec   112 MBytes   939 Mbits/sec    0    426 KBytes       
+6.00-7.00   sec  9.26 MBytes  77.6 Mbits/sec    2   1.41 KBytes       
+7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       
+8.00-9.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
+^C10.00-13.58  sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       
 - - - - - - - - - - - - - - - - - - - - - - - - -
-Interval???????????Transfer?????Bandwidth???????Retr
-0.00-13.58??sec???681 MBytes???421 Mbits/sec????4?????????????sender
-0.00-13.58??sec??0.00 Bytes??0.00 bits/sec??????????????????receiver
+Interval           Transfer     Bandwidth       Retr
+0.00-13.58  sec   681 MBytes   421 Mbits/sec    4             sender
+0.00-13.58  sec  0.00 Bytes  0.00 bits/sec                  receiver
 iperf3: interrupt - the client has terminated
 
 iperf3 does not exit ant the link seems completely broken. We cannot
 send or receive until the interface is brought down then up again.
 
 Here are the LPI related stats after the test:
-? ? ?irq_tx_path_in_lpi_mode_n: 48
-?????irq_tx_path_exit_lpi_mode_n: 48
-?????irq_rx_path_in_lpi_mode_n: 325
-?????irq_rx_path_exit_lpi_mode_n: 325
-?????phy_eee_wakeup_error_n: 0
+     irq_tx_path_in_lpi_mode_n: 48
+     irq_tx_path_exit_lpi_mode_n: 48
+     irq_rx_path_in_lpi_mode_n: 325
+     irq_rx_path_exit_lpi_mode_n: 325
+     phy_eee_wakeup_error_n: 0
 
 Like Martin, I tried playing around with eee in stmmac, but I could not
 improve the situation. Then I tried disabling EEE advertisement on the
@@ -103,11 +103,11 @@ On the P200 Board (PHY Micrel KSZ9031), EEE is off by default. There is
 no problem on this board right now. I tried to force the activation of
 EEE on this board and ended up in the same situation as the OdroidC2
 (link broken). The stats were a bit different though:
-? ? ?irq_tx_path_in_lpi_mode_n: 28
-?????irq_tx_path_exit_lpi_mode_n: 28
-?????irq_rx_path_in_lpi_mode_n: 408
-?????irq_rx_path_exit_lpi_mode_n: 408
-?????phy_eee_wakeup_error_n: 5440
+     irq_tx_path_in_lpi_mode_n: 28
+     irq_tx_path_exit_lpi_mode_n: 28
+     irq_rx_path_in_lpi_mode_n: 408
+     irq_rx_path_exit_lpi_mode_n: 408
+     phy_eee_wakeup_error_n: 5440
 
 To everybody having similar issue with their OdroidC2, could you try
 the attached patch and let us know if it changes anything for you ?
@@ -124,18 +124,11 @@ Cheers
 Jerome
 
 
-[0] :?https://github.com/freebsd/freebsd-base-graphics/commit/1f49e276c
+[0] : https://github.com/freebsd/freebsd-base-graphics/commit/1f49e276c
 3801545dc0a337792a5f07e6ad39c84
-?
 
 > _______________________________________________
 > linux-amlogic mailing list
-> linux-amlogic at lists.infradead.org
+> linux-amlogic@lists.infradead.org
 > http://lists.infradead.org/mailman/listinfo/linux-amlogic
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: realtek8211f-disable-eee-1000.patch
-Type: text/x-patch
-Size: 2912 bytes
-Desc: not available
-URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20161103/27c2f20a/attachment.bin>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..4469321
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,3 @@
+Content-Disposition: attachment; filename="realtek8211f-disable-eee-1000.patch"
+Content-Type: text/x-patch; name="realtek8211f-disable-eee-1000.patch"; charset="UTF-8"
+Content-Transfer-Encoding: base64
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..58e5e1d
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,110 @@
+diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+index a45d1013c225..3cbeec63a439 100644
+--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+@@ -127,3 +127,18 @@
+ &usb1 {
+ 	status = "okay";
+ };
++
++&ethmac {
++	phy-handle = <&eth_phy0>;
++
++	mdio {
++		compatible = "snps,dwmac-mdio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		eth_phy0: ethernet-phy@0 {
++			reg = <0>;
++			realtek,disable-eee-1000t;
++		};
++	};
++};
+diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
+index aadd6e9f54ad..30e20ba10f45 100644
+--- a/drivers/net/phy/realtek.c
++++ b/drivers/net/phy/realtek.c
+@@ -15,6 +15,12 @@
+  */
+ #include <linux/phy.h>
+ #include <linux/module.h>
++#include <linux/of.h>
++
++struct rtl8211f_phy_priv {
++	bool eee_1000_disable;
++	bool eee_100_disable;
++};
+ 
+ #define RTL821x_PHYSR		0x11
+ #define RTL821x_PHYSR_DUPLEX	0x2000
+@@ -93,6 +99,25 @@ static int rtl8211f_config_intr(struct phy_device *phydev)
+ 	return err;
+ }
+ 
++static void rtl8211f_force_eee(struct phy_device *phydev)
++{
++	struct rtl8211f_phy_priv *priv = phydev->priv;
++	u16 val;
++
++	if (priv->eee_1000_disable || priv->eee_100_disable) {
++		val = phy_read_mmd_indirect(phydev, MDIO_AN_EEE_ADV,
++					    MDIO_MMD_AN);
++
++		if (priv->eee_1000_disable)
++			val &= ~MDIO_AN_EEE_ADV_1000T;
++		if (priv->eee_100_disable)
++			val &= ~MDIO_AN_EEE_ADV_100TX;
++
++		phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV,
++				       MDIO_MMD_AN, val);
++	}
++}
++
+ static int rtl8211f_config_init(struct phy_device *phydev)
+ {
+ 	int ret;
+@@ -102,6 +127,8 @@ static int rtl8211f_config_init(struct phy_device *phydev)
+ 	if (ret < 0)
+ 		return ret;
+ 
++	rtl8211f_force_eee(phydev);
++
+ 	if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
+ 		/* enable TXDLY */
+ 		phy_write(phydev, RTL8211F_PAGE_SELECT, 0xd08);
+@@ -115,6 +142,26 @@ static int rtl8211f_config_init(struct phy_device *phydev)
+ 	return 0;
+ }
+ 
++static int rtl8211f_phy_probe(struct phy_device *phydev)
++{
++	struct device *dev = &phydev->mdio.dev;
++	struct device_node *of_node = dev->of_node;
++	struct rtl8211f_phy_priv *priv;
++
++	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
++	if (!priv)
++		return -ENOMEM;
++
++	if (of_property_read_bool(of_node, "realtek,disable-eee-1000t"))
++		priv->eee_1000_disable= true;
++	if (of_property_read_bool(of_node, "realtek,disable-eee-100t"))
++		priv->eee_100_disable= true;
++
++	phydev->priv = priv;
++
++	return 0;
++}
++
+ static struct phy_driver realtek_drvs[] = {
+ 	{
+ 		.phy_id         = 0x00008201,
+@@ -164,6 +211,7 @@ static struct phy_driver realtek_drvs[] = {
+ 		.phy_id_mask	= 0x001fffff,
+ 		.features	= PHY_GBIT_FEATURES,
+ 		.flags		= PHY_HAS_INTERRUPT,
++		.probe		= &rtl8211f_phy_probe,
+ 		.config_aneg	= &genphy_config_aneg,
+ 		.config_init	= &rtl8211f_config_init,
+ 		.read_status	= &genphy_read_status,
diff --git a/a/content_digest b/N1/content_digest
index 2d0d558..7bec7dc 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -4,11 +4,17 @@
  "ref\020160917232312.1e30d425@gmail.com\0"
  "ref\0d59f6e2c-15ff-779d-da2f-8eb5f5a535a6@st.com\0"
  "ref\0CAFBinCD_-KjVa70iOhBSGaXZc9uKy2m4d2yVr-AfLiV7F=3EqQ@mail.gmail.com\0"
- "From\0jbrunet@baylibre.com (Jerome Brunet)\0"
- "Subject\0stmmac/RTL8211F/Meson GXBB: TX throughput problems\0"
+ "From\0Jerome Brunet <jbrunet@baylibre.com>\0"
+ "Subject\0Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems\0"
  "Date\0Thu, 03 Nov 2016 17:36:20 +0100\0"
- "To\0linus-amlogic@lists.infradead.org\0"
- "\00:1\0"
+ "To\0Martin Blumenstingl <martin.blumenstingl@googlemail.com>"
+ " Giuseppe CAVALLARO <peppe.cavallaro@st.com>\0"
+ "Cc\0Johnson Leung <r58129@freescale.com>"
+  netdev@vger.kernel.org
+ " Andr\303\251 Roth <neolynx@gmail.com>"
+  Alexandre Torgue <alexandre.torgue@st.com>
+ " linux-amlogic@lists.infradead.org\0"
+ "\01:1\0"
  "b\0"
  "On Sat, 2016-10-01 at 17:58 +0200, Martin Blumenstingl wrote:\n"
  "> Hello Peppe,\n"
@@ -16,9 +22,9 @@
  "> On Mon, Sep 26, 2016 at 8:17 AM, Giuseppe CAVALLARO\n"
  "> <peppe.cavallaro@st.com> wrote:\n"
  "> > \n"
- "> > Hello Andr?\n"
+ "> > Hello Andr\303\251\n"
  "> > \n"
- "> > On 9/17/2016 11:23 PM, Andr? Roth wrote:\n"
+ "> > On 9/17/2016 11:23 PM, Andr\303\251 Roth wrote:\n"
  "> > > \n"
  "> > > \n"
  "> > > \n"
@@ -61,15 +67,15 @@
  "Hi all,\n"
  "\n"
  "I did several tests on this issue with amlogic's S905 SoC (Synopsys MAC\n"
- "- user ID: 0x11, Synopsys ID: 0x37.)?\n"
+ "- user ID: 0x11, Synopsys ID: 0x37.)\302\240\n"
  "\n"
  "With the OdroidC2 (PHY Realtek RTL8211F), EEE is on by default.\n"
  "Just before launching iperf3, here are the ethtool stats regarding LPI:\n"
- "? ? ?irq_tx_path_in_lpi_mode_n: 6\n"
- "?????irq_tx_path_exit_lpi_mode_n: 5\n"
- "?????irq_rx_path_in_lpi_mode_n: 76\n"
- "?????irq_rx_path_exit_lpi_mode_n: 75\n"
- "?????phy_eee_wakeup_error_n: 0\n"
+ "\302\240 \302\240 \302\240irq_tx_path_in_lpi_mode_n: 6\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_tx_path_exit_lpi_mode_n: 5\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_in_lpi_mode_n: 76\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_exit_lpi_mode_n: 75\n"
+ "\302\240\302\240\302\240\302\240\302\240phy_eee_wakeup_error_n: 0\n"
  "\n"
  "Sending data with iperf usually works for little while (between 0 and\n"
  "10s)\n"
@@ -77,32 +83,32 @@
  "# iperf3 -c 192.168.1.170 -p12345\n"
  "Connecting to host 192.168.1.170, port 12345\n"
  "local 192.168.1.30 port 54450 connected to 192.168.1.170 port 12345\n"
- "Interval???????????Transfer?????Bandwidth???????Retr??Cwnd\n"
- "0.00-1.00???sec???112 MBytes???938 Mbits/sec????0????409 KBytes???????\n"
- "1.00-2.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes ? ? ??\n"
- "2.00-3.00???sec???112 MBytes???939 Mbits/sec????0????426 KBytes???????\n"
- "3.00-4.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes???????\n"
- "4.00-5.00???sec???112 MBytes???940 Mbits/sec????0????426 KBytes???????\n"
- "5.00-6.00???sec???112 MBytes???939 Mbits/sec????0????426 KBytes???????\n"
- "6.00-7.00???sec??9.26 MBytes??77.6 Mbits/sec????2???1.41 KBytes???????\n"
- "7.00-8.00???sec??0.00 Bytes??0.00 bits/sec????1???1.41 KBytes???????\n"
- "8.00-9.00???sec??0.00 Bytes??0.00 bits/sec????0???1.41 KBytes???????\n"
- "^C10.00-13.58??sec??0.00 Bytes??0.00 bits/sec????1???1.41 KBytes???????\n"
+ "Interval\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240Transfer\302\240\302\240\302\240\302\240\302\240Bandwidth\302\240\302\240\302\240\302\240\302\240\302\240\302\240Retr\302\240\302\240Cwnd\n"
+ "0.00-1.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240938 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240409 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "1.00-2.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240940 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240426 KBytes \302\240 \302\240 \302\240\302\240\n"
+ "2.00-3.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240939 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240426 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "3.00-4.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240940 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240426 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "4.00-5.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240940 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240426 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "5.00-6.00\302\240\302\240\302\240sec\302\240\302\240\302\240112 MBytes\302\240\302\240\302\240939 Mbits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\240\302\240426 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "6.00-7.00\302\240\302\240\302\240sec\302\240\302\2409.26 MBytes\302\240\302\24077.6 Mbits/sec\302\240\302\240\302\240\302\2402\302\240\302\240\302\2401.41 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "7.00-8.00\302\240\302\240\302\240sec\302\240\302\2400.00 Bytes\302\240\302\2400.00 bits/sec\302\240\302\240\302\240\302\2401\302\240\302\240\302\2401.41 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "8.00-9.00\302\240\302\240\302\240sec\302\240\302\2400.00 Bytes\302\240\302\2400.00 bits/sec\302\240\302\240\302\240\302\2400\302\240\302\240\302\2401.41 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
+ "^C10.00-13.58\302\240\302\240sec\302\240\302\2400.00 Bytes\302\240\302\2400.00 bits/sec\302\240\302\240\302\240\302\2401\302\240\302\240\302\2401.41 KBytes\302\240\302\240\302\240\302\240\302\240\302\240\302\240\n"
  "- - - - - - - - - - - - - - - - - - - - - - - - -\n"
- "Interval???????????Transfer?????Bandwidth???????Retr\n"
- "0.00-13.58??sec???681 MBytes???421 Mbits/sec????4?????????????sender\n"
- "0.00-13.58??sec??0.00 Bytes??0.00 bits/sec??????????????????receiver\n"
+ "Interval\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240Transfer\302\240\302\240\302\240\302\240\302\240Bandwidth\302\240\302\240\302\240\302\240\302\240\302\240\302\240Retr\n"
+ "0.00-13.58\302\240\302\240sec\302\240\302\240\302\240681 MBytes\302\240\302\240\302\240421 Mbits/sec\302\240\302\240\302\240\302\2404\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240sender\n"
+ "0.00-13.58\302\240\302\240sec\302\240\302\2400.00 Bytes\302\240\302\2400.00 bits/sec\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240receiver\n"
  "iperf3: interrupt - the client has terminated\n"
  "\n"
  "iperf3 does not exit ant the link seems completely broken. We cannot\n"
  "send or receive until the interface is brought down then up again.\n"
  "\n"
  "Here are the LPI related stats after the test:\n"
- "? ? ?irq_tx_path_in_lpi_mode_n: 48\n"
- "?????irq_tx_path_exit_lpi_mode_n: 48\n"
- "?????irq_rx_path_in_lpi_mode_n: 325\n"
- "?????irq_rx_path_exit_lpi_mode_n: 325\n"
- "?????phy_eee_wakeup_error_n: 0\n"
+ "\302\240 \302\240 \302\240irq_tx_path_in_lpi_mode_n: 48\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_tx_path_exit_lpi_mode_n: 48\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_in_lpi_mode_n: 325\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_exit_lpi_mode_n: 325\n"
+ "\302\240\302\240\302\240\302\240\302\240phy_eee_wakeup_error_n: 0\n"
  "\n"
  "Like Martin, I tried playing around with eee in stmmac, but I could not\n"
  "improve the situation. Then I tried disabling EEE advertisement on the\n"
@@ -115,11 +121,11 @@
  "no problem on this board right now. I tried to force the activation of\n"
  "EEE on this board and ended up in the same situation as the OdroidC2\n"
  "(link broken). The stats were a bit different though:\n"
- "? ? ?irq_tx_path_in_lpi_mode_n: 28\n"
- "?????irq_tx_path_exit_lpi_mode_n: 28\n"
- "?????irq_rx_path_in_lpi_mode_n: 408\n"
- "?????irq_rx_path_exit_lpi_mode_n: 408\n"
- "?????phy_eee_wakeup_error_n: 5440\n"
+ "\302\240 \302\240 \302\240irq_tx_path_in_lpi_mode_n: 28\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_tx_path_exit_lpi_mode_n: 28\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_in_lpi_mode_n: 408\n"
+ "\302\240\302\240\302\240\302\240\302\240irq_rx_path_exit_lpi_mode_n: 408\n"
+ "\302\240\302\240\302\240\302\240\302\240phy_eee_wakeup_error_n: 5440\n"
  "\n"
  "To everybody having similar issue with their OdroidC2, could you try\n"
  "the attached patch and let us know if it changes anything for you ?\n"
@@ -136,20 +142,126 @@
  "Jerome\n"
  "\n"
  "\n"
- "[0] :?https://github.com/freebsd/freebsd-base-graphics/commit/1f49e276c\n"
+ "[0] :\302\240https://github.com/freebsd/freebsd-base-graphics/commit/1f49e276c\n"
  "3801545dc0a337792a5f07e6ad39c84\n"
- "?\n"
+ "\302\240\n"
  "\n"
  "> _______________________________________________\n"
  "> linux-amlogic mailing list\n"
- "> linux-amlogic at lists.infradead.org\n"
- "> http://lists.infradead.org/mailman/listinfo/linux-amlogic\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: realtek8211f-disable-eee-1000.patch\n"
- "Type: text/x-patch\n"
- "Size: 2912 bytes\n"
- "Desc: not available\n"
- URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20161103/27c2f20a/attachment.bin>
+ "> linux-amlogic@lists.infradead.org\n"
+ > http://lists.infradead.org/mailman/listinfo/linux-amlogic
+ "\01:2\0"
+ "fn\0realtek8211f-disable-eee-1000.patch\0"
+ "b\0"
+ "diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts\n"
+ "index a45d1013c225..3cbeec63a439 100644\n"
+ "--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts\n"
+ "+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts\n"
+ "@@ -127,3 +127,18 @@\n"
+ " &usb1 {\n"
+ " \tstatus = \"okay\";\n"
+ " };\n"
+ "+\n"
+ "+&ethmac {\n"
+ "+\tphy-handle = <&eth_phy0>;\n"
+ "+\n"
+ "+\tmdio {\n"
+ "+\t\tcompatible = \"snps,dwmac-mdio\";\n"
+ "+\t\t#address-cells = <1>;\n"
+ "+\t\t#size-cells = <0>;\n"
+ "+\n"
+ "+\t\teth_phy0: ethernet-phy@0 {\n"
+ "+\t\t\treg = <0>;\n"
+ "+\t\t\trealtek,disable-eee-1000t;\n"
+ "+\t\t};\n"
+ "+\t};\n"
+ "+};\n"
+ "diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c\n"
+ "index aadd6e9f54ad..30e20ba10f45 100644\n"
+ "--- a/drivers/net/phy/realtek.c\n"
+ "+++ b/drivers/net/phy/realtek.c\n"
+ "@@ -15,6 +15,12 @@\n"
+ "  */\n"
+ " #include <linux/phy.h>\n"
+ " #include <linux/module.h>\n"
+ "+#include <linux/of.h>\n"
+ "+\n"
+ "+struct rtl8211f_phy_priv {\n"
+ "+\tbool eee_1000_disable;\n"
+ "+\tbool eee_100_disable;\n"
+ "+};\n"
+ " \n"
+ " #define RTL821x_PHYSR\t\t0x11\n"
+ " #define RTL821x_PHYSR_DUPLEX\t0x2000\n"
+ "@@ -93,6 +99,25 @@ static int rtl8211f_config_intr(struct phy_device *phydev)\n"
+ " \treturn err;\n"
+ " }\n"
+ " \n"
+ "+static void rtl8211f_force_eee(struct phy_device *phydev)\n"
+ "+{\n"
+ "+\tstruct rtl8211f_phy_priv *priv = phydev->priv;\n"
+ "+\tu16 val;\n"
+ "+\n"
+ "+\tif (priv->eee_1000_disable || priv->eee_100_disable) {\n"
+ "+\t\tval = phy_read_mmd_indirect(phydev, MDIO_AN_EEE_ADV,\n"
+ "+\t\t\t\t\t    MDIO_MMD_AN);\n"
+ "+\n"
+ "+\t\tif (priv->eee_1000_disable)\n"
+ "+\t\t\tval &= ~MDIO_AN_EEE_ADV_1000T;\n"
+ "+\t\tif (priv->eee_100_disable)\n"
+ "+\t\t\tval &= ~MDIO_AN_EEE_ADV_100TX;\n"
+ "+\n"
+ "+\t\tphy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV,\n"
+ "+\t\t\t\t       MDIO_MMD_AN, val);\n"
+ "+\t}\n"
+ "+}\n"
+ "+\n"
+ " static int rtl8211f_config_init(struct phy_device *phydev)\n"
+ " {\n"
+ " \tint ret;\n"
+ "@@ -102,6 +127,8 @@ static int rtl8211f_config_init(struct phy_device *phydev)\n"
+ " \tif (ret < 0)\n"
+ " \t\treturn ret;\n"
+ " \n"
+ "+\trtl8211f_force_eee(phydev);\n"
+ "+\n"
+ " \tif (phydev->interface == PHY_INTERFACE_MODE_RGMII) {\n"
+ " \t\t/* enable TXDLY */\n"
+ " \t\tphy_write(phydev, RTL8211F_PAGE_SELECT, 0xd08);\n"
+ "@@ -115,6 +142,26 @@ static int rtl8211f_config_init(struct phy_device *phydev)\n"
+ " \treturn 0;\n"
+ " }\n"
+ " \n"
+ "+static int rtl8211f_phy_probe(struct phy_device *phydev)\n"
+ "+{\n"
+ "+\tstruct device *dev = &phydev->mdio.dev;\n"
+ "+\tstruct device_node *of_node = dev->of_node;\n"
+ "+\tstruct rtl8211f_phy_priv *priv;\n"
+ "+\n"
+ "+\tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n"
+ "+\tif (!priv)\n"
+ "+\t\treturn -ENOMEM;\n"
+ "+\n"
+ "+\tif (of_property_read_bool(of_node, \"realtek,disable-eee-1000t\"))\n"
+ "+\t\tpriv->eee_1000_disable= true;\n"
+ "+\tif (of_property_read_bool(of_node, \"realtek,disable-eee-100t\"))\n"
+ "+\t\tpriv->eee_100_disable= true;\n"
+ "+\n"
+ "+\tphydev->priv = priv;\n"
+ "+\n"
+ "+\treturn 0;\n"
+ "+}\n"
+ "+\n"
+ " static struct phy_driver realtek_drvs[] = {\n"
+ " \t{\n"
+ " \t\t.phy_id         = 0x00008201,\n"
+ "@@ -164,6 +211,7 @@ static struct phy_driver realtek_drvs[] = {\n"
+ " \t\t.phy_id_mask\t= 0x001fffff,\n"
+ " \t\t.features\t= PHY_GBIT_FEATURES,\n"
+ " \t\t.flags\t\t= PHY_HAS_INTERRUPT,\n"
+ "+\t\t.probe\t\t= &rtl8211f_phy_probe,\n"
+ " \t\t.config_aneg\t= &genphy_config_aneg,\n"
+ " \t\t.config_init\t= &rtl8211f_config_init,\n"
+ " \t\t.read_status\t= &genphy_read_status,"
 
-419b7ec3c9465ba9310f3d07bc9b87e3fd57606a631529d43ef29b00ad14d34a
+88e142ad3d28c32ccace04af5cb4f33f9652f4e9d5ee296a8218b51c8d1c348b

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.