freebsd-skq/sys/dev
mckay 8620a54252 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
..
aac Add support for the Dell 2650 2002-04-05 20:00:29 +00:00
acpica Rework the kernel environment subsystem. We now convert the static 2002-04-17 13:06:36 +00:00
advansys Restore I/O port resources to the condition before adv_isa_probe() is 2001-05-06 09:28:18 +00:00
agp Fix some nits in AMD AGP driver. Remove excess malloc and move a bzero 2002-04-15 18:57:26 +00:00
aha Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
ahb Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
aic Remove __P. 2002-03-20 02:08:01 +00:00
aic7xxx Remove __P. 2002-03-20 08:56:31 +00:00
amd Move unused functions into #if 0 ... #endif. 2001-05-06 08:07:10 +00:00
amr Fixed printf format errors in previous commit. %llu is no more suitable 2002-03-18 23:24:00 +00:00
an Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
ar Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
asr Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
ata Add support for the nVIDIA nForce ATA controller. 2002-04-16 08:30:51 +00:00
atkbdc GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
awi Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
bge Try to sort out the correct way to generate async link state change 2002-04-04 06:01:31 +00:00
bktr Fix bktr and pcf compilation with LINT 2002-03-25 21:22:35 +00:00
buslogic Use ANSI C string contatenation instead of a multi-line string literal. 2001-12-13 11:14:28 +00:00
cardbus Revert most of the recent PCI merge. This has proven to be too 2002-03-15 06:41:01 +00:00
ccd Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>. 2002-04-08 09:20:07 +00:00
ciss Fix the I/O performance issues with the ciss driver where CAM was limiting 2002-04-11 09:28:09 +00:00
cm Remove __P. 2002-03-20 02:08:01 +00:00
cnw Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
cs Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
ct Remove __P. 2002-03-20 02:08:01 +00:00
cy Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
dc Work around an Intel 21143 chip bug. 2002-04-18 14:40:20 +00:00
de No FreeBSD/vax here either. 2001-11-03 08:32:28 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
digi Make delay iteration counts a function of hz as the delay period in each 2002-04-17 15:28:41 +00:00
dpt Fix a couple of bogus enums. 2002-01-08 06:47:55 +00:00
ed More newcard devices: 2002-04-02 05:52:52 +00:00
eisa GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
em Added support for 82540EM based cards. 2002-04-06 00:36:53 +00:00
en Remove __P. 2002-03-20 02:08:01 +00:00
ep Remove __P. 2002-03-20 02:08:01 +00:00
ex Remove __P. 2002-03-20 02:08:01 +00:00
exca Default debugging to OFF now. 2002-02-04 15:55:21 +00:00
fb Turn on TGA support. 2002-04-13 22:34:16 +00:00
fdc When reading a UFS-style label from a floppy, don't attempt to use a 2002-04-02 18:29:43 +00:00
fe Supported C-NET(98)P2 PnP mode. 2002-02-04 14:01:27 +00:00
fxp Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
gem In some cases, RX descriptors that are signalled to have been completed 2002-03-23 19:43:15 +00:00
gfb Turn on TGA support. 2002-04-13 22:34:16 +00:00
gx Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
hea Remove __P. 2002-03-20 02:08:01 +00:00
hfa - Convert the 'hfa' ATM interface driver to newbus. 2002-04-17 00:26:09 +00:00
hme Assorted fixes: 2002-03-23 19:37:11 +00:00
ic Oops, forgot to commit one file in the fd driver mega update. Here it 2001-12-16 07:52:13 +00:00
ichsmb Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
ida Here follows the new kernel dumping infrastructure. 2002-03-31 22:37:00 +00:00
ie Repo copy i82586.h to dev/ic/i82586.h. 2001-07-02 05:29:58 +00:00
iicbus Major rework of the iicbus/smbus framework: 2002-03-23 15:49:15 +00:00
iir Remove __P. 2002-03-20 02:08:01 +00:00
isp Scale back # of luns supported for SCC to 16384- oops- top 3 bits are a 2002-04-16 19:55:35 +00:00
ispfw Remove __P. 2002-03-20 02:08:01 +00:00
joy Revert change that breaks the joy module. joydevclass must not be static. 2002-01-08 18:27:49 +00:00
kbd GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
lge Remove __P. 2002-03-20 02:08:01 +00:00
lmc Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
lnc Remove __P. 2002-03-20 02:08:01 +00:00
mc146818
mca - Remove an unused write_ivars function that didn't do anything anyway. 2001-01-19 09:29:34 +00:00
mcd Retire the bogus ioctl DIOCGPART in toto. 2002-04-02 11:52:13 +00:00
md Remove unused include. 2002-03-20 09:55:07 +00:00
mii Work around an Intel 21143 chip bug. 2002-04-18 14:40:20 +00:00
mk48txx Add a driver back end for the Mostek MK48T02, MK48T08 and MK48T59 2002-04-04 23:44:42 +00:00
mlx Fixed printf format errors in previous commit. %llu is no more suitable 2002-03-18 23:38:16 +00:00
mly Rework the kernel environment subsystem. We now convert the static 2002-04-17 13:06:36 +00:00
mse Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 16:01:49 +00:00
musycc Fix warnings: 2001-06-15 00:19:43 +00:00
my diff reduction 2002-04-17 01:50:03 +00:00
ncv Remove __P. 2002-03-20 02:08:01 +00:00
nge If the receiver runs out of space for an received frame in the internal 2002-04-13 21:33:33 +00:00
nmdm Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
nsp Remove __P. 2002-03-20 02:08:01 +00:00
null Rename DIOCGKERNELDUMP to DIOCSKERNELDUMP as it strictly speaking 2002-04-09 10:04:09 +00:00
ofw Basic OpenFirmware disk driver. It will attach to anything in OpenFirmware 2002-04-15 10:54:22 +00:00
pccard Catchup to 1.32 2002-04-11 21:19:04 +00:00
pccbb Restore NetBSD copyrights that shouldn't have been removed in the first place. 2002-04-13 04:07:07 +00:00
pcf Fix bktr and pcf compilation with LINT 2002-03-25 21:22:35 +00:00
pci Add MODULE_VERSION. 2002-04-17 00:31:32 +00:00
pcic Fix missing comma in previous commit. 2001-12-28 23:51:48 +00:00
pdq Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
ppbus This makes ppbus childs like lpt and ppi succesfully connect to more 2002-04-07 22:06:20 +00:00
ppc Restore the original copyright 2002-03-23 15:36:13 +00:00
puc Add an entry for "PCCOM dual port RS232/422/485". 2002-04-01 13:33:43 +00:00
random Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
ray Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
rc Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
rp Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
sbni Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
scd Retire the bogus ioctl DIOCGPART in toto. 2002-04-02 11:52:13 +00:00
se Use the right major number. 2002-04-09 00:35:26 +00:00
sf Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
si Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
sio Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
sk Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
smbus Major rework of the iicbus/smbus framework: 2002-03-23 15:49:15 +00:00
sn Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
snc Remove __P. 2002-03-20 02:08:01 +00:00
snp Treat input on the snp device as an `unsigned char'. According to the 2002-04-10 03:51:49 +00:00
sound Cast another bus_addr_t to long long for a printf to quiet a warning on 2002-04-16 01:58:13 +00:00
speaker Remove __P. 2002-03-20 07:51:46 +00:00
sr Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
stg Remove __P. 2002-03-20 02:08:01 +00:00
streams Remove __P. 2002-03-20 02:08:01 +00:00
sym Fix some gcc-3.1+ warnings: 2002-03-19 23:20:21 +00:00
syscons Turn on TGA support. 2002-04-13 22:34:16 +00:00
tdfx Replace ffind_* with fget calls. 2002-01-14 00:13:45 +00:00
tga Add the TGA video driver. This is a great accomplishtment and will help 2001-11-01 08:26:30 +00:00
ti Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
twe Here follows the new kernel dumping infrastructure. 2002-03-31 22:37:00 +00:00
tx Remove __P. 2002-03-20 02:08:01 +00:00
txp Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
usb Revert part of revision 1.49 which was supposed to be white space 2002-04-17 12:03:20 +00:00
vinum Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>. 2002-04-08 09:20:07 +00:00
vr Change callers of mtx_init() to pass in an appropriate lock type name. In 2002-04-04 21:03:38 +00:00
vx Remove __P. 2002-03-20 02:08:01 +00:00
wds Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
wi Merge from OpenBSD's fixes: 2002-04-16 07:45:30 +00:00
wl Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
xe Remove an unused variable. 2002-02-26 03:37:35 +00:00