195d67482SBill Paul.\" Copyright (c) 2001 Wind River Systems 295d67482SBill Paul.\" Copyright (c) 1997, 1998, 1999, 2000, 2001 395d67482SBill Paul.\" Bill Paul <wpaul@windriver.com>. All rights reserved. 495d67482SBill Paul.\" 595d67482SBill Paul.\" Redistribution and use in source and binary forms, with or without 695d67482SBill Paul.\" modification, are permitted provided that the following conditions 795d67482SBill Paul.\" are met: 895d67482SBill Paul.\" 1. Redistributions of source code must retain the above copyright 995d67482SBill Paul.\" notice, this list of conditions and the following disclaimer. 1095d67482SBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright 1195d67482SBill Paul.\" notice, this list of conditions and the following disclaimer in the 1295d67482SBill Paul.\" documentation and/or other materials provided with the distribution. 1395d67482SBill Paul.\" 3. All advertising materials mentioning features or use of this software 1495d67482SBill Paul.\" must display the following acknowledgement: 1595d67482SBill Paul.\" This product includes software developed by Bill Paul. 1695d67482SBill Paul.\" 4. Neither the name of the author nor the names of any co-contributors 1795d67482SBill Paul.\" may be used to endorse or promote products derived from this software 1895d67482SBill Paul.\" without specific prior written permission. 1995d67482SBill Paul.\" 2095d67482SBill Paul.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 2195d67482SBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2295d67482SBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2395d67482SBill Paul.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 2495d67482SBill Paul.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2595d67482SBill Paul.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2695d67482SBill Paul.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2795d67482SBill Paul.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2895d67482SBill Paul.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2995d67482SBill Paul.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 3095d67482SBill Paul.\" THE POSSIBILITY OF SUCH DAMAGE. 3195d67482SBill Paul.\" 3295d67482SBill Paul.\" $FreeBSD$ 3395d67482SBill Paul.\" 34*5ad09310SSevan Janiyan.Dd August 18, 2017 3595d67482SBill Paul.Dt BGE 4 3695d67482SBill Paul.Os 3795d67482SBill Paul.Sh NAME 3895d67482SBill Paul.Nm bge 398194413bSPyun YongHyeon.Nd "Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver" 4095d67482SBill Paul.Sh SYNOPSIS 4116d78bb8STom RhodesTo compile this driver into the kernel, 4216d78bb8STom Rhodesplace the following lines in your 4390296834STom Rhodeskernel configuration file: 4486e3186eSTom Rhodes.Bd -ragged -offset indent 4595d67482SBill Paul.Cd "device miibus" 4695d67482SBill Paul.Cd "device bge" 4786e3186eSTom Rhodes.Ed 4886e3186eSTom Rhodes.Pp 4916d78bb8STom RhodesAlternatively, to load the driver as a 5016d78bb8STom Rhodesmodule at boot time, place the following line in 5186e3186eSTom Rhodes.Xr loader.conf 5 : 5286e3186eSTom Rhodes.Bd -literal -offset indent 5386e3186eSTom Rhodesif_bge_load="YES" 5486e3186eSTom Rhodes.Ed 5595d67482SBill Paul.Sh DESCRIPTION 5695d67482SBill PaulThe 5795d67482SBill Paul.Nm 58ed598065SChristian Bruefferdriver provides support for various NICs based on the Broadcom BCM570x, 598194413bSPyun YongHyeon571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller 608194413bSPyun YongHyeonchips and the 590x and 5779x Fast Ethernet controller chips. 6195d67482SBill Paul.Pp 6295d67482SBill PaulAll of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 6395d67482SBill Paulcopper cable, except for the SysKonnect SK-9D41 which supports only 6495d67482SBill Paul1000Mbps over multimode fiber. 6569826705SRuslan ErmilovThe BCM570x builds upon the technology of the Alteon Tigon II. 6669826705SRuslan ErmilovIt has two R4000 CPU cores and is PCI v2.2 and PCI-X v1.0 compliant. 6769826705SRuslan ErmilovIt supports IP, TCP 68959d6c24SRuslan Ermilovand UDP checksum offload for both receive and transmit, 6995d67482SBill Paulmultiple RX and TX DMA rings for QoS applications, rules-based 7095d67482SBill Paulreceive filtering, and VLAN tag stripping/insertion as well as 7169826705SRuslan Ermilova 256-bit multicast hash filter. 7269826705SRuslan ErmilovAdditional features may be 7395d67482SBill Paulprovided via value-add firmware updates. 7495d67482SBill PaulThe BCM570x supports TBI (ten bit interface) and GMII 752b3d1b3aSChristian Brueffertransceivers, which means it can be used with either copper or 1000baseX 7669826705SRuslan Ermilovfiber applications. 7769826705SRuslan ErmilovNote however the device only supports a single 7895d67482SBill Paulspeed in TBI mode. 7995d67482SBill Paul.Pp 80a02e220cSJohn PolstraMost BCM5700-based cards also use the Broadcom BCM5401 or BCM5411 10/100/1000 81f87717faSMike Pritchardcopper gigabit transceivers, 821d705c5cSColin Percivalwhich support autonegotiation of 10, 100 and 1000Mbps modes in 8395d67482SBill Paulfull or half duplex. 8495d67482SBill Paul.Pp 85a03150fdSPyun YongHyeonThe BCM5700, BCM5701, BCM5702, BCM5703, BCM5704, BCM5714, BCM5717, BCM5719, 86a03150fdSPyun YongHyeonBCM5720, BCM5780 and BCM57765 also support jumbo frames, which can be 87a03150fdSPyun YongHyeonconfigured via the interface MTU setting. 8895d67482SBill PaulSelecting an MTU larger than 1500 bytes with the 8995d67482SBill Paul.Xr ifconfig 8 9095d67482SBill Paulutility configures the adapter to receive and transmit jumbo frames. 9195d67482SBill PaulUsing jumbo frames can greatly improve performance for certain tasks, 9295d67482SBill Paulsuch as file transfers and data streaming. 9395d67482SBill Paul.Pp 9495d67482SBill PaulThe 9595d67482SBill Paul.Nm 9695d67482SBill Pauldriver supports the following media types: 9769826705SRuslan Ermilov.Bl -tag -width ".Cm 10baseT/UTP" 9895d67482SBill Paul.It Cm autoselect 9995d67482SBill PaulEnable autoselection of the media type and options. 10095d67482SBill PaulThe user can manually override 10195d67482SBill Paulthe autoselected mode by adding media options to 10295d67482SBill Paul.Xr rc.conf 5 . 10395d67482SBill Paul.It Cm 10baseT/UTP 10495d67482SBill PaulSet 10Mbps operation. 10595d67482SBill PaulThe 10695d67482SBill Paul.Xr ifconfig 8 10795d67482SBill Paul.Ic mediaopt 10895d67482SBill Pauloption can also be used to select either 10995d67482SBill Paul.Cm full-duplex 11095d67482SBill Paulor 11195d67482SBill Paul.Cm half-duplex 11295d67482SBill Paulmodes. 11395d67482SBill Paul.It Cm 100baseTX 11479e8b03aSChristian BruefferSet 100Mbps (Fast Ethernet) operation. 11595d67482SBill PaulThe 11695d67482SBill Paul.Xr ifconfig 8 11795d67482SBill Paul.Ic mediaopt 11895d67482SBill Pauloption can also be used to select either 11995d67482SBill Paul.Cm full-duplex 12095d67482SBill Paulor 12195d67482SBill Paul.Cm half-duplex 12295d67482SBill Paulmodes. 12395d67482SBill Paul.It Cm 1000baseTX 12444704bfdSRuslan ErmilovSet 1000baseTX operation over twisted pair. 12544704bfdSRuslan ErmilovOnly 12695d67482SBill Paul.Cm full-duplex 127b4cb26bfSPaul Saabmode is supported. 12895d67482SBill Paul.It Cm 1000baseSX 12979e8b03aSChristian BruefferSet 1000Mbps (Gigabit Ethernet) operation. 13095d67482SBill PaulBoth 13195d67482SBill Paul.Cm full-duplex 13295d67482SBill Pauland 13395d67482SBill Paul.Cm half-duplex 13495d67482SBill Paulmodes are supported. 13595d67482SBill Paul.El 13695d67482SBill Paul.Pp 13795d67482SBill PaulThe 13895d67482SBill Paul.Nm 13995d67482SBill Pauldriver supports the following media options: 14069826705SRuslan Ermilov.Bl -tag -width ".Cm full-duplex" 14195d67482SBill Paul.It Cm full-duplex 14295d67482SBill PaulForce full duplex operation. 14395d67482SBill Paul.It Cm half-duplex 14495d67482SBill PaulForce half duplex operation. 14595d67482SBill Paul.El 14695d67482SBill Paul.Pp 14795d67482SBill PaulFor more information on configuring this device, see 14895d67482SBill Paul.Xr ifconfig 8 . 14969f9d7b1SSimon L. B. Nielsen.Sh HARDWARE 15069f9d7b1SSimon L. B. NielsenThe 15169f9d7b1SSimon L. B. Nielsen.Nm 15269f9d7b1SSimon L. B. Nielsendriver provides support for various NICs based on the Broadcom BCM570x 15379e8b03aSChristian Bruefferfamily of Gigabit Ethernet controller chips, including the 15469f9d7b1SSimon L. B. Nielsenfollowing: 15569f9d7b1SSimon L. B. Nielsen.Pp 15669f9d7b1SSimon L. B. Nielsen.Bl -bullet -compact 15769f9d7b1SSimon L. B. Nielsen.It 158bb22863bSChristian Brueffer3Com 3c996-SX (1000baseSX) 159bb22863bSChristian Brueffer.It 16069f9d7b1SSimon L. B. Nielsen3Com 3c996-T (10/100/1000baseTX) 16169f9d7b1SSimon L. B. Nielsen.It 162*5ad09310SSevan JaniyanApple Thunderbolt Display (10/100/1000baseTX) 163*5ad09310SSevan Janiyan.It 164*5ad09310SSevan JaniyanApple Thunderbolt to Gigabit Ethernet Adapter (10/100/1000baseTX) 165*5ad09310SSevan Janiyan.It 16669f9d7b1SSimon L. B. NielsenDell PowerEdge 1750 integrated BCM5704C NIC (10/100/1000baseTX) 16769f9d7b1SSimon L. B. Nielsen.It 16869f9d7b1SSimon L. B. NielsenDell PowerEdge 2550 integrated BCM5700 NIC (10/100/1000baseTX) 16969f9d7b1SSimon L. B. Nielsen.It 17069f9d7b1SSimon L. B. NielsenDell PowerEdge 2650 integrated BCM5703 NIC (10/100/1000baseTX) 17169f9d7b1SSimon L. B. Nielsen.It 17222ccc253SJoel DahlDell PowerEdge R200 integrated BCM5750 NIC (10/100/1000baseTX) 17322ccc253SJoel Dahl.It 17422ccc253SJoel DahlDell PowerEdge R300 integrated BCM5722 NIC (10/100/1000baseTX) 17522ccc253SJoel Dahl.It 17669f9d7b1SSimon L. B. NielsenIBM x235 server integrated BCM5703x NIC (10/100/1000baseTX) 17769f9d7b1SSimon L. B. Nielsen.It 178878124feSGleb SmirnoffHP Compaq dc7600 integrated BCM5752 NIC (10/100/1000baseTX) 179878124feSGleb Smirnoff.It 18069f9d7b1SSimon L. B. NielsenHP ProLiant NC7760 embedded Gigabit NIC (10/100/1000baseTX) 18169f9d7b1SSimon L. B. Nielsen.It 18269f9d7b1SSimon L. B. NielsenHP ProLiant NC7770 PCI-X Gigabit NIC (10/100/1000baseTX) 18369f9d7b1SSimon L. B. Nielsen.It 184c8250f08SAndrew ThompsonHP ProLiant NC7771 PCI-X Gigabit NIC (10/100/1000baseTX) 185c8250f08SAndrew Thompson.It 18669f9d7b1SSimon L. B. NielsenHP ProLiant NC7781 embedded PCI-X Gigabit NIC (10/100/1000baseTX) 18769f9d7b1SSimon L. B. Nielsen.It 18869f9d7b1SSimon L. B. NielsenNetgear GA302T (10/100/1000baseTX) 18969f9d7b1SSimon L. B. Nielsen.It 19069f9d7b1SSimon L. B. NielsenSysKonnect SK-9D21 (10/100/1000baseTX) 19169f9d7b1SSimon L. B. Nielsen.It 19269f9d7b1SSimon L. B. NielsenSysKonnect SK-9D41 (1000baseSX) 19369f9d7b1SSimon L. B. Nielsen.El 1940d7c3728SScott Long.Sh LOADER TUNABLES 195ca4bfcbcSPyun YongHyeonThe following tunables can be set at the 1960d7c3728SScott Long.Xr loader 8 1970d7c3728SScott Longprompt before booting the kernel, or stored in 1980d7c3728SScott Long.Xr loader.conf 5 . 1990d7c3728SScott Long.Bl -tag -width indent 2000d7c3728SScott Long.It Va hw.bge.allow_asf 2010d7c3728SScott LongAllow the ASF feature for cooperating with IPMI. 2020d7c3728SScott LongCan cause system lockup problems on a small number of systems. 2030d7c3728SScott LongEnabled by default. 204d99ecc7dSPyun YongHyeon.It Va dev.bge.%d.msi 205d99ecc7dSPyun YongHyeonNon-zero value enables MSI support on the Ethernet hardware. 206d99ecc7dSPyun YongHyeonThe default value is 1. 2070d7c3728SScott Long.El 2088024e982SPyun YongHyeon.Sh SYSCTL VARIABLES 2098024e982SPyun YongHyeonThe following variables are available as both 2108024e982SPyun YongHyeon.Xr sysctl 8 2118024e982SPyun YongHyeonvariables and 2128024e982SPyun YongHyeon.Xr loader 8 2138024e982SPyun YongHyeontunables: 2148024e982SPyun YongHyeon.Bl -tag -width indent 2158024e982SPyun YongHyeon.It Va dev.bge.%d.forced_collapse 2168024e982SPyun YongHyeonAllow collapsing multiple transmit buffers into a single buffer 2178024e982SPyun YongHyeonto increase transmit performance with the cost of CPU cycles. 2188024e982SPyun YongHyeonThe default value is 0 to disable transmit buffer collapsing. 2198024e982SPyun YongHyeon.It Va dev.bge.%d.forced_udpcsum 2208024e982SPyun YongHyeonEnable UDP transmit checksum offloading even if controller can generate 2218024e982SPyun YongHyeonUDP datagrams with checksum value 0. 2228024e982SPyun YongHyeonUDP datagrams with checksum value 0 can confuse receiver host as it means 2238024e982SPyun YongHyeonsender did not compute UDP checksum. 2248024e982SPyun YongHyeonThe default value is 0 which disables UDP transmit checksum offloading. 2258024e982SPyun YongHyeonThe interface need to be brought down and up again before a change takes 2268024e982SPyun YongHyeoneffect. 2278024e982SPyun YongHyeon.El 22895d67482SBill Paul.Sh DIAGNOSTICS 22995d67482SBill Paul.Bl -diag 23095d67482SBill Paul.It "bge%d: couldn't map memory" 23195d67482SBill PaulA fatal initialization error has occurred. 23295d67482SBill Paul.It "bge%d: couldn't map ports" 23395d67482SBill PaulA fatal initialization error has occurred. 23495d67482SBill Paul.It "bge%d: couldn't map interrupt" 23595d67482SBill PaulA fatal initialization error has occurred. 23695d67482SBill Paul.It "bge%d: no memory for softc struct!" 23795d67482SBill PaulThe driver failed to allocate memory for per-device instance information 23895d67482SBill Paulduring initialization. 23995d67482SBill Paul.It "bge%d: failed to enable memory mapping!" 24095d67482SBill PaulThe driver failed to initialize PCI shared memory mapping. 24195d67482SBill PaulThis might 24295d67482SBill Paulhappen if the card is not in a bus-master slot. 243*5ad09310SSevan Janiyan.It "bge%d: firmware handshake timed out, found 0xffffffff" 244*5ad09310SSevan JaniyanThe device was physically disconnected from the system, or there is a problem with 245*5ad09310SSevan Janiyanthe device causing it to stop responding to the host it is attached to. 24695d67482SBill Paul.It "bge%d: no memory for jumbo buffers!" 24795d67482SBill PaulThe driver failed to allocate memory for jumbo frames during 24895d67482SBill Paulinitialization. 24995d67482SBill Paul.It "bge%d: watchdog timeout" 25095d67482SBill PaulThe device has stopped responding to the network, or there is a problem with 25195d67482SBill Paulthe network connection (cable). 25295d67482SBill Paul.El 25395d67482SBill Paul.Sh SEE ALSO 254a25ecdffSChristian Brueffer.Xr altq 4 , 25595d67482SBill Paul.Xr arp 4 , 256071d726dSTom Rhodes.Xr miibus 4 , 25795d67482SBill Paul.Xr netintro 4 , 25895d67482SBill Paul.Xr ng_ether 4 , 2596a38205eSChristian Brueffer.Xr polling 4 , 26095d67482SBill Paul.Xr vlan 4 , 26195d67482SBill Paul.Xr ifconfig 8 26295d67482SBill Paul.Sh HISTORY 26395d67482SBill PaulThe 26495d67482SBill Paul.Nm 26595d67482SBill Pauldevice driver first appeared in 26669826705SRuslan Ermilov.Fx 4.5 . 26795d67482SBill Paul.Sh AUTHORS 26895d67482SBill PaulThe 26995d67482SBill Paul.Nm 27095d67482SBill Pauldriver was written by 2716c899950SBaptiste Daroussin.An Bill Paul Aq Mt wpaul@windriver.com . 272*5ad09310SSevan Janiyan.Sh BUGS 273*5ad09310SSevan JaniyanHotplug is not currently supported in 274*5ad09310SSevan Janiyan.Fx , 275*5ad09310SSevan Janiyanhence, Thunderbolt interfaces need to be connected prior to system power up on 276*5ad09310SSevan JaniyanApple systems in order for the interface to be detected. 277*5ad09310SSevan JaniyanAlso, due to the lack of hotplug support, Thunderbolt-based interfaces must not be removed 278*5ad09310SSevan Janiyanwhile the system is up as the kernel is currently unable to cope with a 279*5ad09310SSevan Janiyan.Nm 280*5ad09310SSevan Janiyaninterface disappearing. 281