Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2003 09:41:34 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 40636 for review
Message-ID:  <200310271741.h9RHfYMF003944@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40636

Change 40636 by sam@sam_ebb on 2003/10/27 09:40:43

	IFC @ 40635

Affected files ...

.. //depot/projects/netperf/sys/boot/forth/beastie.4th#3 integrate
.. //depot/projects/netperf/sys/cam/cam_periph.c#5 integrate
.. //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#10 integrate
.. //depot/projects/netperf/sys/conf/NOTES#15 integrate
.. //depot/projects/netperf/sys/conf/files#19 integrate
.. //depot/projects/netperf/sys/conf/kern.pre.mk#5 integrate
.. //depot/projects/netperf/sys/conf/options#14 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi.c#11 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi_acad.c#6 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi_button.c#5 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi_cmbat.c#6 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi_lid.c#4 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi_thermal.c#5 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpivar.h#4 integrate
.. //depot/projects/netperf/sys/dev/drm/drm_sysctl.h#4 integrate
.. //depot/projects/netperf/sys/dev/ep/if_ep.c#7 integrate
.. //depot/projects/netperf/sys/dev/ep/if_ep_eisa.c#4 integrate
.. //depot/projects/netperf/sys/dev/ep/if_ep_isa.c#5 integrate
.. //depot/projects/netperf/sys/dev/ep/if_ep_mca.c#4 integrate
.. //depot/projects/netperf/sys/dev/ep/if_ep_pccard.c#5 integrate
.. //depot/projects/netperf/sys/dev/ep/if_epreg.h#3 integrate
.. //depot/projects/netperf/sys/dev/ep/if_epvar.h#3 integrate
.. //depot/projects/netperf/sys/dev/ex/if_ex_pccard.c#3 integrate
.. //depot/projects/netperf/sys/dev/firewire/firewire.c#7 integrate
.. //depot/projects/netperf/sys/dev/firewire/fwohci_pci.c#4 integrate
.. //depot/projects/netperf/sys/dev/firewire/fwohcivar.h#2 integrate
.. //depot/projects/netperf/sys/dev/hatm/if_hatm_intr.c#4 integrate
.. //depot/projects/netperf/sys/dev/ncv/ncr53c500_pccard.c#3 integrate
.. //depot/projects/netperf/sys/dev/pccard/pccard.c#7 integrate
.. //depot/projects/netperf/sys/dev/pccard/pccarddevs#8 integrate
.. //depot/projects/netperf/sys/dev/pccard/pccarddevs.h#8 integrate
.. //depot/projects/netperf/sys/dev/pccard/pccardvar.h#5 integrate
.. //depot/projects/netperf/sys/dev/puc/puc_pccard.c#3 integrate
.. //depot/projects/netperf/sys/dev/puc/pucdata.c#7 integrate
.. //depot/projects/netperf/sys/dev/sn/if_sn.c#3 integrate
.. //depot/projects/netperf/sys/dev/sn/if_sn_pccard.c#4 integrate
.. //depot/projects/netperf/sys/dev/sn/if_snreg.h#2 integrate
.. //depot/projects/netperf/sys/dev/sn/if_snvar.h#2 integrate
.. //depot/projects/netperf/sys/dev/vx/if_vx.c#3 integrate
.. //depot/projects/netperf/sys/dev/vx/if_vx_eisa.c#3 integrate
.. //depot/projects/netperf/sys/dev/vx/if_vx_pci.c#5 integrate
.. //depot/projects/netperf/sys/dev/vx/if_vxreg.h#3 integrate
.. //depot/projects/netperf/sys/dev/vx/if_vxvar.h#1 branch
.. //depot/projects/netperf/sys/dev/xe/if_xe_pccard.c#5 integrate
.. //depot/projects/netperf/sys/geom/geom_ccd.c#4 integrate
.. //depot/projects/netperf/sys/geom/geom_fox.c#3 integrate
.. //depot/projects/netperf/sys/i386/acpica/acpi_wakecode.S#3 integrate
.. //depot/projects/netperf/sys/i386/conf/NOTES#6 integrate
.. //depot/projects/netperf/sys/i386/i386/mp_clock.c#5 integrate
.. //depot/projects/netperf/sys/i386/i386/mp_machdep.c#7 integrate
.. //depot/projects/netperf/sys/i386/i386/pmap.c#19 integrate
.. //depot/projects/netperf/sys/ia64/ia64/sys_machdep.c#2 integrate
.. //depot/projects/netperf/sys/ia64/include/sysarch.h#2 integrate
.. //depot/projects/netperf/sys/kern/kern_alq.c#3 integrate
.. //depot/projects/netperf/sys/kern/kern_intr.c#2 integrate
.. //depot/projects/netperf/sys/kern/kern_resource.c#2 integrate
.. //depot/projects/netperf/sys/kern/kern_sig.c#7 integrate
.. //depot/projects/netperf/sys/kern/kern_time.c#2 integrate
.. //depot/projects/netperf/sys/kern/sched_ule.c#12 integrate
.. //depot/projects/netperf/sys/kern/subr_bus.c#6 integrate
.. //depot/projects/netperf/sys/kern/vfs_aio.c#4 integrate
.. //depot/projects/netperf/sys/net/if_loop.c#10 integrate
.. //depot/projects/netperf/sys/net/if_types.h#2 integrate
.. //depot/projects/netperf/sys/netinet/icmp6.h#5 integrate
.. //depot/projects/netperf/sys/netinet/in.h#4 integrate
.. //depot/projects/netperf/sys/netinet/in_pcb.h#9 integrate
.. //depot/projects/netperf/sys/netinet/ip6.h#3 integrate
.. //depot/projects/netperf/sys/netinet/ip_dummynet.c#13 edit
.. //depot/projects/netperf/sys/netinet6/frag6.c#7 integrate
.. //depot/projects/netperf/sys/netinet6/icmp6.c#12 integrate
.. //depot/projects/netperf/sys/netinet6/in6.h#4 integrate
.. //depot/projects/netperf/sys/netinet6/in6_pcb.c#11 integrate
.. //depot/projects/netperf/sys/netinet6/in6_var.h#5 integrate
.. //depot/projects/netperf/sys/netinet6/ip6_input.c#14 integrate
.. //depot/projects/netperf/sys/netinet6/ip6_output.c#19 integrate
.. //depot/projects/netperf/sys/netinet6/ip6_var.h#7 integrate
.. //depot/projects/netperf/sys/netinet6/mld6.c#4 integrate
.. //depot/projects/netperf/sys/netinet6/nd6.c#13 integrate
.. //depot/projects/netperf/sys/netinet6/nd6.h#6 integrate
.. //depot/projects/netperf/sys/netinet6/nd6_rtr.c#9 integrate
.. //depot/projects/netperf/sys/netinet6/raw_ip6.c#6 integrate
.. //depot/projects/netperf/sys/netinet6/route6.c#3 integrate
.. //depot/projects/netperf/sys/netinet6/udp6_output.c#5 integrate
.. //depot/projects/netperf/sys/nfsserver/nfs_serv.c#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_internal.h#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_net.c#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_pipe.c#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_process.c#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_vfs.c#2 integrate
.. //depot/projects/netperf/sys/sys/bus.h#4 integrate
.. //depot/projects/netperf/sys/sys/interrupt.h#4 integrate
.. //depot/projects/netperf/sys/sys/time.h#2 integrate
.. //depot/projects/netperf/sys/vm/swap_pager.c#8 integrate
.. //depot/projects/netperf/sys/vm/vm_object.c#8 integrate
.. //depot/projects/netperf/sys/vm/vm_page.h#7 integrate
.. //depot/projects/netperf/sys/vm/vnode_pager.c#10 integrate

