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