[En-Nut-Discussion] changes in nicrtl driver

Stephen Noftall stephenn at lcsaudio.com
Fri Jul 2 16:03:18 CEST 2004


> Hi Stephen,
>
> thanks, that was very helpful. I should have spent more time reading
> your previous postings. Somehow I've been on the wrong track. I wasn't
> aware, that the Realtek doesn't support link negotiation at all.

No thanks needed, I should be thanking you! Ethernut is a real pleasure to
work with. Well thought out and executed on limited hardware.

> However, still I do not fully understand, why collisions appear.
> The original Ethernet coaxial cable obviously did not support full
> duplex. Twisted pair with separate transmit and receive lines
> offers this option. But even if the switch is in half duplex
> mode, there should be no collisions when Ethernut starts transmitting
> a packet while the switch is transmitting another. Of course the
> switch's hardware is able to detect this, but it doesn't make
> sense to me.
>
> Harald

This threw me off as well. My best guess (as none of my networking tools can
go to this level) is this:
- The Realtek is working in what it thinks is Full Duplex mode (because the
FUDUP is set).
- It transmits on the transmit pair, and received on its receive pair (that
one is pretty simple ;-).
- The switch is working in half duplex mode (which it should fall back to
when it fails negotiation).
- The switch will send and receive on the RealTek's transmit pair.
- The Realtek, even though it is working in full duplex, can still process
packets on it's transmit pair.

Now, where I think the collisions are coming from is:
- The realtek, nowing that it is in full duplex, does not worry about the
half duplex hold off protocol (I forget the terminalogy, OHDCMP? Or
something). This protocol sets up the one way stream so that it reduces the
chance of a collision. There is still a chance, but when it does happen it
is fairly wuickly resolved.
- When in the full duplex mode, the realtek just transmits out it's transmit
port, even if it is currently receiving a packet on its transmit port. This
causes a collision right away. I am just theorizing this, as I don't really
know. But it makes sense from all the responses I have seen from the
Ethernet tools.

So my guess is that the Realtek does not do any half duplex collision
provention protocols while it is running in full duplex.

But it is tricky down there ;-)

Cheers, and thanks again.

Stephen Noftall





More information about the En-Nut-Discussion mailing list