1.\" $OpenBSD: vr.4,v 1.26 2011/07/27 00:50:23 sthen Exp $ 2.\" 3.\" Copyright (c) 1997, 1998 4.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by Bill Paul. 17.\" 4. Neither the name of the author nor the names of any co-contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 25.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31.\" THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.\" $FreeBSD: vr.4,v 1.3 1999/03/25 00:52:44 wpaul Exp $ 34.\" 35.Dd $Mdocdate: July 27 2011 $ 36.Dt VR 4 37.Os 38.Sh NAME 39.Nm vr 40.Nd VIA VT3043/VT86C100A/VT6105/VT6105M 10/100 Ethernet device 41.Sh SYNOPSIS 42.Cd "vr* at pci?" 43.Cd "amphy* at mii?" 44.Cd "icsphy* at mii?" 45.Cd "sqphy* at mii?" 46.Sh DESCRIPTION 47The 48.Nm 49driver provides support for PCI Ethernet adapters and embedded 50controllers based on the VIA Technologies VT3043 Rhine I, 51VT86C100A Rhine II, and VT6105/VT6105M Rhine III Fast Ethernet 52controller chips. 53This includes the D-Link DFE530-TX and various other commodity Fast Ethernet 54cards. 55.Pp 56The VIA Rhine chips use bus master DMA and have a software interface 57designed to resemble that of the DEC 21x4x "tulip" chips. 58The major differences are that the receive filter in the Rhine chips is 59much simpler and is programmed through registers rather than by 60downloading a special setup frame through the transmit DMA engine, 61and that transmit and receive DMA buffers must be longword aligned. 62The Rhine chips are meant to be interfaced with external 63physical layer devices via an MII bus. 64They support both 10 and 100Mbps speeds in either full or half duplex. 65.Pp 66The 67.Nm 68driver additionally supports Wake on LAN (WoL). 69See 70.Xr arp 8 71and 72.Xr ifconfig 8 73for more details. 74.Pp 75The 76.Nm 77driver supports the following media types: 78.Bl -tag -width full-duplex 79.It autoselect 80Enable autoselection of the media type and options. 81The user can manually override 82the autoselected mode by adding media options to the appropriate 83.Xr hostname.if 5 84file. 85.It 10baseT 86Set 10Mbps operation. 87The 88.Ar mediaopt 89option can also be used to select either 90.Ar full-duplex 91or 92.Ar half-duplex 93modes. 94.It 100baseTX 95Set 100Mbps (Fast Ethernet) operation. 96The 97.Ar mediaopt 98option can also be used to select either 99.Ar full-duplex 100or 101.Ar half-duplex 102modes. 103.El 104.Pp 105The 106.Nm 107driver supports the following media options: 108.Bl -tag -width full-duplex 109.It full-duplex 110Force full duplex operation. 111.It half-duplex 112Force half duplex operation. 113.El 114.Pp 115Note that the 100baseTX media type is only available if supported 116by the adapter. 117.Pp 118For more information on configuring this device, see 119.Xr ifconfig 8 . 120.Sh DIAGNOSTICS 121.Bl -diag 122.It "vr%d: couldn't map memory" 123A fatal initialization error has occurred. 124.It "vr%d: couldn't map interrupt" 125A fatal initialization error has occurred. 126.It "vr%d: watchdog timeout" 127The device has stopped responding to the network, or there is a problem with 128the network connection (cable). 129.It "vr%d: no memory for rx list" 130The driver failed to allocate an mbuf for the receiver ring. 131.It "vr%d: no memory for tx list" 132The driver failed to allocate an mbuf for the transmitter ring when 133allocating a pad buffer or collapsing an mbuf chain into a cluster. 134.It "vr%d: chip is in D3 power state -- setting to D0" 135This message applies only to adapters which support power management. 136Some operating systems place the controller in low power 137mode when shutting down, and some PCI BIOSes fail to bring the chip 138out of this state before configuring it. 139The controller loses all of its PCI configuration in the D3 state, so if the 140BIOS does not set it back to full power mode in time, it won't be able to 141configure it correctly. 142The driver tries to detect this condition and bring 143the adapter back to the D0 (full power) state, but this may not be 144enough to return the driver to a fully operational condition. 145If this message appears at boot time and the driver fails to attach 146the device as a network interface, a second warm boot will have to be 147performed to have the device properly configured. 148.Pp 149Note that this condition only occurs when warm booting from another 150operating system. 151If the system is powered down prior to booting 152.Ox , 153the card should be configured correctly. 154.El 155.Sh SEE ALSO 156.Xr amphy 4 , 157.Xr arp 4 , 158.Xr icsphy 4 , 159.Xr ifmedia 4 , 160.Xr intro 4 , 161.Xr netintro 4 , 162.Xr pci 4 , 163.Xr sqphy 4 , 164.Xr hostname.if 5 , 165.Xr ifconfig 8 166.Rs 167.%T The VIA Technologies VT86C100A data sheet 168.%O http://www.via.com.tw 169.Re 170.Sh HISTORY 171The 172.Nm 173device driver first appeared in 174.Fx 3.0 . 175.Ox 176support first appeared in 177.Ox 2.5 . 178.Sh AUTHORS 179The 180.Nm 181driver was written by 182.An Bill Paul Aq wpaul@ctr.columbia.edu . 183.Sh BUGS 184The 185.Nm 186driver always copies transmit mbuf chains into longword-aligned 187buffers prior to transmission in order to pacify the Rhine chips. 188If buffers are not aligned correctly, the chip will round the 189supplied buffer address and begin DMAing from the wrong location. 190This buffer copying impairs transmit performance on slower systems but can't 191be avoided. 192On faster machines (e.g., a Pentium II), the performance 193impact is much less noticeable. 194