|DC(4)||Device Drivers Manual||DC(4)|
dc — DEC/Intel
21140/21142/21143/21145 and clones 10/100 Ethernet device
dc* at pci?
dc* at cardbus?
amphy* at mii?
bmtphy* at mii?
dcphy* at mii?
icsphy* at mii?
lxtphy* at mii?
mtdphy* at mii?
nsphy* at mii?
nsphyter* at mii?
sqphy* at mii?
tqphy* at mii?
dc driver provides support for several
PCI, Mini PCI, and CardBus Fast Ethernet adapters and embedded controllers
based on the following chipsets:
All of these chips have the same general register layout, DMA descriptor format and method of operation. All of the clone chips are based on the 21143 design with various modifications. (The 21140 is an older version of the 21143.) The 21143 itself has support for 10baseT, BNC, AUI, MII and symbol media attachments, 10 and 100Mbps speeds in full or half duplex, and built-in NWAY autonegotiation. The 21143 also offers several receive filter programming options including perfect filtering, inverse perfect filtering and hash table filtering. The 21145 seems to be 10Mbps only and has an additional (unsupported) HomePNA PHY.
Some clone chips duplicate the 21143 fairly closely while others
only maintain superficial similarities. Some support only MII media
attachments. Others use different receiver filter programming mechanisms. At
least one supports only chained DMA descriptors (most support both chained
descriptors and contiguously allocated fixed size rings). Some chips
(especially the PNIC) also have peculiar bugs. The
dc driver does its best to provide generalized
support for all of these chipsets in order to keep special case code to a
These chips are used by many vendors, which makes it difficult to
provide a complete list of all supported cards. The following NICs are known
to work with the
dc driver at this time:
dc driver supports the following media
Note: the built-in NWAY autonegotiation on the original PNIC
82c168 chip is horribly broken and is not supported by the
dc driver at this time: the chip will operate in
any speed or duplex mode, however these must be set manually. The
original 82c168 appears on very early revisions of the Linksys LNE100TX
and Matrox FastNIC.
dc driver supports the following media
Note that the 100baseTX media type may not be available on certain Intel 21143 adapters which support 10Mbps media attachments only. The Intel 21145 supports 10Mbps half-duplex only.
For more information on configuring this device, see ifconfig(8).
ADMtek AL981 and AL983 data sheets.
ASIX Electronics AX88140A and AX88141 data sheets, https://www.asix.com.tw.
Davicom DM9102 data sheet.
Intel 21143 Hardware Reference Manual, http://developer.intel.com.
Macronix 98713/A, 98715/A and 98725 data sheets, https://www.macronix.com.
Macronix 98713/A and 98715/A app notes, https://www.macronix.com.
dc device driver first appeared in
FreeBSD 4.0. OpenBSD support
was added in OpenBSD 2.7.
The Macronix application notes claim that in order to put the chips in normal operation, the driver must write a certain magic number into the CSR16 register. The numbers are documented in the app notes, but the exact meaning of the bits is not.
The 98713A seems to have a problem with 10Mbps full duplex mode. The transmitter works but the receiver tends to produce many unexplained errors leading to very poor overall performance. The 98715A does not exhibit this problem. All other modes on the 98713A seem to work correctly.
The original 82c168 PNIC chip has built-in NWAY support which is used on certain early Linksys LNE100TX and Matrox FastNIC cards, however it is horribly broken and difficult to use reliably. Consequently, autonegotiation is not currently supported for this chipset: the driver defaults the NIC to 10baseT half duplex, and it's up to the operator to manually select a different mode if necessary. (Later cards use an external MII transceiver to implement NWAY autonegotiation and work correctly.)
dc driver programs 82c168 and 82c169
PNIC chips to use the store and forward setting for the transmit start
threshold by default. This is to work around problems with some NIC/PCI bus
combinations where the PNIC can transmit corrupt frames when operating at
100Mbps, probably due to PCI DMA burst transfer errors.
The 82c168 and 82c169 PNIC chips also have a receiver bug that
sometimes manifests during periods of heavy receive and transmit activity,
where the chip will improperly DMA received frames to the host. The chips
appear to upload several kilobytes of garbage data along with the received
frame data, dirtying several RX buffers instead of just the expected one.
dc driver detects this condition and will
salvage the frame, however it incurs a serious performance penalty in the
The PNIC chips also sometimes generate a transmit underrun error
when the driver attempts to download the receiver filter setup frame, which
can result in the receive filter being incorrectly programmed. The
dc driver will watch for this condition and requeue
the setup frame until it is transferred successfully.
The ADMtek AL981 chip (and possibly the AN983 as well) has been
observed to sometimes wedge on transmit: this appears to happen when the
driver queues a sequence of frames which cause it to wrap from the end of
the transmit descriptor ring back to the beginning. The
dc driver attempts to avoid this condition by not
queuing any frames past the end of the transmit ring during a single
invocation of the
dc_start() routine. This
workaround has a negligible impact on transmit performance.
mii_tick() function does not currently
run for ASIX boards, meaning cable disconnects and reconnects can go
unnoticed. The AX88140A and AX88141 data sheets indicate that they don't
have RX or TX state registers (the bits are reserved). Therefore, we can't
seem to reliably detect when the adapter is idle.
The Davicom interfaces require a grossly high PCI latency timer value to function properly. This means when a Davicom adapter is present in the machine, it is given an unfairly high amount of bandwidth on the PCI bus, unnecessarily taking time away from other devices. Therefore, Davicom network cards are not recommended for use with OpenBSD. Be careful; some motherboards have Davicom interfaces built-in.
|February 18, 2022||OpenBSD-current|