Differences ...

==== //depot/projects/netperf/sys/boot/forth/beastie.4th#3 (text+ko) ====

@@ -23,7 +23,7 @@
 \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 \ SUCH DAMAGE.
 \
-\ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.5 2003/09/13 18:35:01 scottl Exp $
+\ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.6 2003/10/27 16:39:49 scottl Exp $
 
 marker task-beastie.4th
 
@@ -209,9 +209,9 @@
 		dup tkey
 		0 25 at-xy
 		dup 32 = if nip 0 swap then
-		dup -1 = if s" boot" evaluate then
-		dup 13 = if s" boot" evaluate then
-		dup bootkey @ = if s" boot" evaluate then
+		dup -1 = if 0 boot then
+		dup 13 = if 0 boot then
+		dup bootkey @ = if 0 boot then
 		dup bootacpikey @ = if
 			acpienabled? if
 				s" acpi_load" unsetenv
@@ -221,7 +221,7 @@
 				s" YES" s" acpi_load" setenv
 				s" 0" s" hint.acpi.0.disabled" setenv
 			then
-			s" boot" evaluate
+			0 boot
 		then
 		dup bootsafekey @ = if
 			s" arch-i386" environment? if
@@ -233,15 +233,15 @@
 			s" 0" s" hw.ata.atapi_dma" setenv
 			s" 0" s" hw.ata.wc" setenv
 			s" 0" s" hw.eisa_slots" setenv
-			s" boot" evaluate
+			0 boot
 		then
 		dup bootverbosekey @ = if
 			s" YES" s" boot_verbose" setenv
-			s" boot" evaluate
+			0 boot
 		then
 		dup bootsinglekey @ = if
 			s" YES" s" boot_single" setenv
-			s" boot" evaluate
+			0 boot
 		then
 		dup escapekey @ = if
 			2drop

