MPC8360E: One ethernet device works, two doesn't work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC8360E: One ethernet device works, two doesn't work

2,616 Views
Timmo
Contributor I
Hello.
I'm working with the MPC8360E Evaluation board and I try to test the ethernet performance. I'm using the provided Linux system on it.
When I bootup the System with eth0 plugged it works very well. But when I load eth1
# ifconfig eth1 10.193.20.251 netmask 255.255.255.0
the device is not responding (ping, tcp etc). But after entering the command I get

eth1: PHY is Marvell 88E11x1 (1410cc2)
eth1: Full Duplex
eth1: Speed 1000BT
eth1: Link is up

so everthing seems to be okay, but only the first device which was loaded works correctly.
And one other question. Is the MPC8360e able to get almost gbit performance? My last measurement looks like this:

NETIO - Network Throughput Benchmark, Version 1.26(C) 1997-2005 Kai Uwe RommelTCP connection established.Packet size  1k bytes:  43660 KByte/s Tx,  44079 KByte/s Rx.Packet size  2k bytes:  43418 KByte/s Tx,  46477 KByte/s Rx.Packet size  4k bytes:  43488 KByte/s Tx,  47587 KByte/s Rx.Packet size  8k bytes:  42917 KByte/s Tx,  48112 KByte/s Rx.Packet size 16k bytes:  42109 KByte/s Tx,  48933 KByte/s Rx.Packet size 32k bytes:  41822 KByte/s Tx,  49129 KByte/s Rx.
 

 The other Device for the measurement was a VR9 which has definite enough performance.

Thanks
Tags (1)
0 Kudos
4 Replies

647 Views
abartky
Contributor IV

timmo,

I had a problem some time back that I had to debug and fix regarding the Freescale provided Marvell PHY Linux driver on the MPC8313E-RDB board which also uses the same PHY on eth1. It may not be the same problem you are seeing, but it may be worth a try.

The problem I had was where I had two MPC8313E-RDB boards where one board would work all the time on eth1, but the other one was intermittent on eth1 and would either fail completely or come up at a speed less than 1 gigabit (also sometimes in half duplex) under Linux. The interesting symptom was that both boards would always work OK when running uboot.

After a lot of debugging and lost time, I found out that there were significant differences between the u-boot initialization code and the Linux marvell.c code under Linux-2.6.20/drivers/net/phy. My initial fix was to basically copy the u-boot code to marvell.c and then everything worked fine.

After some further experimentation, I found I was able to get it to work by changing a single #define statement for the 88E1111 as follows:

was:
#define MII_M1111S_CTRL_RESET 0x8000

change to:
#define MII_M1111S_CTRL_RESET 0x9140 // from u-boot tsec.h MIIM_CONTROL_RESET

I do not have access to the Marvell documentation as it requires an NDA and after weeks of asking multiple people at Marvell, I gave up. I'm guessing that for that register, in issueing a reset that on some chips, the bits may not be "sticky" and keep there value and by writing the u-boot value, it does more than just setting the reset bit.

I do have high confidence in this change as I've been running it for several months now with no side affects and no more failures for eth1 under Linux :smileyhappy:

As far as your performance question goes, I don't have a MPC8360 board, but on my 333MHz core speed MPC8313E, I wrote a quick program using raw sockets to create a user specified length raw Ethenet frame and send a user specified number of frames as fast as it can (from user mode using raw sockets) and then used a stopwatch to time how long it took to complete. This program was an attempt to measure with the absolute simplest user mode program, how many transmitted frames per second could you get on a gigabit interface. Here are the results I got:

1514 byte frames: 31.5 seconds to transmit 1,000,000 frames
64 byte frames: 117.5 seconds to transmit 10,000,000 frames

Adding in the Ethernet 20 byte per frame inter-frame overhead you get:

1514 (Max Ethenet Frame)

