1.\" Copyright (c) 2006 Broadcom Corporation 2.\" David Christensen <davidch@broadcom.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.\" 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors 14.\" may be used to endorse or promote products derived from this software 15.\" without specific prior written consent. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' 18.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27.\" THE POSSIBILITY OF SUCH DAMAGE. 28.\" 29.\" $FreeBSD: src/share/man/man4/bce.4,v 1.7 2007/02/09 18:26:13 brueffer Exp $ 30.\" 31.Dd April 7, 2012 32.Dt BCE 4 33.Os 34.Sh NAME 35.Nm bce 36.Nd "Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet adapter driver" 37.Sh SYNOPSIS 38To compile this driver into the kernel, 39place the following lines in your 40kernel configuration file: 41.Bd -ragged -offset indent 42.Cd "device miibus" 43.Cd "device bce" 44.Ed 45.Pp 46Alternatively, to load the driver as a 47module at boot time, place the following line in 48.Xr loader.conf 5 : 49.Bd -literal -offset indent 50if_bce_load="YES" 51.Ed 52.Sh DESCRIPTION 53The 54.Nm 55driver supports Broadcom's NetXtreme II product family, including the 56BCM5706 and BCM5708 Ethernet controllers. 57.Pp 58The NetXtreme II product family is composed of various Converged NIC (or CNIC) 59Ethernet controllers which support a TCP Offload Engine (TOE), Remote DMA (RDMA), 60and iSCSI acceleration, in addition to standard L2 Ethernet traffic, all on the 61same controller. 62The following features are supported in the 63.Nm 64driver under 65.Dx : 66.Pp 67.Bl -item -offset indent -compact 68.It 69.\"IP/TCP/UDP checksum offload 70TCP/UDP checksum offload 71.\".It 72.\"Jumbo frames (up to 9022 bytes) 73.It 74VLAN tag stripping 75.It 76Interrupt coalescing 77.It 7810/100/1000Mbps operation in full-duplex mode 79.It 8010/100Mbps operation in half-duplex mode 81.El 82.Pp 83The 84.Nm 85driver supports the following media types: 86.Bl -tag -width ".Cm 10baseT/UTP" 87.It Cm autoselect 88Enable autoselection of the media type and options. 89The user can manually override 90the autoselected mode by adding media options to 91.Xr rc.conf 5 . 92.It Cm 10baseT/UTP 93Set 10Mbps operation. 94The 95.Xr ifconfig 8 96.Cm mediaopt 97option can also be used to select either 98.Cm full-duplex 99or 100.Cm half-duplex 101modes. 102.It Cm 100baseTX 103Set 100Mbps (Fast Ethernet) operation. 104The 105.Xr ifconfig 8 106.Cm mediaopt 107option can also be used to select either 108.Cm full-duplex 109or 110.Cm half-duplex 111modes. 112.It Cm 1000baseT 113Set 1000baseT operation over twisted pair. 114Only 115.Cm full-duplex 116mode is supported. 117.El 118.Pp 119The 120.Nm 121driver supports the following media options: 122.Bl -tag -width ".Cm full-duplex" 123.It Cm full-duplex 124Force full duplex operation. 125.It Cm half-duplex 126Force half duplex operation. 127.El 128.Pp 129For more information on configuring this device, see 130.Xr ifconfig 8 . 131The 132.Nm 133driver supports 134.Xr polling 4 . 135.Sh TUNABLES 136.Bl -tag -width ".Va hw.bce.tx_ticks_int" 137.It Va hw.bce.tx_bds 138Maximum number of sending BDs which must be processed by the device 139before the device updates the status block and generates interrupt. 140It is used together with 141.Va hw.bce.tx_ticks 142to achieve TX interrupt moderation. 143Default value is 24. 144.It Va hw.bce.tx_bds_int 145Maximum number of sending BDs which must be processed by the device 146before the device updates the status block 147during host interrupt processing. 148Default value is 20. 149.It Va hw.bce.tx_ticks 150How often status block should be updated and interrupt should be generated 151by the device, 152due to sending packets. 153It is used together with 154.Va hw.bce.tx_bds 155to achieve TX interrupt moderation. 156Default value is 1000 (microseconds). 157.It Va hw.bce.tx_ticks_int 158How often status block should be updated by the device 159during host interrupt processing, 160due to sending packets. 161Default value is 80 (microseconds). 162.It Va hw.bce.rx_bds 163Maximum number of BDs which must be received by the device 164before the device updates the status block and generates interrupt. 165It is used together with 166.Va hw.bce.rx_ticks 167to achieve RX interrupt moderation. 168Default value is 24. 169.It Va hw.bce.rx_bds_int 170Maximum number of BDs which must be received by the device 171before the device updates the status block 172during host interrupt processing. 173Default value is 6. 174.It Va hw.bce.rx_ticks 175How often status block should be updated and interrupt should be generated 176by the device, 177due to receiving packets. 178It is used together with 179.Va hw.bce.rx_bds 180to achieve RX interrupt moderation. 181Default value is 100 (microseconds). 182.It Va hw.bce.rx_ticks_int 183How often status block should be updated by the device 184during host interrupt processing, 185due to receiving packets. 186Default value is 18 (microseconds). 187.It Va hw.bce.msi.enable 188By default, the driver will use MSI if it is supported. 189This behavior can be turned off by setting this tunable to 0. 190.El 191.Sh HARDWARE 192The 193.Nm 194driver provides support for various NICs based on the Broadcom NetXtreme II 195family of Gigabit Ethernet controllers, including the 196following: 197.Pp 198.Bl -bullet -compact 199.It 200HP NC370T Multifunction Gigabit Server Adapter 201.It 202HP NC370i Multifunction Gigabit Server Adapter 203.El 204.Sh DIAGNOSTICS 205.Bl -diag 206.It "bce%d: PCI memory allocation failed!" 207The driver has encountered a fatal initialization error. 208.It "bce%d: PCI map interrupt failed!" 209The driver has encountered a fatal initialization error. 210.It "bce%d: Unsupported controller revision (%c%d)" 211The driver does not support the controller revision in use. 212.It "bce%d: Controller initialization failed!" 213The driver has encountered a fatal initialization error. 214.It "bce%d: NVRAM test failed!" 215The driver could not access the controller NVRAM correctly. 216.It "bce%d: DMA resource allocation failed!" 217The driver could not allocate DMA memory to setup the controllers 218host memory data structures. 219.It "bce%d: Interface allocation failed!" 220The driver could not create a network interface for the controller. 221.It "bce%d: PHY probe failed!" 222The driver could not access the PHY used by the controller. 223.It "bce%d: Failed to setup IRQ!" 224The driver could not initialize the IRQ handler. 225.It "bce%d: Error: PHY read timeout!" 226The driver could not read a PHY register before the timeout period expired. 227.It "bce%d: PHY write timeout!" 228The driver could not write to the PHY register because a timeout occurred. 229.It "bce%d: Timeout error reading NVRAM at offset 0x%08X!" 230The driver could not write to NVRAM because a timeout occurred. 231.It "bce%d: Unknown Flash NVRAM found!" 232The driver does not recognize the NVRAM device being used and therefore 233cannot access it correctly. 234.It "bce%d: Invalid NVRAM magic value!" 235The driver cannot read NVRAM or the NVRAM is corrupt. 236.It "bce%d: Invalid Manufacturing Information NVRAM CRC!" 237The driver cannot read NVRAM or the NVRAM is corrupt. 238.It "bce%d: Invalid Feature Configuration Information NVRAM CRC!" 239The driver cannot read NVRAM or the NVRAM is corrupt. 240.It "bce%d: DMA mapping error!" 241The driver was unable to map memory into DMA addressable space required 242by the controller. 243.It "bce%d: Could not allocate parent DMA tag!" 244The driver could not allocate a PCI compatible DMA tag. 245.It "bce%d: Could not allocate status block DMA tag!" 246The driver could not allocate a DMA tag for the controller's 247status block. 248.It "bce%d: Could not allocate status block DMA memory!" 249The driver could not allocate DMA addressable memory for the controller's 250status block. 251.It "bce_d: Could not map status block DMA memory!" 252The driver could not map the status block memory into the controller's DMA 253address space. 254.It "bce%d: Could not allocate statistics block DMA tag!" 255The driver could not allocate a DMA tag for the controller's 256statistics block. 257.It "bce%d: Could not allocate statistics block DMA memory!" 258The driver could not allocate DMA addressable memory for the controller's 259statistics block. 260.It "bce%d: Could not map statistics block DMA memory!" 261The driver could not map the statistics block memory into the controller's DMA 262address space. 263.It "bce%d: Could not allocate TX descriptor chain DMA tag!" 264The driver could not allocate a DMA tag for the controller's 265TX chain. 266.It "bce%d: Could not allocate TX descriptor chain DMA memory!" 267The driver could not allocate DMA addressable memory for the controller's 268TX chain. 269.It "bce%d: Could not map TX descriptor chain DMA memory!" 270The driver could not map the TX descriptor chain memory into the controller's DMA 271address space. 272.It "bce%d: Could not allocate TX mbuf DMA tag!" 273The driver could not allocate a DMA tag for the controller's 274TX mbuf memory. 275.It "bce%d: Unable to create TX mbuf DMA map!" 276The driver could not map the TX mbuf memory into the controller's DMA 277address space. 278.It "bce%d: Could not allocate RX descriptor chain DMA tag!" 279The driver could not allocate a DMA tag for the controller's 280RX chain. 281.It "bce%d: Could not allocate RX descriptor chain " 282The driver could not allocate DMA addressable memory for the controller's 283RX chain. 284.It "bce%d: Could not map RX descriptor chain DMA memory!" 285The driver could not map the RX descriptor chain memory into the controller's DMA 286address space. 287.It "bce%d: Could not allocate RX mbuf DMA tag!" 288The driver could not allocate a DMA tag for the controller's 289RX mbuf memory. 290.It "bce%d: Unable to create RX mbuf DMA map!" 291The driver could not map the RX mbuf memory into the controller's DMA 292address space. 293.It "bce%d: Firmware synchronization timeout!" 294The driver was not able to synchronize with the firmware running on the 295controller. 296The firmware may be stopped or hung. 297.It "bce%d: Invalid Ethernet address!" 298The driver was not able to read a valid Ethernet MAC address from NVRAM. 299.It "bce%d: Reset failed!" 300The driver has encountered a fatal initialization error. 301.It "bce%d: Byte swap is incorrect!" 302The driver has encountered a fatal initialization error. 303Contact the author 304with details of the CPU architecture and system chipset in use. 305.It "bce%d: Firmware did not complete initialization!" 306The driver has encountered a fatal initialization error. 307.It "bce%d: Bootcode not running!" 308The driver has encountered a fatal initialization error. 309.It "bce%d: Error mapping mbuf into RX chain!" 310The driver could not map a RX mbuf into DMA addressable memory. 311.It "bce%d: Error filling RX chain: rx_bd[0x%04X]!" 312The driver was unable to allocate enough mbufs to fill the RX chain 313during initialization. 314Try increasing the number of mbufs available in 315the system, increase system memory. 316.\"or if using jumbo frames, make sure enough 9KB mbufs are available. 317.It "bce%d: Failed to allocate new mbuf, incoming frame dropped!" 318The driver was unable to allocate a new mbuf for the RX chain and reused 319the mbuf for the received frame, dropping the incoming frame in the process. 320Try increasing the number of mbufs available in the system or increase system 321memory. 322.It "bce%d: Controller reset failed!" 323A fatal initialization error has occurred. 324.It "bce%d: Controller initialization failed!" 325A fatal initialization error has occurred. 326.It "bce%d: Block initialization failed!" 327A fatal initialization error has occurred. 328.It "bce%d: Error mapping mbuf into TX chain!" 329The driver could not map a TX mbuf into DMA addressable memory. 330.It "bce%d: Watchdog timeout occurred, resetting!" 331The device has stopped responding to the network, there is a problem 332with the cable connection, or a driver logic problem has occurred.. 333.It "bce%d: Fatal attention detected: 0x%08X!" 334A controller hardware failure has occurred. 335If the problem continues replace the controller. 336.El 337.Sh SEE ALSO 338.Xr altq 4 , 339.Xr arp 4 , 340.Xr ifmedia 4 , 341.Xr miibus 4 , 342.Xr netintro 4 , 343.Xr ng_ether 4 , 344.Xr polling 4 , 345.Xr vlan 4 , 346.Xr ifconfig 8 347.Sh HISTORY 348The 349.Nm 350device driver first appeared in 351.Fx 6.1 . 352.Sh AUTHORS 353The 354.Nm 355driver was written by 356.An David Christensen Aq davidch@broadcom.com . 357