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. (That time interval can be changed via the 212.Dv TIIOCSETPARAMS 213ioctl.) The argument is 214.Vt "struct ti_stats" . 215.It Dv TIIOCGETPARAMS 216Get various performance-related firmware parameters that largely affect how 217interrupts are coalesced. 218The argument is 219.Vt "struct ti_params" . 220.It Dv TIIOCSETPARAMS 221Set various performance-related firmware parameters that largely affect how 222interrupts are coalesced. The argument is 223.Vt "struct ti_params" . 224.It Dv TIIOCSETTRACE 225Tell the NIC to trace the requested types of information. 226The argument is 227.Vt ti_trace_type . 228.It Dv TIIOCGETTRACE 229Dump the trace buffer from the card. 230The argument is 231.Vt "struct ti_trace_buf" . 232.It Dv ALT_ATTACH 233This ioctl is used for compatibility with Alteon's Solaris driver. 234They apparently only have one character interface for debugging, so they have 235to tell it which Tigon instance they want to debug. 236This ioctl is a noop for 237.Fx . 238.It Dv ALT_READ_TG_MEM 239Read the requested memory region from the Tigon board. 240The argument is 241.Vt "struct tg_mem" . 242.It Dv ALT_WRITE_TG_MEM 243Write to the requested memory region on the Tigon board. 244The argument is 245.Vt "struct tg_mem" . 246.It Dv ALT_READ_TG_REG 247Read the requested register on the Tigon board. 248The argument is 249.Vt "struct tg_reg" . 250.It Dv ALT_WRITE_TG_REG 251Write to the requested register on the Tigon board. 252The argument is 253.Vt "struct tg_reg" . 254.El 255.Sh FILES 256.Bl -tag -width ".Pa /dev/ti[0-255]" -compact 257.It Pa /dev/ti[0-255] 258Tigon driver character interface. 259.El 260.Sh DIAGNOSTICS 261.Bl -diag 262.It "ti%d: couldn't map memory" 263A fatal initialization error has occurred. 264.It "ti%d: couldn't map interrupt" 265A fatal initialization error has occurred. 266.It "ti%d: no memory for softc struct!" 267The driver failed to allocate memory for per-device instance information 268during initialization. 269.It "ti%d: failed to enable memory mapping!" 270The driver failed to initialize PCI shared memory mapping. 271This might 272happen if the card is not in a bus-master slot. 273.It "ti%d: no memory for jumbo buffers!" 274The driver failed to allocate memory for jumbo frames during 275initialization. 276.It "ti%d: bios thinks we're in a 64 bit slot, but we aren't" 277The BIOS has programmed the NIC as though it had been installed in 278a 64-bit PCI slot, but in fact the NIC is in a 32-bit slot. 279This happens 280as a result of a bug in some BIOSes. 281This can be worked around on the 282Tigon II, but on the Tigon I initialization will fail. 283.It "ti%d: board self-diagnostics failed!" 284The ROMFAIL bit in the CPU state register was set after system 285startup, indicating that the on-board NIC diagnostics failed. 286.It "ti%d: unknown hwrev" 287The driver detected a board with an unsupported hardware revision. 288The 289.Nm 290driver supports revision 4 (Tigon 1) and revision 6 (Tigon 2) chips 291and has firmware only for those devices. 292.It "ti%d: watchdog timeout" 293The device has stopped responding to the network, or there is a problem with 294the network connection (cable). 295.El 296.Sh SEE ALSO 297.Xr arp 4 , 298.Xr netintro 4 , 299.Xr ng_ether 4 , 300.Xr vlan 4 , 301.Xr ifconfig 8 , 302.Xr jumbo 9 , 303.Xr zero_copy 9 304.Rs 305.%T Alteon Gigabit Ethernet/PCI NIC manuals 306.%O http://sanjose.alteon.com/open.shtml 307.Re 308.Sh HISTORY 309The 310.Nm 311device driver first appeared in 312.Fx 3.0 . 313.Sh AUTHORS 314.An -nosplit 315The 316.Nm 317driver was written by 318.An Bill Paul Aq wpaul@bsdi.com . 319The header splitting firmware modifications, character 320.Xr ioctl 2 321interface and debugging support were written by 322.An Kenneth Merry Aq ken@FreeBSD.org . 323Initial zero copy support was written by 324.An Andrew Gallatin Aq gallatin@FreeBSD.org . 325