DC(4)
dc(4) β DEC/Intel 21143 and clone 10/100 Ethernet driver π¦
okay so this is the dc man page from the Kernel Interfaces Manual, and bestie, it's a whole saga. grab a snack. π
β¨ NAME β¨
dc β the DEC/Intel 21143 and clone 10/100 Ethernet driver. that's the whole vibe. π
β¨ SYNOPSIS β¨
so if you wanna bake this driver into the kernel (no cap, some people live like this), you drop these lines into your kernel config file:
device miibus
device dc
alternatively β and honestly this is the lowkey easier route β you can load it as a module at boot time by putting this line in loader.conf(5):
if_dc_load="YES"
slay. that's it. β¨
β¨ DESCRIPTION β¨
the dc driver is out here providing support for a bunch of PCI Fast Ethernet adapters and embedded controllers, all based on the DEC/Intel 21143 chipset and its many clones. iconic behavior honestly.
here's the tea: all the supported chipsets share the same general register layout, the same DMA descriptor format, and the same method of operation. all the clone chips are based on the 21143 design with various little modifications β think of it like the remix versions of a hit song.
the 21143 itself is that girl β it has support for 10baseT, BNC, AUI, MII and symbol media attachments, 10 and 100Mbps speeds in full or half duplex, built in NWAY autonegotiation, and wake on LAN. the 21143 also offers several receive filter programming options, including perfect filtering, inverse perfect filtering and hash table filtering. multitasking queen. π
now the clones? some of them duplicate the 21143 fairly closely, but others only maintain superficial similarities β it's giving "we have 21143 at home". 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 β not them being messy. π
the dc driver does its best to provide generalized support for all of these chipsets in order to keep special case code to a minimum. she's doing her best and honestly that's enough.
these chips are used by many vendors, which makes it difficult to provide a complete list of all supported cards. so if yours works, great, and if it's not on the list... maybe it still works. we simply don't know. π
the dc driver supports the following media types:
autoselectβ enable autoselection of the media type and options. the user can manually override the autoselected mode by adding media options to the/etc/rc.conffile.
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 (see the βBUGSβ section for details). the original 82c168 appears on very early revisions of the LinkSys LNE100TX and Matrox FastNIC. π
10baseT/UTPβ set 10Mbps operation. themediaoptoption can also be used to enable full-duplex operation. not specifying full-duplex implies half-duplex mode.100baseTXβ set 100Mbps (Fast Ethernet) operation. themediaoptoption can also be used to enable full-duplex operation. not specifying full-duplex implies half-duplex mode.
and the dc driver supports the following media options:
full-duplexβ force full duplex operation. the interface will operate in half duplex mode if this media option is not specified.
heads up bestie: the 100baseTX media type may not be available on certain Intel 21143 adapters which support 10Mbps media attachments only. so like, vibe check your card first. π
for more information on configuring this device, see ifconfig(8).
β¨ HARDWARE β¨
the dc driver provides support for the following chipsets β roll call:
- DEC/Intel 21143
- ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513 Centaur II
- ALi/ULi M5261 and M5263
- ASIX Electronics AX88140A and AX88141
- Conexant LANfinity RS7112 (miniPCI)
- Davicom DM9009, DM9100, DM9102 and DM9102A
- Lite-On 82c168 and 82c169 PNIC
- Lite-On/Macronix 82c115 PNIC II
- Macronix 98713, 98713A, 98715, 98715A, 98715AEC-C, 98725, 98727 and 98732
- Xircom X3201 (cardbus only)
and the following NICs are known to work with the dc driver at this time β this list is long, so buckle up π«Ά:
- 3Com OfficeConnect 10/100B (ADMtek AN985 Centaur-P)
- Abocom FE2500
- Accton EN1217 (98715A)
- Accton EN2242 MiniPCI
- Adico AE310TX (98715A)
- Alfa Inc GFC2204 (ASIX AX88140A)
- Built in 10Mbps only Ethernet on Compaq Presario 7900 series desktops (21143, non-MII)
- Built in Ethernet on LinkSys EtherFast 10/100 Instant GigaDrive (DM9102, MII)
- CNet Pro110B (ASIX AX88140A)
- CNet Pro120A (98715A or 98713A) and CNet Pro120B (98715)
- Compex RL100-TX (98713 or 98713A)
- D-Link DFE-570TX (21143, MII, quad port)
- Digital DE500-BA 10/100 (21143, non-MII)
- ELECOM Laneed LD-CBL/TXA (ADMtek AN985)
- Hawking CB102 CardBus
- IBM EtherJet Cardbus Adapter
- Intel PRO/100 Mobile Cardbus (versions that use the X3201 chipset)
- Jaton XpressNet (Davicom DM9102)
- Kingston KNE100TX (21143, MII)
- Kingston KNE110TX (PNIC 82c169)
- LinkSys LNE100TX (PNIC 82c168, 82c169)
- LinkSys LNE100TX v2.0 (PNIC II 82c115)
- LinkSys LNE100TX v4.0/4.1 (ADMtek AN985 Centaur-P)
- Matrox FastNIC 10/100 (PNIC 82c168, 82c169)
- Melco LGY-PCI-TXL
- Microsoft MN-120 10/100 CardBus (ADMTek Centaur-C)
- Microsoft MN-130 10/100 PCI (ADMTek Centaur-P)
- NDC SOHOware SFA110A (98713A)
- NDC SOHOware SFA110A Rev B4 (98715AEC-C)
- NetGear FA310-TX Rev. D1, D2 or D3 (PNIC 82c169)
- Netgear FA511
- PlaneX FNW-3602-T (ADMtek AN985)
- SMC EZ Card 10/100 1233A-TX (ADMtek AN985)
- SVEC PN102-TX (98713)
- Xircom Cardbus Realport
- Xircom Cardbus Ethernet 10/100
- Xircom Cardbus Ethernet II 10/100
the way that list just keeps going. we love a comprehensive queen. π
β¨ DIAGNOSTICS β¨
these are the messages the driver might hit you with β read them like texts from your network card. π₯
dc%d: couldn't map ports/memoryβ a fatal initialization error has occurred. πdc%d: couldn't map interruptβ a fatal initialization error has occurred.dc%d: watchdog timeoutβ a packet was queued for transmission and a transmit command was issued, but the device failed to acknowledge the transmission before a timeout expired. this can happen if the device is unable to deliver interrupts for some reason, or if there is a problem with the network connection (cable or network equipment) that results in a loss of link. check your cable bestie. πdc%d: no memory for rx listβ the driver failed to allocate an mbuf for the receiver ring. πdc%d: TX underrun -- increasing TX thresholdβ the device generated a transmit underrun error while attempting to DMA and transmit a packet. this happens if the host is not able to DMA the packet data into the NIC's FIFO fast enough. the driver will dynamically increase the transmit start threshold so that more data must be DMAed into the FIFO before the NIC will start transmitting it onto the wire. she's adapting. we stan an adaptive driver. πdc%d: TX underrun -- using store and forward modeβ the device continued to generate transmit underruns even after all possible transmit start threshold settings had been tried, so the driver programmed the chip for store and forward mode. in this mode, the NIC will not begin transmission until the entire packet has been transferred into its FIFO memory. full send only. π¦dc%d: chip is in D3 power state -- setting to D0β this message applies only to adapters which support power management. some operating systems place the controller in low power mode when shutting down, and some PCI BIOSes fail to bring the chip out of this state before configuring it. the controller loses all of its PCI configuration in the D3 state, so if the BIOS does not set it back to full power mode in time, it will not be able to configure it correctly. the driver tries to detect this condition and bring the adapter back to the D0 (full power) state, but this may not be enough to return the driver to a fully operational condition.
if you see this message at boot time and the driver fails to attach the device as a network interface, you will have to perform a second warm boot to have the device properly configured. π
Note: this condition only occurs when warm booting from another operating system. if you power down your system prior to booting FreeBSD, the card should be configured correctly. so like... just actually turn it off and on again. iconic fix. β¨
β¨ SEE ALSO β¨
altq(4), arp(4), miibus(4), netintro(4), ng_ether(4), polling(4), vlan(4), ifconfig(8)
and the reading list β datasheets and manuals, for when you're feeling academic π§:
- ADMtek AL981, AL983 and AL985 data sheets, http://www.admtek.com.tw.
- ASIX Electronics AX88140A and AX88141 data sheets, http://www.asix.com.tw.
- Davicom DM9102 data sheet, http://www.davicom.com.tw/userfile/24247/DM9102H-DS-F01-021508.pdf.
- Intel 21143 Hardware Reference Manual, http://developer.intel.com.
- Macronix 98713/A, 98715/A and 98725 data sheets, http://www.macronix.com.
- Macronix 98713/A and 98715/A app notes, http://www.macronix.com.
β¨ HISTORY β¨
the dc device driver first appeared in FreeBSD 4.0. a legend since day one. β
β¨ AUTHORS β¨
the dc driver was written by Bill Paul <wpaul@ee.columbia.edu>. thank you Bill, genuinely. π«Άπ
π BUGS π (aka the lore, the drama, the fine print)
okay bestie, gather round, because this is the part where we air out all the chipset drama π none of this is a dealbreaker, it's just... the β¨situationβ¨. read it so you know what you're getting into, iykyk.
- the Macronix magic number situation π β 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
CSR16register. the numbers are documented in the app notes, but the exact meaning of the bits is not. so we're writing a magic number. because the notes said so. it's giving "trust me bro" but make it silicon π - the
98713A10Mbps full duplex moment π β the98713Aseems to have a problem with10Mbps full duplexmode. the transmitter works but the receiver tends to produce many unexplained errors leading to very poor overall performance. the98715Adoes not exhibit this problem, bestie, it's literally fine. and all other modes on the98713Aseem to work correctly, so it's just this one vibe that's off. π«Ά - the original
82c168PNIC NWAY saga π β the original82c168PNIC chip has built inNWAYsupport 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 to10baseT half duplex, and it is up to the operator (that's you, babe) to manually select a different mode if necessary. not me having to hand-pick my own link mode π (later cards use an externalMIItransceiver to implementNWAYautonegotiation and work correctly, so if you've got a newer one you can chill π) - the
82c168/82c169transmit threshold workaround β¨ β thedcdriver programs82c168and82c169PNIC 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 at100Mbps, probably due toPCI DMAburst transfer errors. no cap, corrupt frames are not the vibe, so we just... don't do that π₯ - the
82c168/82c169receiver bug π¦ β the82c168and82c169PNIC 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. thedcdriver detects this condition and will salvage the frame; however, it incurs a serious performance penalty in the process. so like. it works. but it's not slaying π - the mysterious transmit underrun πΈ β 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
dcdriver will watch for this condition and requeue the setup frame until it is transferred successfully. icon behavior honestly, it just keeps trying until it works π - the ADMtek
AL981transmit wedge π§ β the ADMtekAL981chip (and possibly theAN985as 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. thedcdriver attempts to avoid this condition by not queuing any frames past the end of the transmit ring during a single invocation of thedc_start()routine. this workaround has a negligible impact on transmit performance. tiny cost, big save, we love to see it π
fr fr though β none of these are "your card is bricked" territory, they're "your card is a little quirky and the driver is doing gymnastics about it" territory. the driver's got your back π«Ά
and that's the whole page, bestie! π this little beauty is from the Debian crew, dated December 26, 2020, filed under DC(4) β go forth and configure your NIC with confidence, mwah π
πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1997, 1998, 1999 Bill Paul <wpaul@ee.columbia.edu>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms