xref: /freebsd/share/man/man4/ti.4 (revision 3642298923e528d795e3a30ec165d2b469e28b40)
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 July 16, 2005
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
40To compile support for the
41.Nm
42driver into your kernel, place the following lines in your
43kernel configuration file:
44.Bd -ragged -offset indent
45.Cd "device ti"
46.Cd "options TI_PRIVATE_JUMBOS"
47.Cd "options TI_JUMBO_HDRSPLIT"
48.Ed
49.Pp
50Alternatively, to load the
51.Nm
52driver at boot time, place the following line in
53.Xr loader.conf 5 :
54.Bd -literal -offset indent
55if_ti_load="YES"
56.Ed
57.Sh DESCRIPTION
58The
59.Nm
60driver provides support for PCI Gigabit Ethernet adapters based on
61the Alteon Networks Tigon Gigabit Ethernet controller chip.
62The Tigon
63contains an embedded R4000 CPU, gigabit MAC, dual DMA channels and
64a PCI interface unit.
65The Tigon II contains two R4000 CPUs and other
66refinements.
67Either chip can be used in either a 32-bit or 64-bit PCI
68slot.
69Communication with the chip is achieved via PCI shared memory
70and bus master DMA.
71The Tigon I and II support hardware multicast
72address filtering, VLAN tag extraction and insertion, and jumbo
73Ethernet frames sizes up to 9000 bytes.
74Note that the Tigon I chipset
75is no longer in active production: all new adapters should come equipped
76with Tigon II chipsets.
77.Pp
78While the Tigon chipset supports 10, 100 and 1000Mbps speeds, support for
7910 and 100Mbps speeds is only available on boards with the proper
80transceivers.
81Most adapters are only designed to work at 1000Mbps,
82however the driver should support those NICs that work at lower speeds
83as well.
84.Pp
85Support for jumbo frames is provided via the interface MTU setting.
86Selecting an MTU larger than 1500 bytes with the
87.Xr ifconfig 8
88utility configures the adapter to receive and transmit jumbo frames.
89Using jumbo frames can greatly improve performance for certain tasks,
90such as file transfers and data streaming.
91.Pp
92Header splitting support for Tigon 2 boards (this option has no effect for
93the Tigon 1) can be turned on with the
94.Dv TI_JUMBO_HDRSPLIT
95option.
96See
97.Xr zero_copy 9
98for more discussion on zero copy receive and header splitting.
99.Pp
100The
101.Nm
102driver normally uses jumbo receive buffers allocated by the
103.Xr sendfile 2
104buffer allocator, but can be configured to use its own private pool of
105jumbo buffers that are contiguous instead of buffers from the jumbo
106allocator, which are made up of multiple page sized chunks.
107To turn on private jumbos, use the
108.Dv TI_PRIVATE_JUMBOS
109option.
110.Pp
111Support for vlans is also available using the
112.Xr vlan 4
113mechanism.
114See the
115.Xr vlan 4
116man page for more details.
117.Pp
118The
119.Nm
120driver supports the following media types:
121.Pp
122.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
123.It autoselect
124Enable autoselection of the media type and options.
125The user can manually override
126the autoselected mode by adding media options to the
127.Pa /etc/rc.conf
128file.
129.It 10baseT/UTP
130Set 10Mbps operation.
131The
132.Ar mediaopt
133option can also be used to select either
134.Ar full-duplex
135or
136.Ar half-duplex
137modes.
138.It 100baseTX
139Set 100Mbps (Fast Ethernet) operation.
140The
141.Ar mediaopt
142option can also be used to select either
143.Ar full-duplex
144or
145.Ar half-duplex
146modes.
147.It 1000baseSX
148Set 1000Mbps (Gigabit Ethernet) operation.
149Only full
150.Ar full-duplex
151mode is supported at this speed.
152.El
153.Pp
154The
155.Nm
156driver supports the following media options:
157.Pp
158.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
159.It full-duplex
160Force full duplex operation
161.It half-duplex
162Force half duplex operation.
163.El
164.Pp
165For more information on configuring this device, see
166.Xr ifconfig 8 .
167.Sh HARDWARE
168The
169.Nm
170driver supports Gigabit Ethernet adapters based on the
171Alteon Tigon I and II chips.
172The
173.Nm
174driver has been tested with the following adapters:
175.Pp
176.Bl -bullet -compact
177.It
1783Com 3c985-SX Gigabit Ethernet adapter (Tigon 1)
179.It
1803Com 3c985B-SX Gigabit Ethernet adapter (Tigon 2)
181.It
182Alteon AceNIC V Gigabit Ethernet adapter (1000baseSX)
183.It
184Alteon AceNIC V Gigabit Ethernet adapter (1000baseT)
185.It
186Digital EtherWORKS 1000SX PCI Gigabit adapter
187.It
188Netgear GA620 Gigabit Ethernet adapter (1000baseSX)
189.It
190Netgear GA620T Gigabit Ethernet adapter (1000baseT)
191.El
192.Pp
193The following adapters should also be supported but have
194not yet been tested:
195.Pp
196.Bl -bullet -compact
197.It
198Asante GigaNIX1000T Gigabit Ethernet adapter
199.It
200Asante PCI 1000BASE-SX Gigabit Ethernet adapter
201.It
202Farallon PN9000SX Gigabit Ethernet adapter
203.It
204NEC Gigabit Ethernet
205.It
206Silicon Graphics PCI Gigabit Ethernet adapter
207.El
208.Sh IOCTLS
209In addition to the standard
210.Xr socket 2
211.Xr ioctl 2
212calls implemented by most network drivers, the
213.Nm
214driver also includes a character device interface that can be used for
215additional diagnostics, configuration and debugging.
216With this character
217device interface, and a specially patched version of
218.Xr gdb 1 ,
219the user can
220debug firmware running on the Tigon board.
221.Pp
222These ioctls and their arguments are defined in the
223.In sys/tiio.h
224header file.
225.Bl -tag -width ".Dv ALT_WRITE_TG_MEM"
226.It Dv TIIOCGETSTATS
227Return card statistics DMAed from the card into kernel memory approximately
228every 2 seconds.
229(That time interval can be changed via the
230.Dv TIIOCSETPARAMS
231ioctl.)
232The argument is
233.Vt "struct ti_stats" .
234.It Dv TIIOCGETPARAMS
235Get various performance-related firmware parameters that largely affect how
236interrupts are coalesced.
237The argument is
238.Vt "struct ti_params" .
239.It Dv TIIOCSETPARAMS
240Set various performance-related firmware parameters that largely affect how
241interrupts are coalesced.
242The argument is
243.Vt "struct ti_params" .
244.It Dv TIIOCSETTRACE
245Tell the NIC to trace the requested types of information.
246The argument is
247.Vt ti_trace_type .
248.It Dv TIIOCGETTRACE
249Dump the trace buffer from the card.
250The argument is
251.Vt "struct ti_trace_buf" .
252.It Dv ALT_ATTACH
253This ioctl is used for compatibility with Alteon's Solaris driver.
254They apparently only have one character interface for debugging, so they have
255to tell it which Tigon instance they want to debug.
256This ioctl is a noop for
257.Fx .
258.It Dv ALT_READ_TG_MEM
259Read the requested memory region from the Tigon board.
260The argument is
261.Vt "struct tg_mem" .
262.It Dv ALT_WRITE_TG_MEM
263Write to the requested memory region on the Tigon board.
264The argument is
265.Vt "struct tg_mem" .
266.It Dv ALT_READ_TG_REG
267Read the requested register on the Tigon board.
268The argument is
269.Vt "struct tg_reg" .
270.It Dv ALT_WRITE_TG_REG
271Write to the requested register on the Tigon board.
272The argument is
273.Vt "struct tg_reg" .
274.El
275.Sh FILES
276.Bl -tag -width ".Pa /dev/ti[0-255]" -compact
277.It Pa /dev/ti[0-255]
278Tigon driver character interface.
279.El
280.Sh DIAGNOSTICS
281.Bl -diag
282.It "ti%d: couldn't map memory"
283A fatal initialization error has occurred.
284.It "ti%d: couldn't map interrupt"
285A fatal initialization error has occurred.
286.It "ti%d: no memory for softc struct!"
287The driver failed to allocate memory for per-device instance information
288during initialization.
289.It "ti%d: failed to enable memory mapping!"
290The driver failed to initialize PCI shared memory mapping.
291This might
292happen if the card is not in a bus-master slot.
293.It "ti%d: no memory for jumbo buffers!"
294The driver failed to allocate memory for jumbo frames during
295initialization.
296.It "ti%d: bios thinks we're in a 64 bit slot, but we aren't"
297The BIOS has programmed the NIC as though it had been installed in
298a 64-bit PCI slot, but in fact the NIC is in a 32-bit slot.
299This happens
300as a result of a bug in some BIOSes.
301This can be worked around on the
302Tigon II, but on the Tigon I initialization will fail.
303.It "ti%d: board self-diagnostics failed!"
304The ROMFAIL bit in the CPU state register was set after system
305startup, indicating that the on-board NIC diagnostics failed.
306.It "ti%d: unknown hwrev"
307The driver detected a board with an unsupported hardware revision.
308The
309.Nm
310driver supports revision 4 (Tigon 1) and revision 6 (Tigon 2) chips
311and has firmware only for those devices.
312.It "ti%d: watchdog timeout"
313The device has stopped responding to the network, or there is a problem with
314the network connection (cable).
315.El
316.Sh SEE ALSO
317.Xr sendfile 2 ,
318.Xr arp 4 ,
319.Xr netintro 4 ,
320.Xr ng_ether 4 ,
321.Xr vlan 4 ,
322.Xr ifconfig 8 ,
323.Xr zero_copy 9
324.Sh HISTORY
325The
326.Nm
327device driver first appeared in
328.Fx 3.0 .
329.Sh AUTHORS
330.An -nosplit
331The
332.Nm
333driver was written by
334.An Bill Paul Aq wpaul@bsdi.com .
335The header splitting firmware modifications, character
336.Xr ioctl 2
337interface and debugging support were written by
338.An Kenneth Merry Aq ken@FreeBSD.org .
339Initial zero copy support was written by
340.An Andrew Gallatin Aq gallatin@FreeBSD.org .
341