# HG changeset patch # User gs150176 # Date 1181613770 25200 # Node ID 7276384d1aac6458c71fdbb00941e96a02b4be0d # Parent 566ce8b5e131a00dedf9cb38c9705a7d4eed0873 PSARC 2007/081 Broadcom NetXtreme II Gigabit Ethernet Driver 6377378 bnx: Solaris needs to support Broadcom NetXtreme II chipset diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/Makefile --- a/usr/src/pkgdefs/BRCMbnx/Makefile Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/pkgdefs/BRCMbnx/Makefile Mon Jun 11 19:02:50 2007 -0700 @@ -28,7 +28,7 @@ include ../Makefile.com -DATAFILES += depend +DATAFILES += depend i.renameold .KEEP_STATE: diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/pkginfo.tmpl --- a/usr/src/pkgdefs/BRCMbnx/pkginfo.tmpl Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/pkgdefs/BRCMbnx/pkginfo.tmpl Mon Jun 11 19:02:50 2007 -0700 @@ -38,7 +38,7 @@ BASEDIR=/ SUNW_PKGVERS="1.0" SUNW_PKGTYPE="root" -CLASSES="none" +CLASSES="none renameold" DESC="Broadcom NetXtreme II Gigabit Ethernet PCI-X/PCIE Adapter Driver" SUNW_PRODNAME="SunOS" SUNW_PRODVERS="RELEASE/VERSION" diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/postinstall --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/pkgdefs/BRCMbnx/postinstall Mon Jun 11 19:02:50 2007 -0700 @@ -0,0 +1,88 @@ +#!/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" +# + +PATH="/usr/bin:/usr/sbin:${PATH}" +export PATH + +# +# Driver name +# +DRV=bnx + +# +# Driver support device list +# +DRVALIAS="\"pci14e4,164a\" \ + \"pci14e4,16aa\" \ + \"pci14e4,164c\" \ + \"pci14e4,16ac\"" + +# +# Select the correct add_drv options to execute. +# +if [ "${BASEDIR}" = "" ] +then + BASEDIR=/ +fi +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. + # + # Note: don't use '-b' under this situation. + # See add_drv(1M) for more info. + # + 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 the driver has *not* been previously installed +# 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 '* 0644 root sys' -i "${DRVALIAS}" ${DRV} + if [ $? -ne 0 ]; then + echo "\nFailed add_drv!\n" >&2 + exit 1 + fi +else + echo "${DRV} is already installed!" +fi + +exit 0 diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/postremove --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/pkgdefs/BRCMbnx/postremove Mon Jun 11 19:02:50 2007 -0700 @@ -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 bnx $BD/etc/name_to_major > /dev/null 2>&1 +then + rem_drv -b ${BD} bnx + if [ $? -ne 0 ] + then + exit 1 + fi +fi +exit 0 diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/prototype_com --- a/usr/src/pkgdefs/BRCMbnx/prototype_com Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/pkgdefs/BRCMbnx/prototype_com Mon Jun 11 19:02:50 2007 -0700 @@ -36,15 +36,19 @@ #!= # puts parameter in pkg environment # -# +# packaging files i copyright i pkginfo i depend +i postinstall +i postremove +i i.renameold # # source locations relative to the prototype file # -# BRCMbnx +# Broadcom NetXtreme II NIC driver # -d none kernel 0755 root sys -d none kernel/drv 0755 root sys +d none kernel 0755 root sys +d none kernel/drv 0755 root sys +e renameold kernel/drv/bnx.conf 0644 root sys diff -r 566ce8b5e131 -r 7276384d1aac usr/src/pkgdefs/BRCMbnx/prototype_i386 --- a/usr/src/pkgdefs/BRCMbnx/prototype_i386 Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/pkgdefs/BRCMbnx/prototype_i386 Mon Jun 11 19:02:50 2007 -0700 @@ -44,6 +44,9 @@ # # source locations relative to the prototype file # -# BRCMbnx +# Broadcom NetXtreme II NIC driver # +f none kernel/drv/bnx 0755 root sys d none kernel/drv/amd64 0755 root sys +f none kernel/drv/amd64/bnx 0755 root sys + diff -r 566ce8b5e131 -r 7276384d1aac usr/src/uts/intel/Makefile --- a/usr/src/uts/intel/Makefile Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/uts/intel/Makefile Mon Jun 11 19:02:50 2007 -0700 @@ -40,7 +40,8 @@ # EXPORT DELETE START $(CLOSED_BUILD)LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) -$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(CLOSED_XMODS:lsimega=) +$(CLOSED_BUILD)LINT_CLOSED_XMOD4 = $(CLOSED_XMODS:bnx=) +$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(LINT_CLOSED_XMOD4:lsimega=) $(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:spwr=) $(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:adpu320=) $(CLOSED_BUILD)LINT_XMODLIBS = $(LINT_CLOSED_XMOD1:nge=) diff -r 566ce8b5e131 -r 7276384d1aac usr/src/uts/intel/Makefile.intel.shared --- a/usr/src/uts/intel/Makefile.intel.shared Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/uts/intel/Makefile.intel.shared Mon Jun 11 19:02:50 2007 -0700 @@ -599,6 +599,7 @@ # $(CLOSED_BUILD)CLOSED_XMODS = \ adpu320 \ + bnx \ daplt \ lsimega \ nge \ diff -r 566ce8b5e131 -r 7276384d1aac usr/src/xmod/xmod_files --- a/usr/src/xmod/xmod_files Mon Jun 11 17:48:55 2007 -0700 +++ b/usr/src/xmod/xmod_files Mon Jun 11 19:02:50 2007 -0700 @@ -21,6 +21,8 @@ ../closed/uts/sun/io/wsdrv.conf ../closed/uts/common/io/nge ../closed/uts/intel/nge +../closed/uts/common/io/bnx +../closed/uts/intel/bnx ../closed/uts/intel/io/adpu320 ../closed/uts/intel/adpu320 ../closed/uts/intel/io/lsimega