Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2004 14:53:57 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 60065 for review
Message-ID:  <200408191453.i7JErvaY035904@repoman.freebsd.org>

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

Change 60065 by rwatson@rwatson_tislabs on 2004/08/19 14:53:14

	Integrate netperf_socket:
	
	More ACPI stuff.
	Profiling of hashing for mutexes.
	Various build fixen.
	More GEOM stuff.
	More aic stuff.
	Consistency and abstraction improvements for sleep queues.
	FS_BAD2_MAGIC now FS_BAD_MAGIC.
	
	Loop back of UNP_UNLOCK_ASSERT() from rwatson_netperf.
	Loop back of inpcb assertion fixups.
	Loop back of udp_send()/udp_output() locking push-down and cleanup.

Affected files ...

.. //depot/projects/netperf_socket/sys/Makefile#3 integrate
.. //depot/projects/netperf_socket/sys/boot/common/help.common#5 integrate
.. //depot/projects/netperf_socket/sys/boot/common/loader.8#7 integrate
.. //depot/projects/netperf_socket/sys/boot/powerpc/loader/Makefile#6 integrate
.. //depot/projects/netperf_socket/sys/conf/NOTES#37 integrate
.. //depot/projects/netperf_socket/sys/conf/options#27 integrate
.. //depot/projects/netperf_socket/sys/conf/options.pc98#6 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/aclocal.h#5 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#38 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#10 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpiio.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#21 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_isa.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.h#6 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/firewire/if_fwe.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/twa/twa_freebsd.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/twa/twa_reg.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/vx/if_vx.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/vx/if_vx_eisa.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/vx/if_vx_pci.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/vx/if_vxreg.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/vx/if_vxvar.h#2 integrate
.. //depot/projects/netperf_socket/sys/geom/geom_slice.c#7 integrate
.. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#7 integrate
.. //depot/projects/netperf_socket/sys/geom/nop/g_nop.c#7 integrate
.. //depot/projects/netperf_socket/sys/geom/raid3/g_raid3.c#2 integrate
.. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_drive.c#9 integrate
.. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_init.c#3 integrate
.. //depot/projects/netperf_socket/sys/geom/vinum/geom_vinum_state.c#3 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_condvar.c#7 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_mutex.c#11 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_synch.c#16 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_thread.c#24 integrate
.. //depot/projects/netperf_socket/sys/kern/subr_sleepqueue.c#9 integrate
.. //depot/projects/netperf_socket/sys/kern/uipc_usrreq.c#25 integrate
.. //depot/projects/netperf_socket/sys/modules/Makefile#18 integrate
.. //depot/projects/netperf_socket/sys/modules/linprocfs/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/in_pcb.c#15 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_input.c#22 integrate
.. //depot/projects/netperf_socket/sys/netinet/udp_usrreq.c#13 integrate
.. //depot/projects/netperf_socket/sys/sys/param.h#25 integrate
.. //depot/projects/netperf_socket/sys/sys/proc.h#23 integrate
.. //depot/projects/netperf_socket/sys/sys/sleepqueue.h#4 integrate
.. //depot/projects/netperf_socket/sys/ufs/ffs/fs.h#5 integrate
.. //depot/projects/netperf_socket/sys/vm/vnode_pager.c#5 integrate

Differences ...

==== //depot/projects/netperf_socket/sys/Makefile#3 (text+ko) ====

@@ -1,9 +1,11 @@
-# $FreeBSD: src/sys/Makefile,v 1.30 2004/05/16 00:19:12 cognet Exp $
+# $FreeBSD: src/sys/Makefile,v 1.31 2004/08/19 09:54:28 des Exp $
 
 # The boot loader
+.if !defined(NO_BOOT)
 .if ${MACHINE_ARCH} != "arm"
 SUBDIR=	boot
 .endif
+.endif
 
 # Loadable kernel modules
 .if defined(MODULES_WITH_WORLD)

==== //depot/projects/netperf_socket/sys/boot/common/help.common#5 (text+ko) ====

@@ -277,13 +277,6 @@
 		this option provides a hint as to the actual size of
 		system memory (which will be tested before use).
 
-	set hw.pci.allow_unsupported_io_range=<value>
-
-		Allow the PCI Bridge to pass through an unsupported
-		memory range assigned by the BIOS.
-
-		value is 0 (default) or non-zero to enable.
-
 	set hw.pci.enable_io_modes=<value>
 
 		Enable PCI resources which are left off by some BIOSes

==== //depot/projects/netperf_socket/sys/boot/common/loader.8#7 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.64 2004/07/08 22:35:33 brian Exp $
+.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.66 2004/08/18 09:39:24 maxim Exp $
 .\"
