Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - io-pkt on mpc8313: MDI_FinyPhy failed: (13 Items)
   
io-pkt on mpc8313: MDI_FinyPhy failed  
Hi guys..

I have a test version of the mpc8313 BSP here for eval purposes. Since the io-net driver included with it does not give 
the expected performance, I would like to test the io-pkt driver. I downloaded it from the Foundry, File patch-632-CE-CN
-Milestone-4.tar.gz (Binary Version).

Next steps I did:
- boot up mpc8313 eval board and start io-net-driver (done automatically)
- download all files from patches\632-CN-Milestone-4\target\qnx6\ppcbe\lib\dll and patches\632-CN-Milestone-4\target\
qnx6\ppcbe\lib to /tmp
- download patches\632-CN-Milestone-4\target\qnx6\ppcbe\sbin\io-pkt-v4 via ftp to /tmp
- set LD_PRELOAD_PATH to /tmp
- check parameters of io-net via "pidin args"
- slay ionet driver
- start io-pkt driver using "./io-pkt-v4 -dmpc85xx mac=000012345678 -ptcpip" in directory /tmp
- ifconfig tsec1 192.168.80.2

Now ifconfig shows the two ethernet interfaces again, as expected, as tsec0 and tsec1 (with io-net it was en0 and en1). 
Local ping to 192.168.80.2 works. Ping to 192.168.80.1 (attached host) does not work, results in "sendto: unreachable", 
and no packets leave the physical interface (as shown by Wireshark running on the host).
sloginfo shows:
Jan 01 00:04:54    5    14     0 MPC85XX TSEC
Jan 01 00:04:54    5    14     0 Vendor .............. 0x0
Jan 01 00:04:54    5    14     0 Device .............. 0x0
Jan 01 00:04:54    5    14     0 Revision ............ 0x0
Jan 01 00:04:54    5    14     0 Memory base ......... 0xe0025000
Jan 01 00:04:54    5    14     0 Interrupt ........... 0x13
Jan 01 00:04:54    5    14     0 Interrupt ........... 0x14
Jan 01 00:04:54    5    14     0 Interrupt ........... 0x18
Jan 01 00:04:54    5    14     0 MAC address ......... 000102 030406
Jan 01 00:04:54    2    14     0 mpc85xx_attach(): eTsec: yes
Jan 01 00:05:12    2    14     0 mpc85xx_init(): rx dma buffer size 2048 bytes
Jan 01 00:05:12    2    14     0 mpc85xx_init_phy(): media_rate: -1, duplex: -1,
 PHY: 1
Jan 01 00:05:12    2    14     0 mpc85xx_init_phy(): MDI_FindPhy() failed for ph
y 1: 0
Jan 01 00:05:12    2    14     0 mpc85xx->rx_cap_mask: 0x0

Jan 01 00:05:12    2    14     0 mpc85xx->tx_cap_mask: 0x0

So it seems it somehow can't attach to the hardware layer.

Is there anything I can do to get this running? It would be very important for us to use this to evaluate the achievable
 network performance..

Thanks & Greetings,
 Marc
Re: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi Marc,

We were able to get io-pkt running on this board using the attached detect.c file in the native io-pkt driver devnp-
mpc85xx. I hope this will help.

Thanks,

Rajat
Attachment: Text detect.c 44.05 KB
Re: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi Rajat,

Thanks! Do you think you can send me a binary file so I can do a quick test? I do not have the io-pkt source set up at 
the moment.. just for a quick test a binary would be much easier for me

Thanks,
 Marc
RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi Rajat:
	I can see that there are at least two areas that have been
changed (and these match what I would expect for the Freescale chips):
the IRQs and the PHY addresses assigned.

While what you've done is consistent with the way things were done in
the past (as you can tell from the code :->), we really want this to be
done in a different way going forward.

Things like interrupts and PHY addresses are particular to the chip and
board.  Having these built into the driver will eventually result in a
driver which is unmaintainable over time.  The "correct" way to do this
is to have the IRQs and PHY addresses populated in the system page and
then have the driver read the system page (i.e. use the "syspage" option
to the driver).  This leaves the driver free of chip specific info.

Of course, we can't entirely get away from chip specific behaviour as
you can tell from the fact that the low level configuration (FIFO set up
etc.) differs for the 85xx and 83xx chip series (since the bus
performance on the 83xx seems to be much poorer than on the 85xx).

If you look at the startup code, you can see in init_hwinfo.c a
"add_one_tsec" function.  This lets you populate the system page with
the tsec IRQs (rx,tx,err), mac address and PHY address. 

To Mark, while the PHY addresses can be modified from the command line,
the interrupt selection can't be.  Would you be able to modify your
startup

	Robert.


-----Original Message-----
From: Rajat Jain [mailto:community-noreply@qnx.com] 
Sent: Monday, September 22, 2008 9:41 AM
To: drivers-networking
Subject: Re: io-pkt on mpc8313: MDI_FinyPhy failed

Hi Marc,

We were able to get io-pkt running on this board using the attached
detect.c file in the native io-pkt driver devnp-mpc85xx. I hope this
will help.

Thanks,

Rajat

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post13760
Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Robert, I am currently not able to modify my startup, as all I have at the moment is a binary-only BSP for eval.

I'm currently compiling the network code with the file attached by Rajat. Even if this is a "hack", it will suffice for 
my test for now. Will his patch work for me or will I need to modify the startup code as you seemed to indicate?

Thanks & Greetings,
 Marc
Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
The changes should be fine.  It's more a matter of philosophy over where chip specific parameters should be set up.



