lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200107123828.6586-2-patrice.chotard@st.com>
Date:   Tue, 7 Jan 2020 13:38:27 +0100
From:   <patrice.chotard@...com>
To:     <robh+dt@...nel.org>, <mark.rutland@....com>,
        <linux@...linux.org.uk>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
CC:     <patrice.chotard@...com>
Subject: [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy DT node

From: Patrice Chotard <patrice.chotard@...com>

Since 'd3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")'
we got the following kernel Oops :

Unable to handle kernel NULL pointer dereference at virtual address 00000260
pgd = (ptrval)
[00000260] *pgd=79a79831
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 201 Comm: ip Not tainted 5.5.0-rc5 #13
Hardware name: STi SoC with Flattened Device Tree
PC is at mdiobus_get_phy+0x4/0x20
LR is at stmmac_open+0x278/0xaa8
pc : [<c0a7e41c>]    lr : [<c0b1755c>]    psr: a0070013
sp : ed663930  ip : 00000000  fp : c110079c
r10: ed663d4c  r9 : ed663d4c  r8 : ee774028
r7 : ee22ad00  r6 : ee776000  r5 : 00000000  r4 : ee774000
r3 : ee775000  r2 : ca451a07  r1 : 00000098  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 6d75404a  DAC: 00000051
Process ip (pid: 201, stack limit = 0x(ptrval))

This is due to lack of mdio DT subnode, so add it.

Signed-off-by: Patrice Chotard <patrice.chotard@...com>
---
 arch/arm/boot/dts/stih410-b2260.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 4fbd8e9eb5b7..1df2c37eb3a7 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -176,6 +176,7 @@
 
 		ethernet0: dwmac@...0000 {
 			phy-mode = "rgmii";
+			phy-handle = <&phy0>;
 			pinctrl-0 = <&pinctrl_rgmii1 &pinctrl_rgmii1_mdio_1>;
 
 			snps,phy-bus-name = "stmmac";
@@ -186,6 +187,15 @@
 			snps,reset-delays-us = <0 10000 1000000>;
 
 			status = "okay";
+
+			mdio0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "snps,dwmac-mdio";
+				phy0: ethernet-phy@0 {
+					reg = <0>;
+				};
+			};
 		};
 
 		sti_uni_player0: sti-uni-player@...0000 {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