-.Dd January 27, 2004
+.Dd August 18, 2004
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -426,10 +426,6 @@
 enabled correctly by the device driver.
 Tunable value set to ON (1) by default, but this may cause problems
 with some peripherals.
-.It Va hw.pci.allow_unsupported_io_range
-Allow the PCI bridge to pass through an unsupported memory range
-assigned by the BIOS.
-Tunable value set to OFF (0) by default.
 .It Va kern.maxusers
 Set the size of a number of statically allocated system tables; see
 .Xr tuning 7

==== //depot/projects/netperf_socket/sys/boot/powerpc/loader/Makefile#6 (text+ko) ====

@@ -1,7 +1,6 @@
-# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.16 2004/08/16 15:45:25 marius Exp $
+# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.17 2004/08/18 11:31:00 grehan Exp $
 
 PROG=		loader
-NOMAN=
 NEWVERSWHAT=	"bootstrap loader" "Open Firmware/PowerPC"
 BINDIR?=	/boot
 INSTALLFLAGS=	-b

==== //depot/projects/netperf_socket/sys/conf/NOTES#37 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1261 2004/08/16 06:36:20 pjd Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1262 2004/08/19 06:38:26 jmg Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -222,6 +222,10 @@
 # MUTEX_PROFILING - Profiling mutual exclusion locks (mutexes).  See
 # MUTEX_PROFILING(9) for details.
 options 	MUTEX_PROFILING
+# Set the number of buffers and the hash size.  The hash size MUST be larger
+# than the number of buffers.  Hash size should be prime.
+options		MPROF_BUFFERS="1536"
+options		MPROF_HASH_SIZE="1543"
 
 # Profiling for internal hash tables.
 options 	SLEEPQUEUE_PROFILING

==== //depot/projects/netperf_socket/sys/conf/options#27 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.475 2004/08/17 22:05:53 andre Exp $
+# $FreeBSD: src/sys/conf/options,v 1.476 2004/08/19 06:38:26 jmg Exp $
 #
 #        On the handling of kernel options
 #
@@ -108,6 +108,8 @@
 MAC_TEST	opt_dontuse.h
 MD_ROOT		opt_md.h
 MD_ROOT_SIZE	opt_md.h
+MPROF_BUFFERS	opt_mprof.h
+MPROF_HASH_SIZE	opt_mprof.h
 MUTEX_WAKE_ALL
 NSWBUF_MIN	opt_swap.h
 PANIC_REBOOT_WAIT_TIME	opt_panic.h

==== //depot/projects/netperf_socket/sys/conf/options.pc98#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.pc98,v 1.177 2004/08/16 13:59:01 rwatson Exp $
+# $FreeBSD: src/sys/conf/options.pc98,v 1.178 2004/08/18 03:46:39 rwatson Exp $
 # Options specific to the pc98 platform kernels
 
 AUTO_EOI_1		opt_auto_eoi.h
@@ -108,3 +108,6 @@
 DEV_APIC		opt_apic.h
 DEV_MECIA		opt_mecia.h
 DEV_NPX			opt_npx.h
+
+# agp options
+AGP_AMD64_GART		opt_agp.h

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/aclocal.h#5 (text+ko) ====

@@ -1050,7 +1050,8 @@
     UINT32                      Component; \
     UINT32                      Line; \
     char                        Module[ACPI_MAX_MODULE_NAME]; \
