summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/pkgdefs/Makefile2
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/Makefile40
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/pkginfo.tmpl49
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/postinstall81
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/postremove38
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/prototype_com48
-rwxr-xr-xusr/src/pkgdefs/SUNWnxge.i/prototype_i38658
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/Makefile38
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl49
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/postinstall81
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/postremove38
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/prototype_com48
-rw-r--r--usr/src/pkgdefs/SUNWnxge.u/prototype_sparc58
-rw-r--r--usr/src/pkgdefs/SUNWnxge.v/Makefile4
-rw-r--r--usr/src/pkgdefs/SUNWnxge.v/pkginfo.tmpl10
-rw-r--r--usr/src/pkgdefs/SUNWnxge.v/postinstall144
-rw-r--r--usr/src/pkgdefs/SUNWnxge.v/prototype_com3
-rw-r--r--usr/src/pkgdefs/SUNWnxge.v/prototype_sparc3
-rw-r--r--usr/src/uts/common/Makefile.files18
-rw-r--r--usr/src/uts/common/Makefile.rules20
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_espc.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_espc.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_espc.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_espc.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_fflp.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_fflp.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_fflp.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_fflp.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_ipp.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_ipp.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_ipp.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_ipp.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_mac.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_mac.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_mac.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_mac.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_rxdma.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_rxdma.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_txc.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_txc.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_txc.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_txc.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_txdma.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_txdma.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_txdma.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_txdma.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_vir.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_vir.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_vir.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_vir.h)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_zcp.c (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_zcp.c)0
-rw-r--r--usr/src/uts/common/io/nxge/npi/npi_zcp.h (renamed from usr/src/uts/sun4v/io/nxge/npi/npi_zcp.h)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge.conf157
-rw-r--r--usr/src/uts/common/io/nxge/nxge_classify.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_classify.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_espc.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_espc.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_fflp.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_fflp.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_fflp_hash.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_fflp_hash.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_fm.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_fm.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_fzc.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_fzc.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_hcall.s (renamed from usr/src/uts/sun4v/io/nxge/nxge_hcall.s)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_hw.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_hw.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_ipp.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_ipp.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_kstats.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_kstats.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_mac.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_mac.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_main.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_main.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_ndd.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_ndd.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_rxdma.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_rxdma.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_send.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_send.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_txc.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_txc.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_txdma.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_txdma.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_virtual.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_virtual.c)0
-rw-r--r--usr/src/uts/common/io/nxge/nxge_zcp.c (renamed from usr/src/uts/sun4v/io/nxge/nxge_zcp.c)0
-rw-r--r--usr/src/uts/common/sys/Makefile26
-rw-r--r--usr/src/uts/common/sys/nxge/nxge.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_common.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_common.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_common_impl.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_common_impl.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_defs.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_defs.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_espc.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_espc.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_espc_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_espc_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fflp.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_fflp.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fflp_hash.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_fflp_hash.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fflp_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_fflp_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_flow.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_flow.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fm.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_fm.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_fzc.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_fzc.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_impl.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_impl.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_ipp.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_ipp.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_ipp_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_ipp_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_mac.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_mac.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_mac_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_mac_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_mii.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_mii.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_n2_esr_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_n2_esr_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_phy_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_phy_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_rxdma.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_rxdma.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_rxdma_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_rxdma_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_sr_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_sr_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_txc.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_txc.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_txc_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_txc_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_txdma.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_txdma.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_txdma_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_txdma_hw.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_virtual.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_virtual.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_zcp.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_zcp.h)0
-rw-r--r--usr/src/uts/common/sys/nxge/nxge_zcp_hw.h (renamed from usr/src/uts/sun4v/sys/nxge/nxge_zcp_hw.h)0
-rw-r--r--usr/src/uts/i86pc/Makefile3
-rw-r--r--usr/src/uts/i86pc/Makefile.i86pc.shared1
-rw-r--r--usr/src/uts/i86pc/nxge/Makefile125
-rw-r--r--usr/src/uts/sun4u/Makefile.sun4u.shared1
-rw-r--r--usr/src/uts/sun4u/nxge/Makefile119
-rw-r--r--usr/src/uts/sun4v/Makefile.files17
-rw-r--r--usr/src/uts/sun4v/Makefile.rules22
-rw-r--r--usr/src/uts/sun4v/nxge/Makefile19
-rw-r--r--usr/src/uts/sun4v/sys/Makefile26
101 files changed, 1167 insertions, 179 deletions
diff --git a/usr/src/pkgdefs/Makefile b/usr/src/pkgdefs/Makefile
index a75aedf03f..46d3a39a57 100644
--- a/usr/src/pkgdefs/Makefile
+++ b/usr/src/pkgdefs/Makefile
@@ -78,6 +78,7 @@ sparc_SUBDIRS= \
SUNWn2cp.v \
SUNWn2cpact.v \
SUNWniumx.v \
+ SUNWnxge.u \
SUNWnxge.v \
SUNWonmtst.u \
SUNWonmtst.v \
@@ -127,6 +128,7 @@ i386_SUBDIRS= \
SUNWlxr \
SUNWlxu \
SUNWmv88sx \
+ SUNWnxge.i \
SUNWonmtst.i \
SUNWos86r \
SUNWpsdcr \
diff --git a/usr/src/pkgdefs/SUNWnxge.i/Makefile b/usr/src/pkgdefs/SUNWnxge.i/Makefile
new file mode 100755
index 0000000000..896956325b
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/Makefile
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+DATAFILES += depend i.renameold
+
+
+
+.KEEP_STATE:
+
+all: $(FILES) postinstall postremove
+
+install: all pkg
+
+include ../Makefile.targ
diff --git a/usr/src/pkgdefs/SUNWnxge.i/pkginfo.tmpl b/usr/src/pkgdefs/SUNWnxge.i/pkginfo.tmpl
new file mode 100755
index 0000000000..fbdde5c66b
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/pkginfo.tmpl
@@ -0,0 +1,49 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file describes characteristics of the
+# package, such as package abbreviation, full package name, package version,
+# and package architecture.
+#
+PKG="SUNWnxge"
+NAME="Sun NIU leaf driver"
+ARCH="i386.i86pc"
+VERSION="ONVERS,REV=0.0.0"
+SUNW_PRODNAME="SunOS"
+SUNW_PRODVERS="RELEASE/VERSION"
+SUNW_PKGTYPE="root"
+SUNW_PKG_ALLZONES="true"
+SUNW_PKG_HOLLOW="true"
+SUNW_PKG_THISZONE="false"
+MAXINST="1000"
+CATEGORY="system"
+DESC="Sun NIU 10Gb/1Gb leaf driver"
+VENDOR="Sun Microsystems, Inc."
+HOTLINE="Please contact your local service provider"
+EMAIL=""
+CLASSES="none renameold"
+BASEDIR=/
+SUNW_PKGVERS="1.0"
+
diff --git a/usr/src/pkgdefs/SUNWnxge.i/postinstall b/usr/src/pkgdefs/SUNWnxge.i/postinstall
new file mode 100755
index 0000000000..20a179a756
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/postinstall
@@ -0,0 +1,81 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+set -u
+
+PATH="/usr/bin:/usr/sbin:${PATH}"
+export PATH
+
+#
+# Driver info
+#
+DRV=nxge
+DRVALIAS=" \"pciex108e,abcd\" \"SUNW,niusl\""
+
+DRVPERM='* 0600 root sys'
+# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess'
+MAJORDEV=11
+
+#
+# Select the correct add_drv options to execute.
+#
+if [ "${BASEDIR}" = "/" ]; then
+ #
+ # Irrespective of whether hardware exists
+ # or not don't attempt to attach driver
+ # to the hardware. This is to avoid problems
+ # with installing a 32 bit driver on a 64 bit
+ # running system.
+ #
+ ADD_DRV="add_drv -n"
+else
+ #
+ # On a client,
+ # modify the system files and touch/reconfigure
+ # for reconfigure reboot
+ #
+ ADD_DRV="add_drv -b ${BASEDIR}"
+fi
+
+#
+# Make sure add_drv has *not* been previously executed
+# before attempting to add the driver.
+#
+grep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1
+if [ $? -eq 1 ]; then
+ ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV}
+ if [ $? -ne 0 ]; then
+ echo "\nFailed add_drv!\n" >&2
+ exit 1
+ fi
+else
+ echo " add_drv Failed; ${DRV} is already in ${BASEDIR}/etc/name_to_major"
+ exit 0
+fi
+
+exit 0
diff --git a/usr/src/pkgdefs/SUNWnxge.i/postremove b/usr/src/pkgdefs/SUNWnxge.i/postremove
new file mode 100755
index 0000000000..9839cb4cd6
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/postremove
@@ -0,0 +1,38 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+BD=${BASEDIR:-/}
+if grep -w nxge $BD/etc/name_to_major > /dev/null 2>&1
+then
+ rem_drv -b ${BD} nxge
+ if [ $? -ne 0 ]
+ then
+ exit 1
+ fi
+fi
+exit 0
diff --git a/usr/src/pkgdefs/SUNWnxge.i/prototype_com b/usr/src/pkgdefs/SUNWnxge.i/prototype_com
new file mode 100755
index 0000000000..f4ed0e1c5e
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/prototype_com
@@ -0,0 +1,48 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+# packaging files
+i pkginfo
+i copyright
+i depend
+i postinstall
+i postremove
+i i.renameold
+#
+# source locations relative to the prototype file
+#
+# SUNWnxge.i
+#
diff --git a/usr/src/pkgdefs/SUNWnxge.i/prototype_i386 b/usr/src/pkgdefs/SUNWnxge.i/prototype_i386
new file mode 100755
index 0000000000..bf23debaa2
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.i/prototype_i386
@@ -0,0 +1,58 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+# packaging files
+#
+# Include ISA independent files (prototype_com)
+#
+!include prototype_com
+#
+#
+#
+# List files which are SPARC specific here
+#
+# source locations relative to the prototype file
+#
+#
+# SUNWnxge.i
+#
+d none platform 755 root sys
+d none platform/i86pc 755 root sys
+d none platform/i86pc/kernel 755 root sys
+d none platform/i86pc/kernel/drv 755 root sys
+e renameold platform/i86pc/kernel/drv/nxge.conf 0644 root sys
+d none platform/i86pc/kernel/drv/amd64 755 root sys
+f none platform/i86pc/kernel/drv/amd64/nxge 755 root sys
diff --git a/usr/src/pkgdefs/SUNWnxge.u/Makefile b/usr/src/pkgdefs/SUNWnxge.u/Makefile
new file mode 100644
index 0000000000..71b302a489
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/Makefile
@@ -0,0 +1,38 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+DATAFILES += depend i.renameold
+
+.KEEP_STATE:
+
+all: $(FILES) postinstall postremove
+
+install: all pkg
+
+include ../Makefile.targ
diff --git a/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl b/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl
new file mode 100644
index 0000000000..ea65126045
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl
@@ -0,0 +1,49 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file describes characteristics of the
+# package, such as package abbreviation, full package name, package version,
+# and package architecture.
+#
+PKG="SUNWnxge"
+NAME="Sun NIU leaf driver"
+ARCH="sparc.sun4u"
+VERSION="ONVERS,REV=0.0.0"
+SUNW_PRODNAME="SunOS"
+SUNW_PRODVERS="RELEASE/VERSION"
+SUNW_PKGTYPE="root"
+SUNW_PKG_ALLZONES="true"
+SUNW_PKG_HOLLOW="true"
+SUNW_PKG_THISZONE="false"
+MAXINST="1000"
+CATEGORY="system"
+DESC="Sun NIU 10Gb/1Gb driver"
+VENDOR="Sun Microsystems, Inc."
+HOTLINE="Please contact your local service provider"
+EMAIL=""
+CLASSES="none renameold"
+BASEDIR=/
+SUNW_PKGVERS="1.0"
+
diff --git a/usr/src/pkgdefs/SUNWnxge.u/postinstall b/usr/src/pkgdefs/SUNWnxge.u/postinstall
new file mode 100644
index 0000000000..20a179a756
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/postinstall
@@ -0,0 +1,81 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+set -u
+
+PATH="/usr/bin:/usr/sbin:${PATH}"
+export PATH
+
+#
+# Driver info
+#
+DRV=nxge
+DRVALIAS=" \"pciex108e,abcd\" \"SUNW,niusl\""
+
+DRVPERM='* 0600 root sys'
+# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess'
+MAJORDEV=11
+
+#
+# Select the correct add_drv options to execute.
+#
+if [ "${BASEDIR}" = "/" ]; then
+ #
+ # Irrespective of whether hardware exists
+ # or not don't attempt to attach driver
+ # to the hardware. This is to avoid problems
+ # with installing a 32 bit driver on a 64 bit
+ # running system.
+ #
+ ADD_DRV="add_drv -n"
+else
+ #
+ # On a client,
+ # modify the system files and touch/reconfigure
+ # for reconfigure reboot
+ #
+ ADD_DRV="add_drv -b ${BASEDIR}"
+fi
+
+#
+# Make sure add_drv has *not* been previously executed
+# before attempting to add the driver.
+#
+grep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1
+if [ $? -eq 1 ]; then
+ ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV}
+ if [ $? -ne 0 ]; then
+ echo "\nFailed add_drv!\n" >&2
+ exit 1
+ fi
+else
+ echo " add_drv Failed; ${DRV} is already in ${BASEDIR}/etc/name_to_major"
+ exit 0
+fi
+
+exit 0
diff --git a/usr/src/pkgdefs/SUNWnxge.u/postremove b/usr/src/pkgdefs/SUNWnxge.u/postremove
new file mode 100644
index 0000000000..9839cb4cd6
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/postremove
@@ -0,0 +1,38 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+BD=${BASEDIR:-/}
+if grep -w nxge $BD/etc/name_to_major > /dev/null 2>&1
+then
+ rem_drv -b ${BD} nxge
+ if [ $? -ne 0 ]
+ then
+ exit 1
+ fi
+fi
+exit 0
diff --git a/usr/src/pkgdefs/SUNWnxge.u/prototype_com b/usr/src/pkgdefs/SUNWnxge.u/prototype_com
new file mode 100644
index 0000000000..b432867c8d
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/prototype_com
@@ -0,0 +1,48 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+# packaging files
+i pkginfo
+i copyright
+i depend
+i postinstall
+i postremove
+i i.renameold
+#
+# source locations relative to the prototype file
+#
+# SUNWnxge.u
+#
diff --git a/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc b/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc
new file mode 100644
index 0000000000..01cb0882df
--- /dev/null
+++ b/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc
@@ -0,0 +1,58 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This required package information file contains a list of package contents.
+# The 'pkgmk' command uses this file to identify the contents of a package
+# and their location on the development machine when building the package.
+# Can be created via a text editor or through use of the 'pkgproto' command.
+
+#!search <pathname pathname ...> # where to find pkg objects
+#!include <filename> # include another 'prototype' file
+#!default <mode> <owner> <group> # default used if not specified on entry
+#!<param>=<value> # puts parameter in pkg environment
+
+# packaging files
+#
+# Include ISA independent files (prototype_com)
+#
+!include prototype_com
+#
+#
+#
+# List files which are SPARC specific here
+#
+# source locations relative to the prototype file
+#
+#
+# SUNWnxge.u
+#
+d none platform 755 root sys
+d none platform/sun4u 755 root sys
+d none platform/sun4u/kernel 755 root sys
+d none platform/sun4u/kernel/drv 755 root sys
+e renameold platform/sun4u/kernel/drv/nxge.conf 0644 root sys
+d none platform/sun4u/kernel/drv/sparcv9 755 root sys
+f none platform/sun4u/kernel/drv/sparcv9/nxge 755 root sys
diff --git a/usr/src/pkgdefs/SUNWnxge.v/Makefile b/usr/src/pkgdefs/SUNWnxge.v/Makefile
index f8f1d88c8a..71b302a489 100644
--- a/usr/src/pkgdefs/SUNWnxge.v/Makefile
+++ b/usr/src/pkgdefs/SUNWnxge.v/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -27,7 +27,7 @@
include ../Makefile.com
-DATAFILES += depend
+DATAFILES += depend i.renameold
.KEEP_STATE:
diff --git a/usr/src/pkgdefs/SUNWnxge.v/pkginfo.tmpl b/usr/src/pkgdefs/SUNWnxge.v/pkginfo.tmpl
index e97609b6c2..80b94e3b80 100644
--- a/usr/src/pkgdefs/SUNWnxge.v/pkginfo.tmpl
+++ b/usr/src/pkgdefs/SUNWnxge.v/pkginfo.tmpl
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# CDDL HEADER START
@@ -21,14 +21,14 @@
#
# CDDL HEADER END
#
-#ident "%Z%%M% %I% %E% SMI"
+# ident "%Z%%M% %I% %E% SMI"
#
# This required package information file describes characteristics of the
# package, such as package abbreviation, full package name, package version,
# and package architecture.
#
PKG="SUNWnxge"
-NAME="UltraSPARC-T2 NIU leaf driver"
+NAME="Sun NIU leaf driver"
ARCH="sparc.sun4v"
VERSION="ONVERS,REV=0.0.0"
SUNW_PRODNAME="SunOS"
@@ -39,11 +39,11 @@ SUNW_PKG_HOLLOW="true"
SUNW_PKG_THISZONE="false"
MAXINST="1000"
CATEGORY="system"
-DESC="UltraSPARC-T2 NIU leaf driver"
+DESC="Sun NIU leaf driver"
VENDOR="Sun Microsystems, Inc."
HOTLINE="Please contact your local service provider"
EMAIL=""
-CLASSES="none"
+CLASSES="none renameold"
BASEDIR=/
SUNW_PKGVERS="1.0"
diff --git a/usr/src/pkgdefs/SUNWnxge.v/postinstall b/usr/src/pkgdefs/SUNWnxge.v/postinstall
index 80dd35fa68..20a179a756 100644
--- a/usr/src/pkgdefs/SUNWnxge.v/postinstall
+++ b/usr/src/pkgdefs/SUNWnxge.v/postinstall
@@ -20,110 +20,62 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
-
-# Function: check_add_drv()
#
-# This function will check if the module has an entry in etc/name_to_major
-# If not simply calls add_drv with the arguments given. If there is
-# such an entry in name_to_major file, it adds entries in driver_aliases
-# driver_classes and minor_perm if necessary.
-# The syntax of this function is the same as add_drv.
-
-check_add_drv()
-{
- if [ "$BASEDIR" = "" ]
- then
- BASEDIR=/
- fi
- alias=""
- class=""
- ADD_ALIAS=0
- ADD_CLASS=0
- ADD_MINOR=0
- OPTIND=1
- IS_NET_DRIVER=0
-
- cmd="add_drv"
-
- NO_CMD=
- while getopts i:b:m:c:N opt
- do
- case $opt in
- N ) NO_CMD=1;;
- i ) ADD_ALIAS=1
- alias=$OPTARG
- cmd=$cmd" -i '$alias'"
- ;;
- m ) ADD_MINOR=1
- minor=$OPTARG
- cmd=$cmd" -m '$minor'"
- ;;
- c) ADD_CLASS=1
- class=$OPTARG
- cmd=$cmd" -c $class"
- ;;
- b) BASEDIR=$OPTARG
- cmd=$cmd" -b $BASEDIR"
- ;;
- \?) echo "check_add_drv can not handle this option"
- return
- ;;
- esac
- done
- shift `/usr/bin/expr $OPTIND - 1`
-
- drvname=$1
-
- cmd=$cmd" "$drvname
- drvname=`echo $drvname | /usr/bin/sed 's;.*/;;g'`
+set -u
- /usr/bin/grep "^$drvname[ ]" $BASEDIR/etc/name_to_major > /dev/null 2>&1
+PATH="/usr/bin:/usr/sbin:${PATH}"
+export PATH
- if [ "$NO_CMD" = "" -a $? -ne 0 ]
- then
- eval $cmd
- else
- # entry already in name_to_major, add alias, class, minorperm
- # if necessary
- if [ $ADD_ALIAS = 1 ]
- then
- for i in $alias
- do
- /usr/bin/egrep "^$drvname[ ]+$i" $BASEDIR/etc/driver_aliases>/dev/null 2>&1
- if [ $? -ne 0 ]
- then
- echo "$drvname $i" >> $BASEDIR/etc/driver_aliases
- fi
- done
- fi
+#
+# Driver info
+#
+DRV=nxge
+DRVALIAS=" \"pciex108e,abcd\" \"SUNW,niusl\""
- if [ $ADD_CLASS = 1 ]
- then
- /usr/bin/egrep "^$drvname[ ]+$class( | |$)" $BASEDIR/etc/driver_classes > /dev/null 2>&1
- if [ $? -ne 0 ]
- then
- echo "$drvname\t$class" >> $BASEDIR/etc/driver_classes
- fi
- fi
+DRVPERM='* 0600 root sys'
+# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess'
+MAJORDEV=11
- if [ $ADD_MINOR = 1 ]
- then
- /usr/bin/grep "^$drvname:" $BASEDIR/etc/minor_perm > /dev/null 2>&1
- if [ $? -ne 0 ]
- then
- minorentry="$drvname:$minor"
- echo $minorentry >> $BASEDIR/etc/minor_perm
- fi
- fi
-
- fi
+#
+# Select the correct add_drv options to execute.
+#
+if [ "${BASEDIR}" = "/" ]; then
+ #
+ # Irrespective of whether hardware exists
+ # or not don't attempt to attach driver
+ # to the hardware. This is to avoid problems
+ # with installing a 32 bit driver on a 64 bit
+ # running system.
+ #
+ ADD_DRV="add_drv -n"
+else
+ #
+ # On a client,
+ # modify the system files and touch/reconfigure
+ # for reconfigure reboot
+ #
+ ADD_DRV="add_drv -b ${BASEDIR}"
+fi
-
-}
+#
+# Make sure add_drv has *not* been previously executed
+# before attempting to add the driver.
+#
+grep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1
+if [ $? -eq 1 ]; then
+ ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV}
+ if [ $? -ne 0 ]; then
+ echo "\nFailed add_drv!\n" >&2
+ exit 1
+ fi
+else
+ echo " add_drv Failed; ${DRV} is already in ${BASEDIR}/etc/name_to_major"
+ exit 0
+fi
-check_add_drv -b "${BASEDIR}" -i '"SUNW,niusl"' -m '* 0666 root sys' nxge
+exit 0
diff --git a/usr/src/pkgdefs/SUNWnxge.v/prototype_com b/usr/src/pkgdefs/SUNWnxge.v/prototype_com
index f6a8fbdd93..7cf716dbc2 100644
--- a/usr/src/pkgdefs/SUNWnxge.v/prototype_com
+++ b/usr/src/pkgdefs/SUNWnxge.v/prototype_com
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -40,6 +40,7 @@ i copyright
i depend
i postinstall
i postremove
+i i.renameold
#
# source locations relative to the prototype file
#
diff --git a/usr/src/pkgdefs/SUNWnxge.v/prototype_sparc b/usr/src/pkgdefs/SUNWnxge.v/prototype_sparc
index 167ecf3f70..f3ac73dba6 100644
--- a/usr/src/pkgdefs/SUNWnxge.v/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWnxge.v/prototype_sparc
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -53,5 +53,6 @@ d none platform 755 root sys
d none platform/sun4v 755 root sys
d none platform/sun4v/kernel 755 root sys
d none platform/sun4v/kernel/drv 755 root sys
+e renameold platform/sun4v/kernel/drv/nxge.conf 0644 root sys
d none platform/sun4v/kernel/drv/sparcv9 755 root sys
f none platform/sun4v/kernel/drv/sparcv9/nxge 755 root sys
diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files
index be88c153fa..d516d9b853 100644
--- a/usr/src/uts/common/Makefile.files
+++ b/usr/src/uts/common/Makefile.files
@@ -1365,3 +1365,21 @@ XGE_HAL_OBJS = xgehal-channel.o xgehal-fifo.o xgehal-ring.o xgehal-config.o \
#
E1000G_OBJS += e1000g_debug.o e1000_hw.o e1000g_main.o e1000g_alloc.o \
e1000g_tx.o e1000g_rx.o e1000g_stat.o e1000g_ndd.o
+#
+# NIU 10G/1G driver module
+#
+NXGE_OBJS = nxge_mac.o nxge_ipp.o nxge_rxdma.o \
+ nxge_txdma.o nxge_txc.o nxge_main.o \
+ nxge_hw.o nxge_fzc.o nxge_virtual.o \
+ nxge_send.o nxge_classify.o nxge_fflp.o \
+ nxge_fflp_hash.o nxge_ndd.o nxge_kstats.o \
+ nxge_zcp.o nxge_fm.o nxge_espc.o
+
+NXGE_NPI_OBJS = \
+ npi.o npi_mac.o npi_ipp.o \
+ npi_txdma.o npi_rxdma.o npi_txc.o \
+ npi_zcp.o npi_espc.o npi_fflp.o \
+ npi_vir.o
+
+NXGE_HCALL_OBJS = \
+ nxge_hcall.o
diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules
index 60806ad5f1..e0b9a1508c 100644
--- a/usr/src/uts/common/Makefile.rules
+++ b/usr/src/uts/common/Makefile.rules
@@ -599,6 +599,17 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/net80211/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
+$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nxge/%.c
+ $(COMPILE.c) -o $@ $<
+ $(CTFCONVERT_O)
+
+$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nxge/npi/%.c
+ $(COMPILE.c) -o $@ $<
+ $(CTFCONVERT_O)
+
+$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nxge/%.s
+ $(COMPILE.s) -o $@ $<
+
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/pci-ide/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -1353,6 +1364,15 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/mac/plugins/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/net80211/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
+$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nxge/%.c
+ @($(LHEAD) $(LINT.c) $< $(LTAIL))
+
+$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nxge/%.s
+ @($(LHEAD) $(LINT.c) $< $(LTAIL))
+
+$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nxge/npi/%.c
+ @($(LHEAD) $(LINT.c) $< $(LTAIL))
+
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/pci-ide/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi.c b/usr/src/uts/common/io/nxge/npi/npi.c
index 3d72c8dbe6..3d72c8dbe6 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi.c
+++ b/usr/src/uts/common/io/nxge/npi/npi.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi.h b/usr/src/uts/common/io/nxge/npi/npi.h
index b8ec582d2f..b8ec582d2f 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi.h
+++ b/usr/src/uts/common/io/nxge/npi/npi.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_espc.c b/usr/src/uts/common/io/nxge/npi/npi_espc.c
index 6cba8555ac..6cba8555ac 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_espc.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_espc.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_espc.h b/usr/src/uts/common/io/nxge/npi/npi_espc.h
index 867344b2da..867344b2da 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_espc.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_espc.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_fflp.c b/usr/src/uts/common/io/nxge/npi/npi_fflp.c
index 5cce5f8d9b..5cce5f8d9b 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_fflp.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_fflp.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_fflp.h b/usr/src/uts/common/io/nxge/npi/npi_fflp.h
index b2de964973..b2de964973 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_fflp.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_fflp.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_ipp.c b/usr/src/uts/common/io/nxge/npi/npi_ipp.c
index 4694fe146a..4694fe146a 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_ipp.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_ipp.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_ipp.h b/usr/src/uts/common/io/nxge/npi/npi_ipp.h
index b3685e063e..b3685e063e 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_ipp.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_ipp.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_mac.c b/usr/src/uts/common/io/nxge/npi/npi_mac.c
index 8452a8e0ca..8452a8e0ca 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_mac.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_mac.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_mac.h b/usr/src/uts/common/io/nxge/npi/npi_mac.h
index 06f0b80ef2..06f0b80ef2 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_mac.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_mac.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.c b/usr/src/uts/common/io/nxge/npi/npi_rxdma.c
index 76394496f1..76394496f1 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_rxdma.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.h b/usr/src/uts/common/io/nxge/npi/npi_rxdma.h
index ebf96c94e9..ebf96c94e9 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_rxdma.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_rxdma.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_txc.c b/usr/src/uts/common/io/nxge/npi/npi_txc.c
index 7afee5252f..7afee5252f 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_txc.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_txc.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_txc.h b/usr/src/uts/common/io/nxge/npi/npi_txc.h
index 7b3dff9ce2..7b3dff9ce2 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_txc.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_txc.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_txdma.c b/usr/src/uts/common/io/nxge/npi/npi_txdma.c
index 94324ec8b2..94324ec8b2 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_txdma.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_txdma.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_txdma.h b/usr/src/uts/common/io/nxge/npi/npi_txdma.h
index fe694ab3d1..fe694ab3d1 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_txdma.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_txdma.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_vir.c b/usr/src/uts/common/io/nxge/npi/npi_vir.c
index 27379033f2..27379033f2 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_vir.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_vir.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_vir.h b/usr/src/uts/common/io/nxge/npi/npi_vir.h
index 11aada4cf2..11aada4cf2 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_vir.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_vir.h
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_zcp.c b/usr/src/uts/common/io/nxge/npi/npi_zcp.c
index 4f7a7c6657..4f7a7c6657 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_zcp.c
+++ b/usr/src/uts/common/io/nxge/npi/npi_zcp.c
diff --git a/usr/src/uts/sun4v/io/nxge/npi/npi_zcp.h b/usr/src/uts/common/io/nxge/npi/npi_zcp.h
index 25c7337fca..25c7337fca 100644
--- a/usr/src/uts/sun4v/io/nxge/npi/npi_zcp.h
+++ b/usr/src/uts/common/io/nxge/npi/npi_zcp.h
diff --git a/usr/src/uts/common/io/nxge/nxge.conf b/usr/src/uts/common/io/nxge/nxge.conf
new file mode 100644
index 0000000000..4c019c2356
--- /dev/null
+++ b/usr/src/uts/common/io/nxge/nxge.conf
@@ -0,0 +1,157 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#########################################################################
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+#
+# driver.conf file for Sun NIU 10Gb/1Gb Ethernet Driver (nxge)
+#
+#
+#---------------Link Configuration ----------------------
+# The link parameters depend on the type of the card
+# and the port.
+# 10 gigabit related parameters ( i.e adv_10gfdx_cap)
+# apply only to 10gigabit ports.
+# Half duplex is not supported on any NIU card.
+#
+# adv-autoneg-cap
+# Advertise auto-negotiation capability.
+# default is 1
+# adv-autoneg-cap = 1;
+#
+# adv_10gfdx_cap
+# Advertise 10gbps Full duplex capability.
+# default is 1
+# adv_10gfdx_cap = 1;
+#
+# adv_1000fdx_cap
+# Advertise 1gbps Full duplex capability.
+# default is 1
+# adv_1000fdx_cap = 1;
+#
+# adv_100fdx_cap
+# Advertise 100mbps Full duplex capability.
+# default is 1
+# adv_100fdx_cap = 1;
+#
+# adv_10fdx_cap
+# Advertise 10mbps Full duplex capability.
+# default is 1
+# adv_10fdx_cap = 1;
+#
+# adv_asmpause_cap
+# Advertise Asymmetric pause capability.
+# default is 0
+# adv_asmpause_cap = 0;
+#
+# adv_pause_cap
+# Advertise pause capability.
+# default is 1
+# adv_pause_cap = 1;
+#
+#
+#------- Jumbo frame support ---------------------------------
+# To enable jumbo support for all nxge interfaces,
+# accept_jumbo = 1;
+#
+# To disable jumbo support for all nxge interfaces,
+# accept_jumbo = 0;
+#
+# Default is 0. See the example at the end of this file for
+# enabling or disabling jumbo for a particular nxge interface.
+#
+#
+#------- Receive DMA Configuration ----------------------------
+#
+# rxdma-intr-time
+# Interrupts after this number of NIU hardware ticks have
+# elapsed since the last packet was received.
+# A value of zero means no time blanking (Default = 8).
+#
+# rxdma-intr-pkts
+# Interrupt after this number of packets have arrived since
+# the last packet was serviced. A value of zero indicates
+# no packet blanking (Default = 20).
+#
+# Default Interrupt Blanking parameters.
+#
+# rxdma-intr-time = 8;
+# rxdma-intr-pkts = 20;
+#
+#
+#------- Classification and Load Distribution Configuration ------
+#
+# class-opt-****-***
+# These variables define how each IP class is configured.
+# Configuration options range from whether TCAM lookup ie
+# is enabled to flow hash generation.
+# This parameters also control how the flow template is
+# constructed and how packet is distributed within RDC
+# groups.
+#
+# supported classes:
+# class-opt-ipv4-tcp class-opt-ipv4-udp class-opt-ipv4-sctp
+# class-opt-ipv4-ah class-opt-ipv6-tcp class-opt-ipv6-udp
+# class-opt-ipv6-sctp class-opt-ipv6-ah
+#
+# Configuration bits (Thes following bits will be decoded
+# by the driver as hex format).
+#
+# 0010: use MAC Port (for flow key)
+# 0020: use L2DA (for flow key)
+# 0040: use VLAN (for flow key)
+# 0080: use proto (for flow key)
+# 0100: use IP src addr (for flow key)
+# 0200: use IP dest addr (for flow key)
+# 0400: use Src Port (for flow key)
+# 0800: use Dest Port (for flow key)
+#
+# class-opt-ipv4-tcp = fe0;
+#
+# ------- How to set parameters for a particular interface --------
+# The example below shows how to locate the device path and set a
+# parameter for a particular nxge interface. (Using jumbo support as
+# an example)
+#
+# Use the following command to find out the device paths for nxge,
+# more /etc/path_to_inst | grep nxge
+#
+# For example, if you see,
+# "/pci@7c0/pci@0/pci@8/network@0" 0 "nxge"
+# "/pci@7c0/pci@0/pci@8/network@0,1" 1 "nxge"
+# "/pci@7c0/pci@0/pci@8/network@0,2" 2 "nxge"
+# "/pci@7c0/pci@0/pci@8/network@0,3" 3 "nxge"
+#
+# then you can enable jumbo for ports 0 and 1 and disable jumbo for ports 2
+# and 3 as follows,
+#
+# name = "pciex108e,abcd" parent = "/pci@7c0/pci@0/pci@8" unit-address = "0"
+# accept_jumbo = 1;
+# name = "pciex108e,abcd" parent = "/pci@7c0/pci@0/pci@8" unit-address = "0,1"
+# accept_jumbo = 1;
+# name = "pciex108e,abcd" parent = "/pci@7c0/pci@0/pci@8" unit-address = "0,2"
+# accept_jumbo = 0;
+# name = "pciex108e,abcd" parent = "/pci@7c0/pci@0/pci@8" unit-address = "0,3"
+# accept_jumbo = 0;
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_classify.c b/usr/src/uts/common/io/nxge/nxge_classify.c
index bcb36b6bc6..bcb36b6bc6 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_classify.c
+++ b/usr/src/uts/common/io/nxge/nxge_classify.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_espc.c b/usr/src/uts/common/io/nxge/nxge_espc.c
index 2603d2b601..2603d2b601 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_espc.c
+++ b/usr/src/uts/common/io/nxge/nxge_espc.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_fflp.c b/usr/src/uts/common/io/nxge/nxge_fflp.c
index 6a7cff4ac7..6a7cff4ac7 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_fflp.c
+++ b/usr/src/uts/common/io/nxge/nxge_fflp.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_fflp_hash.c b/usr/src/uts/common/io/nxge/nxge_fflp_hash.c
index 8f71968222..8f71968222 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_fflp_hash.c
+++ b/usr/src/uts/common/io/nxge/nxge_fflp_hash.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_fm.c b/usr/src/uts/common/io/nxge/nxge_fm.c
index 74531bae1d..74531bae1d 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_fm.c
+++ b/usr/src/uts/common/io/nxge/nxge_fm.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_fzc.c b/usr/src/uts/common/io/nxge/nxge_fzc.c
index b9e357ca16..b9e357ca16 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_fzc.c
+++ b/usr/src/uts/common/io/nxge/nxge_fzc.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_hcall.s b/usr/src/uts/common/io/nxge/nxge_hcall.s
index 758e08f462..758e08f462 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_hcall.s
+++ b/usr/src/uts/common/io/nxge/nxge_hcall.s
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_hw.c b/usr/src/uts/common/io/nxge/nxge_hw.c
index 3802197b0e..3802197b0e 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_hw.c
+++ b/usr/src/uts/common/io/nxge/nxge_hw.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_ipp.c b/usr/src/uts/common/io/nxge/nxge_ipp.c
index 09633973a0..09633973a0 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_ipp.c
+++ b/usr/src/uts/common/io/nxge/nxge_ipp.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_kstats.c b/usr/src/uts/common/io/nxge/nxge_kstats.c
index f4a342a706..f4a342a706 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_kstats.c
+++ b/usr/src/uts/common/io/nxge/nxge_kstats.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_mac.c b/usr/src/uts/common/io/nxge/nxge_mac.c
index 67ffc4eefc..67ffc4eefc 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_mac.c
+++ b/usr/src/uts/common/io/nxge/nxge_mac.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c
index f1a2b21f40..f1a2b21f40 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_main.c
+++ b/usr/src/uts/common/io/nxge/nxge_main.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_ndd.c b/usr/src/uts/common/io/nxge/nxge_ndd.c
index 4e413391d9..4e413391d9 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_ndd.c
+++ b/usr/src/uts/common/io/nxge/nxge_ndd.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_rxdma.c b/usr/src/uts/common/io/nxge/nxge_rxdma.c
index 4fdc318387..4fdc318387 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_rxdma.c
+++ b/usr/src/uts/common/io/nxge/nxge_rxdma.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_send.c b/usr/src/uts/common/io/nxge/nxge_send.c
index 581a4413d6..581a4413d6 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_send.c
+++ b/usr/src/uts/common/io/nxge/nxge_send.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_txc.c b/usr/src/uts/common/io/nxge/nxge_txc.c
index 1210821a96..1210821a96 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_txc.c
+++ b/usr/src/uts/common/io/nxge/nxge_txc.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_txdma.c b/usr/src/uts/common/io/nxge/nxge_txdma.c
index d05b19555f..d05b19555f 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_txdma.c
+++ b/usr/src/uts/common/io/nxge/nxge_txdma.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_virtual.c b/usr/src/uts/common/io/nxge/nxge_virtual.c
index 773cc785c3..773cc785c3 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_virtual.c
+++ b/usr/src/uts/common/io/nxge/nxge_virtual.c
diff --git a/usr/src/uts/sun4v/io/nxge/nxge_zcp.c b/usr/src/uts/common/io/nxge/nxge_zcp.c
index d4388487fe..d4388487fe 100644
--- a/usr/src/uts/sun4v/io/nxge/nxge_zcp.c
+++ b/usr/src/uts/common/io/nxge/nxge_zcp.c
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile
index 70d9401c70..2cab0fbac7 100644
--- a/usr/src/uts/common/sys/Makefile
+++ b/usr/src/uts/common/sys/Makefile
@@ -940,6 +940,29 @@ I2OHDRS= \
i2omstr.h \
i2outil.h
+NXGEHDRS= \
+ nxge.h \
+ nxge_common.h \
+ nxge_common_impl.h \
+ nxge_defs.h \
+ nxge_hw.h \
+ nxge_impl.h \
+ nxge_ipp.h \
+ nxge_ipp_hw.h \
+ nxge_mac.h \
+ nxge_mac_hw.h \
+ nxge_fflp.h \
+ nxge_fflp_hw.h \
+ nxge_mii.h \
+ nxge_rxdma.h \
+ nxge_rxdma_hw.h \
+ nxge_txc.h \
+ nxge_txc_hw.h \
+ nxge_txdma.h \
+ nxge_txdma_hw.h \
+ nxge_virtual.h \
+ nxge_espc.h
+
include Makefile.syshdrs
dcam/%.check: dcam/%.h
@@ -987,7 +1010,8 @@ CHECKHDRS= \
$(USBHDRS:%.h=usb/%.check) \
$(I1394HDRS:%.h=1394/%.check) \
$(RSMHDRS:%.h=rsm/%.check) \
- $(TSOLHDRS:%.h=tsol/%.check)
+ $(TSOLHDRS:%.h=tsol/%.check) \
+ $(NXGEHDRS:%.h=nxge/%.check)
.KEEP_STATE:
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge.h b/usr/src/uts/common/sys/nxge/nxge.h
index 91c98f5861..91c98f5861 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge.h
+++ b/usr/src/uts/common/sys/nxge/nxge.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_common.h b/usr/src/uts/common/sys/nxge/nxge_common.h
index 26a994dec4..26a994dec4 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_common.h
+++ b/usr/src/uts/common/sys/nxge/nxge_common.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_common_impl.h b/usr/src/uts/common/sys/nxge/nxge_common_impl.h
index 23c049eeb3..23c049eeb3 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_common_impl.h
+++ b/usr/src/uts/common/sys/nxge/nxge_common_impl.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_defs.h b/usr/src/uts/common/sys/nxge/nxge_defs.h
index 60d4b26965..60d4b26965 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_defs.h
+++ b/usr/src/uts/common/sys/nxge/nxge_defs.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_espc.h b/usr/src/uts/common/sys/nxge/nxge_espc.h
index b54fec9d6d..b54fec9d6d 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_espc.h
+++ b/usr/src/uts/common/sys/nxge/nxge_espc.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_espc_hw.h b/usr/src/uts/common/sys/nxge/nxge_espc_hw.h
index e38dda43bb..e38dda43bb 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_espc_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_espc_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_fflp.h b/usr/src/uts/common/sys/nxge/nxge_fflp.h
index 93458357a6..93458357a6 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_fflp.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fflp.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_fflp_hash.h b/usr/src/uts/common/sys/nxge/nxge_fflp_hash.h
index 74e42d7e3f..74e42d7e3f 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_fflp_hash.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fflp_hash.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_fflp_hw.h b/usr/src/uts/common/sys/nxge/nxge_fflp_hw.h
index 802cd864e5..802cd864e5 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_fflp_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fflp_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_flow.h b/usr/src/uts/common/sys/nxge/nxge_flow.h
index cbe60f0d46..cbe60f0d46 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_flow.h
+++ b/usr/src/uts/common/sys/nxge/nxge_flow.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_fm.h b/usr/src/uts/common/sys/nxge/nxge_fm.h
index 72536375a9..72536375a9 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_fm.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fm.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_fzc.h b/usr/src/uts/common/sys/nxge/nxge_fzc.h
index 9be1e787d3..9be1e787d3 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_fzc.h
+++ b/usr/src/uts/common/sys/nxge/nxge_fzc.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_hw.h b/usr/src/uts/common/sys/nxge/nxge_hw.h
index 961d4ff8dd..961d4ff8dd 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_impl.h b/usr/src/uts/common/sys/nxge/nxge_impl.h
index 978d692d85..978d692d85 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_impl.h
+++ b/usr/src/uts/common/sys/nxge/nxge_impl.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_ipp.h b/usr/src/uts/common/sys/nxge/nxge_ipp.h
index 283fa01d4e..283fa01d4e 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_ipp.h
+++ b/usr/src/uts/common/sys/nxge/nxge_ipp.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_ipp_hw.h b/usr/src/uts/common/sys/nxge/nxge_ipp_hw.h
index fbaec297b7..fbaec297b7 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_ipp_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_ipp_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_mac.h b/usr/src/uts/common/sys/nxge/nxge_mac.h
index 52c6187c7d..52c6187c7d 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_mac.h
+++ b/usr/src/uts/common/sys/nxge/nxge_mac.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_mac_hw.h b/usr/src/uts/common/sys/nxge/nxge_mac_hw.h
index f894e531ef..f894e531ef 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_mac_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_mac_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_mii.h b/usr/src/uts/common/sys/nxge/nxge_mii.h
index 9c801b794c..9c801b794c 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_mii.h
+++ b/usr/src/uts/common/sys/nxge/nxge_mii.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_n2_esr_hw.h b/usr/src/uts/common/sys/nxge/nxge_n2_esr_hw.h
index 3390233187..3390233187 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_n2_esr_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_n2_esr_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_phy_hw.h b/usr/src/uts/common/sys/nxge/nxge_phy_hw.h
index c1ae1d883b..c1ae1d883b 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_phy_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_phy_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_rxdma.h b/usr/src/uts/common/sys/nxge/nxge_rxdma.h
index 32c565fd96..32c565fd96 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_rxdma.h
+++ b/usr/src/uts/common/sys/nxge/nxge_rxdma.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_rxdma_hw.h b/usr/src/uts/common/sys/nxge/nxge_rxdma_hw.h
index 8657de219b..8657de219b 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_rxdma_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_rxdma_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_sr_hw.h b/usr/src/uts/common/sys/nxge/nxge_sr_hw.h
index c487105f26..c487105f26 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_sr_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_sr_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_txc.h b/usr/src/uts/common/sys/nxge/nxge_txc.h
index 74ec1f2d01..74ec1f2d01 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_txc.h
+++ b/usr/src/uts/common/sys/nxge/nxge_txc.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_txc_hw.h b/usr/src/uts/common/sys/nxge/nxge_txc_hw.h
index 712941037b..712941037b 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_txc_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_txc_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_txdma.h b/usr/src/uts/common/sys/nxge/nxge_txdma.h
index fdd8a46b4a..fdd8a46b4a 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_txdma.h
+++ b/usr/src/uts/common/sys/nxge/nxge_txdma.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_txdma_hw.h b/usr/src/uts/common/sys/nxge/nxge_txdma_hw.h
index da234ee008..da234ee008 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_txdma_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_txdma_hw.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_virtual.h b/usr/src/uts/common/sys/nxge/nxge_virtual.h
index 7006ebd443..7006ebd443 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_virtual.h
+++ b/usr/src/uts/common/sys/nxge/nxge_virtual.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_zcp.h b/usr/src/uts/common/sys/nxge/nxge_zcp.h
index 05356e628e..05356e628e 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_zcp.h
+++ b/usr/src/uts/common/sys/nxge/nxge_zcp.h
diff --git a/usr/src/uts/sun4v/sys/nxge/nxge_zcp_hw.h b/usr/src/uts/common/sys/nxge/nxge_zcp_hw.h
index ea4a7593f6..ea4a7593f6 100644
--- a/usr/src/uts/sun4v/sys/nxge/nxge_zcp_hw.h
+++ b/usr/src/uts/common/sys/nxge/nxge_zcp_hw.h
diff --git a/usr/src/uts/i86pc/Makefile b/usr/src/uts/i86pc/Makefile
index aa3fb7f1f2..9659a4c57f 100644
--- a/usr/src/uts/i86pc/Makefile
+++ b/usr/src/uts/i86pc/Makefile
@@ -42,9 +42,10 @@ INTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
INTEL_LINTS = genunix
+LINT_PARALLEL_KMODS = $(PARALLEL_KMODS:nxge=)
LINT_LIBS = $(LINT_LIB) \
$(GENUNIX_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
- $(PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
+ $(LINT_PARALLEL_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
$(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
$(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln)
diff --git a/usr/src/uts/i86pc/Makefile.i86pc.shared b/usr/src/uts/i86pc/Makefile.i86pc.shared
index 73ef283182..40fa8479fa 100644
--- a/usr/src/uts/i86pc/Makefile.i86pc.shared
+++ b/usr/src/uts/i86pc/Makefile.i86pc.shared
@@ -246,6 +246,7 @@ DRV_KMODS += pcplusmp
DRV_KMODS += cpc
DRV_KMODS += pci
DRV_KMODS += npe
+DRV_KMODS += nxge
DRV_KMODS += pci-ide
DRV_KMODS += xsvc
DRV_KMODS += mc-amd
diff --git a/usr/src/uts/i86pc/nxge/Makefile b/usr/src/uts/i86pc/nxge/Makefile
new file mode 100644
index 0000000000..ed06f74776
--- /dev/null
+++ b/usr/src/uts/i86pc/nxge/Makefile
@@ -0,0 +1,125 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# uts/i86pc/nxge/Makefile
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile drives the production of the Sun NIU
+# 10G/1G Ethernet leaf driver kernel module.
+#
+#
+# Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE = ../..
+
+#
+# Define the module and object file sets.
+#
+MODULE = nxge
+NXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS)
+OBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
+LINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
+CONF_SRCDIR = $(UTSBASE)/common/io/nxge
+
+#
+# Include common rules.
+#
+include $(UTSBASE)/i86pc/Makefile.i86pc
+
+#
+# Override defaults to build a unique, local modstubs.o.
+#
+MODSTUBS_DIR = $(OBJS_DIR)
+
+CLEANFILES += $(MODSTUBS_O)
+
+#
+# Define targets
+#
+ALL_TARGET = $(BINARY)
+LINT_TARGET = $(MODULE).lint
+INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
+
+#
+#
+# Turn on doubleword alignment for 64 bit registers
+#
+CFLAGS += -dalign
+#
+# Include nxge specific header files
+#
+INC_PATH += -I$(UTSBASE)/common
+INC_PATH += -I$(UTSBASE)/common/io/nxge/npi
+INC_PATH += -I$(UTSBASE)/common/sys/nxge
+#
+#
+# lint pass one enforcement
+#
+CFLAGS += -DSOLARIS
+#
+# Only build 64-bit version.
+ALL_BUILDS = $(ALL_BUILDS64)
+DEF_BUILDS = $(DEF_BUILDS64)
+CLEANLINTFILES += $(LINT64_FILES)
+#
+LINTFLAGS += -DSOLARIS
+#
+# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
+# force us to turn off these lint checks.
+#
+LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
+LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
+LINTTAGS += -erroff=E_FALSE_LOGICAL_EXPR
+#
+# Driver depends on mac & IP
+#
+LDFLAGS += -dy -N misc/mac -N drv/ip
+
+#
+# Default build targets.
+#
+.KEEP_STATE:
+
+def: $(DEF_DEPS)
+
+all: $(ALL_DEPS)
+
+clean: $(CLEAN_DEPS)
+
+clobber: $(CLOBBER_DEPS)
+
+lint: $(LINT_DEPS)
+
+modlintlib: $(MODLINTLIB_DEPS)
+
+clean.lint: $(CLEAN_LINT_DEPS)
+
+install: $(INSTALL_DEPS)
+
+#
+# Include common targets.
+#
+include $(UTSBASE)/i86pc/Makefile.targ
diff --git a/usr/src/uts/sun4u/Makefile.sun4u.shared b/usr/src/uts/sun4u/Makefile.sun4u.shared
index c1398f6afc..e18b04a57d 100644
--- a/usr/src/uts/sun4u/Makefile.sun4u.shared
+++ b/usr/src/uts/sun4u/Makefile.sun4u.shared
@@ -403,6 +403,7 @@ DRV_KMODS += rmcadm
DRV_KMODS += rmclomv
DRV_KMODS += wrsmd
DRV_KMODS += sf
+DRV_KMODS += nxge
$(CLOSED_BUILD)CLOSED_DRV_KMODS += ctsmc
$(CLOSED_BUILD)CLOSED_DRV_KMODS += i2bsc
diff --git a/usr/src/uts/sun4u/nxge/Makefile b/usr/src/uts/sun4u/nxge/Makefile
new file mode 100644
index 0000000000..b16c145e25
--- /dev/null
+++ b/usr/src/uts/sun4u/nxge/Makefile
@@ -0,0 +1,119 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# uts/sun4u/nxge/Makefile
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile drives the production of the Sun
+# 10G/1G Ethernet leaf driver kernel module.
+#
+#
+# Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE = ../..
+
+#
+# Define the module and object file sets.
+#
+MODULE = nxge
+NXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS)
+OBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
+LINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
+CONF_SRCDIR = $(UTSBASE)/common/io/nxge
+
+#
+# Include common rules.
+#
+include $(UTSBASE)/sun4u/Makefile.sun4u
+
+#
+# Override defaults to build a unique, local modstubs.o.
+#
+MODSTUBS_DIR = $(OBJS_DIR)
+
+CLEANFILES += $(MODSTUBS_O)
+
+#
+# Define targets
+#
+ALL_TARGET = $(BINARY)
+LINT_TARGET = $(MODULE).lint
+INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
+
+#
+#
+# Turn on doubleword alignment for 64 bit registers
+#
+CFLAGS += -dalign
+#
+# Include nxge specific header files
+#
+INC_PATH += -I$(UTSBASE)/common
+INC_PATH += -I$(UTSBASE)/common/io/nxge/npi
+INC_PATH += -I$(UTSBASE)/common/sys/nxge
+#
+#
+# lint pass one enforcement
+#
+CFLAGS += -DSOLARIS
+#
+LINTFLAGS += -DSOLARIS
+#
+# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
+# force us to turn off these lint checks.
+#
+LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
+LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
+#
+# Driver depends on mac & IP
+#
+LDFLAGS += -dy -N misc/mac -N drv/ip
+
+#
+# Default build targets.
+#
+.KEEP_STATE:
+
+def: $(DEF_DEPS)
+
+all: $(ALL_DEPS)
+
+clean: $(CLEAN_DEPS)
+
+clobber: $(CLOBBER_DEPS)
+
+lint: $(LINT_DEPS)
+
+modlintlib: $(MODLINTLIB_DEPS)
+
+clean.lint: $(CLEAN_LINT_DEPS)
+
+install: $(INSTALL_DEPS)
+
+#
+# Include common targets.
+#
+include $(UTSBASE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4v/Makefile.files b/usr/src/uts/sun4v/Makefile.files
index 110b337432..0a63ac33fb 100644
--- a/usr/src/uts/sun4v/Makefile.files
+++ b/usr/src/uts/sun4v/Makefile.files
@@ -207,20 +207,3 @@ ASSYM_DEPS += mach_sfmmu_asm.o sfmmu_asm.o
ARCFOUR_OBJS += arcfour.o arcfour_crypt.o
-#
-# N2/NIU 10G driver module
-#
-NXGE_OBJS = nxge_mac.o nxge_ipp.o nxge_rxdma.o \
- nxge_txdma.o nxge_txc.o nxge_main.o \
- nxge_hw.o nxge_fzc.o nxge_virtual.o \
- nxge_send.o nxge_classify.o nxge_fflp.o \
- nxge_fflp_hash.o nxge_ndd.o nxge_kstats.o \
- nxge_zcp.o nxge_fm.o nxge_espc.o nxge_hcall.o
-
-NXGE_NPI_OBJS = \
- npi.o npi_mac.o npi_ipp.o \
- npi_txdma.o npi_rxdma.o npi_txc.o \
- npi_zcp.o npi_espc.o npi_fflp.o \
- npi_vir.o
-
-#
diff --git a/usr/src/uts/sun4v/Makefile.rules b/usr/src/uts/sun4v/Makefile.rules
index eb25f1d418..691d537382 100644
--- a/usr/src/uts/sun4v/Makefile.rules
+++ b/usr/src/uts/sun4v/Makefile.rules
@@ -20,7 +20,7 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -73,17 +73,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/px/%.c
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/px/%.s
$(COMPILE.s) -o $@ $<
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/nxge/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/nxge/%.s
- $(COMPILE.s) -o $@ $<
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/nxge/npi/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/fpc/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -171,15 +160,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/px/%.s
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/niumx/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/nxge/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/nxge/%.s
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/nxge/npi/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/fpc/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/sun4v/nxge/Makefile b/usr/src/uts/sun4v/nxge/Makefile
index ce86192df3..cc9a246329 100644
--- a/usr/src/uts/sun4v/nxge/Makefile
+++ b/usr/src/uts/sun4v/nxge/Makefile
@@ -20,14 +20,14 @@
#
# uts/sun4v/nxge/Makefile
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# ident "%Z%%M% %I% %E% SMI"
#
# This makefile drives the production of the N2 NIU
-# 10G Ethernet leaf driver kernel module.
+# 10G and SUN 10G/1G Ethernet leaf driver kernel module.
#
# sun4v implementation architecture dependent
#
@@ -41,10 +41,11 @@ UTSBASE = ../..
# Define the module and object file sets.
#
MODULE = nxge
-OBJECTS = $(NXGE_OBJS:%=$(OBJS_DIR)/%) $(NXGE_NPI_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(NXGE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
- $(NXGE_NPI_OBJS:%.o=$(LINTS_DIR)/%.ln)
+NXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS) $(NXGE_HCALL_OBJS)
+OBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
+LINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
+CONF_SRCDIR = $(UTSBASE)/common/io/nxge
#
# Include common rules.
@@ -63,7 +64,7 @@ CLEANFILES += $(MODSTUBS_O)
#
ALL_TARGET = $(BINARY)
LINT_TARGET = $(MODULE).lint
-INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
+INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
#
#
@@ -73,8 +74,8 @@ CFLAGS += -dalign
#
# Include nxge specific header files
#
-INC_PATH += -I$(UTSBASE)/sun4v/io/nxge/npi
-INC_PATH += -I$(UTSBASE)/sun4v/sys/nxge
+INC_PATH += -I$(UTSBASE)/common/io/nxge/npi
+INC_PATH += -I$(UTSBASE)/common/sys/nxge
#
#
# lint pass one enforcement
@@ -139,4 +140,4 @@ install: $(INSTALL_DEPS)
#
# Include common targets.
#
-include $(UTSBASE)/$(PLATFORM)/Makefile.targ
+include $(UTSBASE)/sun4v/Makefile.targ
diff --git a/usr/src/uts/sun4v/sys/Makefile b/usr/src/uts/sun4v/sys/Makefile
index f4b1a65dbf..66d7605b9a 100644
--- a/usr/src/uts/sun4v/sys/Makefile
+++ b/usr/src/uts/sun4v/sys/Makefile
@@ -97,29 +97,6 @@ CLOSED_HDRS= \
memtestio_n2.h \
memtestio_v.h
-NXGEHDRS= \
- nxge.h \
- nxge_common.h \
- nxge_common_impl.h \
- nxge_defs.h \
- nxge_hw.h \
- nxge_impl.h \
- nxge_ipp.h \
- nxge_ipp_hw.h \
- nxge_mac.h \
- nxge_mac_hw.h \
- nxge_fflp.h \
- nxge_fflp_hw.h \
- nxge_mii.h \
- nxge_rxdma.h \
- nxge_rxdma_hw.h \
- nxge_txc.h \
- nxge_txc_hw.h \
- nxge_txdma.h \
- nxge_txdma_hw.h \
- nxge_virtual.h \
- nxge_espc.h
-
ROOTHDRS= $(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
@@ -133,8 +110,7 @@ ROOTLINK= $(ROOTDIR)/uts/$(PLATFORM)/sys
LINKDEST= ../../../../platform/$(PLATFORM)/include/sys
CHECKHDRS= $(HDRS:%.h=%.check) \
- $(SUN4_HDRS:%.h=%.cmncheck) \
- $(NXGEHDRS:%.h=nxge/%.check)
+ $(SUN4_HDRS:%.h=%.cmncheck)
$(CLOSED_BUILD)CHECKHDRS += \
$(CLOSED_HDRS:%.h=%.check) \