svn commit: r228100 - in stable/9: share/man/man4 sys/amd64/conf
sys/conf sys/dev/sfxge sys/dev/sfxge/common sys/modules
sys/modules/sfxge
Philip Paeps
philip at FreeBSD.org
Mon Nov 28 20:28:24 UTC 2011
Author: philip
Date: Mon Nov 28 20:28:23 2011
New Revision: 228100
URL: http://svn.freebsd.org/changeset/base/228100
Log:
MFC r227569,227633,227640-227641,227662,227699-227700,228077-228078,228085
Add the sfxge(4) driver providing support for 10Gb Ethernet adapters
based on Solarflare SFC9000 family controllers. The driver supports jumbo
frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO),
Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side
Scaling (RSS) using MSI-X interrupts.
This work was sponsored by Solarflare Communications, Inc.
My sincere thanks to Ben Hutchings for doing a lot of the hard work!
Sponsored by: Solarflare Communications, Inc.
Approved by: re (bz)
Added:
stable/9/share/man/man4/sfxge.4
- copied, changed from r227569, head/share/man/man4/sfxge.4
stable/9/sys/dev/sfxge/
- copied from r227569, head/sys/dev/sfxge/
stable/9/sys/modules/sfxge/
- copied from r227569, head/sys/modules/sfxge/
Modified:
stable/9/share/man/man4/Makefile
stable/9/sys/amd64/conf/NOTES
stable/9/sys/conf/files.amd64
stable/9/sys/dev/sfxge/common/efsys.h
stable/9/sys/dev/sfxge/common/efx.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_bootcfg.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_ev.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_filter.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_impl.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_intr.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_mac.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_mcdi.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_mcdi.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_mon.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_nic.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_nvram.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_phy.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_port.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_regs.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_regs_ef10.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_regs_pci.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_rx.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_sram.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_tx.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_types.h (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_vpd.c (contents, props changed)
stable/9/sys/dev/sfxge/common/efx_wol.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_flash.h (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_impl.h (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_mac.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_mon.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_nic.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_nvram.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_phy.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_sram.c (contents, props changed)
stable/9/sys/dev/sfxge/common/siena_vpd.c (contents, props changed)
stable/9/sys/dev/sfxge/sfxge.h
stable/9/sys/dev/sfxge/sfxge_dma.c
stable/9/sys/dev/sfxge/sfxge_intr.c
stable/9/sys/dev/sfxge/sfxge_port.c
stable/9/sys/dev/sfxge/sfxge_tx.c
stable/9/sys/modules/Makefile
Directory Properties:
stable/9/share/man/man4/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/conf/ (props changed)
Modified: stable/9/share/man/man4/Makefile
==============================================================================
--- stable/9/share/man/man4/Makefile Mon Nov 28 20:16:55 2011 (r228099)
+++ stable/9/share/man/man4/Makefile Mon Nov 28 20:28:23 2011 (r228100)
@@ -378,6 +378,7 @@ MAN= aac.4 \
send.4 \
ses.4 \
sf.4 \
+ ${_sfxge.4} \
sge.4 \
si.4 \
siba.4 \
@@ -717,6 +718,7 @@ MLINKS+=lindev.4 full.4
.if ${MACHINE_CPUARCH} == "amd64"
_qlxgb.4= qlxgb.4
+_sfxge.4= sfxge.4
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
Copied and modified: stable/9/share/man/man4/sfxge.4 (from r227569, head/share/man/man4/sfxge.4)
==============================================================================
--- head/share/man/man4/sfxge.4 Wed Nov 16 17:11:13 2011 (r227569, copy source)
+++ stable/9/share/man/man4/sfxge.4 Mon Nov 28 20:28:23 2011 (r228100)
@@ -48,25 +48,29 @@ sfxge_load="YES"
The
.Nm
driver provides support for 10Gb Ethernet adapters based on
-Solarflare SFC9000 family controllers. The driver supports jumbo
+Solarflare SFC9000 family controllers.
+The driver supports jumbo
frames, transmit/receive checksum offload, TCP Segmentation Offload
(TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO,
and Receive Side Scaling (RSS) using MSI-X interrupts.
.Pp
The driver allocates 1 receive queue, transmit queue, event queue and
-IRQ per CPU up to a maximum of 64. IRQ affinities should be spread
-out using
+IRQ per CPU up to a maximum of 64.
+IRQ affinities should be spread out using
.Xr cpuset 8 .
Interrupt moderation may be controlled through the sysctl
-dev.sfxge.\fIindex\fR.int_mod (units are microseconds).
+.Va dev.sfxge.%d.int_mod
+(units are microseconds).
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Pp
A large number of MAC, PHY and data path statistics are available
-under the sysctl dev.sfxge.\fIindex\fR.stats. The adapter's VPD
+under the sysctl
+.Va dev.sfxge.%d.stats .
+The adapter's VPD
fields including its serial number are available under the sysctl
-dev.sfxge.\fIindex\fR.vpd.
+.Va dev.sfxge.%d.vpd .
.Sh HARDWARE
The
.Nm
Modified: stable/9/sys/amd64/conf/NOTES
==============================================================================
--- stable/9/sys/amd64/conf/NOTES Mon Nov 28 20:16:55 2011 (r228099)
+++ stable/9/sys/amd64/conf/NOTES Mon Nov 28 20:28:23 2011 (r228100)
@@ -294,6 +294,7 @@ options DRM_DEBUG # Include debug print
# Requires the mwl firmware module
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
# nve: nVidia nForce MCP on-board Ethernet Networking
+# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters
# wpi: Intel 3945ABG Wireless LAN controller
# Requires the wpi firmware module
@@ -307,6 +308,7 @@ device iwn
device mwl
device nfe
device nve
+device sfxge
device wpi
# IEEE 802.11 adapter firmware modules
Modified: stable/9/sys/conf/files.amd64
==============================================================================
--- stable/9/sys/conf/files.amd64 Mon Nov 28 20:16:55 2011 (r228099)
+++ stable/9/sys/conf/files.amd64 Mon Nov 28 20:28:23 2011 (r228100)
@@ -214,6 +214,37 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc
dev/qlxgb/qla_isr.c optional qlxgb pci
dev/qlxgb/qla_misc.c optional qlxgb pci
dev/qlxgb/qla_os.c optional qlxgb pci
+dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci
+dev/sfxge/common/efx_ev.c optional sfxge inet pci
+dev/sfxge/common/efx_filter.c optional sfxge inet pci
+dev/sfxge/common/efx_intr.c optional sfxge inet pci
+dev/sfxge/common/efx_mac.c optional sfxge inet pci
+dev/sfxge/common/efx_mcdi.c optional sfxge inet pci
+dev/sfxge/common/efx_mon.c optional sfxge inet pci
+dev/sfxge/common/efx_nic.c optional sfxge inet pci
+dev/sfxge/common/efx_nvram.c optional sfxge inet pci
+dev/sfxge/common/efx_phy.c optional sfxge inet pci
+dev/sfxge/common/efx_port.c optional sfxge inet pci
+dev/sfxge/common/efx_rx.c optional sfxge inet pci
+dev/sfxge/common/efx_sram.c optional sfxge inet pci
+dev/sfxge/common/efx_tx.c optional sfxge inet pci
+dev/sfxge/common/efx_vpd.c optional sfxge inet pci
+dev/sfxge/common/efx_wol.c optional sfxge inet pci
+dev/sfxge/common/siena_mac.c optional sfxge inet pci
+dev/sfxge/common/siena_mon.c optional sfxge inet pci
+dev/sfxge/common/siena_nic.c optional sfxge inet pci
+dev/sfxge/common/siena_nvram.c optional sfxge inet pci
+dev/sfxge/common/siena_phy.c optional sfxge inet pci
+dev/sfxge/common/siena_sram.c optional sfxge inet pci
+dev/sfxge/common/siena_vpd.c optional sfxge inet pci
+dev/sfxge/sfxge.c optional sfxge inet pci
+dev/sfxge/sfxge_dma.c optional sfxge inet pci
+dev/sfxge/sfxge_ev.c optional sfxge inet pci
+dev/sfxge/sfxge_intr.c optional sfxge inet pci
+dev/sfxge/sfxge_mcdi.c optional sfxge inet pci
+dev/sfxge/sfxge_port.c optional sfxge inet pci
+dev/sfxge/sfxge_rx.c optional sfxge inet pci
+dev/sfxge/sfxge_tx.c optional sfxge inet pci
dev/sio/sio.c optional sio
dev/sio/sio_isa.c optional sio isa
dev/sio/sio_pccard.c optional sio pccard
Modified: stable/9/sys/dev/sfxge/common/efsys.h
==============================================================================
--- head/sys/dev/sfxge/common/efsys.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efsys.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -25,14 +25,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFSYS_H
#define _SYS_EFSYS_H
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -97,10 +96,11 @@ extern "C" {
MALLOC_DECLARE(M_SFXGE);
/* Machine dependend prefetch wrappers */
-#if defined(__i386) || defined(__amd64)
+#if defined(__i386__) || defined(__amd64__)
static __inline void
prefetch_read_many(void *addr)
{
+
__asm__(
"prefetcht0 (%0)"
:
@@ -110,11 +110,44 @@ prefetch_read_many(void *addr)
static __inline void
prefetch_read_once(void *addr)
{
+
__asm__(
"prefetchnta (%0)"
:
: "r" (addr));
}
+#elif defined(__sparc64__)
+static __inline void
+prefetch_read_many(void *addr)
+{
+
+ __asm__(
+ "prefetch [%0], 0"
+ :
+ : "r" (addr));
+}
+
+static __inline void
+prefetch_read_once(void *addr)
+{
+
+ __asm__(
+ "prefetch [%0], 1"
+ :
+ : "r" (addr));
+}
+#else
+static __inline void
+prefetch_read_many(void *addr)
+{
+
+}
+
+static __inline void
+prefetch_read_once(void *addr)
+{
+
+}
#endif
#if defined(__i386__) || defined(__amd64__)
Modified: stable/9/sys/dev/sfxge/common/efx.h
==============================================================================
--- head/sys/dev/sfxge/common/efx.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_H
Modified: stable/9/sys/dev/sfxge/common/efx_bootcfg.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_bootcfg.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_ev.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_ev.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_ev.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_filter.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_filter.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_filter.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_impl.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_IMPL_H
Modified: stable/9/sys/dev/sfxge/common/efx_intr.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_intr.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_intr.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_mac.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mac.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_mac.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mcdi.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_mcdi.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_mcdi.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_mcdi.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_MCDI_H
Modified: stable/9/sys/dev/sfxge/common/efx_mon.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mon.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_mon.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_nic.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nic.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_nic.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_nvram.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_phy.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_phy.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_phy.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_port.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_port.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_port.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_regs.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_regs.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_regs.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_REGS_H
Modified: stable/9/sys/dev/sfxge/common/efx_regs_ef10.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_regs_ef10.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_regs_ef10.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_EF10_REGS_H
Modified: stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,10 +21,10 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
-/*! \cidoxg_firmware_mc_cmd */
-
#ifndef _SIENA_MC_DRIVER_PCOL_H
#define _SIENA_MC_DRIVER_PCOL_H
@@ -2783,4 +2783,3 @@
#define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0
#endif /* _SIENA_MC_DRIVER_PCOL_H */
-/*! \cidoxg_end */
Modified: stable/9/sys/dev/sfxge/common/efx_regs_pci.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_regs_pci.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_regs_pci.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_REGS_PCI_H
Modified: stable/9/sys/dev/sfxge/common/efx_rx.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_rx.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_rx.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_sram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_sram.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_sram.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_tx.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_tx.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_tx.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_types.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_types.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_types.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,8 @@
* SUCH DAMAGE.
*
* Ackowledgement to Fen Systems Ltd.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_EFX_TYPES_H
Modified: stable/9/sys/dev/sfxge/common/efx_vpd.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_vpd.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_vpd.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/efx_wol.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_wol.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/efx_wol.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/siena_flash.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_flash.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_flash.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,9 +21,10 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
-
#ifndef _SYS_SIENA_FLASH_H
#define _SYS_SIENA_FLASH_H
Modified: stable/9/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_impl.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -21,6 +21,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_SIENA_IMPL_H
Modified: stable/9/sys/dev/sfxge/common/siena_mac.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_mac.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_mac.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -22,6 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
Modified: stable/9/sys/dev/sfxge/common/siena_mon.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_mon.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_mon.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -22,6 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
Modified: stable/9/sys/dev/sfxge/common/siena_nic.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nic.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_nic.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -22,6 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
Modified: stable/9/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_nvram.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/common/siena_phy.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_phy.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_phy.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -22,6 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
Modified: stable/9/sys/dev/sfxge/common/siena_sram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_sram.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_sram.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -22,6 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
Modified: stable/9/sys/dev/sfxge/common/siena_vpd.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_vpd.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/common/siena_vpd.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -23,6 +23,9 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include "efsys.h"
#include "efx.h"
#include "efx_types.h"
Modified: stable/9/sys/dev/sfxge/sfxge.h
==============================================================================
--- head/sys/dev/sfxge/sfxge.h Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/sfxge.h Mon Nov 28 20:28:23 2011 (r228100)
@@ -144,7 +144,6 @@ struct sfxge_intr {
int n_alloc;
int type;
efsys_mem_t status;
- uint64_t mask;
uint32_t zero_count;
};
Modified: stable/9/sys/dev/sfxge/sfxge_dma.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_dma.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/sfxge_dma.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -134,8 +134,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc,
/* Create the child DMA tag. */
if (bus_dma_tag_create(sc->parent_dma_tag, PAGE_SIZE, 0,
- 0x3FFFFFFFFFFFULL, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0,
- NULL, NULL, &esmp->esm_tag) != 0) {
+ MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL,
+ NULL, len, 1, len, 0, NULL, NULL, &esmp->esm_tag) != 0) {
device_printf(sc->dev, "Couldn't allocate txq DMA tag\n");
return (ENOMEM);
}
Modified: stable/9/sys/dev/sfxge/sfxge_intr.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_intr.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/sfxge_intr.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -65,15 +65,9 @@ sfxge_intr_line_filter(void *arg)
KASSERT(intr->type == EFX_INTR_LINE,
("intr->type != EFX_INTR_LINE"));
- if (intr->state != SFXGE_INTR_STARTED &&
- intr->state != SFXGE_INTR_TESTING)
+ if (intr->state != SFXGE_INTR_STARTED)
return FILTER_STRAY;
- if (intr->state == SFXGE_INTR_TESTING) {
- intr->mask |= 1; /* only one interrupt */
- return FILTER_HANDLED;
- }
-
(void)efx_intr_status_line(enp, &fatal, &qmask);
if (fatal) {
@@ -137,21 +131,9 @@ sfxge_intr_message(void *arg)
KASSERT(intr->type == EFX_INTR_MESSAGE,
("intr->type != EFX_INTR_MESSAGE"));
- if (intr->state != SFXGE_INTR_STARTED &&
- intr->state != SFXGE_INTR_TESTING)
+ if (intr->state != SFXGE_INTR_STARTED)
return;
- if (intr->state == SFXGE_INTR_TESTING) {
- uint64_t mask;
-
- do {
- mask = intr->mask;
- } while (atomic_cmpset_long(&intr->mask, mask,
- mask | (1 << index)) == 0);
-
- return;
- }
-
(void)efx_intr_status_message(enp, index, &fatal);
if (fatal) {
@@ -447,7 +429,6 @@ sfxge_intr_stop(struct sfxge_softc *sc)
intr->state = SFXGE_INTR_INITIALIZED;
/* Disable interrupts at the NIC */
- intr->mask = 0;
efx_intr_disable(sc->enp);
/* Disable interrupts at the bus */
@@ -480,13 +461,11 @@ sfxge_intr_start(struct sfxge_softc *sc)
if ((rc = sfxge_intr_bus_enable(sc)) != 0)
goto fail;
- intr->state = SFXGE_INTR_TESTING;
+ intr->state = SFXGE_INTR_STARTED;
/* Enable interrupts at the NIC */
efx_intr_enable(sc->enp);
- intr->state = SFXGE_INTR_STARTED;
-
return (0);
fail:
Modified: stable/9/sys/dev/sfxge/sfxge_port.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_port.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/sfxge_port.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -31,6 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
+#include <sys/limits.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
@@ -219,14 +220,14 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE
#endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */
-static const int sfxge_link_speed_kbit[EFX_LINK_NMODES] = {
- [EFX_LINK_10HDX] = 10000,
- [EFX_LINK_10FDX] = 10000,
- [EFX_LINK_100HDX] = 100000,
- [EFX_LINK_100FDX] = 100000,
- [EFX_LINK_1000HDX] = 1000000,
- [EFX_LINK_1000FDX] = 1000000,
- [EFX_LINK_10000FDX] = 10000000,
+static const u_long sfxge_link_baudrate[EFX_LINK_NMODES] = {
+ [EFX_LINK_10HDX] = IF_Mbps(10),
+ [EFX_LINK_10FDX] = IF_Mbps(10),
+ [EFX_LINK_100HDX] = IF_Mbps(100),
+ [EFX_LINK_100FDX] = IF_Mbps(100),
+ [EFX_LINK_1000HDX] = IF_Gbps(1),
+ [EFX_LINK_1000FDX] = IF_Gbps(1),
+ [EFX_LINK_10000FDX] = MIN(IF_Gbps(10ULL), ULONG_MAX),
};
void
@@ -245,7 +246,7 @@ sfxge_mac_link_update(struct sfxge_softc
/* Push link state update to the OS */
link_state = (port->link_mode != EFX_LINK_DOWN ?
LINK_STATE_UP : LINK_STATE_DOWN);
- sc->ifnet->if_baudrate = sfxge_link_speed_kbit[port->link_mode];
+ sc->ifnet->if_baudrate = sfxge_link_baudrate[port->link_mode];
if_link_state_change(sc->ifnet, link_state);
}
Modified: stable/9/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_tx.c Wed Nov 16 17:11:13 2011 (r227569)
+++ stable/9/sys/dev/sfxge/sfxge_tx.c Mon Nov 28 20:28:23 2011 (r228100)
@@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *
/* Acquire the put list. */
putp = &stdp->std_put;
- put = atomic_readandclear_long(putp);
+ put = atomic_readandclear_ptr(putp);
mbuf = (void *)put;
if (mbuf == NULL)
@@ -484,7 +484,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq,
return ENOBUFS;
mbuf->m_pkthdr.csum_data = old_len + 1;
mbuf->m_nextpkt = (void *)old;
- } while (atomic_cmpset_long(putp, old, new) == 0);
+ } while (atomic_cmpset_ptr(putp, old, new) == 0);
}
return (0);
@@ -1323,9 +1323,9 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
&txq->buf_base_id);
/* Create a DMA tag for packet mappings. */
- if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, 0x3FFFFFFFFFFFULL,
- BUS_SPACE_MAXADDR, NULL, NULL, 0x11000,
- SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL,
+ if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000,
+ MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL,
+ NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL,
&txq->packet_dma_tag) != 0) {
device_printf(sc->dev, "Couldn't allocate txq DMA tag\n");
rc = ENOMEM;
Modified: stable/9/sys/modules/Makefile
==============================================================================
--- stable/9/sys/modules/Makefile Mon Nov 28 20:16:55 2011 (r228099)
+++ stable/9/sys/modules/Makefile Mon Nov 28 20:28:23 2011 (r228100)
@@ -275,6 +275,7 @@ SUBDIR= ${_3dfx} \
sem \
send \
sf \
+ ${_sfxge} \
sge \
siba_bwn \
siftr \
@@ -627,6 +628,7 @@ _rdma= rdma
_s3= s3
_safe= safe
_scsi_low= scsi_low
+_sfxge= sfxge
_smbfs= smbfs
_sound= sound
_speaker= speaker
More information about the svn-src-stable-9
mailing list