==== //depot/projects/netperf/sys/cam/cam_periph.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.54 2003/10/18 11:01:11 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.55 2003/10/27 06:15:54 ken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -994,14 +994,26 @@
 		scsi_cmd = (struct scsi_start_stop_unit *)
 				&done_ccb->csio.cdb_io.cdb_bytes;
 		if (sense != 0) {
+			struct ccb_getdev cgd;
 			struct scsi_sense_data *sense;
 			int    error_code, sense_key, asc, ascq;	
+			scsi_sense_action err_action;
 
 			sense = &done_ccb->csio.sense_data;
 			scsi_extract_sense(sense, &error_code, 
 					   &sense_key, &asc, &ascq);
 
 			/*
+			 * Grab the inquiry data for this device.
+			 */
+			xpt_setup_ccb(&cgd.ccb_h, done_ccb->ccb_h.path,
+				      /*priority*/ 1);
+			cgd.ccb_h.func_code = XPT_GDEV_TYPE;
+			xpt_action((union ccb *)&cgd);
+			err_action = scsi_error_action(&done_ccb->csio,
+						       &cgd.inq_data, 0);
+
+			/*
 	 		 * If the error is "invalid field in CDB", 
 			 * and the load/eject flag is set, turn the 
 			 * flag off and try again.  This is just in 
@@ -1028,12 +1040,15 @@
 
 				xpt_action(done_ccb);
 
-			} else if (done_ccb->ccb_h.retry_count > 1) {
+			} else if ((done_ccb->ccb_h.retry_count > 1)
+				&& ((err_action & SS_MASK) != SS_FAIL)) {
+
 				/*
 				 * In this case, the error recovery
 				 * command failed, but we've got 
 				 * some retries left on it.  Give
-				 * it another try.
+				 * it another try unless this is an
+				 * unretryable error.
 				 */
 
 				/* set the timeout to .5 sec */

==== //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#10 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.87 2003/10/18 17:24:05 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.88 2003/10/27 06:15:55 ken Exp $");
 
 #include "opt_cd.h"
 
@@ -2856,20 +2856,6 @@
              
 	ccb = cdgetccb(periph, /* priority */ 1);
 
-	scsi_test_unit_ready(&ccb->csio, 0, cddone,
-	    MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, 1000);
-	ccb->ccb_h.ccb_bp = NULL;
-
-	error = cam_periph_runccb(ccb, NULL,
-				  /*cam_flags*/0,
-				  /*sense_flags*/SF_RETRY_UA,
-				  softc->disk.d_devstat);
-
-	if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-		xpt_release_ccb(ccb);
-		return (ENXIO);
-	}
-
 	rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), 
 			  M_TEMP, M_WAITOK);
 

==== //depot/projects/netperf/sys/conf/NOTES#15 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1180 2003/10/24 15:44:08 simokawa Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1182 2003/10/27 11:19:08 harti Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -29,11 +29,11 @@
 # comment on the same line if possible.  Very detailed descriptions of
 # devices and subsystems belong in manpages.
 #
-# A space followed by a tab separates 'option' from an option name.  Two
+# A space followed by a tab separates 'options' from an option name.  Two
 # spaces followed by a tab separate 'device' from a device name.  Comments
 # after an option or device should use one space after the comment character.
 # To comment out a negative option that disables code and thus should not be
-# enabled for LINT builds, precede 'option' with "#!".
+# enabled for LINT builds, precede 'options' with "#!".
 #
 
 #
@@ -452,7 +452,10 @@
 options		NETGRAPH_ATM_ATMPIF
 
 # NgATM - Netgraph ATM
-options		NGATM_ATM
+options 	NGATM_ATM
+options 	NGATM_ATMBASE
+options 	NGATM_SSCOP
+options 	NGATM_SSCFU
 
 device		mn	# Munich32x/Falc54 Nx64kbit/sec cards.
 device		lmc	# tulip based LanMedia WAN cards

==== //depot/projects/netperf/sys/conf/files#19 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.838 2003/10/24 15:44:08 simokawa Exp $
+# $FreeBSD: src/sys/conf/files,v 1.841 2003/10/27 11:19:08 harti Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1370,7 +1370,13 @@
 netatm/uni/unisig_vc_state.c	optional atm_uni atm_core
 netgraph/atm/atmpif/ng_atmpif.c	optional netgraph_atm_atmpif
 netgraph/atm/atmpif/ng_atmpif_harp.c	optional netgraph_atm_atmpif
-netgraph/atm/ng_atm.c	optional ngatm_atm
+netgraph/atm/ngatmbase.c			optional ngatm_atmbase
+contrib/ngatm/netnatm/misc/unimsg_common.c	optional ngatm_atmbase
+netgraph/atm/ng_atm.c		optional ngatm_atm
+netgraph/atm/sscfu/ng_sscfu.c		optional ngatm_sscfu
+contrib/ngatm/netnatm/saal/saal_sscfu.c	optional ngatm_sscfu
+netgraph/atm/sscop/ng_sscop.c		optional ngatm_sscop
+contrib/ngatm/netnatm/saal/saal_sscop.c	optional ngatm_sscop
 netgraph/ng_UI.c	optional netgraph_UI
 netgraph/ng_async.c	optional netgraph_async
 netgraph/ng_base.c	optional netgraph

==== //depot/projects/netperf/sys/conf/kern.pre.mk#5 (text+ko) ====

@@ -3,7 +3,7 @@
 # Unified Makefile for building kernels.  This includes all the definitions
 # that need to be included before %BEFORE_DEPEND
 #
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.34 2003/08/22 15:41:44 imp Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.35 2003/10/27 11:19:08 harti Exp $
 #
 
 # Can be overridden by makeoptions or /etc/make.conf
