linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
@ 2008-03-17 17:52 Anton Vorontsov
  2008-03-17 19:42 ` Joakim Tjernlund
  2008-06-10 14:20 ` Kumar Gala
  0 siblings, 2 replies; 12+ messages in thread
From: Anton Vorontsov @ 2008-03-17 17:52 UTC (permalink / raw)
  To: linuxppc-dev

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 <avorontsov@ru.mvista.com>
---
 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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 17:52 [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus Anton Vorontsov
@ 2008-03-17 19:42 ` Joakim Tjernlund
  2008-03-17 21:46   ` Timur Tabi
  2008-06-10 14:20 ` Kumar Gala
  1 sibling, 1 reply; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-17 19:42 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev


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 <avorontsov@ru.mvista.com>

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 19:42 ` Joakim Tjernlund
@ 2008-03-17 21:46   ` Timur Tabi
  2008-03-17 22:22     ` Joakim Tjernlund
  2008-03-17 22:29     ` Joakim Tjernlund
  0 siblings, 2 replies; 12+ messages in thread
From: Timur Tabi @ 2008-03-17 21:46 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linuxppc-dev

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 21:46   ` Timur Tabi
@ 2008-03-17 22:22     ` Joakim Tjernlund
  2008-03-17 23:08       ` Timur Tabi
  2008-03-17 22:29     ` Joakim Tjernlund
  1 sibling, 1 reply; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-17 22:22 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Mon, 2008-03-17 at 16:46 -0500, Timur Tabi wrote:
> 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?

eth0 is also up, was it commit 4942bd80e83d13bf394df4a8109bee39d861820f
that fixed that bug? 2.6.23 works fine for me.

      Jocke

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 21:46   ` Timur Tabi
  2008-03-17 22:22     ` Joakim Tjernlund
@ 2008-03-17 22:29     ` Joakim Tjernlund
  1 sibling, 0 replies; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-17 22:29 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Mon, 2008-03-17 at 16:46 -0500, Timur Tabi wrote:
> 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?

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>

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 22:22     ` Joakim Tjernlund
@ 2008-03-17 23:08       ` Timur Tabi
  2008-03-17 23:53         ` Joakim Tjernlund
  2008-03-18  9:16         ` Joakim Tjernlund
  0 siblings, 2 replies; 12+ messages in thread
From: Timur Tabi @ 2008-03-17 23:08 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linuxppc-dev

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 23:08       ` Timur Tabi
@ 2008-03-17 23:53         ` Joakim Tjernlund
  2008-03-18  9:16         ` Joakim Tjernlund
  1 sibling, 0 replies; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-17 23:53 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Mon, 2008-03-17 at 18:08 -0500, Timur Tabi wrote:
> 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.
> 

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 23:08       ` Timur Tabi
  2008-03-17 23:53         ` Joakim Tjernlund
@ 2008-03-18  9:16         ` Joakim Tjernlund
  2008-03-18 14:32           ` Timur Tabi
  1 sibling, 1 reply; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-18  9:16 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Mon, 2008-03-17 at 18:08 -0500, Timur Tabi wrote:
> 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.
> 

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-18  9:16         ` Joakim Tjernlund
@ 2008-03-18 14:32           ` Timur Tabi
  2008-03-18 15:19             ` Joakim Tjernlund
  0 siblings, 1 reply; 12+ messages in thread
From: Timur Tabi @ 2008-03-18 14:32 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linuxppc-dev

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-18 14:32           ` Timur Tabi
@ 2008-03-18 15:19             ` Joakim Tjernlund
  2008-03-18 15:21               ` Timur Tabi
  0 siblings, 1 reply; 12+ messages in thread
From: Joakim Tjernlund @ 2008-03-18 15:19 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Tue, 2008-03-18 at 09:32 -0500, Timur Tabi wrote:
> 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? :-)

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-18 15:19             ` Joakim Tjernlund
@ 2008-03-18 15:21               ` Timur Tabi
  0 siblings, 0 replies; 12+ messages in thread
From: Timur Tabi @ 2008-03-18 15:21 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linuxppc-dev

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

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

* Re: [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
  2008-03-17 17:52 [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus Anton Vorontsov
  2008-03-17 19:42 ` Joakim Tjernlund
@ 2008-06-10 14:20 ` Kumar Gala
  1 sibling, 0 replies; 12+ messages in thread
From: Kumar Gala @ 2008-06-10 14:20 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev


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 <avorontsov@ru.mvista.com>
> ---
> 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

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

end of thread, other threads:[~2008-06-10 14:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 17:52 [PATCH] [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus Anton Vorontsov
2008-03-17 19:42 ` Joakim Tjernlund
2008-03-17 21:46   ` Timur Tabi
2008-03-17 22:22     ` Joakim Tjernlund
2008-03-17 23:08       ` Timur Tabi
2008-03-17 23:53         ` Joakim Tjernlund
2008-03-18  9:16         ` Joakim Tjernlund
2008-03-18 14:32           ` Timur Tabi
2008-03-18 15:19             ` Joakim Tjernlund
2008-03-18 15:21               ` Timur Tabi
2008-03-17 22:29     ` Joakim Tjernlund
2008-06-10 14:20 ` Kumar Gala

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).