Add bnx(4), a driver for Broadcom NetXtreme II 10/100/1000 Ethernet device.

Ported from OpenBSD by cube@, with some bus_dma fixes by me.
Tested on i386 and amd64.
This commit is contained in:
bouyer 2006-12-17 23:02:06 +00:00
parent 462dc620e3
commit ea4f35dcd0
15 changed files with 14273 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.958 2006/12/17 22:57:14 bouyer Exp $
# $NetBSD: mi,v 1.959 2006/12/17 23:02:06 bouyer Exp $
./etc/mtree/set.man man-sys-root
./usr/share/info/am-utils.info man-amd-info info
./usr/share/info/as.info man-computil-info bfd,info
@ -721,6 +721,7 @@
./usr/share/man/cat4/bktr.0 man-sys-catman .cat
./usr/share/man/cat4/bluetooth.0 man-sys-catman .cat
./usr/share/man/cat4/bmtphy.0 man-sys-catman .cat
./usr/share/man/cat4/bnx.0 man-sys-catman .cat
./usr/share/man/cat4/boca.0 man-sys-catman .cat
./usr/share/man/cat4/bpf.0 man-sys-catman .cat
./usr/share/man/cat4/brgphy.0 man-sys-catman .cat
@ -3122,6 +3123,7 @@
./usr/share/man/man4/bktr.4 man-sys-man .man
./usr/share/man/man4/bluetooth.4 man-sys-man .man
./usr/share/man/man4/bmtphy.4 man-sys-man .man
./usr/share/man/man4/bnx.4 man-sys-man .man
./usr/share/man/man4/boca.4 man-sys-man .man
./usr/share/man/man4/bpf.4 man-sys-man .man
./usr/share/man/man4/brgphy.4 man-sys-man .man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.416 2006/12/17 22:57:14 bouyer Exp $
# $NetBSD: Makefile,v 1.417 2006/12/17 23:02:06 bouyer Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 adc.4 adt7467c.4 adv.4 \
@ -7,7 +7,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 adc.4 adt7467c.4 adv.4 \
ath.4 atppc.4 attimer.4 atw.4 \
auacer.4 audio.4 audiocs.4 auich.4 \
auixp.4 autri.4 auvia.4 awi.4 azalia.4 \
bba.4 bce.4 be.4 bge.4 bha.4 bktr.4 bluetooth.4 bmtphy.4 \
bba.4 bce.4 be.4 bge.4 bnx.4 bha.4 bktr.4 bluetooth.4 bmtphy.4 \
bpf.4 brgphy.4 bridge.4 bthidev.4 bthub.4 btkbd.4 btms.4 btsco.4 \
cac.4 cardbus.4 carp.4 ccd.4 cd.4 \
cec.4 cgd.4 cfb.4 ch.4 ciphy.4 ciss.4 clcs.4 clct.4 clnp.4 \

148
share/man/man4/bnx.4 Normal file
View File

