[POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

Started by Anton Vorontsov on Mar 17, 2008 · 12 messages from 4 authors · Last reply Jun 10, 2008

Subsystems (2)

Maintainers (2)

STALE6717d

open the first message on its own page

  1. [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
    Related patches

[PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Anton Vorontsov <hidden>
Date: 2008-03-17 17:52:11

MDIO-less PHYs should use CONFIG_FIXED_PHY driver and appropriate
fixed-link property in the device tree.

If not, ethernet will not work:
  e0024520:03 not found
  eth1: Could not attach to PHY
  IP-Config: Failed to open eth1

Signed-off-by: Anton Vorontsov <redacted>
---
 arch/powerpc/boot/dts/mpc8377_rdb.dts      |    8 +-------
 arch/powerpc/boot/dts/mpc8378_rdb.dts      |    8 +-------
 arch/powerpc/boot/dts/mpc8379_rdb.dts      |    8 +-------
 arch/powerpc/configs/mpc837x_rdb_defconfig |    2 +-
 4 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index d2332fb..476f65a 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -164,12 +164,6 @@
 				reg = <0x2>;
 				device_type = "ethernet-phy";
 			};
-			phy3: ethernet-phy@3 {
-				interrupt-parent = <&ipic>;
-				interrupts = <18 0x8>;
-				reg = <0x3>;
-				device_type = "ethernet-phy";
-			};
 		};
 
 		enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
 			interrupts = <35 0x8 36 0x8 37 0x8>;
 			phy-connection-type = "mii";
 			interrupt-parent = <&ipic>;
-			phy-handle = <&phy3>;
+			fixed-link = <1 1 1000 0 0>;
 		};
 
 		serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 711f9a3..0e872a6 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -164,12 +164,6 @@
 				reg = <0x2>;
 				device_type = "ethernet-phy";
 			};
-			phy3: ethernet-phy@3 {
-				interrupt-parent = <&ipic>;
-				interrupts = <18 0x8>;
-				reg = <0x3>;
-				device_type = "ethernet-phy";
-			};
 		};
 
 		enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
 			interrupts = <35 0x8 36 0x8 37 0x8>;
 			phy-connection-type = "mii";
 			interrupt-parent = <&ipic>;
-			phy-handle = <&phy3>;
+			fixed-link = <1 1 1000 0 0>;
 		};
 
 		serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index c11ceb7..1eb8def 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -164,12 +164,6 @@
 				reg = <0x2>;
 				device_type = "ethernet-phy";
 			};
-			phy3: ethernet-phy@3 {
-				interrupt-parent = <&ipic>;
-				interrupts = <18 0x8>;
-				reg = <0x3>;
-				device_type = "ethernet-phy";
-			};
 		};
 
 		enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
 			interrupts = <35 0x8 36 0x8 37 0x8>;
 			phy-connection-type = "mii";
 			interrupt-parent = <&ipic>;
