Subject: Re: Vlans with fxp nics (closure)
To: Chuck Yerkes <chuck+nbsd@2003.snew.com>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 06/17/2003 08:06:00
On Tue, Jun 17, 2003 at 12:48:12AM -0400, Chuck Yerkes wrote:
> Chant the matra with me:
>   Autoselect is bad, I will always force my interfaces to what
>   I want.

More dangerous, that is very likely to end up with the ends of a
link disagreeing about FDX - which seems to work until you load the
network...

IMHO the only safe way to do things is to use auto-negotiation.
The 2 transceivers then mutually agree the correct procedure.
Unfortunately the ethernet MAC needs to know whether the link is
FDX or HDX (but typically not whether it is 10M or 100M).
This can be tricky to determine reliably - the actual operating mode
of a transceiver isn't actually available in one of the standard MII
registers :-(

For one pcmcia card (which is transfer-rate challenged on the host interface)
I made the driver set the MII ANAR register to excluse the FDX modes,
that way the MAC engine could be locked into HDX.

If you have to software poll an MII register to find out the current
interface speed you need to do it my sending 1 bit every 2 clock ticks
to avoid software delay loops.

	David

-- 
David Laight: david@l8s.co.uk