]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/rl.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / rl.4
1 .\" Copyright (c) 1997, 1998
2 .\"     Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
18 .\"
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.
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .Dd January 16, 2013
34 .Dt RL 4
35 .Os
36 .Sh NAME
37 .Nm rl
38 .Nd "RealTek 8129/8139 Fast Ethernet device driver"
39 .Sh SYNOPSIS
40 To compile this driver into the kernel,
41 place the following lines in your
42 kernel configuration file:
43 .Bd -ragged -offset indent
44 .Cd "device miibus"
45 .Cd "device rl"
46 .Ed
47 .Pp
48 Alternatively, to load the driver as a
49 module at boot time, place the following line in
50 .Xr loader.conf 5 :
51 .Bd -literal -offset indent
52 if_rl_load="YES"
53 .Ed
54 .Sh DESCRIPTION
55 The
56 .Nm
57 driver provides support for PCI Ethernet adapters and embedded
58 controllers based on the RealTek 8129 and 8139 Fast Ethernet controller
59 chips.
60 .Pp
61 The RealTek 8129/8139 series controllers use bus master DMA but do not use a
62 descriptor-based data transfer mechanism.
63 The receiver uses a
64 single fixed size ring buffer from which packets must be copied
65 into mbufs.
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.
71 .Pp
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.
75 The 8139
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
78 PHY chip.
79 .Pp
80 Note: support for the 8139C+ chip is provided by the
81 .Xr re 4
82 driver.
83 .Pp
84 The
85 .Nm
86 driver supports the following media types:
87 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
88 .It autoselect
89 Enable autoselection of the media type and options.
90 This is only
91 supported if the PHY chip attached to the RealTek controller
92 supports NWAY autonegotiation.
93 The user can manually override
94 the autoselected mode by adding media options to the
95 .Pa /etc/rc.conf
96 file.
97 .It 10baseT/UTP
98 Set 10Mbps operation.
99 The
100 .Ar mediaopt
101 option can also be used to select either
102 .Ar full-duplex
103 or
104 .Ar half-duplex
105 modes.
106 .It 100baseTX
107 Set 100Mbps (Fast Ethernet) operation.
108 The
109 .Ar mediaopt
110 option can also be used to select either
111 .Ar full-duplex
112 or
113 .Ar half-duplex
114 modes.
115 .El
116 .Pp
117 The
118 .Nm
119 driver supports the following media options:
120 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
121 .It full-duplex
122 Force full duplex operation.
123 .It half-duplex
124 Force half duplex operation.
125 .El
126 .Pp
127 Note that the 100baseTX media type is only available if supported
128 by the adapter.
129 For more information on configuring this device, see
130 .Xr ifconfig 8 .
131 .Sh HARDWARE
132 Adapters supported by the
133 .Nm
134 driver include:
135 .Pp
136 .Bl -bullet -compact
137 .It
138 Accton
139 .Dq Cheetah
140 EN1207D (MPX 5030/5038; RealTek 8139 clone)
141 .It
142 Allied Telesyn AT2550
143 .It
144 Allied Telesyn AT2500TX
145 .It
146 Belkin F5D5000
147 .It
148 BUFFALO (Melco INC.) LPC-CB-CLX (CardBus)
149 .It
150 Compaq HNE-300
151 .It
152 CompUSA no-name 10/100 PCI Ethernet NIC
153 .It
154 Corega FEther CB-TXD
155 .It
156 Corega FEtherII CB-TXD
157 .It
158 D-Link DFE-520TX (rev. C1)
159 .It
160 D-Link DFE-528TX
161 .It
162 D-Link DFE-530TX+
163 .It
164 D-Link DFE-538TX
165 .It
166 D-Link DFE-690TXD
167 .It
168 Edimax EP-4103DL CardBus
169 .It
170 Encore ENL832-TX 10/100 M PCI
171 .It
172 Farallon NetLINE 10/100 PCI
173 .It
174 Genius GF100TXR
175 .It
176 GigaFast Ethernet EE100-AXP
177 .It
178 KTX-9130TX 10/100 Fast Ethernet
179 .It
180 LevelOne FPC-0106TX
181 .It
182 Longshine LCS-8038TX-R
183 .It
184 NDC Communications NE100TX-E
185 .It
186 Netronix Inc.\& EA-1210 NetEther 10/100
187 .It
188 Nortel Networks 10/100BaseTX
189 .It
190 OvisLink LEF-8129TX
191 .It
192 OvisLink LEF-8139TX
193 .It
194 Peppercon AG ROL-F
195 .It
196 Planex FNW-3603-TX
197 .It
198 Planex FNW-3800-TX
199 .It
200 SMC EZ Card 10/100 PCI 1211-TX
201 .It
202 SOHO (PRAGMATIC) UE-1211C
203 .El
204 .Sh LOADER TUNABLES
205 .Bl -tag -width indent
206 .It Va dev.rl.%unit.prefer_iomap
207 This tunable controls which register mapping should be used on the
208 specified device.
209 A non-zero value enables I/O space register mapping.
210 For controllers that have no I/O space register mapping this tunable
211 should be set to 0 to use memory space register mapping.
212 The default value is 1 to use I/O space register mapping.
213 .It Va dev.rl.%unit.twister_enable
214 Non-zero value enables the long cable tuning on the specified device.
215 Disabled by default.
216 .El
217 .Sh DIAGNOSTICS
218 .Bl -diag
219 .It "rl%d: couldn't map memory"
220 A fatal initialization error has occurred.
221 .It "rl%d: couldn't map interrupt"
222 A fatal initialization error has occurred.
223 .It "rl%d: watchdog timeout"
224 The device has stopped responding to the network, or there is a problem with
225 the network connection (cable).
226 .It "rl%d: no memory for rx list"
227 The driver failed to allocate an mbuf for the receiver ring.
228 .It "rl%d: no memory for tx list"
229 The driver failed to allocate an mbuf for the transmitter ring when
230 allocating a pad buffer or collapsing an mbuf chain into a cluster.
231 .It "rl%d: chip is in D3 power state -- setting to D0"
232 This message applies only to adapters which support power
233 management.
234 Some operating systems place the controller in low power
235 mode when shutting down, and some PCI BIOSes fail to bring the chip
236 out of this state before configuring it.
237 The controller loses all of
238 its PCI configuration in the D3 state, so if the BIOS does not set
239 it back to full power mode in time, it will not be able to configure it
240 correctly.
241 The driver tries to detect this condition and bring
242 the adapter back to the D0 (full power) state, but this may not be
243 enough to return the driver to a fully operational condition.
244 If
245 you see this message at boot time and the driver fails to attach
246 the device as a network interface, you will have to perform second
247 warm boot to have the device properly configured.
248 .Pp
249 Note that this condition only occurs when warm booting from another
250 operating system.
251 If you power down your system prior to booting
252 .Fx ,
253 the card should be configured correctly.
254 .El
255 .Sh SEE ALSO
256 .Xr altq 4 ,
257 .Xr arp 4 ,
258 .Xr miibus 4 ,
259 .Xr netintro 4 ,
260 .Xr ng_ether 4 ,
261 .Xr polling 4 ,
262 .Xr ifconfig 8
263 .Rs
264 .%B The RealTek 8129, 8139 and 8139C+ datasheets
265 .%U http://www.realtek.com.tw
266 .Re
267 .Sh HISTORY
268 The
269 .Nm
270 device driver first appeared in
271 .Fx 3.0 .
272 .Sh AUTHORS
273 The
274 .Nm
275 driver was written by
276 .An Bill Paul Aq wpaul@ctr.columbia.edu .
277 .Sh BUGS
278 Since outbound packets must be longword aligned, the transmit
279 routine has to copy an unaligned packet into an mbuf cluster buffer
280 before transmission.
281 The driver abuses the fact that the cluster buffer
282 pool is allocated at system startup time in a contiguous region starting
283 at a page boundary.
284 Since cluster buffers are 2048 bytes, they are
285 longword aligned by definition.
286 The driver probably should not be
287 depending on this characteristic.
288 .Pp
289 The RealTek data sheets are of especially poor quality,
290 and there is a lot of information missing
291 particularly concerning the receiver operation.
292 One particularly
293 important fact that the data sheets fail to mention relates to the
294 way in which the chip fills in the receive buffer.
295 When an interrupt
296 is posted to signal that a frame has been received, it is possible that
297 another frame might be in the process of being copied into the receive
298 buffer while the driver is busy handling the first one.
299 If the driver
300 manages to finish processing the first frame before the chip is done
301 DMAing the rest of the next frame, the driver may attempt to process
302 the next frame in the buffer before the chip has had a chance to finish
303 DMAing all of it.
304 .Pp
305 The driver can check for an incomplete frame by inspecting the frame
306 length in the header preceding the actual packet data: an incomplete
307 frame will have the magic length of 0xFFF0.
308 When the driver encounters
309 this value, it knows that it has finished processing all currently
310 available packets.
311 Neither this magic value nor its significance are
312 documented anywhere in the RealTek data sheets.