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