-			phy-handle = <&phy3>;
+			fixed-link = <1 1 1000 0 0>;
 		};
 
 		serial0: serial@4500 {
diff --git a/arch/powerpc/configs/mpc837x_rdb_defconfig b/arch/powerpc/configs/mpc837x_rdb_defconfig
index 91d291e..c429a33 100644
--- a/arch/powerpc/configs/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc837x_rdb_defconfig
@@ -425,7 +425,7 @@ CONFIG_MARVELL_PHY=y
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
-# CONFIG_FIXED_PHY is not set
+CONFIG_FIXED_PHY=y
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
-- 
1.5.2.2

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-17 19:42:18

On Mon, 2008-03-17 at 20:52 +0300, Anton Vorontsov wrote:
MDIO-less PHYs should use CONFIG_FIXED_PHY driver and appropriate
fixed-link property in the device tree.

If not, ethernet will not work:
  e0024520:03 not found
  eth1: Could not attach to PHY
  IP-Config: Failed to open eth1

Signed-off-by: Anton Vorontsov <redacted>
Trying to add fixed-link support for ucc_geth as this is broken too. I
noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs
my board once I got the ucc_geth driver to recognize fixed-link.
Does it work for you?

 Jocke

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Timur Tabi <hidden>
Date: 2008-03-17 21:47:02

Joakim Tjernlund wrote:
Trying to add fixed-link support for ucc_geth as this is broken too. I
noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs
my board once I got the ucc_geth driver to recognize fixed-link.
Does it work for you?
A long time ago there was a bug where "ifconfig eth1 down" would cause a kernel
panic if eth0 was also up.  The root cause was a bug in rheap.c.  However, this
code was fixed a year ago.  Could it be a similar bug?

-- 
Timur Tabi
Linux kernel developer at Freescale

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-17 22:22:19

On Mon, 2008-03-17 at 16:46 -0500, Timur Tabi wrote:
Joakim Tjernlund wrote:
quoted
Trying to add fixed-link support for ucc_geth as this is broken too. I
noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs
my board once I got the ucc_geth driver to recognize fixed-link.
Does it work for you?
A long time ago there was a bug where "ifconfig eth1 down" would cause a kernel
panic if eth0 was also up.  The root cause was a bug in rheap.c.  However, this
code was fixed a year ago.  Could it be a similar bug?
eth0 is also up, was it commit 4942bd80e83d13bf394df4a8109bee39d861820f
that fixed that bug? 2.6.23 works fine for me.

      Jocke

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-17 22:29:34

On Mon, 2008-03-17 at 16:46 -0500, Timur Tabi wrote:
Joakim Tjernlund wrote:
quoted
Trying to add fixed-link support for ucc_geth as this is broken too. I
noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs
my board once I got the ucc_geth driver to recognize fixed-link.
Does it work for you?
A long time ago there was a bug where "ifconfig eth1 down" would cause a kernel
panic if eth0 was also up.  The root cause was a bug in rheap.c.  However, this
code was fixed a year ago.  Could it be a similar bug?
BTW, I get this on the console:
BUG: soft lockup - CPU#0 stuck for 61s! [ifconfig:263]
NIP: c013649c LR: c0136490 CTR: c0015a34
REGS: c78a9cf0 TRAP: 0901   Not tainted  (2.6.25-rc5)
MSR: 00009032 <EE,ME,IR,DR>  CR: 24022448  XER: 00000000
TASK = c7822430[263] 'ifconfig' THREAD: c78a8000
GPR00: 00000000 c78a9da0 c7822430 00000000 00000000 00000006 00000000 02400000 
GPR08: 00009032 c9062210 c02a0000 00000000 0000000c 
NIP [c013649c] ugeth_disable+0x13c/0x18c
LR [c0136490] ugeth_disable+0x130/0x18c
Call Trace:
[c78a9dc0] [c0136c8c] ucc_geth_stop+0x24/0xa0
[c78a9de0] [c01393e8] ucc_geth_close+0x9c/0xd8
[c78a9e00] [c0166f54] dev_close+0xac/0xb0
[c78a9e10] [c0169a7c] dev_change_flags+0x98/0x1c4
[c78a9e30] [c01b4a78] devinet_ioctl+0x668/0x79c
[c78a9eb0] [c01b6a94] inet_ioctl+0xb4/0xc4
[c78a9ec0] [c015a7a4] sock_ioctl+0x174/0x240
[c78a9ee0] [c0072efc] vfs_ioctl+0x88/0x9c
[c78a9ef0] [c0072fc8] do_vfs_ioctl+0xb8/0x400
[c78a9f10] [c0073350] sys_ioctl+0x40/0x74
[c78a9f40] [c000f2b0] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xff65760
    LR = 0xffeae5c
Instruction dump:
91490000 81630000 806b0000 4bedf571 38a0000c 38c00000 7c641b78 38600005 
4bedd70d 813e0008 7c0004ac 80090000 <0c000000> 4c00012c 740b2000 4182ffe

Which appear to be the last IN_BE call in ugeth_disable:

     7d4:	48 00 00 01 	bl      7d4 <ugeth_disable+0x12c>
     7d8:	81 3e 00 08 	lwz     r9,8(r30)
	DEF_MMIO_OUT(name, u##size, __stringify(insn)" %1,0,%2")

DEF_MMIO_IN_BE(in_8,     8, lbz);
DEF_MMIO_IN_BE(in_be16, 16, lhz);
DEF_MMIO_IN_BE(in_be32, 32, lwz);
     7dc:	7c 00 04 ac 	sync    
     7e0:	80 09 00 00 	lwz     r0,0(r9)
---> 7e4:	0c 00 00 00 	twi     0,r0,0
     7e8:	4c 00 01 2c 	isync
     7ec:	74 0b 20 00 	andis.  r11,r0,8192
     7f0:	41 82 ff ec 	beq+    7dc <ugeth_disable+0x134>

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Timur Tabi <hidden>
Date: 2008-03-17 23:08:29

Joakim Tjernlund wrote:
eth0 is also up, was it commit 4942bd80e83d13bf394df4a8109bee39d861820f
that fixed that bug?
Yep.  Unfortunately, I don't really know enough about the ucc_geth driver to
know what could be wrong.  I just noticed your message and remembered that old bug.

-- 
Timur Tabi
Linux kernel developer at Freescale

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-17 23:53:45

On Mon, 2008-03-17 at 18:08 -0500, Timur Tabi wrote:
Joakim Tjernlund wrote:
quoted
eth0 is also up, was it commit 4942bd80e83d13bf394df4a8109bee39d861820f
that fixed that bug?
Yep.  Unfortunately, I don't really know enough about the ucc_geth driver to
know what could be wrong.  I just noticed your message and remembered that old bug.
I noticed that ugeth_graceful_stop_rx() is lacking in_8()/out_8() so I
am adding that, but I cant test until tmw.

Also notice that there is a lot of in_beX()/out_beX() in the driver and
those functions use the sync instruction. Won't that much suny usage
hurt performance and is sync really needed?

 Jocke

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-18 09:16:22

On Mon, 2008-03-17 at 18:08 -0500, Timur Tabi wrote:
Joakim Tjernlund wrote:
quoted
eth0 is also up, was it commit 4942bd80e83d13bf394df4a8109bee39d861820f
that fixed that bug?
Yep.  Unfortunately, I don't really know enough about the ucc_geth driver to
know what could be wrong.  I just noticed your message and remembered that old bug.
Found it, the eth1 i/f on this board isn't working and does not generate
any clocks which makes ugeth_graceful_stop_tx() hang forever.

 Jocke

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Timur Tabi <hidden>
Date: 2008-03-18 14:33:06

Joakim Tjernlund wrote:
Found it, the eth1 i/f on this board isn't working and does not generate
any clocks which makes ugeth_graceful_stop_tx() hang forever.
Well, that doesn't make it very graceful, does it? :-)

Can you fix this yourself, or do you want me to file an internal bug report?  If
so, can you email me a detailed description of the problem?

-- 
Timur Tabi
Linux kernel developer at Freescale

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Joakim Tjernlund <hidden>
Date: 2008-03-18 15:19:50

On Tue, 2008-03-18 at 09:32 -0500, Timur Tabi wrote:
Joakim Tjernlund wrote:
quoted
Found it, the eth1 i/f on this board isn't working and does not generate
any clocks which makes ugeth_graceful_stop_tx() hang forever.
Well, that doesn't make it very graceful, does it? :-)
Nope, :)
Can you fix this yourself, or do you want me to file an internal bug report?  If
so, can you email me a detailed description of the problem?
I fixed it by adding a counter which aborts after 100 loops. If you
could move along the 2 patches I sent today, "Add Fixed PHY support for
ucc_geth" and "ucc_geth: Add 8 bytes to max TX frame for VLANs" into
2.6.25 that would be great :)

 Jocke

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Timur Tabi <hidden>
Date: 2008-03-18 15:21:45

