Subject: Re: de ethernet driver and autosense, and manpages missing
To: Anne Bennett <anne@alcor.concordia.ca>
From: Jonathan Stone <jonathan@cm-24-142-94-15.cableco-op.ispchannel.com>
List: port-i386
Date: 01/13/2000 13:40:06
Anne,

three things. First, if you manually configure full-duplex, you *MUST*
manually configure full-duplex on the remote end of the point-to-point
link (the switch port, or the other card if you're connecting two
hosts via a crossover cable. Full-duplex to hubs cannot work, of course.)

That's according to Jason's reading of the 802. spec, and it sounds
right to me.  (Forcing manual configuration of full-duplex defeats
Nway, and puts autonegotiation into a part of the spec's state-machine
called ``parallel autodetection''. That mode _cannot_ autodetect
full-duplex, so you have to do it manually.)

Is this de0 hooked up to a less-than-brand-new Cisco, by any chance?
That's the typical case where you have to force full-duplex. Old
Ciscos can't do Nway, so network admins sometimes hardwire the ports
to 100baseTX-FDX, and assume the client hosts will be set accordingly.


Second: if you're using the de driver, presumably you're running
NetBSD 1.4.1.  I dont know about the 1.4 branch, but the MII drivers
in -current, till about November 99, could get into a confused state
when manually changing media speed. (From memory, and simplifying
drastically, They did not get the parallel-negotitation state
mentioned above quite right).

The trick I found to fix it was to drop link pulse by ifconfig'ing the
interface down. That forces the link peer to restart auto-negotiation,
which usually ends up in a `good' state.  That's exactly what your

	    ifconfig down/sleep N/ifconfig up

sequence does.  I saw the same death-of-link when switching between
(forced) 10baseT to 100baseTX, and I worked around it by switching
back through the autosense state.

My guess is, if you had tried writing a script which did the ifconfig
up/ ifconfig down, without a sleep, that wouldn't have worked either.


Third: if `ifconfig de0 media autosense' is failing to get to
100baseTX, then there's a bug, either in the de driver or in the
switch at the far end.  Seems to me That's your real problem, and what
you're asking for is a workaround for that. Is there any way you can
try -current or the 1.4.2_ALPHA snapshots and see if those properly
autosense to 100Mbit?