1000000/31.5 = 31746.0317 Frames/second
31746.0317 Frames/second * 1534 * 8 = 3.8958E8 = ~389 MBits/second

64 (Min Ethernet Frame)

10000000/117.5 = 85106.383 Frames/second
85106.383 Frames/second * 84 * 8 = 5.7191E7 = ~57 MBits/second

If you or anyone else is interested in this program, you can send me a private email to the Freescale user: abartky with your email address and I can send out a copy of the source code.

So at least for the MPC8313E goes running normal priority user mode in a basic Linux environment (including inetd and other normal Linux housekeeping tasks running) you won't get saturation of the Gigabit link, even with maximum size ethernet frames. But considering everything else you get with the chip as far as functionality, it is still a very good engine for building embedded systems. I also assume one could get better performance by messing around with the kernel drivers, boost priority, etc. but that is something I don't have time to do for my project :smileywink:

Anyway hope this helps.

Cheers,

abartky

0 Kudos

647 Views
Timmo
Contributor I
Hello abartky
Thank you very much for your detailed answer. Unfortunately I'm unable to compile the ethernet driver because I don't find the sources on the provided CD. I just extracted the linux-2.6.10 kernel source, but theres no directory /driver/net/phy. I also did a full text search in the sources, but nothing there with 88E11 or marvel.
Are we the only persons with that problem? I think it would be nice if freescale did some updates to get the ethernet devices to work. Did you know where I can get the binary version of the driver for the PowerPC? Or is there any location where I can download a newer Linux-BSP for my board?
0 Kudos

647 Views
abartky
Contributor IV

Timmo,

For instructions on how to get the Linux Kernel sources from the standard CD or downloaded .iso file, please see my post at:

http://forums.freescale.com/freescale/board/message?board.id=MCUCOMM&message.id=778#M778

As far as keeping the sources up to date, Freescale I believe actually has been doing a good job of it. In fact also if you subscribe to their design news with your design/system/etc. preferences, the newsletter has a what's new section at the bottom including links to things such as updated documents, app notes, errata and even links to new BSP versions when they are released.

To save you some time, the home page for the 8360E is at:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8360E&nodeId=0162468rH3bTdGJk19143...

If you click on the design tab, you get links to documents, tools, etc. at:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8360E&nodeId=0162468rH3bTdGJk19143...

The current BSP for the MPC8360EA-MDS-PB released on 10/12/2007 is on that page, direct link:

https://www.freescale.com/webapp/Download?colCode=CWF-MPC8360EA-MDS-PB&location=null&fpsp=1

If that is not your board, for a full list of Freescale downloadable BSPs, that direct link is at:

http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=0127260061033202A5

Hope this helps,

Cheers,

Alan

0 Kudos

647 Views
Timmo
Contributor I
Hello Alan.
Thanks again for your effort. The Iso image is exactly that which I downloaded yesterday. The thing is that this is the BSP for the MP8360E in Revision 2.0 and 2.1. But I have Revision 1.3 which hast only 16MB flash instead of 32 MB. Anyway  I attempted to upload it to my board. I used the "small" parts an not the 32MB image. All seemed to work whell. Everything started. But the ethernet device didn't work either. The be exact, the ethernet device works more poorer. The transmit performance is about 10 Mbit with many irregularities. The receive performance isn't much different. The second ethernet device doesn't work like in the previous BSP. But there is no other BSP on this page. So I have to assume that my revision isn't supported anymore?
Of cause freescale did a good job, but I think that the ethernet devices are working is a must! I mean when you buy a board for that amount of money is that too much to ask for to get a full working device? What are evaluation boards for? My opinion was to check out the functionalities if this device is the right for me. I'm not device driver programmer. It costs a company much money to do things which the shouldn't do, if you know what I mean.
Now I'm not able the check out the ethernet performance with both ethernet interfaces, which is for our application the most significant thing.


Best regards
Timmo


Message Edited by Timmo on 2007-11-13 07:56 AM
0 Kudos