1.\" Copyright (c) 2004 2.\" Bill Paul <wpaul@windriver.com>. 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.Dd May 29, 2011 32.Dt VGE 4 33.Os 34.Sh NAME 35.Nm vge 36.Nd "VIA Networking Technologies Velocity Gigabit Ethernet adapter driver" 37.Sh SYNOPSIS 38To compile this driver into the kernel, 39place the following lines in your 40kernel configuration file: 41.Bd -ragged -offset indent 42.Cd "device miibus" 43.Cd "device vge" 44.Ed 45.Pp 46Alternatively, to load the driver as a 47module at boot time, place the following line in 48.Xr loader.conf 5 : 49.Bd -literal -offset indent 50if_vge_load="YES" 51.Ed 52.Sh DESCRIPTION 53The 54.Nm 55driver provides support for various NICs and embedded Ethernet interfaces 56based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity 57Family Gigabit Ethernet controller chips. 58.Pp 59The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed 60MAC with an integrated 10/100/1000 copper PHY. 61(Some older cards use an external PHY.) 62The VT6130/VT6132 is the PCI express version of Velocity family. 63The MAC supports TCP/IP hardware 64checksums (IPv4 only), TCP large send, VLAN tag insertion and stripping, 65as well as VLAN filtering, a 64-entry CAM filter and a 64-entry VLAN filter, 6664-bit multicast hash filter, 4 separate transmit DMA queues, flow control 67and jumbo frames (not on VT6130/VT6132) up to 16K in size. 68The Velocity family controllers have a 16K receive FIFO and 48K transmit FIFO. 69.Pp 70The 71.Nm 72driver takes advantage of the controller's checksum offload and VLAN 73tagging features, as well as the jumbo frame (except VT6130/VT6132) and CAM 74filter support. 75The CAM filter is used for multicast address filtering to provide 7664 perfect multicast address filter support. 77If it is necessary for the interface to join more than 64 multicast 78groups, the driver will switch over to using the hash filter. 79.Pp 80The jumbo frame support can be enabled by setting the interface MTU 81to any value larger than the default of 1500 bytes, up to a maximum 82of 9000 bytes. 83Jumbo frames are disabled on the VT6130/VT6132 controllers because the TX 84MAC will hang when trying to send a frame that is larger than 4K. 85The receive and transmit checksum offload support 86can be toggled on and off using the 87.Xr ifconfig 8 88utility. 89.Pp 90The 91.Nm 92driver supports the following media types: 93.Bl -tag -width ".Cm 10baseT/UTP" 94.It Cm autoselect 95Enable autoselection of the media type and options. 96The user can manually override 97the autoselected mode by adding media options to 98.Xr rc.conf 5 . 99.It Cm 10baseT/UTP 100Set 10Mbps operation. 101The 102.Xr ifconfig 8 103.Cm mediaopt 104option can also be used to select either 105.Cm full-duplex 106or 107.Cm half-duplex 108modes. 109.It Cm 100baseTX 110Set 100Mbps (Fast Ethernet) operation. 111The 112.Xr ifconfig 8 113.Cm mediaopt 114option can also be used to select either 115.Cm full-duplex 116or 117.Cm half-duplex 118modes. 119.It Cm 1000baseTX 120Set 1000baseTX operation over twisted pair. 121The 122.Xr ifconfig 8 123.Cm mediaopt 124option can also be used to select either 125.Cm full-duplex 126or 127.Cm half-duplex 128modes. 129.El 130.Pp 131The 132.Nm 133driver supports the following media options: 134.Bl -tag -width ".Cm full-duplex" 135.It Cm full-duplex 136Force full duplex operation. 137.It Cm half-duplex 138Force half duplex operation. 139.El 140.Pp 141For more information on configuring this device, see 142.Xr ifconfig 8 . 143.Sh HARDWARE 144The 145.Nm 146driver supports VIA Networking VT6120, VT6122, VT6130 and VT6132 based 147Gigabit Ethernet adapters including: 148.Pp 149.Bl -bullet -compact 150.It 151VIA Networking LAN-on-motherboard Gigabit Ethernet 152.It 153ZyXEL GN650-T 64-bit PCI Gigabit Ethernet NIC (ZX1701) 154.It 155ZyXEL GN670-T 32-bit PCI Gigabit Ethernet NIC (ZX1702) 156.El 157.Sh LOADER TUNABLES 158Tunables can be set at the 159.Xr loader 8 160prompt before booting the kernel or stored in 161.Xr loader.conf 5 . 162.Bl -tag -width "xxxxxx" 163.It Va hw.vge.msi_disable 164This tunable disables MSI support on the Ethernet hardware. 165The default value is 0. 166.El 167.Sh SYSCTL VARIABLES 168The following variables are available as both 169.Xr sysctl 8 170variables and 171.Xr loader 8 172tunables: 173.Bl -tag -width "xxxxxx" 174.It Va dev.vge.%d.int_holdoff 175Maximum number of time to delay interrupts. 176The valid range is 0 to 5100 in units of 1us, the default is 177150 (150us). 178The resolution of timer is about 20us so finer tuning than 17920us wouldn't be available. 180The interface should be brought down and up again before a change 181takes effect. 182.It Va dev.vge.%d.rx_coal_pkt 183Maximum number of packets to fire Rx completion interrupt. 184The valid range is 1 to 255, the default is 64. 185.It Va dev.vge.%d.tx_coal_pkt 186Maximum number of packets to fire Tx completion interrupt. 187The valid range is 1 to 255, the default is 128. 188.El 189.Sh DIAGNOSTICS 190.Bl -diag 191.It "vge%d: couldn't map memory" 192A fatal initialization error has occurred. 193.It "vge%d: couldn't map ports" 194A fatal initialization error has occurred. 195.It "vge%d: couldn't map interrupt" 196A fatal initialization error has occurred. 197.It "vge%d: failed to enable memory mapping!" 198The driver failed to initialize PCI shared memory mapping. 199This might 200happen if the card is not in a bus-master slot. 201.It "vge%d: watchdog timeout" 202The device has stopped responding to the network, or there is a problem with 203the network connection (cable). 204.El 205.Sh SEE ALSO 206.Xr altq 4 , 207.Xr arp 4 , 208.Xr miibus 4 , 209.Xr netintro 4 , 210.Xr ng_ether 4 , 211.Xr polling 4 , 212.Xr vlan 4 , 213.Xr ifconfig 8 214.Sh HISTORY 215The 216.Nm 217device driver first appeared in 218.Fx 5.3 . 219.Sh AUTHORS 220The 221.Nm 222driver was written by 223.An Bill Paul Aq Mt wpaul@windriver.com . 224