@@ -35,6 +35,9 @@
 # ... and the same for Atheros HAL
 INCLUDES+= -I$S/contrib/dev/ath -I$S/contrib/dev/ath/freebsd
 
+# ... and the same for the NgATM stuff
+INCLUDES+= -I$S/contrib/ngatm
+
 COPTS=	${INCLUDES} -D_KERNEL -include opt_global.h
 CFLAGS=	${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -fno-common
 

==== //depot/projects/netperf/sys/conf/options#14 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.417 2003/10/24 15:44:08 simokawa Exp $
+# $FreeBSD: src/sys/conf/options,v 1.418 2003/10/27 11:19:08 harti Exp $
 #
 #        On the handling of kernel options
 #
@@ -404,6 +404,9 @@
 
 # NgATM options
 NGATM_ATM		opt_netgraph.h
+NGATM_ATMBASE		opt_netgraph.h
+NGATM_SSCOP		opt_netgraph.h
+NGATM_SSCFU		opt_netgraph.h
 
 # DRM options
 DRM_DEBUG		opt_drm.h

==== //depot/projects/netperf/sys/dev/acpica/acpi.c#11 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.105 2003/10/19 05:56:59 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.106 2003/10/25 05:03:24 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -51,6 +51,7 @@
 #include "acpi.h"
 #include <dev/acpica/acpivar.h>
 #include <dev/acpica/acpiio.h>
+#include <contrib/dev/acpica/acnamesp.h>
 
 MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices");
 
@@ -2054,6 +2055,27 @@
     return (error);
 }
 
+/* Inform devctl(4) when we receive a Notify. */
+void
+acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, uint8_t notify)
+{
+    char		notify_buf[16];
+    ACPI_BUFFER		handle_buf;
+    ACPI_STATUS		status;
+
+    if (subsystem == NULL)
+	return;
+
+    handle_buf.Pointer = NULL;
+    handle_buf.Length = ACPI_ALLOCATE_BUFFER;
+    status = AcpiNsHandleToPathname(h, &handle_buf);
+    if (ACPI_FAILURE(status))
+	return;
+    snprintf(notify_buf, sizeof(notify_buf), "notify=0x%02x", notify);
+    devctl_notify("ACPI", subsystem, handle_buf.Pointer, notify_buf);
+    AcpiOsFree(handle_buf.Pointer);
+}
+
 #ifdef ACPI_DEBUG
 /*
  * Support for parsing debug options from the kernel environment.

==== //depot/projects/netperf/sys/dev/acpica/acpi_acad.c#6 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.19 2003/09/26 05:24:55 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.20 2003/10/25 05:03:24 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -39,7 +39,7 @@
 #include <sys/conf.h>
 #include <sys/power.h>
 
-#include  "acpi.h"
+#include "acpi.h"
 #include <dev/acpica/acpivar.h>
 #include <dev/acpica/acpiio.h>
  
@@ -108,6 +108,8 @@
 				POWER_PROFILE_ECONOMY);
 	ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
 		    "%s Line\n", sc->status ? "On" : "Off");
+
+	acpi_UserNotify("ACAD", h, sc->status);
     }
 }
 

==== //depot/projects/netperf/sys/dev/acpica/acpi_button.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.16 2003/09/22 04:50:29 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.17 2003/10/25 05:03:24 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -175,6 +175,8 @@
     if (acpi_sc == NULL)
 	return_VOID;
 
+    acpi_UserNotify("Button", sc->button_handle, sc->button_type);
+
     switch (sc->button_type) {
     case ACPI_POWER_BUTTON:
 	ACPI_VPRINT(sc->button_dev, acpi_sc, "power button pressed\n");
@@ -202,6 +204,8 @@
     if (acpi_sc == NULL)
 	return_VOID;
 
+    acpi_UserNotify("Button", sc->button_handle, sc->button_type);
+
     switch (sc->button_type) {
     case ACPI_POWER_BUTTON:
 	ACPI_VPRINT(sc->button_dev, acpi_sc, "wakeup by power button\n");

==== //depot/projects/netperf/sys/dev/acpica/acpi_cmbat.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.25 2003/09/26 05:24:55 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.26 2003/10/25 05:03:24 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -295,6 +295,8 @@
     if ((sc = device_get_softc(dev)) == NULL)
 	return;
 
+    acpi_UserNotify("CMBAT", h, notify);
+
     switch (notify) {
     case ACPI_NOTIFY_DEVICE_CHECK:
     case ACPI_BATTERY_BST_CHANGE:

==== //depot/projects/netperf/sys/dev/acpica/acpi_lid.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_lid.c,v 1.14 2003/08/28 16:06:30 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_lid.c,v 1.15 2003/10/25 05:03:24 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -54,7 +54,8 @@
 static int	acpi_lid_suspend(device_t dev);
 static int	acpi_lid_resume(device_t dev);
 static void	acpi_lid_notify_status_changed(void *arg);
-static void 	acpi_lid_notify_handler(ACPI_HANDLE h,UINT32 notify, void *context);
+static void 	acpi_lid_notify_handler(ACPI_HANDLE h, UINT32 notify,
+					void *context);
 
 static device_method_t acpi_lid_methods[] = {
     /* Device interface */
