[U-Boot-Users] CS8900 Problem on an ARM system

Hi all
yet another problem from me. This time with the cs8900 driver.
Macroscopic error description: immediately after booting, the first (typically) 2 packets are not received. E.g., if a ping is issued, two ARP requests go out, can be seen on the network, are replied, but the driver doesn't receive anything - rx status register still returns "no data". The next and all following pings work fine. In case of tftp similarly replies to the first two ARP packets are not received, after further repeats it works.
If after power on I just wait for one minute without doing anything (network inactive too), then the network works from the very first packet.
If at the time, when the first ping is issued I put some traffic on the network, e.g., some broadcasts, the driver starts receiving data immediately too.
I tried putting the chip in promiscuous mode to see whether the problem is, that the chip doesn't identify packets as matching its ethernet address, but the board is on a switch.
Any ideas?
Thanks Guennadi --- Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de

I made an interesting observation... Out of frustration I dumped all chip's register (luckily, there are only about 20 of them), and what I see there: on first attempts the PolarityOK bit is set, and reception doesn't work. Then after some time the bit gets cleared, and - voila - it works! The chip does have automatic polarity detection, if I disable it, it _never_ receives a frame, that's what made me suspicious in the first place. And now the confirmation. I'll have to check if the board is connected with a crossover cable to the switch... But why does the automatic detection need so long??? I just tried again just waiting for a couple of minutes without doing anything, and already on the first access the chip had polarity correctly and ping worked. So, it either needs about a minute idle time (ok, maybe there are some broadcasts taking place in this time), or some activity. That also explains why pinging the board from outside helps too.
But why so long???
Thanks Guennadi --- Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
participants (1)
-
Guennadi Liakhovetski