1.\" Copyright (c) 1997, 1998 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: src/share/man/man4/wb.4,v 1.10.2.5 2003/02/17 21:20:39 trhodes Exp $ 32.\" $DragonFly: src/share/man/man4/wb.4,v 1.3 2004/03/11 12:28:55 hmp Exp $ 33.\" 34.Dd November 4, 1998 35.Dt WB 4 36.Os 37.Sh NAME 38.Nm wb 39.Nd Winbond W89C840F fast ethernet device driver 40.Sh SYNOPSIS 41.Cd "device miibus" 42.Cd "device wb" 43.Sh DESCRIPTION 44The 45.Nm 46driver provides support for PCI ethernet adapters and embedded 47controllers based on the Winbond W89C840F fast ethernet controller 48chip. 49This includes the Trendware TE100-PCIE and various other cheap 50boards. 51The 840F should not be confused with the 940F, which is 52an NE2000 clone and only supports 10Mbps speeds. 53.Pp 54The Winbond controller uses bus master DMA and is designed to be 55a DEC 'tulip' workalike. 56It differs from the standard DEC design 57in several ways: the control and status registers are spaced 4 58bytes apart instead of 8, and the receive filter is programmed through 59registers rather than by downloading a special setup frame via 60the transmit DMA engine. 61Using an external PHY, the Winbond chip 62supports both 10 and 100Mbps speeds in either full or half duplex. 63.Pp 64The 65.Nm 66driver supports the following media types: 67.Pp 68.Bl -tag -width xxxxxxxxxxxxxxxxxxxx 69.It autoselect 70Enable autoselection of the media type and options. 71This is only 72supported if the PHY chip attached to the Winbond controller 73supports NWAY autonegotiation. 74The user can manually override 75the autoselected mode by adding media options to the 76.Pa /etc/rc.conf 77file. 78.It 10baseT/UTP 79Set 10Mbps operation. 80The 81.Ar mediaopt 82option can also be used to select either 83.Ar full-duplex 84or 85.Ar half-duplex 86modes. 87.It 100baseTX 88Set 100Mbps (fast ethernet) operation. 89The 90.Ar mediaopt 91option can also be used to select either 92.Ar full-duplex 93or 94.Ar half-duplex 95modes. 96.El 97.Pp 98The 99.Nm 100driver supports the following media options: 101.Pp 102.Bl -tag -width xxxxxxxxxxxxxxxxxxxx 103.It full-duplex 104Force full duplex operation 105.It half-duplex 106Force half duplex operation. 107.El 108.Pp 109Note that the 100baseTX media type is only available if supported 110by the adapter. 111For more information on configuring this device, see 112.Xr ifconfig 8 . 113.Sh DIAGNOSTICS 114.Bl -diag 115.It "wb%d: couldn't map memory" 116A fatal initialization error has occurred. 117.It "wb%d: couldn't map interrupt" 118A fatal initialization error has occurred. 119.It "wb%d: watchdog timeout" 120The device has stopped responding to the network, or there is a problem with 121the network connection (cable). 122.It "wb%d: no memory for rx list" 123The driver failed to allocate an mbuf for the receiver ring. 124.It "wb%d: no memory for tx list" 125The driver failed to allocate an mbuf for the transmitter ring when 126allocating a pad buffer or collapsing an mbuf chain into a cluster. 127.It "wb%d: chip is in D3 power state -- setting to D0" 128This message applies only to adapters which support power 129management. 130Some operating systems place the controller in low power 131mode when shutting down, and some PCI BIOSes fail to bring the chip 132out of this state before configuring it. 133The controller loses all of 134its PCI configuration in the D3 state, so if the BIOS does not set 135it back to full power mode in time, it won't be able to configure it 136correctly. 137The driver tries to detect this condition and bring 138the adapter back to the D0 (full power) state, but this may not be 139enough to return the driver to a fully operational condition. 140If 141you see this message at boot time and the driver fails to attach 142the device as a network interface, you will have to perform second 143warm boot to have the device properly configured. 144.Pp 145Note that this condition only occurs when warm booting from another 146operating system. 147If you power down your system prior to booting 148.Dx , 149the card should be configured correctly. 150.El 151.Sh SEE ALSO 152.Xr arp 4 , 153.Xr miibus 4 , 154.Xr netintro 4 , 155.Xr ng_ether 4 , 156.Xr ifconfig 8 157.Sh HISTORY 158The 159.Nm 160device driver first appeared in 161.Fx 3.0 . 162.Sh AUTHORS 163The 164.Nm 165driver was written by 166.An Bill Paul Aq wpaul@ctr.columbia.edu . 167.Sh BUGS 168The Winbond chip seems to behave strangely in some cases when the 169link partner switches modes. 170If for example both sides are set to 17110Mbps half-duplex, and the other end is changed to 100Mbps 172full-duplex, the Winbond's receiver suddenly starts writing trash 173all over the RX descriptors. 174The 175.Nm 176driver handles this by forcing a reset of both the controller 177chip and attached PHY. 178This is drastic, but it appears to be the 179only way to recover properly from this condition. 180