@@ -149,6 +150,8 @@
     ACPI_VPRINT(sc->lid_dev, acpi_sc, "Lid %s\n",
 		sc->lid_status ? "opened" : "closed");
 
+    acpi_UserNotify("Lid", sc->lid_handle, sc->lid_status);
+
     if (sc->lid_status == 0)
 	EVENTHANDLER_INVOKE(acpi_sleep_event, acpi_sc->acpi_lid_switch_sx);
     else
@@ -178,4 +181,3 @@
 
     return_VOID;
 }
-

==== //depot/projects/netperf/sys/dev/acpica/acpi_thermal.c#5 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.32 2003/09/26 05:24:55 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.33 2003/10/25 05:03:24 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -727,6 +727,8 @@
 	break;
     }
 
+    acpi_UserNotify("Thermal", h, notify);
+
     return_VOID;
 }
 

==== //depot/projects/netperf/sys/dev/acpica/acpivar.h#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.45 2003/09/10 22:06:41 marcel Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.46 2003/10/25 05:03:24 njl Exp $
  */
 
 #include "bus_if.h"
@@ -188,6 +188,8 @@
 extern ACPI_STATUS	acpi_SetSleepState(struct acpi_softc *sc, int state);
 extern ACPI_STATUS	acpi_Enable(struct acpi_softc *sc);
 extern ACPI_STATUS	acpi_Disable(struct acpi_softc *sc);
