83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
Subsystems (2)
PATCH 1/1 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus
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
--- 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(-)
arch/powerpc/boot/dts/mpc8377_rdb.dts +1 -7
@@ -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 {
arch/powerpc/boot/dts/mpc8378_rdb.dts +1 -7
@@ -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 {
arch/powerpc/boot/dts/mpc8379_rdb.dts +1 -7
@@ -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 {
arch/powerpc/configs/mpc837x_rdb_defconfig +1 -1
@@ -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
Signature · 1 line
1.5.2.2
Quoted 9 lines · Anton Vorontsov
MDIO-less PHYs should use
CONFIG_FIXED_PHYdriver 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 eth1Signed-off-by Anton Vorontsov <[email protected]>
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
Quoted 4 lines · Joakim Tjernlund
Trying to add fixed-link support for
ucc_gethas this is broken too. I noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs my board once I got theucc_gethdriver 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?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 10 lines · Timur Tabi
Quoted 4 lines · Joakim Tjernlund
Trying to add fixed-link support for
ucc_gethas this is broken too. I noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs my board once I got theucc_gethdriver 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
Quoted 2 lines · Joakim Tjernlund
eth0 is also up, was it commit
4942bd80e83d13bf394df4a8109bee39d861820fthat 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.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 8 lines · Timur Tabi
Quoted 2 lines · Joakim Tjernlund
eth0 is also up, was it commit
4942bd80e83d13bf394df4a8109bee39d861820fthat fixed that bug?Yep. Unfortunately, I don't really know enough about the
ucc_gethdriver 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
Quoted 8 lines · Timur Tabi
Quoted 2 lines · Joakim Tjernlund
eth0 is also up, was it commit
4942bd80e83d13bf394df4a8109bee39d861820fthat fixed that bug?Yep. Unfortunately, I don't really know enough about the
ucc_gethdriver 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
Quoted 2 lines · Joakim Tjernlund
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?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 6 lines · Timur Tabi
Quoted 2 lines · Joakim Tjernlund
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, :)
Quoted 3 lines
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
Quoted 4 lines · Joakim Tjernlund
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.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 10 lines · Timur Tabi
Quoted 4 lines · Joakim Tjernlund
Trying to add fixed-link support for
ucc_gethas this is broken too. I noticed that ifconfig eth1 up follwed by ifconfig eth1 down hangs my board once I got theucc_gethdriver 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 = 0xffeae5cInstruction 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>Kumar Gala
AppliedQuoted 8 lines · Anton Vorontsov
MDIO-less PHYs should use
CONFIG_FIXED_PHYdriver 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
Quoted 7 lines
Signed-off-by Anton Vorontsov <[email protected]>---
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