Correction to the "Ethernet problem"

Ian Caddy ianc at goanna.iinet.net.au
Wed Feb 6 00:50:46 UTC 2008


Hi Leon,



Leon Pollak wrote:
> On Tuesday, 5 בFebruary 2008, Ian Caddy wrote:
>>  From your debugging it looks like it is something to do with the PHY
>> interaction with the particular switch.
> Hmm... May be... Why do you think so?

What I was trying to say here was that when you connect to a 10MB hub, 
you have no problems, but when you connect through your switch you are 
missing the first receive.  Therefore it is an interaction problem 
between the switch and the PHY causing the first packet to be lost.


> 
>> Are you using an external PHY?  
> Not sure what do you mean... The PHY is external to the MPC8247 CPU, but it is 
> on-board...:)

By external, I meant to the CPU/MAC, this is normally the case, but you 
never know what wonderful new processors are coming out these days.  You 
answered my question fine.

> 
>> If so, do you have the part number? 
> DP83849ID from National.

I had a quick look at the datasheet and there are a couple of thing to 
note.  From a hardware side do you connect:

FX_EN
AN_EN
AN1
AN0

to anything or are they all left floating.  If they are floating you 
will get the hardware defaults which is auto-negotiate.  This is just to 
make sure the auto negotiation will go smoothly.


> 
> 
>> Does you firmware initialise the PHY at all or do you expect it to come
>> up in the correct state?
> The PHY does auto-negotiation. The spec says that this may take 2-3s after 
> reset. I give it about 14-16s as minimum and it is still not enough!?
> 

I noticed from your code that you don't seem to talk / init the PHY at 
all anywhere in the code.

Can you talk to your PHY (you should be able to through the MII).  There 
are couple of really useful registers in the PHY, such as BMCR, BMSR, 
PHYSTS which will give you most of the information you want out of the 
PHY.  If it is possible, could you get a copy of those values, before 
you transmit your first packet, and then maybe again after you have 
transmitted the first packet to see what is going on with the PHY?




> 
>> Is there an interrupt line from the PHY?  If so, do you service this
>> interrupt line?
> No, there is not, AFAIK.

That is not as good, but it should still be possible to see what the 
PHYSTS is, therefore the test mentioned above, to see exactly what the 
PHY is doing around the time of the problem.

regards,

Ian Caddy


-- 
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9444 2634




More information about the users mailing list