+extern void		acpi_UserNotify(const char *subsystem, ACPI_HANDLE h,
+					uint8_t notify);
 
 struct acpi_parse_resource_set {
     void	(*set_init)(device_t dev, void **context);

==== //depot/projects/netperf/sys/dev/drm/drm_sysctl.h#4 (text+ko) ====

@@ -21,7 +21,7 @@
  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/drm/drm_sysctl.h,v 1.5 2003/10/24 01:48:16 anholt Exp $
+ * $FreeBSD: src/sys/dev/drm/drm_sysctl.h,v 1.6 2003/10/24 21:45:21 anholt Exp $
  */
 
 #ifdef __FreeBSD__
@@ -226,12 +226,11 @@
 	 * copy of the whole structure and the relevant data from buflist.
 	 */
 	DRM_LOCK();
-	DRM_SPINLOCK(&dev->dma_lock);
 	if (dma == NULL) {
-		DRM_SPINUNLOCK(&dev->dma_lock);
 		DRM_UNLOCK();
 		return 0;
 	}
+	DRM_SPINLOCK(&dev->dma_lock);
 	tempdma = *dma;
 	templists = DRM(alloc)(sizeof(int) * dma->buf_count, DRM_MEM_BUFS);
 	for (i = 0; i < dma->buf_count; i++)

==== //depot/projects/netperf/sys/dev/ep/if_ep.c#7 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.124 2003/10/23 05:33:53 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.127 2003/10/26 22:28:20 imp Exp $");
 
 /*
  *	Modified from the FreeBSD 1.1.5.1 version by:
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.124 2003/10/23 05:33:53 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ep/if_ep.c,v 1.127 2003/10/26 22:28:20 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,10 +90,13 @@
 {IFM_10_T, IFM_10_5, IFM_NONE, IFM_10_2, IFM_NONE};
 
 /* if functions */
-static void ep_if_init(void *);
-static int ep_if_ioctl(struct ifnet *, u_long, caddr_t);
-static void ep_if_start(struct ifnet *);
-static void ep_if_watchdog(struct ifnet *);
+static void epinit(void *);
+static int epioctl(struct ifnet *, u_long, caddr_t);
+static void epstart(struct ifnet *);
+static void epwatchdog(struct ifnet *);
+
+static void epstart_locked(struct ifnet *);
+static void epinit_locked(struct ep_softc *);
 
 /* if_media functions */
 static int ep_ifmedia_upd(struct ifnet *);
@@ -134,13 +137,13 @@
 	if (eeprom_rdy(sc))
 		return (ENXIO);
 
-	EP_WRITE_2(sc, EP_W0_EEPROM_COMMAND,
+	CSR_WRITE_2(sc, EP_W0_EEPROM_COMMAND,
 	    (EEPROM_CMD_RD << sc->epb.cmd_off) | offset);
 
 	if (eeprom_rdy(sc))
 		return (ENXIO);
 
-	(*result) = EP_READ_2(sc, EP_W0_EEPROM_DATA);
+	(*result) = CSR_READ_2(sc, EP_W0_EEPROM_DATA);
 
 	return (0);
 }
@@ -155,7 +158,7 @@
 
 	macaddr = (u_int16_t *) addr;
 
-	GO_WINDOW(0);
+	GO_WINDOW(sc, 0);
 	for (i = EEPROM_NODE_ADDR_0; i <= EEPROM_NODE_ADDR_2; i++) {
 		error = get_e(sc, i, &result);
 		if (error)
@@ -200,7 +203,7 @@
 	sc->ep_connectors = 0;
 	sc->ep_connector = 0;
 
-	GO_WINDOW(0);
+	GO_WINDOW(sc, 0);
 	sc->epb.cmd_off = 0;
 
 	error = get_e(sc, EEPROM_PROD_ID, &result);
@@ -222,8 +225,8 @@
 {
 	u_int16_t config;
 
-	GO_WINDOW(0);
-	config = EP_READ_2(sc, EP_W0_CONFIG_CTRL);
+	GO_WINDOW(sc, 0);
+	config = CSR_READ_2(sc, EP_W0_CONFIG_CTRL);
 	if (config & IS_AUI)
 		sc->ep_connectors |= AUI;
 	if (config & IS_BNC)
@@ -240,7 +243,7 @@
 	 * The cards that require something different can override
 	 * this later on.
 	 */
-	sc->ep_connector = EP_READ_2(sc, EP_W0_ADDRESS_CFG) >> ACF_CONNECTOR_BITS;
+	sc->ep_connector = CSR_READ_2(sc, EP_W0_ADDRESS_CFG) >> ACF_CONNECTOR_BITS;
 }
 
 void
@@ -267,19 +270,20 @@
 	int error;
 
 	sc->gone = 0;
-
+	EP_LOCK_INIT(sc);
 	error = ep_get_macaddr(sc, (u_char *)&sc->arpcom.ac_enaddr);
 	if (error) {
 		device_printf(sc->dev, "Unable to get Ethernet address!\n");
+		EP_LOCK_DESTORY(sc);
 		return (ENXIO);
 	}
 	/*
 	 * Setup the station address
 	 */
 	p = (u_short *)&sc->arpcom.ac_enaddr;
-	GO_WINDOW(2);
+	GO_WINDOW(sc, 2);
 	for (i = 0; i < 3; i++)
-		EP_WRITE_2(sc, EP_W2_ADDR_0 + (i * 2), ntohs(p[i]));
+		CSR_WRITE_2(sc, EP_W2_ADDR_0 + (i * 2), ntohs(p[i]));
 
 	device_printf(sc->dev, "Ethernet address %6D\n",
 	    sc->arpcom.ac_enaddr, ":");
@@ -293,10 +297,10 @@
 	ifp->if_mtu = ETHERMTU;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_output = ether_output;
-	ifp->if_start = ep_if_start;
-	ifp->if_ioctl = ep_if_ioctl;
-	ifp->if_watchdog = ep_if_watchdog;
-	ifp->if_init = ep_if_init;
+	ifp->if_start = epstart;
+	ifp->if_ioctl = epioctl;
+	ifp->if_watchdog = epwatchdog;
+	ifp->if_init = epinit;
 	ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
 
 	if (!sc->epb.mii_trans) {
@@ -344,6 +348,7 @@
 	struct ifnet *ifp;
 
 	sc = device_get_softc(dev);
+	EP_ASSERT_UNLOCKED(sc);
 	ifp = &sc->arpcom.ac_if;
 
 	if (sc->gone) {
@@ -358,73 +363,82 @@
 
 	sc->gone = 1;
 	ep_free(dev);
+	EP_LOCK_DESTORY(sc);
 
 	return (0);
 }
 
+static void
+epinit(void *xsc)
+{
+	struct ep_softc *sc = xsc;
+	EP_LOCK(sc);
+	epinit_locked(sc);
+	EP_UNLOCK(sc);
+}
+
 /*
  * The order in here seems important. Otherwise we may not receive
  * interrupts. ?!
  */
 static void
-ep_if_init(void *xsc)
+epinit_locked(struct ep_softc *sc)
 {
-	struct ep_softc *sc = xsc;
 	struct ifnet *ifp = &sc->arpcom.ac_if;
-	int s, i;
+	int i;
 
 	if (sc->gone)
 		return;
 
-	s = splimp();
-	while (EP_READ_2(sc, EP_STATUS) & S_COMMAND_IN_PROGRESS);
+	EP_ASSERT_LOCKED(sc);
+	EP_BUSY_WAIT(sc);
 
-	GO_WINDOW(0);
-	EP_WRITE_2(sc, EP_COMMAND, STOP_TRANSCEIVER);
-	GO_WINDOW(4);
-	EP_WRITE_2(sc, EP_W4_MEDIA_TYPE, DISABLE_UTP);
-	GO_WINDOW(0);
+	GO_WINDOW(sc, 0);
+	CSR_WRITE_2(sc, EP_COMMAND, STOP_TRANSCEIVER);
+	GO_WINDOW(sc, 4);
+	CSR_WRITE_2(sc, EP_W4_MEDIA_TYPE, DISABLE_UTP);
+	GO_WINDOW(sc, 0);
 
 	/* Disable the card */
-	EP_WRITE_2(sc, EP_W0_CONFIG_CTRL, 0);
+	CSR_WRITE_2(sc, EP_W0_CONFIG_CTRL, 0);
 
 	/* Enable the card */
-	EP_WRITE_2(sc, EP_W0_CONFIG_CTRL, ENABLE_DRQ_IRQ);
+	CSR_WRITE_2(sc, EP_W0_CONFIG_CTRL, ENABLE_DRQ_IRQ);
 
-	GO_WINDOW(2);
+	GO_WINDOW(sc, 2);
 
 	/* Reload the ether_addr. */
 	for (i = 0; i < 6; i++)
-		EP_WRITE_1(sc, EP_W2_ADDR_0 + i, sc->arpcom.ac_enaddr[i]);
+		CSR_WRITE_1(sc, EP_W2_ADDR_0 + i, sc->arpcom.ac_enaddr[i]);
 
-	EP_WRITE_2(sc, EP_COMMAND, RX_RESET);
-	EP_WRITE_2(sc, EP_COMMAND, TX_RESET);
-	while (EP_READ_2(sc, EP_STATUS) & S_COMMAND_IN_PROGRESS);
+	CSR_WRITE_2(sc, EP_COMMAND, RX_RESET);
+	CSR_WRITE_2(sc, EP_COMMAND, TX_RESET);
+	EP_BUSY_WAIT(sc);
 
 	/* Window 1 is operating window */
-	GO_WINDOW(1);
+	GO_WINDOW(sc, 1);
 	for (i = 0; i < 31; i++)
-		EP_READ_1(sc, EP_W1_TX_STATUS);
+		CSR_READ_1(sc, EP_W1_TX_STATUS);
 
 	/* get rid of stray intr's */
-	EP_WRITE_2(sc, EP_COMMAND, ACK_INTR | 0xff);
+	CSR_WRITE_2(sc, EP_COMMAND, ACK_INTR | 0xff);
 
-	EP_WRITE_2(sc, EP_COMMAND, SET_RD_0_MASK | S_5_INTS);
+	CSR_WRITE_2(sc, EP_COMMAND, SET_RD_0_MASK | S_5_INTS);
 
-	EP_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK | S_5_INTS);
+	CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK | S_5_INTS);
 
 	if (ifp->if_flags & IFF_PROMISC)
-		EP_WRITE_2(sc, EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
-		    FIL_GROUP | FIL_BRDCST | FIL_ALL);
+		CSR_WRITE_2(sc, EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
+		    FIL_MULTICAST | FIL_BRDCST | FIL_PROMISC);
 	else
-		EP_WRITE_2(sc, EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
-		    FIL_GROUP | FIL_BRDCST);
+		CSR_WRITE_2(sc, EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
+		    FIL_MULTICAST | FIL_BRDCST);
 
 	if (!sc->epb.mii_trans)
 		ep_ifmedia_upd(ifp);
 
-	EP_WRITE_2(sc, EP_COMMAND, RX_ENABLE);
-	EP_WRITE_2(sc, EP_COMMAND, TX_ENABLE);
+	CSR_WRITE_2(sc, EP_COMMAND, RX_ENABLE);
+	CSR_WRITE_2(sc, EP_COMMAND, TX_ENABLE);
 
 	ifp->if_flags |= IFF_RUNNING;
 	ifp->if_flags &= ~IFF_OACTIVE;	/* just in case */
@@ -438,8 +452,8 @@
 		m_freem(sc->top);
 		sc->top = sc->mcur = 0;
 	}
-	EP_WRITE_2(sc, EP_COMMAND, SET_RX_EARLY_THRESH | RX_INIT_EARLY_THRESH);
-	EP_WRITE_2(sc, EP_COMMAND, SET_TX_START_THRESH | 16);
+	CSR_WRITE_2(sc, EP_COMMAND, SET_RX_EARLY_THRESH | RX_INIT_EARLY_THRESH);
+	CSR_WRITE_2(sc, EP_COMMAND, SET_TX_START_THRESH | 16);
 
 	/*
 	 * Store up a bunch of mbuf's for use later. (MAX_MBS).
@@ -447,28 +461,35 @@
 	 * called from intr or somewhere else.
 	 */
 
-	GO_WINDOW(1);
-	ep_if_start(ifp);
+	GO_WINDOW(sc, 1);
+	epstart_locked(ifp);
+}
 
