FreeBSD src
Go to file
Stephen McKay e3c5a44915 Work around an Intel 21143 chip bug.
Rev 1.56 of if_dc.c removed calls to mii_pollstat() from the dc_tick()
routine.  dc_tick() is called regularly to detect link up and link down
status, especially when autonegotiating.

The expectation was that mii_tick() (which is still called from dc_tick())
would update status information automatically in all cases where it would
be sensible to do so.

Unfortunately, with authentic 21143 chips this is not the case, and
the driver never successfully autonegotiates.  This is because (despite
what it says in the 21143 manual) the chip always claims that link is not
present while the autonegotiation enable bit is set.  Autonegotation takes
place and succeeds, but the driver tests the link bits before it switches
off the autonegotiation enable bit, and success is not recognised.

The simplest solution is to call dcphy_status() more often for MII_TICK
calls by dropping out of the switch statement instead of exiting when
we are autonegotiating and link appears to not be present.  When
autonegotiation succeeds, dcphy_status() will note the speed and fdx/hdx
state and turn off the autonegotiation enable bit.  The next call to
dcphy_status() will notice that link is present, and the dc driver code
will be notified.

Macronix chips also use this code, but implement link detection as
described in the manual, and hence don't need this patch.  However, tests
on a Macronix 98715AEC-C show that it does not adversely affect them.

This could be done better but is the minimal effective change, and most
closely mimics what was happening prior to rev 1.56 of if_dc.c.  (Actually
I also deleted a small amount of unnecessary code while I was in the area.)

Reviewed by:	wpaul
2002-04-18 14:40:20 +00:00
bin Replaced exists() tests with two equivalent defined(). 2002-04-18 07:01:35 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r94970, 2002-04-17 22:58:58 +00:00
crypto Fix some warnings. Don't record logins twice in USE_PAM case. Strip 2002-04-14 16:24:36 +00:00
etc Fixed bugs in previous revision: 2002-04-18 10:58:14 +00:00
games Fix a segfault if 'wear' is used without an argument or with 2002-04-15 17:27:34 +00:00
gnu Replaced exists() tests with two equivalent defined(). 2002-04-18 07:01:35 +00:00
include Rework the kernel environment subsystem. We now convert the static 2002-04-17 13:06:36 +00:00
kerberos5 Fix build when MAKE_KERBEROS4 is not requested. This was broken with 2002-02-21 15:54:20 +00:00
kerberosIV Install script via SCRIPTS. 2001-12-17 16:52:32 +00:00
lib Removed gratuitous LIBCOMPATDIR assignments. 2002-04-18 13:24:35 +00:00
libexec When opieverify() is fail, fallback to try unix password. 2002-04-16 10:54:30 +00:00
release Whitespace fix after the restructuring, no content changes 2002-04-18 01:27:19 +00:00
sbin Replaced exists() tests with two equivalent defined(). 2002-04-18 07:01:35 +00:00
secure Switch over to using pam_login_access(8) module in sshd(8). 2002-03-26 12:52:28 +00:00
share Optimize for i486 better (-m486 is just another deprecated 2002-04-18 09:37:15 +00:00
sys Work around an Intel 21143 chip bug. 2002-04-18 14:40:20 +00:00
tools update the reference vector. 2002-04-16 16:11:29 +00:00
usr.bin Fixed some style bugs: 2002-04-18 13:02:17 +00:00
usr.sbin Add variable substitutions for SOCKNAME, IPOCTETSIN, IPOCTETSOUT, IPPACKETSIN, 2002-04-17 12:38:59 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
MAINTAINERS Require approval for DHCP commits. I have commit access to isc.org 2002-04-17 16:39:01 +00:00
Makefile Makefile.inc0 is no longer used. 2002-03-03 22:37:35 +00:00
Makefile.inc1 Sort _startup_libs, _prebuild_libs, and _generic_libs lists alphabetically. 2002-04-16 14:38:15 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Spell "FreeBSD" correctly. 2002-03-26 12:35:49 +00:00
UPDATING Update to note my dropping the strong lock on this file. 2002-04-11 05:45:17 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.FreeBSD.org/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.FreeBSD.org/handbook/synching.html