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