1 .\" Copyright (c) 1997, 1998
2 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by Bill Paul.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 .\" THE POSSIBILITY OF SUCH DAMAGE.
38 .Nd "RealTek 8129/8139 Fast Ethernet device driver"
40 To compile this driver into the kernel,
41 place the following lines in your
42 kernel configuration file:
43 .Bd -ragged -offset indent
48 Alternatively, to load the driver as a
49 module at boot time, place the following line in
51 .Bd -literal -offset indent
57 driver provides support for PCI Ethernet adapters and embedded
58 controllers based on the RealTek 8129 and 8139 Fast Ethernet controller
61 The RealTek 8129/8139 series controllers use bus master DMA but do not use a
62 descriptor-based data transfer mechanism.
64 single fixed size ring buffer from which packets must be copied
66 For transmission, there are only four outbound packet
67 address registers which require all outgoing packets to be stored
68 as contiguous buffers.
69 Furthermore, outbound packet buffers must
70 be longword aligned or else transmission will fail.
72 The 8129 differs from the 8139 in that the 8139 has an internal
73 PHY which is controlled through special direct access registers
74 whereas the 8129 uses an external PHY via an MII bus.
76 supports both 10 and 100Mbps speeds in either full or half duplex.
77 The 8129 can support the same speeds and modes given an appropriate
80 Note: support for the 8139C+ chip is provided by the
86 driver supports the following media types:
88 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
90 Enable autoselection of the media type and options.
92 supported if the PHY chip attached to the RealTek controller
93 supports NWAY autonegotiation.
94 The user can manually override
95 the autoselected mode by adding media options to the
102 option can also be used to select either
108 Set 100Mbps (Fast Ethernet) operation.
111 option can also be used to select either
120 driver supports the following media options:
122 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
124 Force full duplex operation
126 Force half duplex operation.
129 Note that the 100baseTX media type is only available if supported
131 For more information on configuring this device, see
134 Adapters supported by the
142 EN1207D (MPX 5030/5038; RealTek 8139 clone)
144 Allied Telesyn AT2550
146 Allied Telesyn AT2500TX
150 BUFFALO (Melco INC.) LPC-CB-CLX (CardBus)
154 CompUSA no-name 10/100 PCI Ethernet NIC
158 Corega FEtherII CB-TXD
168 Edimax EP-4103DL CardBus
170 Encore ENL832-TX 10/100 M PCI
172 Farallon NetLINE 10/100 PCI
176 GigaFast Ethernet EE100-AXP
178 KTX-9130TX 10/100 Fast Ethernet
182 Longshine LCS-8038TX-R
184 NDC Communications NE100TX-E
186 Netronix Inc.\& EA-1210 NetEther 10/100
188 Nortel Networks 10/100BaseTX
200 SMC EZ Card 10/100 PCI 1211-TX
202 SOHO (PRAGMATIC) UE-1211C
206 .It "rl%d: couldn't map memory"
207 A fatal initialization error has occurred.
208 .It "rl%d: couldn't map interrupt"
209 A fatal initialization error has occurred.
210 .It "rl%d: watchdog timeout"
211 The device has stopped responding to the network, or there is a problem with
212 the network connection (cable).
213 .It "rl%d: no memory for rx list"
214 The driver failed to allocate an mbuf for the receiver ring.
215 .It "rl%d: no memory for tx list"
216 The driver failed to allocate an mbuf for the transmitter ring when
217 allocating a pad buffer or collapsing an mbuf chain into a cluster.
218 .It "rl%d: chip is in D3 power state -- setting to D0"
219 This message applies only to adapters which support power
221 Some operating systems place the controller in low power
222 mode when shutting down, and some PCI BIOSes fail to bring the chip
223 out of this state before configuring it.
224 The controller loses all of
225 its PCI configuration in the D3 state, so if the BIOS does not set
226 it back to full power mode in time, it will not be able to configure it
228 The driver tries to detect this condition and bring
229 the adapter back to the D0 (full power) state, but this may not be
230 enough to return the driver to a fully operational condition.
232 you see this message at boot time and the driver fails to attach
233 the device as a network interface, you will have to perform second
234 warm boot to have the device properly configured.
236 Note that this condition only occurs when warm booting from another
238 If you power down your system prior to booting
240 the card should be configured correctly.
251 .%B The RealTek 8129, 8139 and 8139C+ datasheets
252 .%O http://www.realtek.com.tw
257 device driver first appeared in
262 driver was written by
263 .An Bill Paul Aq wpaul@ctr.columbia.edu .
265 Since outbound packets must be longword aligned, the transmit
266 routine has to copy an unaligned packet into an mbuf cluster buffer
268 The driver abuses the fact that the cluster buffer
269 pool is allocated at system startup time in a contiguous region starting
271 Since cluster buffers are 2048 bytes, they are
272 longword aligned by definition.
273 The driver probably should not be
274 depending on this characteristic.
276 The RealTek data sheets are of especially poor quality,
277 and there is a lot of information missing
278 particularly concerning the receiver operation.
280 important fact that the data sheets fail to mention relates to the
281 way in which the chip fills in the receive buffer.
283 is posted to signal that a frame has been received, it is possible that
284 another frame might be in the process of being copied into the receive
285 buffer while the driver is busy handling the first one.
287 manages to finish processing the first frame before the chip is done
288 DMAing the rest of the next frame, the driver may attempt to process
289 the next frame in the buffer before the chip has had a chance to finish
292 The driver can check for an incomplete frame by inspecting the frame
293 length in the header preceding the actual packet data: an incomplete
294 frame will have the magic length of 0xFFF0.
295 When the driver encounters
296 this value, it knows that it has finished processing all currently
298 Neither this magic value nor its significance are
299 documented anywhere in the RealTek data sheets.