-    UINT8                       AllocType;
+    UINT8                       AllocType; \
+    UINT8                       Padding[3];
 
 typedef struct acpi_debug_mem_header
 {

==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#38 (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.186 2004/08/13 06:21:32 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.188 2004/08/18 07:00:43 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -625,7 +625,7 @@
     size_t buflen)
 {
     struct acpi_device *dinfo = device_get_ivars(child);
-	
+
     if (dinfo->ad_handle)
 	snprintf(buf, buflen, "handle=%s", acpi_name(dinfo->ad_handle));
     else
@@ -1581,7 +1581,7 @@
 {
     ACPI_OBJECT	*comp;
     int		i;
-    
+
     if (pkg == NULL || pkg->Type != ACPI_TYPE_PACKAGE)
 	return (AE_BAD_PARAMETER);
 
@@ -1636,7 +1636,7 @@
 {
     ACPI_RESOURCE	*rp;
     void		*newp;
-    
+
     /* Initialise the buffer if necessary. */
     if (buf->Pointer == NULL) {
 	buf->Length = ACPI_INITIAL_RESOURCE_BUFFER_SIZE;
@@ -1648,7 +1648,7 @@
     }
     if (res == NULL)
 	return (AE_OK);
-    
+
     /*
      * Scan the current buffer looking for the terminator.
      * This will either find the terminator or hit the end
@@ -1687,10 +1687,10 @@
 	buf->Pointer = newp;
 	buf->Length += buf->Length;
     }
-    
+
     /* Insert the new resource. */
     bcopy(res, rp, res->Length + ACPI_RESOURCE_LENGTH_NO_DATA);
-    
+
     /* And add the terminator. */
     rp = ACPI_NEXT_RESOURCE(rp);
     rp->Id = ACPI_RSTYPE_END_TAG;
@@ -1837,10 +1837,10 @@
 	acpi_wake_prep_walk(state);
 	sc->acpi_sstate = ACPI_STATE_S0;
     }
+    if (slp_state >= ACPI_SS_SLP_PREP)
+	AcpiLeaveSleepState(state);
     if (slp_state >= ACPI_SS_DEV_SUSPEND)
 	DEVICE_RESUME(root_bus);
-    if (slp_state >= ACPI_SS_SLP_PREP)
-	AcpiLeaveSleepState(state);
     if (slp_state >= ACPI_SS_SLEPT)
 	acpi_enable_fixed_events(sc);
 
@@ -2146,49 +2146,6 @@
 }
 
 /*
- * Enable/Disable ACPI
- */
-ACPI_STATUS
-acpi_Enable(struct acpi_softc *sc)
-{
-    ACPI_STATUS	status;
-    u_int32_t	flags;
-
-    ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
-
-    status = AE_ERROR;
-    flags = ACPI_NO_ADDRESS_SPACE_INIT | ACPI_NO_HARDWARE_INIT |
-	    ACPI_NO_DEVICE_INIT | ACPI_NO_OBJECT_INIT;
-
-    ACPI_SERIAL_BEGIN(acpi);
-    if (!sc->acpi_enabled)
-	status = AcpiEnableSubsystem(flags);
-    if (ACPI_SUCCESS(status))
-	sc->acpi_enabled = 1;
-    ACPI_SERIAL_END(acpi);
-
-    return_ACPI_STATUS (status);
-}
-
-ACPI_STATUS
-acpi_Disable(struct acpi_softc *sc)
-{
-    ACPI_STATUS	status;
-
-    ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
-
-    status = AE_ERROR;
-    ACPI_SERIAL_BEGIN(acpi);
-    if (sc->acpi_enabled)
-	status = AcpiDisable();
-    if (ACPI_SUCCESS(status))
-	sc->acpi_enabled = 0;
-    ACPI_SERIAL_END(acpi);
-
-    return_ACPI_STATUS (status);
-}
-
-/*
  * ACPI Event Handlers
  */
 
@@ -2463,14 +2420,6 @@
 
     /* Core system ioctls. */
     switch (cmd) {
-    case ACPIIO_ENABLE:
-	if (ACPI_FAILURE(acpi_Enable(sc)))
-	    error = ENXIO;
-	break;
-    case ACPIIO_DISABLE:
-	if (ACPI_FAILURE(acpi_Disable(sc)))
-	    error = ENXIO;
-	break;
     case ACPIIO_SETSLPSTATE:
 	error = EINVAL;
 	state = *(int *)addr;

==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#10 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.24 2004/08/13 19:27:21 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.25 2004/08/18 16:39:59 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -648,10 +648,9 @@
 	 * assume we were successful.
 	 */
 	error = acpi_pci_link_get_current_irq(link, &link->current_irq);
-	if (ACPI_FAILURE(error)) {
+	if (ACPI_FAILURE(error) && bootverbose) {
 		printf("acpi link set: _CRS failed for link %s - %s\n",
 		    acpi_name(link->handle), AcpiFormatException(error));
-		goto out;
 	}
 	if (link->current_irq != irq) {
 		printf("acpi link set: curr irq %d != %d for %s (ignoring)\n",

==== //depot/projects/netperf_socket/sys/dev/acpica/acpiio.h#3 (text+ko) ====

@@ -24,14 +24,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.10 2004/06/22 08:23:26 brueffer Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.11 2004/08/18 05:48:24 njl Exp $
  */
 
 /*
  * Core ACPI subsystem ioctls
  */
-#define ACPIIO_ENABLE		_IO('P', 1)
-#define ACPIIO_DISABLE		_IO('P', 2)
 #define ACPIIO_SETSLPSTATE	_IOW('P', 3, int)
 
 struct acpi_battdesc {

==== //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#21 (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.79 2004/08/13 06:21:19 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.80 2004/08/18 05:48:24 njl Exp $
  */
 
 #include "acpi_if.h"
@@ -274,8 +274,6 @@
 int		acpi_wake_set_enable(device_t dev, int enable);
 int		acpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw);
 ACPI_STATUS	acpi_Startup(void);
-ACPI_STATUS	acpi_Enable(struct acpi_softc *sc);
-ACPI_STATUS	acpi_Disable(struct acpi_softc *sc);
 void		acpi_UserNotify(const char *subsystem, ACPI_HANDLE h,
 		    uint8_t notify);
 struct resource *acpi_bus_alloc_gas(device_t dev, int *rid,

==== //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_isa.c#2 (text+ko) ====

@@ -36,12 +36,11 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_isa.c,v 1.1 2004/08/17 02:32:30 gibbs Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_isa.c,v 1.3 2004/08/18 17:17:43 gibbs Exp $");
 
 #include <dev/aic7xxx/aic7xxx_osm.h>
 
 #include <sys/limits.h>		/* For CHAR_BIT*/
-#include <dev/eisa/eisaconf.h>	/* For EISA constants */
 #include <isa/isavar.h>		/* For ISA attach glue */
 
 
@@ -62,7 +61,7 @@
  */
 static struct aic7770_identity *
 ahc_isa_find_device(bus_space_tag_t tag, bus_space_handle_t bsh) {
-	eisa_id_t id;
+	uint32_t  id;
 	u_int	  id_size;
 	int	  i;
 
@@ -93,7 +92,7 @@
 		int		    rid;
 
 		rid = 0;
-		iobase = (slot * EISA_SLOT_SIZE) + AHC_EISA_SLOT_OFFSET;
+		iobase = (slot * AHC_EISA_SLOT_SIZE) + AHC_EISA_SLOT_OFFSET;
 		regs = bus_alloc_resource(parent, SYS_RES_IOPORT, &rid,
 					  iobase, iobase, AHC_EISA_IOSIZE,
 					  RF_ACTIVE);
@@ -138,7 +137,6 @@
 	int	  error;
 	int	  zero;
 
-	iobase = isa_get_port(dev);
 	error = ENODEV;
 	zero = 0;
 	regs = NULL;
@@ -146,10 +144,11 @@
 
 	regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &zero, RF_ACTIVE);
 	if (regs == NULL) {
-		device_printf(dev, "ioport 0x%x alloc failed\n", iobase);
+		device_printf(dev, "No resources alloated.\n");
 		return (ENOMEM);
 	}
 
+	iobase = rman_get_start(regs);
 	tag = rman_get_bustag(regs);
 	bsh = rman_get_bushandle(regs);
 

==== //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.c#6 (text+ko) ====

@@ -46,7 +46,7 @@
 #include "aicasm/aicasm_insformat.h"
 #else
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.31 2004/08/17 00:14:30 gibbs Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.32 2004/08/18 16:35:52 gibbs Exp $");
 #include <dev/aic7xxx/aic79xx_osm.h>
 #include <dev/aic7xxx/aic79xx_inline.h>
 #include <dev/aic7xxx/aicasm/aicasm_insformat.h>
@@ -9391,7 +9391,7 @@
 				 * untimed-out command is outstanding.
 				 */ 
 				if (ahd_other_scb_timeout(ahd, scb,
-							  active_scb) != 0)
+							  active_scb) == 0)
 					goto bus_reset;
 				continue;
 			} 
@@ -9430,7 +9430,7 @@
 			 * some other command.  Reset the timer
 			 * and go on.
 			 */
-			if (ahd_other_scb_timeout(ahd, scb, NULL) != 0)
+			if (ahd_other_scb_timeout(ahd, scb, NULL) == 0)
 				goto bus_reset;
 		} else {
 			/*

==== //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.h#6 (text+ko) ====

@@ -39,7 +39,7 @@
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#107 $
  *
- * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.21 2004/08/17 00:14:30 gibbs Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.22 2004/08/18 16:33:14 gibbs Exp $
  */
 
 #ifndef _AIC79XX_H_
@@ -1346,19 +1346,6 @@
 extern struct ahd_pci_identity ahd_pci_ident_table [];
 extern const u_int ahd_num_pci_devs;
 
-/***************************** VL/EISA Declarations ***************************/
-struct aic7770_identity {
-	uint32_t		 full_id;
-	uint32_t		 id_mask;
-	char			*name;
-	ahd_device_setup_t	*setup;
-};
-extern struct aic7770_identity aic7770_ident_table [];
-extern const int ahd_num_aic7770_devs;
-
-#define AHD_EISA_SLOT_OFFSET	0xc00
-#define AHD_EISA_IOSIZE		0x100
-
 /*************************** Function Declarations ****************************/
 /******************************************************************************/
 void			ahd_reset_cmds_pending(struct ahd_softc *ahd);

==== //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx.h#3 (text+ko) ====

@@ -39,7 +39,7 @@
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#85 $
  *
- * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.51 2004/08/17 00:14:31 gibbs Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.52 2004/08/18 16:31:56 gibbs Exp $
  */
 
 #ifndef _AIC7XXX_H_
@@ -1175,6 +1175,7 @@
 extern struct aic7770_identity aic7770_ident_table[];
 extern const int ahc_num_aic7770_devs;
 
+#define AHC_EISA_SLOT_SIZE	0x1000
 #define AHC_EISA_SLOT_OFFSET	0xc00
 #define AHC_EISA_IOSIZE		0x100
 

==== //depot/projects/netperf_socket/sys/dev/firewire/if_fwe.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.34 2004/08/12 03:02:16 rwatson Exp $
+ * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.35 2004/08/18 04:54:54 rwatson Exp $
  */
 
 #include "opt_inet.h"
@@ -488,6 +488,8 @@
 	struct fwe_softc *fwe = ((struct fwe_eth_softc *)ifp->if_softc)->fwe;
 	int s;
 
+	GIANT_REQUIRED;
+
 	FWEDEBUG(ifp, "starting\n");
 
 	if (fwe->dma_ch < 0) {

==== //depot/projects/netperf_socket/sys/dev/twa/twa_freebsd.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/twa/twa_freebsd.c,v 1.7 2004/06/24 18:30:08 scottl Exp $
+ *	$FreeBSD: src/sys/dev/twa/twa_freebsd.c,v 1.8 2004/08/18 16:14:44 vkashyap Exp $
  */
 
 /*
@@ -657,7 +657,7 @@
 
 	for (i = 0; i < nsegments; i++) {
 		sgl[i].address = segs[i].ds_addr;
-		sgl[i].length = segs[i].ds_len;
+		sgl[i].length = (u_int32_t)(segs[i].ds_len);
 	}
 }
 

==== //depot/projects/netperf_socket/sys/dev/twa/twa_reg.h#2 (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/twa/twa_reg.h,v 1.1 2004/03/30 03:45:59 vkashyap Exp $
+ *	$FreeBSD: src/sys/dev/twa/twa_reg.h,v 1.2 2004/08/18 16:14:44 vkashyap Exp $
  */
 
 /*
@@ -198,7 +198,7 @@
 /* Scatter/Gather list entry. */
 struct twa_sg {
 	bus_addr_t	address;
-	bus_size_t	length;
+	u_int32_t	length;
 } __attribute__ ((packed));
 
 

==== //depot/projects/netperf_socket/sys/dev/vx/if_vx.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/vx/if_vx.c,v 1.51 2004/08/14 00:12:42 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/vx/if_vx.c,v 1.52 2004/08/18 16:56:54 gibbs Exp $");
 
 /*
  * Created from if_ep.c driver by Fred Gray (fgray@rice.edu) to support
@@ -84,35 +84,51 @@
 #define ETHER_ALIGN 	2
 
 static struct connector_entry {
-  int bit;
-  char *name;
+	int bit;
+	char *name;
 } conn_tab[VX_CONNECTORS] = {
+
 #define CONNECTOR_UTP	0
-  { 0x08, "utp"},
+	{
+		0x08, "utp"
+	},
 #define CONNECTOR_AUI	1
-  { 0x20, "aui"},
+	{
+		0x20, "aui"
+	},
 /* dummy */
-  { 0, "???"},
+	{
+		0, "???"
+	},
 #define CONNECTOR_BNC	3
-  { 0x10, "bnc"},
+	{
+		0x10, "bnc"
+	},
 #define CONNECTOR_TX	4
-  { 0x02, "tx"},
+	{
+		0x02, "tx"
+	},
 #define CONNECTOR_FX	5
-  { 0x04, "fx"},
+	{
+		0x04, "fx"
+	},
 #define CONNECTOR_MII	6
-  { 0x40, "mii"},
-  { 0, "???"}
+	{
+		0x40, "mii"
+	},
+	{
+		0, "???"
+	}
 };
 
 /* int vxattach(struct vx_softc *); */
 static void vxtxstat(struct vx_softc *);
 static int vxstatus(struct vx_softc *);
 static void vxinit(void *);
-static int vxioctl(struct ifnet *, u_long, caddr_t); 
-static void vxstart(struct ifnet *ifp);
+static int vxioctl(struct ifnet *, u_long, caddr_t);
+static void vxstart(struct ifnet *);
 static void vxwatchdog(struct ifnet *);
 static void vxreset(struct vx_softc *);
-/* void vxstop(struct vx_softc *); */
 static void vxread(struct vx_softc *);
 static struct mbuf *vxget(struct vx_softc *, u_int);
 static void vxmbuffill(void *);
@@ -120,381 +136,372 @@
 static void vxsetfilter(struct vx_softc *);
 static void vxgetlink(struct vx_softc *);
 static void vxsetlink(struct vx_softc *);
-/* int vxbusyeeprom(struct vx_softc *); */
-
 
 int
-vxattach(dev)
-    device_t dev;
+vxattach(device_t dev)
 {
-    struct vx_softc *sc = device_get_softc(dev);
-    struct ifnet *ifp = &sc->arpcom.ac_if;
-    int i;
+	struct vx_softc *sc = device_get_softc(dev);
+	struct ifnet *ifp = &sc->arpcom.ac_if;
+	int i;
+
+	callout_handle_init(&sc->ch);
+	GO_WINDOW(0);
+	CSR_WRITE_2(sc, VX_COMMAND, GLOBAL_RESET);
+	VX_BUSY_WAIT;
 
-    callout_handle_init(&sc->ch);
-    GO_WINDOW(0);
-    CSR_WRITE_2(sc, VX_COMMAND, GLOBAL_RESET);
-    VX_BUSY_WAIT;
+	vxgetlink(sc);
 
-    vxgetlink(sc);
+	/*
+         * Read the station address from the eeprom
+         */
+	GO_WINDOW(0);
+	for (i = 0; i < 3; i++) {
+		int x;
 
-    /*
-     * Read the station address from the eeprom
-     */
-    GO_WINDOW(0);
-    for (i = 0; i < 3; i++) {
-        int x;
-        if (vxbusyeeprom(sc))
-            return 0;
-        CSR_WRITE_2(sc,  VX_W0_EEPROM_COMMAND, EEPROM_CMD_RD
-	     | (EEPROM_OEM_ADDR0 + i));
-        if (vxbusyeeprom(sc))
-            return 0;
-        x = CSR_READ_2(sc, VX_W0_EEPROM_DATA);
-        sc->arpcom.ac_enaddr[(i << 1)] = x >> 8;
-        sc->arpcom.ac_enaddr[(i << 1) + 1] = x;
-    }
+		if (vxbusyeeprom(sc))
+			return 0;
+		CSR_WRITE_2(sc, VX_W0_EEPROM_COMMAND, EEPROM_CMD_RD
+		    | (EEPROM_OEM_ADDR0 + i));
+		if (vxbusyeeprom(sc))
+			return 0;
+		x = CSR_READ_2(sc, VX_W0_EEPROM_DATA);
+		sc->arpcom.ac_enaddr[(i << 1)] = x >> 8;
+		sc->arpcom.ac_enaddr[(i << 1) + 1] = x;
+	}
 
-    if_initname(ifp, device_get_name(dev), device_get_unit(dev));
-    ifp->if_mtu = ETHERMTU;
-    ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
-    ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST |
-	IFF_NEEDSGIANT;
-    ifp->if_start = vxstart;
-    ifp->if_ioctl = vxioctl;
-    ifp->if_init = vxinit;
-    ifp->if_watchdog = vxwatchdog;
-    ifp->if_softc = sc;
+	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
+	ifp->if_mtu = ETHERMTU;
+	ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
+	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST |
+	    IFF_NEEDSGIANT;
+	ifp->if_start = vxstart;
+	ifp->if_ioctl = vxioctl;
+	ifp->if_init = vxinit;
+	ifp->if_watchdog = vxwatchdog;
+	ifp->if_softc = sc;
 
-    ether_ifattach(ifp, sc->arpcom.ac_enaddr);
+	ether_ifattach(ifp, sc->arpcom.ac_enaddr);
 
-    sc->tx_start_thresh = 20;	/* probably a good starting point. */
+	sc->tx_start_thresh = 20;	/* probably a good starting point. */
 
-    vxstop(sc);
+	vxstop(sc);
 
-    return 1;
+	return 1;
 }
 
-
-
 /*
  * The order in here seems important. Otherwise we may not receive
  * interrupts. ?!
  */
 static void
-vxinit(xsc)
-	void *xsc;
+vxinit(void *xsc)
 {
-    struct vx_softc *sc = (struct vx_softc *) xsc;
-    struct ifnet *ifp = &sc->arpcom.ac_if;
-    int i;
+	struct vx_softc *sc = (struct vx_softc *)xsc;
+	struct ifnet *ifp = &sc->arpcom.ac_if;
+	int i;
 
-    VX_BUSY_WAIT;
+	VX_BUSY_WAIT;
 
-    GO_WINDOW(2);
+	GO_WINDOW(2);
 
-    for (i = 0; i < 6; i++) /* Reload the ether_addr. */
-	CSR_WRITE_1(sc,  VX_W2_ADDR_0 + i, sc->arpcom.ac_enaddr[i]);
+	for (i = 0; i < 6; i++)	/* Reload the ether_addr. */
+		CSR_WRITE_1(sc, VX_W2_ADDR_0 + i, sc->arpcom.ac_enaddr[i]);
 
-    CSR_WRITE_2(sc,  VX_COMMAND, RX_RESET);
-    VX_BUSY_WAIT;
-    CSR_WRITE_2(sc,  VX_COMMAND, TX_RESET);
-    VX_BUSY_WAIT;
+	CSR_WRITE_2(sc, VX_COMMAND, RX_RESET);
+	VX_BUSY_WAIT;
+	CSR_WRITE_2(sc, VX_COMMAND, TX_RESET);
+	VX_BUSY_WAIT;
 
-    GO_WINDOW(1);	/* Window 1 is operating window */
-    for (i = 0; i < 31; i++)
-	CSR_READ_1(sc,  VX_W1_TX_STATUS);
+	GO_WINDOW(1);		/* Window 1 is operating window */
+	for (i = 0; i < 31; i++)
+		CSR_READ_1(sc, VX_W1_TX_STATUS);
 
-    CSR_WRITE_2(sc,  VX_COMMAND,SET_RD_0_MASK | S_CARD_FAILURE |
-			S_RX_COMPLETE | S_TX_COMPLETE | S_TX_AVAIL);
-    CSR_WRITE_2(sc,  VX_COMMAND,SET_INTR_MASK | S_CARD_FAILURE |
-			S_RX_COMPLETE | S_TX_COMPLETE | S_TX_AVAIL);
+	CSR_WRITE_2(sc, VX_COMMAND, SET_RD_0_MASK | S_CARD_FAILURE |
+	    S_RX_COMPLETE | S_TX_COMPLETE | S_TX_AVAIL);
+	CSR_WRITE_2(sc, VX_COMMAND, SET_INTR_MASK | S_CARD_FAILURE |
+	    S_RX_COMPLETE | S_TX_COMPLETE | S_TX_AVAIL);
 
-    /*
-     * Attempt to get rid of any stray interrupts that occured during
-     * configuration.  On the i386 this isn't possible because one may
-     * already be queued.  However, a single stray interrupt is
-     * unimportant.
-     */
-    CSR_WRITE_2(sc,  VX_COMMAND, ACK_INTR | 0xff);
+	/*
+         * Attempt to get rid of any stray interrupts that occured during
+         * configuration.  On the i386 this isn't possible because one may
+         * already be queued.  However, a single stray interrupt is
+         * unimportant.
+         */
+	CSR_WRITE_2(sc, VX_COMMAND, ACK_INTR | 0xff);
 
-    vxsetfilter(sc);
-    vxsetlink(sc);
+	vxsetfilter(sc);
+	vxsetlink(sc);
 
-    CSR_WRITE_2(sc,  VX_COMMAND, RX_ENABLE);
-    CSR_WRITE_2(sc,  VX_COMMAND, TX_ENABLE);
+	CSR_WRITE_2(sc, VX_COMMAND, RX_ENABLE);
+	CSR_WRITE_2(sc, VX_COMMAND, TX_ENABLE);
 
-    vxmbuffill((caddr_t) sc);
+	vxmbuffill((caddr_t) sc);
 
-    /* Interface is now `running', with no output active. */
-    ifp->if_flags |= IFF_RUNNING;
-    ifp->if_flags &= ~IFF_OACTIVE;
+	/* Interface is now `running', with no output active. */
+	ifp->if_flags |= IFF_RUNNING;
+	ifp->if_flags &= ~IFF_OACTIVE;
 
-    /* Attempt to start output, if any. */
-    vxstart(ifp);
+	/* Attempt to start output, if any. */
+	vxstart(ifp);
 }
 
 static void
-vxsetfilter(sc)
-    struct vx_softc *sc;
+vxsetfilter(struct vx_softc *sc)
 {
-    register struct ifnet *ifp = &sc->arpcom.ac_if;  
-    
-    GO_WINDOW(1);           /* Window 1 is operating window */
-    CSR_WRITE_2(sc,  VX_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL | FIL_BRDCST |
-	 FIL_MULTICAST |
-	 ((ifp->if_flags & IFF_PROMISC) ? FIL_PROMISC : 0 ));
-}               
+	register struct ifnet *ifp = &sc->arpcom.ac_if;
+
+	GO_WINDOW(1);		/* Window 1 is operating window */
+	CSR_WRITE_2(sc, VX_COMMAND, SET_RX_FILTER |
+	    FIL_INDIVIDUAL | FIL_BRDCST | FIL_MULTICAST |
+	    ((ifp->if_flags & IFF_PROMISC) ? FIL_PROMISC : 0));
+}
 
-static void            
-vxgetlink(sc)
-    struct vx_softc *sc;
+static void
+vxgetlink(struct vx_softc *sc)
 {
-    int n, k;
+	int n, k;
 
-    GO_WINDOW(3);
-    sc->vx_connectors = CSR_READ_2(sc, VX_W3_RESET_OPT) & 0x7f;
-    for (n = 0, k = 0; k < VX_CONNECTORS; k++) {
-      if (sc->vx_connectors & conn_tab[k].bit) {
-	if (n > 0) {
-	  printf("/");
+	GO_WINDOW(3);
+	sc->vx_connectors = CSR_READ_2(sc, VX_W3_RESET_OPT) & 0x7f;
+	for (n = 0, k = 0; k < VX_CONNECTORS; k++) {
+		if (sc->vx_connectors & conn_tab[k].bit) {
+			if (n > 0)
+				printf("/");
+			printf("%s", conn_tab[k].name);
+			n++;
+		}
+	}
+	if (sc->vx_connectors == 0) {
+		printf("no connectors!");
+		return;
+	}
+	GO_WINDOW(3);
+	sc->vx_connector =
+	    (CSR_READ_4(sc, VX_W3_INTERNAL_CFG) & INTERNAL_CONNECTOR_MASK)
+	    >> INTERNAL_CONNECTOR_BITS;
+	if (sc->vx_connector & 0x10) {
+		sc->vx_connector &= 0x0f;
+		printf("[*%s*]", conn_tab[(int)sc->vx_connector].name);
+		printf(": disable 'auto select' with DOS util!");
+	} else {
+		printf("[*%s*]", conn_tab[(int)sc->vx_connector].name);
 	}
-	printf("%s", conn_tab[k].name);
-	n++;
-      }
-    }
-    if (sc->vx_connectors == 0) {
-	printf("no connectors!");
-	return;
-    }
-    GO_WINDOW(3);
-    sc->vx_connector = (CSR_READ_4(sc,  VX_W3_INTERNAL_CFG) 
-			& INTERNAL_CONNECTOR_MASK) 
-			>> INTERNAL_CONNECTOR_BITS;
-    if (sc->vx_connector & 0x10) {
-	sc->vx_connector &= 0x0f;
-	printf("[*%s*]", conn_tab[(int)sc->vx_connector].name);
-	printf(": disable 'auto select' with DOS util!");
-    } else {
-	printf("[*%s*]", conn_tab[(int)sc->vx_connector].name);
-    }
 }
 
-static void            
-vxsetlink(sc)
-    struct vx_softc *sc;
-{       
-    register struct ifnet *ifp = &sc->arpcom.ac_if;  
-    int i, j, k;
-    char *reason, *warning;
-    static int prev_flags;
-    static char prev_conn = -1;
+static void
+vxsetlink(struct vx_softc *sc)
+{
+	register struct ifnet *ifp = &sc->arpcom.ac_if;
+	int i, j, k;
+	char *reason, *warning;
+	static int prev_flags;
+	static char prev_conn = -1;
 
-    if (prev_conn == -1) {
-	prev_conn = sc->vx_connector;
-    }
+	if (prev_conn == -1)
+		prev_conn = sc->vx_connector;
 
-    /*
-     * S.B.
-     *
-     * Now behavior was slightly changed:
-     *
-     * if any of flags link[0-2] is used and its connector is
-     * physically present the following connectors are used:
-     *
-     *   link0 - AUI * highest precedence
-     *   link1 - BNC
-     *   link2 - UTP * lowest precedence
-     *
-     * If none of them is specified then
-     * connector specified in the EEPROM is used
-     * (if present on card or UTP if not).

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



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