-	splx(s);
+static void
+epstart(struct ifnet *ifp)
+{
+	struct ep_softc *sc;
+	sc = ifp->if_softc;
+	EP_LOCK(sc);
+	epstart_locked(ifp);
+	EP_UNLOCK(sc);
 }
-
+	
 static void
-ep_if_start(struct ifnet *ifp)
+epstart_locked(struct ifnet *ifp)
 {
 	struct ep_softc *sc;
 	u_int len;
 	struct mbuf *m, *m0;
-	int s, pad;
+	int pad;
 
 	sc = ifp->if_softc;
 	if (sc->gone)
 		return;
-
-	while (EP_READ_2(sc, EP_STATUS) & S_COMMAND_IN_PROGRESS);
+	EP_ASSERT_LOCKED(sc);
+	EP_BUSY_WAIT(sc);
 	if (ifp->if_flags & IFF_OACTIVE)
 		return;
-
 startagain:
 	/* Sneak a peek at the next packet */
 	IF_DEQUEUE(&ifp->if_snd, m0);
@@ -490,50 +511,50 @@
 		m_freem(m0);
 		goto readcheck;
 	}
-	if (EP_READ_2(sc, EP_W1_FREE_TX) < len + pad + 4) {
+	if (CSR_READ_2(sc, EP_W1_FREE_TX) < len + pad + 4) {
 		/* no room in FIFO */
-		EP_WRITE_2(sc, EP_COMMAND, SET_TX_AVAIL_THRESH | (len + pad + 4));
+		CSR_WRITE_2(sc, EP_COMMAND, SET_TX_AVAIL_THRESH | (len + pad + 4));
 		/* make sure */
-		if (EP_READ_2(sc, EP_W1_FREE_TX) < len + pad + 4) {
+		if (CSR_READ_2(sc, EP_W1_FREE_TX) < len + pad + 4) {
 			ifp->if_flags |= IFF_OACTIVE;
 			IF_PREPEND(&ifp->if_snd, m0);
-			return;
+			goto done;
 		}
 	} else
-		EP_WRITE_2(sc, EP_COMMAND,
+		CSR_WRITE_2(sc, EP_COMMAND,
 		    SET_TX_AVAIL_THRESH | EP_THRESH_DISABLE);
 
-	s = splhigh();
+	/* XXX 4.x and earlier would splhigh here */
 
-	EP_WRITE_2(sc, EP_W1_TX_PIO_WR_1, len);
+	CSR_WRITE_2(sc, EP_W1_TX_PIO_WR_1, len);
 	/* Second dword meaningless */
-	EP_WRITE_2(sc, EP_W1_TX_PIO_WR_1, 0x0);
+	CSR_WRITE_2(sc, EP_W1_TX_PIO_WR_1, 0x0);
 
 	if (EP_FTST(sc, F_ACCESS_32_BITS)) {
 		for (m = m0; m != NULL; m = m->m_next) {
 			if (m->m_len > 3)
-				EP_WRITE_MULTI_4(sc, EP_W1_TX_PIO_WR_1,
+				CSR_WRITE_MULTI_4(sc, EP_W1_TX_PIO_WR_1,
 				    mtod(m, uint32_t *), m->m_len / 4);
 			if (m->m_len & 3)
-				EP_WRITE_MULTI_1(sc, EP_W1_TX_PIO_WR_1,
+				CSR_WRITE_MULTI_1(sc, EP_W1_TX_PIO_WR_1,
 				    mtod(m, uint8_t *)+(m->m_len & (~3)),
 				    m->m_len & 3);
 		}
 	} else {
 		for (m = m0; m != NULL; m = m->m_next) {
 			if (m->m_len > 1)
-				EP_WRITE_MULTI_2(sc, EP_W1_TX_PIO_WR_1,
+				CSR_WRITE_MULTI_2(sc, EP_W1_TX_PIO_WR_1,
 				    mtod(m, uint16_t *), m->m_len / 2);
 			if (m->m_len & 1)
-				EP_WRITE_1(sc, EP_W1_TX_PIO_WR_1,
+				CSR_WRITE_1(sc, EP_W1_TX_PIO_WR_1,
 				    *(mtod(m, uint8_t *)+m->m_len - 1));
 		}
 	}
 
 	while (pad--)
-		EP_WRITE_1(sc, EP_W1_TX_PIO_WR_1, 0);	/* Padding */
+		CSR_WRITE_1(sc, EP_W1_TX_PIO_WR_1, 0);	/* Padding */
 
-	splx(s);
+	/* XXX and drop splhigh here */
 
 	BPF_MTAP(ifp, m0);
 
@@ -546,16 +567,18 @@
 	 * the tiny RX fifo.
 	 */
 readcheck:
-	if (EP_READ_2(sc, EP_W1_RX_STATUS) & RX_BYTES_MASK) {
+	if (CSR_READ_2(sc, EP_W1_RX_STATUS) & RX_BYTES_MASK) {
 		/*
 		 * we check if we have packets left, in that case
 		 * we prepare to come back later
 		 */
 		if (ifp->if_snd.ifq_head)
-			EP_WRITE_2(sc, EP_COMMAND, SET_TX_AVAIL_THRESH | 8);
-		return;
+			CSR_WRITE_2(sc, EP_COMMAND, SET_TX_AVAIL_THRESH | 8);
+		goto done;
 	}
 	goto startagain;
+done:;
+	return;
 }
 
 void
@@ -564,29 +587,28 @@
 	struct ep_softc *sc;
 	int status;
 	struct ifnet *ifp;
-	int x;
 
-	x = splbio();
-
 	sc = (struct ep_softc *) arg;
+	EP_LOCK(sc);
+	/* XXX 4.x splbio'd here to reduce interruptability */
 
 	/*
 	 * quick fix: Try to detect an interrupt when the card goes away.
 	 */
-	if (sc->gone || EP_READ_2(sc, EP_STATUS) == 0xffff) {
-		splx(x);
+	if (sc->gone || CSR_READ_2(sc, EP_STATUS) == 0xffff) {
+		EP_UNLOCK(sc);
 		return;
 	}
 	ifp = &sc->arpcom.ac_if;
 
-	EP_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK);	/* disable all Ints */
+	CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK);	/* disable all Ints */
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310271741.h9RHfYMF003944>