Skip to contentSkip to conversation

LXT972 FEC problem on MPC855

DISCUSSION Xiaogeng (Shawn) Jin 3 participants 6 messages Aug 26, 2002 – Aug 28, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

After running ppcboot on our board successfully (including the fast ethernet LXT972), we have trouble on enabling FEC on linux kernel. The problem is that we cannot send any packets through the network after the kernel is booted. The ethernet looks OK during initialization according to the printed messages. We are trying to locate the problem but haven't found yet so far. Any hints on what caused such problem?

My configuration on kernel (linux-2.4.4-08-09 from DENX) is
860T FEC Ethernet
Use MDIO for PHY configuration Support LXT971 PHY

Thanks.

- Shawn.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 7 lines

After running ppcboot on our board successfully (including the fast ethernet LXT972), we have trouble on enabling FEC on linux kernel. The problem is that we cannot send any packets through the network after the kernel is booted. The ethernet looks OK during initialization according to the printed messages. We are trying to locate the problem but haven't found yet so far. Any hints on what caused such problem?

The booting messages are as follows,
-------------duing initialization-----------------------------
eth0: FEC ENET Version 0.2, FEC irq 9, MII irq 10, addr 00:06:17:01:02:00
eth0: Phy @ 0x0, type LXT971 (0x001378e2)
-------------duing initialization----------------------------- -------------Stack init (I guess)-----------------------------
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
IP-Config: Incomplete network configuration information.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. -------------Stack init (I guess)-----------------------------

Using FLUKE to test the ethernet interface, it looks OK. No problem is reported. But we couldn't see any packets transmitted out by the interface. Have you encountered such problem before? Any hints will be greatly appreciated. Thanks a lot.

Quoted 4 lines

My configuration on kernel (linux-2.4.4-08-09 from DENX) is
860T FEC Ethernet
Use MDIO for PHY configuration Support LXT971 PHY

BTW, if I disable "Use MDIO for PHY configuration", after I ping an address, it'll dump data in TX ring buffer. If those data will help to diagnose the problem, I'll paste them later.

- Shawn.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines

After running ppcboot on our board successfully (including the fast ethernet LXT972), we have trouble on enabling FEC on linux kernel. The problem is that we cannot send any packets through the network after the kernel is booted. The ethernet looks OK during initialization according to the printed messages. We are trying to locate the problem but haven't found yet so far. Any hints on what caused such problem?

...

Quoted 2 lines

eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
IP-Config: Incomplete network configuration information.

You are passing bad/insufficient boot arguments to the Linux kernel; unfortunaltely you don;t show us this part of the boot messages, so I cannot even guess what you're doing wrong.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Do not underestimate the value of print statements for debugging.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 7 lines
Quoted 3 lines

eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
IP-Config: Incomplete network configuration information.

You are passing bad/insufficient boot arguments to the Linux kernel; unfortunaltely you don;t show us this part of the boot messages, so I cannot even guess what you're doing wrong.

Well, if IP-Config is not complete, we can change the configuration using 'ifconfig' after the kernel starts. I did that. And I noticed that 'eth0' can receive packets but cannot transmit any packets. Here is the result of running ifconfig.

---------------------------once---------------------------------- #ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:17:01:02:00
inet addr:192.168.5.24 Bcast:192.168.5.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:180 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:18110 (17.6 kb) TX bytes:0 (0.0 b)
Base address:0xe00
---------------------------once---------------------------------- ---------------------------twice--------------------------------- #ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:17:01:02:00
inet addr:192.168.5.24 Bcast:192.168.5.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:282 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100
RX bytes:26831 (26.2 kb) TX bytes:0 (0.0 b)
Base address:0xe00
---------------------------twice---------------------------------

- Shawn.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Shawn:

Maybe I have a contribution...

Quoted 8 lines · Xiaogeng (Shawn) Jin
Quoted 3 lines

You are passing bad/insufficient boot arguments to the Linux kernel; unfortunaltely you don;t show us this part of the boot messages, so I cannot even guess what you're doing wrong.

Finally I figured out the problem and solved it. The problem is that the kernel didn't get the LINK status correctly. The 'fep->link' was always 0 which means the link is down or autonegotiation is in progress.

Quoted 6 lines

In the code which defines 'phy_info_lxt971', it says that somehow LXT971 tells me that the link is down when the first read after power-up. So you have to read MII_REG_SR to set 'fep->phy_status' accordingly. But in my case, the read action occurred too early to wait till the link is up. So what I did is to delay 5s before reading MII_REG_SR during opening FEC device. I guess it takes the link a while to autonegotiate the speed.

Hmm. I suppose PHY should interrupt when link status change, and therefore phy_status would be updated accordingly. So, maybe you have a problem with your board's PHY interrupt signal.

Hope this helps.

-Scop.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#6 lore raw
Quoted 11 lines
Quoted 7 lines

In the code which defines 'phy_info_lxt971', it says that somehow LXT971 tells me that the link is down when the first read after power-up. So you have to read MII_REG_SR to set 'fep->phy_status' accordingly. But in my case, the read action occurred too early to wait till the link is up. So what I did is to delay 5s before reading MII_REG_SR during opening FEC device. I guess it takes the link a while to autonegotiate the speed.

Hmm. I suppose PHY should interrupt when link status change, and therefore phy_status would be updated accordingly. So, maybe you have a problem with your board's PHY interrupt signal.

Yeah, I think so. So I have to check whether the PHY interrupt is enabled or not. Thanks for your thoughts.

- Shawn.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/