----- Original Message -----
From: Marc Roessler <community-noreply@qnx.com>
To: drivers-networking <post13777@community.qnx.com>
Sent: Mon Sep 22 12:05:30 2008
Subject: Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed

Robert, I am currently not able to modify my startup, as all I have at the moment is a binary-only BSP for eval.

I'm currently compiling the network code with the file attached by Rajat. Even if this is a "hack", it will suffice for 
my test for now. Will his patch work for me or will I need to modify the startup code as you seemed to indicate?

Thanks & Greetings,
 Marc

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post13777

Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi,

I had the compile run over night, it compiled just fine.
I copied the resulting binaries (io-pkt-v4) and libraries to the target
and did as described above. Upon loading io-pkt, slogger logs the following:
   Unable to load devnp-shim.so: Library cannot be found
However, I have uploaded this library to the working directory /tmp,
it is readable and executable, and I have set the LD_PRELOAD_PATH to /tmp.
What's going wrong here?

Greetings,
 Marc
RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Hello Marc,

Here is a pre-compiled binary. Since it is a native io-pkt driver, I do
not think you need to use the shim driver layer, the io-pkt should
directly load this. If io-pkt is searching for devnp-shim, I think there
is a problem...

Thanks,

Rajat




----Original Message----
From: Marc Roessler [mailto:community-noreply@qnx.com]
Sent: Tuesday, September 23, 2008 1:42 PM
To: drivers-networking
Subject: Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed

> Hi,
> 
> I had the compile run over night, it compiled just fine.
> I copied the resulting binaries (io-pkt-v4) and libraries to
> the target and did as described above. Upon loading io-pkt, slogger
>    logs the following: Unable to load devnp-shim.so: Library cannot
> be found However, I have uploaded this library to the working
> directory /tmp, it is readable and executable, and I have set the
> LD_PRELOAD_PATH to /tmp. What's going wrong here?
> 
> Greetings,
>  Marc
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post13810

Attachment: Text devnp-mpc85xx.so 74.38 KB
Re: RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi,

thanks for the binary, Rajat.
I've tried using that one, in combination with my own compiled libs and also in combination with the libs supplied in 
the binary package patch-632-CE-CN-Milestone-4.tar.gz - both to no avail. Still gives me the same message:
  Unable to load devnp-shim.so: Library cannot be found

Anybody got any suggestions?

Greetings,
 Marc
RE: RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Hi,

To me, the fact that it is trying to look for the shim driver is
problematic. I think it is not finding the devnp-mpc85xx.so in the right
path... I think I had tested it by placing it /proc/boot and this was
included in LD_LIBRARY_PATH ...

BTW, we were using the Core Networking M3 build binary package
(patch-632-CE-CN-Milestone3.tar.gz), although that shouldn't make a
difference ...

Thanks,

Rajat

PS: Once the driver runs, you can enable HW checksums in both Rx & Tx
directions to see network performance improvements.


----Original Message----
From: Marc Roessler [mailto:community-noreply@qnx.com]
Sent: Tuesday, September 23, 2008 2:31 PM
To: drivers-networking
Subject: Re: RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed

> Hi,
> 
> thanks for the binary, Rajat.
> I've tried using that one, in combination with my own
> compiled libs and also in combination with the libs supplied
> in the binary package patch-632-CE-CN-Milestone-4.tar.gz -
> both to no avail. Still gives me the same message:
>   Unable to load devnp-shim.so: Library cannot be found
> 
> Anybody got any suggestions?
> 
> Greetings,
>  Marc
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post13813
Re: RE: RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Just for completeness and as a reference for othes encountering this problem:

It works now. /proc/boot is readonly, so I used tmp for placing my files and set /tmp as the first path in 
LD_LIBRARY_PATH.

Thanks & Greetings,
 Marc
Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
On Tue, Sep 23, 2008 at 04:12:28AM -0400, Marc Roessler wrote:
> Hi,
> 
> I had the compile run over night, it compiled just fine.
> I copied the resulting binaries (io-pkt-v4) and libraries to the target
> and did as described above. Upon loading io-pkt, slogger logs the following:
>    Unable to load devnp-shim.so: Library cannot be found
> However, I have uploaded this library to the working directory /tmp,
> it is readable and executable, and I have set the LD_PRELOAD_PATH to /tmp.
> What's going wrong here?

s/LD_PRELOAD_PATH/LD_LIBRARY_PATH/

-seanb
RE: RE: io-pkt on mpc8313: MDI_FinyPhy failed  
Any time you're REALLY wondering whether or not you've got your
environment set up properly, try fully specifying the driver path:

io-pkt-vd -d/tmp/devnp-mpc85xx.so

(for example) will remove any doubts as to where the driver is coming
from.


	Robert.

-----Original Message-----
From: Sean Boudreau [mailto:community-noreply@qnx.com] 
Sent: Tuesday, September 23, 2008 9:29 AM
To: drivers-networking
Subject: Re: RE: io-pkt on mpc8313: MDI_FinyPhy failed

On Tue, Sep 23, 2008 at 04:12:28AM -0400, Marc Roessler wrote:
> Hi,
> 
> I had the compile run over night, it compiled just fine.
> I copied the resulting binaries (io-pkt-v4) and libraries to the
target
> and did as described above. Upon loading io-pkt, slogger logs the
following:
>    Unable to load devnp-shim.so: Library cannot be found
> However, I have uploaded this library to the working directory /tmp,
> it is readable and executable, and I have set the LD_PRELOAD_PATH to
/tmp.
> What's going wrong here?

s/LD_PRELOAD_PATH/LD_LIBRARY_PATH/

-seanb

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post13846