freebsd-skq/sys/dev/dc
yongari 8a28fc08af Rearrange dc_tx_underrun() a bit to correctly set TX FIFO threshold
value. Controllers that always require "store and forward" mode(
Davicom and PNIC 82C168) have no way to recover from TX underrun
except completely reinitializing hardware. Previously only Davicom
was reinitialized and the TX FIFO threshold was changed not to use
"store and forward" mode after reinitialization since the default
FIFO threshold value was 0. This effectively disabled Davicom
controller's "store and forward" mode once it encountered TX
underruns. In theory, this can cause watchodg timeouts.

Intel 21143 controller requires TX MAC should be idle before
changing TX FIFO threshold. So driver tried to disable TX MAC and
checked whether it saw the idle state of TX MAC. Driver should
perform full hardware reinitialization on failing to enter to idle
state and it should not touch TX MAC again once it performed full
reinitialization.

While I'm here remove resetting TX FIFO threshold to 0 when
interface is put into down state. If driver ever encountered TX
underrun, it's likely to trigger TX underrun again whenever
interface is brought to up again. Keeping old/learned TX FIFO
threshold value shall reduce the chance of seeing TX underrns in
next run.
2011-03-08 19:49:16 +00:00
..
dcphy.c - Even after masking the media with IFM_GMASK the result may have bits 2011-01-14 20:26:59 +00:00
if_dc.c Rearrange dc_tx_underrun() a bit to correctly set TX FIFO threshold 2011-03-08 19:49:16 +00:00
if_dcreg.h s/u_intXX_t/uintXX_t/g 2011-02-19 03:32:10 +00:00
pnphy.c - Even after masking the media with IFM_GMASK the result may have bits 2011-01-14 20:26:59 +00:00