1.\" $NetBSD: we.4,v 1.16 2008/04/30 13:10:55 martin Exp $ 2.\" 3.\" Copyright (c) 1997 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8.\" NASA Ames Research Center. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 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 THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd October 20, 1997 32.Dt WE 4 33.Os 34.Sh NAME 35.Nm we 36.Nd "Western Digital/SMC WD80x3, SMC Elite Ultra, and SMC EtherEZ Ethernet cards device driver" 37.Sh SYNOPSIS 38.Cd "we0 at isa? port 0x280 iomem 0xd0000 irq 9" 39.Cd "we1 at isa? port 0x300 iomem 0xcc000 irq 10" 40.Cd "we* at mca? slot ?" 41.Sh DESCRIPTION 42The 43.Nm 44device driver supports Western Digital/SMC WD80x3, SMC Elite Ultra, and 45SMC EtherEZ Ethernet cards. 46.Sh FLAG VALUES 47For some clone boards the driver is not able to recognize 16bit or 8bit 48interfaces correctly. Since this makes a huge difference (see diagnostic 49section below) 50you can override this by specifying flags value in the config file: 51.Pp 52.Cd "we2 at isa? port 0x300 iomem 0xe0000 irq 15 flags 4" 53.Pp 54The values to add together for flags are: 55.Pp 56.Bl -diag 57.It 2 58force adapter to be treated as 8bit, even if it probes 59as a 16bit interface. Improper use of this flag will make the 60driver fail or send invalid Ethernet packets. 61.It 4 62force adapter to be treated as 16bit, even if it probes 63as a 8bit interface. For example the COMPEX ENT/U boards 64identify as WD8003 compatibles, but are in fact 16bit cards. 65Using this flag on a board that really is a 8bit board will 66result in bogus packets being sent. 67.It 8 68disable the use of double transmit buffers to save space in 69the on-board RAM for more receive buffers. 70.El 71.Pp 72Note that all supported MCA cards are 16bit. 73.Sh MEDIA SELECTION 74The ability to select media from software is dependent on the particular 75model of WD/SMC card. The following models support only manual configuration: 76WD8003S, WD8003E, and WD8013EBT. 77.Pp 78Other WD/SMC 80x3 interfaces support two types of media on a single card. 79All support the AUI media type. The other media is either BNC or UTP 80behind a transceiver. Software cannot differentiate between BNC and UTP 81cards. On some models, the AUI port is always active. 82.Pp 83The SMC Elite Ultra and SMC EtherEZ interfaces support three media 84a single card: AUI, BNC, and UTP. If the transceiver is active, the BNC 85media is selected. Otherwise, the AUI and UTP ports are both active. 86.Pp 87To enable the AUI media, select the 88.Em 10base5 89or 90.Em aui 91media type with 92.Xr ifconfig 8 Ns 's 93.Cm media 94directive. To select the other media (transceiver), select the 95.Em 10base2 96or 97.Em bnc 98media type. 99.Sh DIAGNOSTICS 100.Bl -diag 101.It "we0: overriding IRQ \*[Lt]n\*[Gt] to \*[Lt]m\*[Gt]" 102The IRQ specified in the kernel configuration file is different from that 103found in the card's configuration registers. The value in the kernel 104configuration file is being overridden by the one configured into the card. 105.It "we0: can't wildcard IRQ on a \*[Lt]model\*[Gt]" 106The IRQ was wildcarded in the kernel configuration file, and the card is 107a WD8003S, WD8003E, or WD8013EBT, which do not support software IRQ 108configuration. 109.It "we0: failed to clear shared memory at offset \*[Lt]off\*[Gt]" 110The memory test was unable to clear the interface's shared memory 111region. This often indicates that the card is configured at a conflicting 112.Em iomem 113address. 114.It we0: warning - receiver ring buffer overrun 115The DP8390 Ethernet chip used by this board implements a shared-memory 116ring-buffer to store incoming packets. 117.Pp 118The 16bit boards (8013 series) have 16k of memory as well as 119fast memory access speed. Typical memory access speed on these 120boards is about 4MB/second. These boards generally have no 121problems keeping up with full Ethernet speed and the ring-buffer 122seldom overfills. 123.Pp 124However, the 8bit boards (8003) usually have only 8k bytes of shared 125memory. This is only enough room for about 4 full-size (1500 byte) 126packets. This can sometimes be a problem, especially on the original 127WD8003E, because these boards' shared-memory access speed is quite 128slow; typically only about 1MB/second. The overhead of this slow 129memory access, and the fact that there is only room for 4 full-sized 130packets means that the ring-buffer will occasionally overrun. When 131this happens, the board must be reset to avoid a lockup problem in 132early revision 8390's. Resetting the board causes all of the data in 133the ring-buffer to be lost, requiring it to be retransmitted/received, 134congesting the board further. Because of this, maximum throughput on 135these boards is only about 400-600k per second. 136.Pp 137This problem is exasperated by NFS because the 8bit boards lack 138sufficient memory to support the default 8k byte packets that NFS and 139other protocols use as their default. If these cards must be used 140with NFS, use the NFS 141.Fl r 142and 143.Fl w 144options in 145.Pa /etc/fstab 146to limit NFS's packet size. 1474096 byte packets generally work. 148.El 149.Sh SEE ALSO 150.Xr ifmedia 4 , 151.Xr intro 4 , 152.Xr isa 4 , 153.Xr mca 4 , 154.Xr ifconfig 8 155