@ -0,0 +1,148 @@
.\" $NetBSD: bnx.4,v 1.1 2006/12/17 23:02:06 bouyer Exp $
.\" $OpenBSD: bnx.4,v 1.13 2006/12/15 16:12:52 reyk Exp $
.\"
.\" Copyright (c) 2006 Broadcom Corporation
.\" David Christensen <davidch@broadcom.com>. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of Broadcom Corporation nor the name of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written consent.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\"
.\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/bce.4,v 1.2 2006/04/10 20:12:17 brueffer Exp $
.\"
.Dd December 17, 2006
.Dt BNX 4
.Os
.Sh NAME
.Nm bnx
.Nd Broadcom NetXtreme II 10/100/1000 Ethernet device
.Sh SYNOPSIS
.Cd "bnx* at pci?"
.Cd "brgphy* at mii?"
.Sh DESCRIPTION
The
.Nm
driver supports Broadcom's NetXtreme II product family, such as the
BCM5706 PCI-X and BCM5708 PCI Express Ethernet controllers, which
includes the following:
.Pp
.Bl -bullet -compact
.It
Dell PowerEdge 1950 integrated BCM5708 NIC (10/100/1000baseT)
.It
Dell PowerEdge 2950 integrated BCM5708 NIC (10/100/1000baseT)
.It
HP NC370F PCI-X Multifunction Gigabit server adapter (1000baseSX)
.It
HP NC370T PCI-X Multifunction Gigabit server adapter (10/100/1000baseT)
.It
HP NC373F PCI Express Multifunction Gigabit server adapter (1000baseSX)
.It
HP NC373i PCI Express Multifunction Gigabit embedded server adapter (10/100/1000baseT)
.It
HP NC380T PCI Express Dual Port Multifunction Gigabit server adapter (10/100/1000baseT)
.It
IBM xSeries 3550 integrated BCM5708 NIC (10/100/1000baseT)
.It
IBM xSeries 3650 integrated BCM5708 NIC (10/100/1000baseT)
.El
.Pp
The NetXtreme II product family is composed of various Converged NIC (or CNIC)
Ethernet controllers which support a TCP Offload Engine (TOE),
Remote DMA (RDMA), and iSCSI acceleration,
in addition to standard L2 Ethernet traffic,
all on the same controller.
The following features are supported in the
.Nm
driver under
.Ox :
.Bd -literal -offset indent
IPv4 receive IP/TCP/UDP checksum offload
Jumbo frames (up to 9022 bytes)
VLAN tag insertion
Interrupt coalescing
10/100/1000Mbps operation in full-duplex mode
10/100Mbps operation in half-duplex mode
.Ed
.Pp
The
.Nm
driver supports the following media types:
.Bl -tag -width ".Cm 10baseT/UTP"
.It Cm autoselect
Enable autoselection of the media type and options.
The user can manually override
the autoselected mode via
.Xr ifconfig 8 .
.It Cm 10baseT/UTP
Set 10Mbps operation.
The
.Xr ifconfig 8
.Ic mediaopt
option can also be used to select either
.Cm full-duplex
or
.Cm half-duplex
modes.
.It Cm 100baseTX
Set 100Mbps (Fast Ethernet) operation.
The
.Xr ifconfig 8
.Ic mediaopt
option can also be used to select either
.Cm full-duplex
or
.Cm half-duplex
modes.
.It Cm 1000baseTX
Set 1000baseTX operation over twisted pair.
Only
.Cm full-duplex
mode is supported.
.El
.Pp
The
.Nm
driver supports the following media options:
.Bl -tag -width ".Cm full-duplex"
.It Cm full-duplex
Force full duplex operation.
.It Cm half-duplex
Force half duplex operation.
.El
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh SEE ALSO
.Xr arp 4 ,
.Xr brgphy 4 ,
.Xr ifmedia 4 ,
.Xr intro 4 ,
.Xr mii 4 ,
.Xr netintro 4 ,
.Xr pci 4 ,
.Xr ifconfig 8
.Sh HISTORY
The
.Nm
device driver first appeared in
.Nx 4.0 .

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.122 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: GENERIC,v 1.123 2006/12/17 23:02:06 bouyer Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.122 $"
#ident "GENERIC-$Revision: 1.123 $"
maxusers 32 # estimated number of users
@ -523,6 +523,7 @@ an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11)
ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
bce* at pci? dev ? function ? # Broadcom 440x 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
dge* at pci? dev ? function ? # Intel 82597 10GbE LR
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.61 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: INSTALL,v 1.62 2006/12/17 23:02:06 bouyer Exp $
#
# GENERIC machine description file
#
@ -20,7 +20,7 @@
include "arch/amd64/conf/std.amd64"
#ident "INSTALL-$Revision: 1.61 $"
#ident "INSTALL-$Revision: 1.62 $"
maxusers 32 # estimated number of users
@ -414,6 +414,7 @@ an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11)
ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.75 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: ALL,v 1.76 2006/12/17 23:02:06 bouyer Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "ALL-$Revision: 1.75 $"
#ident "ALL-$Revision: 1.76 $"
maxusers 32 # estimated number of users
@ -812,6 +812,7 @@ ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11)
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
dge* at pci? dev ? function ? # Intel 82597 10GbE LR
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.802 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: GENERIC,v 1.803 2006/12/17 23:02:06 bouyer Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.802 $"
#ident "GENERIC-$Revision: 1.803 $"
maxusers 32 # estimated number of users
@ -834,6 +834,7 @@ ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11)
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
dge* at pci? dev ? function ? # Intel 82597 10GbE LR
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC_LAPTOP,v 1.217 2006/11/30 21:01:16 bouyer Exp $
# $NetBSD: GENERIC_LAPTOP,v 1.218 2006/12/17 23:02:06 bouyer Exp $
# From: NetBSD: GENERIC,v 1.414 2001/07/30 19:59:05 ad Exp
#
# GENERIC_LAPTOP -- GENERIC with cardbus and some USB devices enabled
@ -8,7 +8,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.217 $"
#ident "GENERIC-$Revision: 1.218 $"
maxusers 32 # estimated number of users
@ -601,6 +601,7 @@ fd* at fdc? drive ? # the drives themselves
ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
ipw* at pci? dev ? function ? # Intel PRO/Wireless 2100

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.298 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: INSTALL,v 1.299 2006/12/17 23:02:06 bouyer Exp $
#
# INSTALL - Installation kernel.
#
@ -512,6 +512,7 @@ ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11)
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x Gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
#en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x
ex* at pci? dev ? function ? # 3Com 90x[BC]

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL_LAPTOP,v 1.111 2006/11/30 21:01:16 bouyer Exp $
# $NetBSD: INSTALL_LAPTOP,v 1.112 2006/12/17 23:02:06 bouyer Exp $
#
# INSTALL - Installation kernel.
#
@ -432,6 +432,7 @@ fd* at fdc? drive ? # the drives themselves
ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
ex* at pci? dev ? function ? # 3Com 90x[BC]
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
ipw* at pci? dev ? function ? # Intel PRO/Wireless 2100

View File

@ -1,4 +1,4 @@
# $NetBSD: XEN2_DOM0,v 1.19 2006/12/17 22:57:15 bouyer Exp $
# $NetBSD: XEN2_DOM0,v 1.20 2006/12/17 23:02:06 bouyer Exp $
include "arch/xen/conf/std.xen"
@ -264,6 +264,7 @@ ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11)
bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet
dge* at pci? dev ? function ? # Intel 82597 10GbE LR
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pci,v 1.274 2006/12/17 22:57:16 bouyer Exp $
# $NetBSD: files.pci,v 1.275 2006/12/17 23:02:06 bouyer Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@ -611,6 +611,11 @@ device bge: ether, ifnet, arp, mii, mii_bitbang
attach bge at pci
file dev/pci/if_bge.c bge
# Broadcom NetXtreme II
device bnx: ether, ifnet, arp, mii
attach bnx at pci
file dev/pci/if_bnx.c bnx
# Realtek 8129/8139 Ethernet controllers
attach rtk at pci with rtk_pci
file dev/pci/if_rtk_pci.c rtk_pci

5735
sys/dev/pci/if_bnx.c Normal file

File diff suppressed because it is too large Load Diff

4848
sys/dev/pci/if_bnxreg.h Normal file

File diff suppressed because it is too large Load Diff