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