]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - share/man/man4/ti.4
MFC r317584:
[FreeBSD/stable/8.git] / share / man / man4 / ti.4
1 .\" Copyright (c) 1997, 1998, 1999
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 November 14, 2011
34 .Dt TI 4
35 .Os
36 .Sh NAME
37 .Nm ti
38 .Nd "Alteon Networks Tigon I and Tigon II Gigabit Ethernet 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 ti"
45 .Cd "options TI_SF_BUF_JUMBO"
46 .Cd "options TI_JUMBO_HDRSPLIT"
47 .Ed
48 .Pp
49 Alternatively, to load the driver as a
50 module at boot time, place the following line in
51 .Xr loader.conf 5 :
52 .Bd -literal -offset indent
53 if_ti_load="YES"
54 .Ed
55 .Sh DESCRIPTION
56 The
57 .Nm
58 driver provides support for PCI Gigabit Ethernet adapters based on
59 the Alteon Networks Tigon Gigabit Ethernet controller chip.
60 The Tigon
61 contains an embedded R4000 CPU, gigabit MAC, dual DMA channels and
62 a PCI interface unit.
63 The Tigon II contains two R4000 CPUs and other
64 refinements.
65 Either chip can be used in either a 32-bit or 64-bit PCI
66 slot.
67 Communication with the chip is achieved via PCI shared memory
68 and bus master DMA.
69 The Tigon I and II support hardware multicast
70 address filtering, VLAN tag extraction and insertion, and jumbo
71 Ethernet frames sizes up to 9000 bytes.
72 Note that the Tigon I chipset
73 is no longer in active production: all new adapters should come equipped
74 with Tigon II chipsets.
75 .Pp
76 While the Tigon chipset supports 10, 100 and 1000Mbps speeds, support for
77 10 and 100Mbps speeds is only available on boards with the proper
78 transceivers.
79 Most adapters are only designed to work at 1000Mbps,
80 however the driver should support those NICs that work at lower speeds
81 as well.
82 .Pp
83 Support for jumbo frames is provided via the interface MTU setting.
84 Selecting an MTU larger than 1500 bytes with the
85 .Xr ifconfig 8
86 utility configures the adapter to receive and transmit jumbo frames.
87 Using jumbo frames can greatly improve performance for certain tasks,
88 such as file transfers and data streaming.
89 .Pp
90 Header splitting support for Tigon 2 boards (this option has no effect for
91 the Tigon 1) can be turned on with the
92 .Dv TI_JUMBO_HDRSPLIT
93 option.
94 See
95 .Xr zero_copy 9
96 for more discussion on zero copy receive and header splitting.
97 .Pp
98 The
99 .Nm
100 driver uses UMA backed jumbo receive buffers, but can be configured
101 to use
102 .Xr sendfile 2
103 buffer allocator.
104 To turn on
105 .Xr sendfile 2
106 buffer allocator, use the
107 .Dv TI_SF_BUF_JUMBO
108 option.
109 .Pp
110 Support for vlans is also available using the
111 .Xr vlan 4
112 mechanism.
113 See the
114 .Xr vlan 4
115 man page for more details.
116 .Pp
117 The
118 .Nm
119 driver supports the following media types:
120 .Pp
121 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
122 .It autoselect
123 Enable autoselection of the media type and options.
124 The user can manually override
125 the autoselected mode by adding media options to the
126 .Pa /etc/rc.conf
127 file.
128 .It 10baseT/UTP
129 Set 10Mbps operation.
130 The
131 .Ar mediaopt
132 option can also be used to select either
133 .Ar full-duplex
134 or
135 .Ar half-duplex
136 modes.
137 .It 100baseTX
138 Set 100Mbps (Fast Ethernet) operation.
139 The
140 .Ar mediaopt
141 option can also be used to select either
142 .Ar full-duplex
143 or
144 .Ar half-duplex
145 modes.
146 .It 1000baseSX
147 Set 1000Mbps (Gigabit Ethernet) operation.
148 Only
149 .Ar full-duplex
150 mode is supported at this speed.
151 .El
152 .Pp
153 The
154 .Nm
155 driver supports the following media options:
156 .Pp
157 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
158 .It full-duplex
159 Force full-duplex operation.
160 .It half-duplex
161 Force half duplex operation.
162 .El
163 .Pp
164 For more information on configuring this device, see
165 .Xr ifconfig 8 .
166 .Sh HARDWARE
167 The
168 .Nm
169 driver supports Gigabit Ethernet adapters based on the
170 Alteon Tigon I and II chips.
171 The
172 .Nm
173 driver has been tested with the following adapters:
174 .Pp
175 .Bl -bullet -compact
176 .It
177 3Com 3c985-SX Gigabit Ethernet adapter (Tigon 1)
178 .It
179 3Com 3c985B-SX Gigabit Ethernet adapter (Tigon 2)
180 .It
181 Alteon AceNIC V Gigabit Ethernet adapter (1000baseSX)
182 .It
183 Alteon AceNIC V Gigabit Ethernet adapter (1000baseT)
184 .It
185 Digital EtherWORKS 1000SX PCI Gigabit adapter
186 .It
187 Netgear GA620 Gigabit Ethernet adapter (1000baseSX)
188 .It
189 Netgear GA620T Gigabit Ethernet adapter (1000baseT)
190 .El
191 .Pp
192 The following adapters should also be supported but have
193 not yet been tested:
194 .Pp
195 .Bl -bullet -compact
196 .It
197 Asante GigaNIX1000T Gigabit Ethernet adapter
198 .It
199 Asante PCI 1000BASE-SX Gigabit Ethernet adapter
200 .It
201 Farallon PN9000SX Gigabit Ethernet adapter
202 .It
203 NEC Gigabit Ethernet
204 .It
205 Silicon Graphics PCI Gigabit Ethernet adapter
206 .El
207 .Sh LOADER TUNABLES
208 Tunables can be set at the
209 .Xr loader 8
210 prompt before booting the kernel or stored in
211 .Xr loader.conf 5 .
212 .Bl -tag -width "xxxxxx"
213 .It Va hw.ti.%d.dac
214 If this tunable is set to 0 it will disable DAC (Dual Address Cycle).
215 The default value is 1 which means driver will use full 64bit
216 DMA addressing.
217 .El
218 .Sh SYSCTL VARIABLES
219 The following variables are available as both
220 .Xr sysctl 8
221 variables and
222 .Xr loader 8
223 tunables.
224 The interface has to be brought down and up again before a
225 change takes effect when any of the following tunables are
226 changed.
227 The one microsecond clock tick referenced below is a nominal
228 time and the actual hardware may not provide granularity to
229 this level.
230 For example, on Tigon 2 (revision 6) cards with release 12.0
231 the clock granularity is 5 microseconds.
232 .Bl -tag -width "xxxxxx"
233 .It Va dev.ti.%d.rx_coal_ticks
234 This value, receive coalesced ticks, controls the number of clock
235 ticks (of 1 microseconds each) that must elapse before the NIC DMAs
236 the receive return producer pointer to the Host and generates an
237 interrupt.
238 This parameter works in conjunction with the rx_max_coal_bds,
239 receive max coalesced BDs, tunable parameter.
240 The NIC will return the receive return producer pointer to the Host
241 when either of the thresholds is exceeded.
242 A value of 0 means that this parameter is ignored and receive BDs
243 will only be returned when the receive max coalesced BDs value is
244 reached.
245 The default value is 170.
246 .It Va dev.ti.%d.rx_max_coal_bds
247 This value, receive max coalesced BDs, controls the number of
248 receive buffer descriptors that will be coalesced before the NIC
249 updates the receive return ring producer index.
250 If this value is set to 0 it will disable receive buffer descriptor
251 coalescing.
252 The default value is 64.
253 .It Va dev.ti.%d.ti_tx_coal_ticks
254 This value, send coalesced ticks, controls the number of clock
255 ticks (of 1 microseconds each) that must elapse before the NIC DMAs
256 the send consumer pointer to the Host and generates an interrupt.
257 This parameter works in conjunction with the tx_max_coal_bds,
258 send max coalesced BDs, tunable parameter.
259 The NIC will return the send consumer pointer to the Host when
260 either of the thresholds is exceeded.
261 A value of 0 means that this parameter is ignored and send BDs will
262 only be returned when the send max coalesced BDs value is reached.
263 The default value is 2000.
264 .It Va dev.ti.%d.tx_max_coal_bds
265 This value, send max coalesced BDs, controls the number of send
266 buffer descriptors that will be coalesced before the NIC updates
267 the send consumer index.
268 If this value is set to 0 it will disable send buffer descriptor
269 coalescing.
270 The default value is 32.
271 .It Va dev.ti.%d.tx_buf_ratio
272 This value controls the ratio of the remaining memory in the NIC
273 that should be devoted to transmit buffer vs. receive buffer.
274 The lower 7 bits are used to indicate the ratio in 1/64th increments.
275 For example, setting this value to 16 will set the transmit buffer
276 to 1/4 of the remaining buffer space.
277 In no cases will the transmit or receive buffer be reduced below
278 68 KB.
279 For a 1 MB NIC the approximate total space for data buffers is
280 800 KB.
281 For a 512 KB NIC that number is 300 KB.
282 The default value is 21.
283 .It Va dev.ti.%d.stat_ticks
284 The value, stat ticks, controls the number of clock ticks
285 (of 1 microseconds each) that must elapse before the NIC DMAs
286 the statistics block to the Host and generates a STATS_UPDATED
287 event.
288 If set to zero then statistics are never DMAed to the Host.
289 It is recommended that this value be set to a high enough
290 frequency to not mislead someone reading statistics refreshes.
291 Several times a second is enough.
292 The default value is 2000000 (2 seconds).
293 .El
294 .Sh IOCTLS
295 In addition to the standard
296 .Xr socket 2
297 .Xr ioctl 2
298 calls implemented by most network drivers, the
299 .Nm
300 driver also includes a character device interface that can be used for
301 additional diagnostics, configuration and debugging.
302 With this character
303 device interface, and a specially patched version of
304 .Xr gdb 1 ,
305 the user can
306 debug firmware running on the Tigon board.
307 .Pp
308 These ioctls and their arguments are defined in the
309 .In sys/tiio.h
310 header file.
311 .Bl -tag -width ".Dv ALT_WRITE_TG_MEM"
312 .It Dv TIIOCGETSTATS
313 Return card statistics DMAed from the card into kernel memory approximately
314 every 2 seconds.
315 (That time interval can be changed via the
316 .Dv TIIOCSETPARAMS
317 ioctl.)
318 The argument is
319 .Vt "struct ti_stats" .
320 .It Dv TIIOCGETPARAMS
321 Get various performance-related firmware parameters that largely affect how
322 interrupts are coalesced.
323 The argument is
324 .Vt "struct ti_params" .
325 .It Dv TIIOCSETPARAMS
326 Set various performance-related firmware parameters that largely affect how
327 interrupts are coalesced.
328 The argument is
329 .Vt "struct ti_params" .
330 .It Dv TIIOCSETTRACE
331 Tell the NIC to trace the requested types of information.
332 The argument is
333 .Vt ti_trace_type .
334 .It Dv TIIOCGETTRACE
335 Dump the trace buffer from the card.
336 The argument is
337 .Vt "struct ti_trace_buf" .
338 .It Dv ALT_ATTACH
339 This ioctl is used for compatibility with Alteon's Solaris driver.
340 They apparently only have one character interface for debugging, so they have
341 to tell it which Tigon instance they want to debug.
342 This ioctl is a noop for
343 .Fx .
344 .It Dv ALT_READ_TG_MEM
345 Read the requested memory region from the Tigon board.
346 The argument is
347 .Vt "struct tg_mem" .
348 .It Dv ALT_WRITE_TG_MEM
349 Write to the requested memory region on the Tigon board.
350 The argument is
351 .Vt "struct tg_mem" .
352 .It Dv ALT_READ_TG_REG
353 Read the requested register from the Tigon board.
354 The argument is
355 .Vt "struct tg_reg" .
356 .It Dv ALT_WRITE_TG_REG
357 Write to the requested register on the Tigon board.
358 The argument is
359 .Vt "struct tg_reg" .
360 .El
361 .Sh FILES
362 .Bl -tag -width ".Pa /dev/ti[0-255]" -compact
363 .It Pa /dev/ti[0-255]
364 Tigon driver character interface.
365 .El
366 .Sh DIAGNOSTICS
367 .Bl -diag
368 .It "ti%d: couldn't map memory"
369 A fatal initialization error has occurred.
370 .It "ti%d: couldn't map interrupt"
371 A fatal initialization error has occurred.
372 .It "ti%d: no memory for softc struct!"
373 The driver failed to allocate memory for per-device instance information
374 during initialization.
375 .It "ti%d: failed to enable memory mapping!"
376 The driver failed to initialize PCI shared memory mapping.
377 This might
378 happen if the card is not in a bus-master slot.
379 .It "ti%d: no memory for jumbo buffers!"
380 The driver failed to allocate memory for jumbo frames during
381 initialization.
382 .It "ti%d: bios thinks we're in a 64 bit slot, but we aren't"
383 The BIOS has programmed the NIC as though it had been installed in
384 a 64-bit PCI slot, but in fact the NIC is in a 32-bit slot.
385 This happens
386 as a result of a bug in some BIOSes.
387 This can be worked around on the
388 Tigon II, but on the Tigon I initialization will fail.
389 .It "ti%d: board self-diagnostics failed!"
390 The ROMFAIL bit in the CPU state register was set after system
391 startup, indicating that the on-board NIC diagnostics failed.
392 .It "ti%d: unknown hwrev"
393 The driver detected a board with an unsupported hardware revision.
394 The
395 .Nm
396 driver supports revision 4 (Tigon 1) and revision 6 (Tigon 2) chips
397 and has firmware only for those devices.
398 .It "ti%d: watchdog timeout"
399 The device has stopped responding to the network, or there is a problem with
400 the network connection (cable).
401 .El
402 .Sh SEE ALSO
403 .Xr sendfile 2 ,
404 .Xr altq 4 ,
405 .Xr arp 4 ,
406 .Xr netintro 4 ,
407 .Xr ng_ether 4 ,
408 .Xr vlan 4 ,
409 .Xr ifconfig 8 ,
410 .Xr zero_copy 9
411 .Sh HISTORY
412 The
413 .Nm
414 device driver first appeared in
415 .Fx 3.0 .
416 .Sh AUTHORS
417 .An -nosplit
418 The
419 .Nm
420 driver was written by
421 .An Bill Paul Aq wpaul@bsdi.com .
422 The header splitting firmware modifications, character
423 .Xr ioctl 2
424 interface and debugging support were written by
425 .An Kenneth Merry Aq ken@FreeBSD.org .
426 Initial zero copy support was written by
427 .An Andrew Gallatin Aq gallatin@FreeBSD.org .