stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: ls1021a: Restore MDIO compatible to gianfar
@ 2020-01-26 19:49 Vladimir Oltean
  2020-02-14  2:34 ` Shawn Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2020-01-26 19:49 UTC (permalink / raw)
  To: shawnguo, devicetree
  Cc: leoyang.li, claudiu.manoil, robh+dt, pavel, linux-arm-kernel,
	linux-kernel, netdev, stable, Vladimir Oltean

The difference between "fsl,etsec2-mdio" and "gianfar" has to do with
the .get_tbipa function, which calculates the address of the TBIPA
register automatically, if not explicitly specified. [ see
drivers/net/ethernet/freescale/fsl_pq_mdio.c ]. On LS1021A, the TBIPA
register is at offset 0x30 within the port register block, which is what
the "gianfar" method of calculating addresses actually does.

Luckily, the bad "compatible" is inconsequential for ls1021a.dtsi,
because the TBIPA register is explicitly specified via the second "reg"
(<0x0 0x2d10030 0x0 0x4>), so the "get_tbipa" function is dead code.
Nonetheless it's good to restore it to its correct value.

Background discussion:
https://www.spinics.net/lists/stable/msg361156.html

Fixes: c7861adbe37f ("ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 2f6977ada447..63d9f4a066e3 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -728,7 +728,7 @@
 		};
 
 		mdio0: mdio@2d24000 {
-			compatible = "fsl,etsec2-mdio";
+			compatible = "gianfar";
 			device_type = "mdio";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -737,7 +737,7 @@
 		};
 
 		mdio1: mdio@2d64000 {
-			compatible = "fsl,etsec2-mdio";
+			compatible = "gianfar";
 			device_type = "mdio";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: dts: ls1021a: Restore MDIO compatible to gianfar
  2020-01-26 19:49 [PATCH] ARM: dts: ls1021a: Restore MDIO compatible to gianfar Vladimir Oltean
@ 2020-02-14  2:34 ` Shawn Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2020-02-14  2:34 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: devicetree, leoyang.li, claudiu.manoil, robh+dt, pavel,
	linux-arm-kernel, linux-kernel, netdev, stable

On Sun, Jan 26, 2020 at 09:49:50PM +0200, Vladimir Oltean wrote:
> The difference between "fsl,etsec2-mdio" and "gianfar" has to do with
> the .get_tbipa function, which calculates the address of the TBIPA
> register automatically, if not explicitly specified. [ see
> drivers/net/ethernet/freescale/fsl_pq_mdio.c ]. On LS1021A, the TBIPA
> register is at offset 0x30 within the port register block, which is what
> the "gianfar" method of calculating addresses actually does.
> 
> Luckily, the bad "compatible" is inconsequential for ls1021a.dtsi,
> because the TBIPA register is explicitly specified via the second "reg"
> (<0x0 0x2d10030 0x0 0x4>), so the "get_tbipa" function is dead code.
> Nonetheless it's good to restore it to its correct value.
> 
> Background discussion:
> https://www.spinics.net/lists/stable/msg361156.html
> 
> Fixes: c7861adbe37f ("ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-14  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26 19:49 [PATCH] ARM: dts: ls1021a: Restore MDIO compatible to gianfar Vladimir Oltean
2020-02-14  2:34 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).