xref: /freebsd/share/man/man4/ti.4 (revision 884a2a699669ec61e2366e3e358342dbc94be24a)
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.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
120.It autoselect
121Enable autoselection of the media type and options.
122The user can manually override
123the autoselected mode by adding media options to the
124.Pa /etc/rc.conf
125file.
126.It 10baseT/UTP
127Set 10Mbps operation.
128The
129.Ar mediaopt
130option can also be used to select either
131.Ar full-duplex
132or
133.Ar half-duplex
134modes.
135.It 100baseTX
136Set 100Mbps (Fast Ethernet) operation.
137The
138.Ar mediaopt
139option can also be used to select either
140.Ar full-duplex
141or
142.Ar half-duplex
143modes.
144.It 1000baseSX
145Set 1000Mbps (Gigabit Ethernet) operation.
146Only full
147.Ar full-duplex
148mode is supported at this speed.
149.El
150.Pp
151The
152.Nm
153driver supports the following media options:
154.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
155.It full-duplex
156Force full duplex operation
157.It half-duplex
158Force half duplex operation.
159.El
160.Pp
161For more information on configuring this device, see
162.Xr ifconfig 8 .
163.Sh HARDWARE
164The
165.Nm
166driver supports Gigabit Ethernet adapters based on the
167Alteon Tigon I and II chips.
168The
169.Nm
170driver has been tested with the following adapters:
171.Pp
172.Bl -bullet -compact
173.It
1743Com 3c985-SX Gigabit Ethernet adapter (Tigon 1)
175.It
1763Com 3c985B-SX Gigabit Ethernet adapter (Tigon 2)
177.It
178Alteon AceNIC V Gigabit Ethernet adapter (1000baseSX)
179.It
180Alteon AceNIC V Gigabit Ethernet adapter (1000baseT)
181.It
182Digital EtherWORKS 1000SX PCI Gigabit adapter
183.It
184Netgear GA620 Gigabit Ethernet adapter (1000baseSX)
185.It
186Netgear GA620T Gigabit Ethernet adapter (1000baseT)
187.El
188.Pp
189The following adapters should also be supported but have
190not yet been tested:
191.Pp
192.Bl -bullet -compact
193.It
194Asante GigaNIX1000T Gigabit Ethernet adapter
195.It
196Asante PCI 1000BASE-SX Gigabit Ethernet adapter
197.It
198Farallon PN9000SX Gigabit Ethernet adapter
199.It
200NEC Gigabit Ethernet
201.It
202Silicon Graphics PCI Gigabit Ethernet adapter
203.El
204.Sh IOCTLS
205In addition to the standard
206.Xr socket 2
207.Xr ioctl 2
208calls implemented by most network drivers, the
209.Nm
210driver also includes a character device interface that can be used for
211additional diagnostics, configuration and debugging.
212With this character
213device interface, and a specially patched version of
214.Xr gdb 1 ,
215the user can
216debug firmware running on the Tigon board.
217.Pp
218These ioctls and their arguments are defined in the
219.In sys/tiio.h
220header file.
221.Bl -tag -width ".Dv ALT_WRITE_TG_MEM"
222.It Dv TIIOCGETSTATS
223Return card statistics DMAed from the card into kernel memory approximately
224every 2 seconds.
225(That time interval can be changed via the
226.Dv TIIOCSETPARAMS
227ioctl.)
228The argument is
229.Vt "struct ti_stats" .
230.It Dv TIIOCGETPARAMS
231Get various performance-related firmware parameters that largely affect how
232interrupts are coalesced.
233The argument is
234.Vt "struct ti_params" .
235.It Dv TIIOCSETPARAMS
236Set various performance-related firmware parameters that largely affect how
237interrupts are coalesced.
238The argument is
239.Vt "struct ti_params" .
240.It Dv TIIOCSETTRACE
241Tell the NIC to trace the requested types of information.
242The argument is
243.Vt ti_trace_type .
244.It Dv TIIOCGETTRACE
245Dump the trace buffer from the card.
246The argument is
247.Vt "struct ti_trace_buf" .
248.It Dv ALT_ATTACH
249This ioctl is used for compatibility with Alteon's Solaris driver.
250They apparently only have one character interface for debugging, so they have
251to tell it which Tigon instance they want to debug.
252This ioctl is a noop for
253.Fx .
254.It Dv ALT_READ_TG_MEM
255Read the requested memory region from the Tigon board.
256The argument is
257.Vt "struct tg_mem" .
258.It Dv ALT_WRITE_TG_MEM
259Write to the requested memory region on the Tigon board.
260The argument is
261.Vt "struct tg_mem" .
262.It Dv ALT_READ_TG_REG
263Read the requested register on the Tigon board.
264The argument is
265.Vt "struct tg_reg" .
266.It Dv ALT_WRITE_TG_REG
267Write to the requested register on the Tigon board.
268The argument is
269.Vt "struct tg_reg" .
270.El
271.Sh FILES
272.Bl -tag -width ".Pa /dev/ti[0-255]" -compact
273.It Pa /dev/ti[0-255]
274Tigon driver character interface.
275.El
276.Sh DIAGNOSTICS
277.Bl -diag
278.It "ti%d: couldn't map memory"
279A fatal initialization error has occurred.
280.It "ti%d: couldn't map interrupt"
281A fatal initialization error has occurred.
282.It "ti%d: no memory for softc struct!"
283The driver failed to allocate memory for per-device instance information
284during initialization.
285.It "ti%d: failed to enable memory mapping!"
286The driver failed to initialize PCI shared memory mapping.
287This might
288happen if the card is not in a bus-master slot.
289.It "ti%d: no memory for jumbo buffers!"
290The driver failed to allocate memory for jumbo frames during
291initialization.
292.It "ti%d: bios thinks we're in a 64 bit slot, but we aren't"
293The BIOS has programmed the NIC as though it had been installed in
294a 64-bit PCI slot, but in fact the NIC is in a 32-bit slot.
295This happens
296as a result of a bug in some BIOSes.
297This can be worked around on the
298Tigon II, but on the Tigon I initialization will fail.
299.It "ti%d: board self-diagnostics failed!"
300The ROMFAIL bit in the CPU state register was set after system
301startup, indicating that the on-board NIC diagnostics failed.
302.It "ti%d: unknown hwrev"
303The driver detected a board with an unsupported hardware revision.
304The
305.Nm
306driver supports revision 4 (Tigon 1) and revision 6 (Tigon 2) chips
307and has firmware only for those devices.
308.It "ti%d: watchdog timeout"
309The device has stopped responding to the network, or there is a problem with
310the network connection (cable).
311.El
312.Sh SEE ALSO
313.Xr sendfile 2 ,
314.Xr arp 4 ,
315.Xr netintro 4 ,
316.Xr ng_ether 4 ,
317.Xr vlan 4 ,
318.Xr ifconfig 8 ,
319.Xr zero_copy 9
320.Sh HISTORY
321The
322.Nm
323device driver first appeared in
324.Fx 3.0 .
325.Sh AUTHORS
326.An -nosplit
327The
328.Nm
329driver was written by
330.An Bill Paul Aq wpaul@bsdi.com .
331The header splitting firmware modifications, character
332.Xr ioctl 2
333interface and debugging support were written by
334.An Kenneth Merry Aq ken@FreeBSD.org .
335Initial zero copy support was written by
336.An Andrew Gallatin Aq gallatin@FreeBSD.org .
337