Joakim Tjernlund wrote:
I fixed it by adding a counter which aborts after 100 loops. If you
could move along the 2 patches I sent today, "Add Fixed PHY support for
ucc_geth" and "ucc_geth: Add 8 bytes to max TX frame for VLANs" into
2.6.25 that would be great :)
I have no control over that, sorry.  You'll have to ask Jeff G or maybe Kumar to
pick up those patches.

-- 
Timur Tabi
Linux kernel developer at Freescale

Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus

From: Kumar Gala <hidden>
Date: 2008-06-10 14:20:45

On Mar 17, 2008, at 12:52 PM, Anton Vorontsov wrote:
MDIO-less PHYs should use CONFIG_FIXED_PHY driver and appropriate
fixed-link property in the device tree.

If not, ethernet will not work:
 e0024520:03 not found
 eth1: Could not attach to PHY
 IP-Config: Failed to open eth1

Signed-off-by: Anton Vorontsov <redacted>
---
arch/powerpc/boot/dts/mpc8377_rdb.dts      |    8 +-------
arch/powerpc/boot/dts/mpc8378_rdb.dts      |    8 +-------
arch/powerpc/boot/dts/mpc8379_rdb.dts      |    8 +-------
arch/powerpc/configs/mpc837x_rdb_defconfig |    2 +-
4 files changed, 4 insertions(+), 22 deletions(-)
applied to for-2.6.26 branch.

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help