Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 14:09:19 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 50008 for review
Message-ID:  <200403302209.i2UM9J50039636@repoman.freebsd.org>

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

Change 50008 by rwatson@rwatson_tislabs on 2004/03/30 14:08:50

	Integrate netperf_socket:
	
	- twa driver for new 3Ware array cards (and now with.. SCSI!)
	- pf synchronization.
	- UDF bugfix.
	- if_ste uses m_defrag().
	- Even more fixes relating to kstack pages.

Affected files ...

.. //depot/projects/netperf_socket/sys/conf/NOTES#10 integrate
.. //depot/projects/netperf_socket/sys/conf/files.i386#11 integrate
.. //depot/projects/netperf_socket/sys/conf/options#6 integrate
.. //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#9 integrate
.. //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/twa/twa.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa.h#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_cam.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_externs.h#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_freebsd.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_fwimg.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_globals.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_includes.h#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_ioctl.h#1 branch
.. //depot/projects/netperf_socket/sys/dev/twa/twa_reg.h#1 branch
.. //depot/projects/netperf_socket/sys/fs/udf/udf_vfsops.c#2 integrate
.. //depot/projects/netperf_socket/sys/fs/udf/udf_vnops.c#3 integrate
.. //depot/projects/netperf_socket/sys/i386/conf/GENERIC#4 integrate
.. //depot/projects/netperf_socket/sys/kern/subr_param.c#4 integrate
.. //depot/projects/netperf_socket/sys/modules/twa/Makefile#1 branch
.. //depot/projects/netperf_socket/sys/pci/if_ste.c#6 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/vm_machdep.c#5 integrate

Differences ...

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1208 2004/03/29 22:41:20 peter Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1209 2004/03/30 07:01:56 bde Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -685,23 +685,24 @@
 
 # One of these is mandatory:
 options 	FFS			#Fast filesystem
-options 	NFSCLIENT		#Network File System
+options 	NFSCLIENT		#Network File System client
 
 # The rest are optional:
 options 	CD9660			#ISO 9660 filesystem
 options 	FDESCFS			#File descriptor filesystem
 options 	HPFS			#OS/2 File system
 options 	MSDOSFS			#MS DOS File System (FAT, FAT32)
-options 	NFSSERVER		#Network File System
+options 	NFSSERVER		#Network File System server
 options 	NTFS			#NT File System
 options 	NULLFS			#NULL filesystem
+# Broken (depends on NCP):
 #options 	NWFS			#NetWare filesystem
 options 	PORTALFS		#Portal filesystem
 options 	PROCFS			#Process filesystem (requires PSEUDOFS)
 options 	PSEUDOFS		#Pseudo-filesystem framework
 options 	SMBFS			#SMB/CIFS filesystem
 options 	UDF			#Universal Disk Format
-#umapfs is seriously (functionally) broken at this point.
+# Broken (seriously (functionally) broken):
 #options 	UMAPFS			#UID map filesystem
 options 	UNIONFS			#Union filesystem
 # The xFS_ROOT options REQUIRE the associated ``options xFS''

==== //depot/projects/netperf_socket/sys/conf/files.i386#11 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.481 2004/03/22 18:00:39 wpaul Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.482 2004/03/30 03:45:59 vkashyap Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -170,6 +170,11 @@
 dev/syscons/scvtb.c		optional	sc
 dev/syscons/syscons.c		optional	sc
 dev/syscons/sysmouse.c		optional	sc
+dev/twa/twa.c			optional	twa
+dev/twa/twa_cam.c		optional	twa
+dev/twa/twa_freebsd.c		optional	twa
+dev/twa/twa_fwimg.c		optional	twa
+dev/twa/twa_globals.c		optional	twa
 dev/uart/uart_cpu_i386.c	optional	uart
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.435 2004/03/16 12:23:38 scottl Exp $
+# $FreeBSD: src/sys/conf/options,v 1.436 2004/03/30 18:53:18 vkashyap Exp $
 #
 #        On the handling of kernel options
 #
@@ -71,6 +71,10 @@
 ADW_ALLOW_MEMIO		opt_adw.h	# Allow PCI devices to use memory
 					# mapped I/O
 
+# 3ware 9000 series RAID controller driver options
+TWA_DEBUG		opt_twa.h	# 0-10; 10 prints the most messages.
+TWA_FLASH_FIRMWARE	opt_twa.h	# firmware image bundled when defined.
+
 # Miscellaneous options.
 ADAPTIVE_MUTEXES
 ALQ

==== //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#5 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.5 2004/03/28 20:04:12 mlaier Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.6 2004/03/30 18:28:30 mlaier Exp $	*/
 /*	$OpenBSD: pf.c,v 1.389.2.2 2004/03/14 00:13:42 brad Exp $ */
 
 /*
@@ -1142,7 +1142,7 @@
 	/* Change inner protocol port, fix inner protocol checksum. */
 	if (ip != NULL) {
 		u_int16_t	oip = *ip;
-		u_int32_t	opc;
+		u_int32_t	opc = 0;	/* make the compiler happy */
 
 		if (pc != NULL)
 			opc = *pc;
@@ -1222,14 +1222,14 @@
 {
 	struct mbuf	*m;
 	struct m_tag	*mtag;
-	int		 len, tlen;
+	int		 len = 0, tlen;		/* make the compiler happy */
 #ifdef INET
-	struct ip	*h;
+	struct ip	*h = NULL;		/* make the compiler happy */
 #endif /* INET */
 #ifdef INET6
-	struct ip6_hdr	*h6;
+	struct ip6_hdr	*h6 = NULL;		/* make the compiler happy */
 #endif /* INET6 */
-	struct tcphdr	*th;
+	struct tcphdr	*th = NULL;		/* make the compiler happy */
 #ifdef __FreeBSD__
 	struct ip 	*ip;
 #if (__FreeBSD_version < 501114)
@@ -2343,7 +2343,7 @@
 	struct route_in6	 ro6;
 #endif /* INET6 */
 	struct rtentry		*rt = NULL;
-	int			 hlen;
+	int			 hlen = 0;	/* make the compiler happy */
 	u_int16_t		 mss = tcp_mssdflt;
 
 	switch (af) {
@@ -3014,9 +3014,10 @@
 	struct pf_rule		*r, *a = NULL;
 	struct pf_ruleset	*ruleset = NULL;
 	u_short			 reason;
-	u_int16_t		 icmpid;
+	u_int16_t		 icmpid = 0;	/* make the compiler happy */
 	sa_family_t		 af = pd->af;
-	u_int8_t		 icmptype, icmpcode;
+	u_int8_t		 icmptype = 0;	/* make the compiler happy */
+	u_int8_t		 icmpcode = 0;	/* make the compiler happy */
 	int			 state_icmp = 0;
 	struct pf_tag		*pftag = NULL;
 	int			 tag = -1;
@@ -4094,8 +4095,9 @@
     struct mbuf *m, int ipoff, int off, void *h, struct pf_pdesc *pd)
 {
 	struct pf_addr	*saddr = pd->src, *daddr = pd->dst;
-	u_int16_t	 icmpid, *icmpsum;
-	u_int8_t	 icmptype;
+	u_int16_t	 icmpid = 0;		/* make the compiler happy */
+	u_int16_t	*icmpsum = NULL;	/* make the compiler happy */
+	u_int8_t	 icmptype = 0;		/* make the compiler happy */
 	int		 state_icmp = 0, dirndx;
 
 	switch (pd->proto) {
@@ -4216,8 +4218,8 @@
 		struct ip6_hdr	h2_6;
 		int		terminal = 0;
 #endif /* INET6 */
-		int		ipoff2;
-		int		off2;
+		int		ipoff2 = 0;	/* make the compiler happy */
+		int		off2 = 0;	/* make the compiler happy */
 
 		pd2.af = pd->af;
 		switch (pd->af) {
@@ -4961,7 +4963,7 @@
 {
 	struct mbuf		*m0, *m1;
 	struct route		 iproute;
-	struct route		*ro;
+	struct route		*ro = NULL;	/* XXX: was uninitialized */
 	struct sockaddr_in	*dst;
 	struct ip		*ip;
 	struct ifnet		*ifp = NULL;
@@ -5589,7 +5591,7 @@
 {
 	u_short		   action, reason = 0, log = 0;
 	struct mbuf	  *m = *m0;
-	struct ip	  *h;
+	struct ip	  *h = NULL;		/* XXX: was uninitialized */
 	struct pf_rule	  *a = NULL, *r = &pf_default_rule, *tr;
 	struct pf_state	  *s = NULL;
 	struct pf_ruleset *ruleset = NULL;

==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#9 (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.129 2004/03/27 16:26:00 takawata Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.130 2004/03/30 07:35:18 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -235,14 +235,23 @@
 
 /*
  * Allow override of whether methods execute in parallel or not.
- * Default to serial behavior as this fixes some AE_ALREADY_EXISTS errors
- * and matches the MS interpreter.
+ * Enable this for serial behavior, which fixes "AE_ALREADY_EXISTS"
+ * errors for AML that really can't handle parallel method execution.
+ * It is off by default since this breaks recursive methods and
+ * some IBMs use such code.
  */
-static int acpi_serialize_methods = 1;
+static int acpi_serialize_methods;
 TUNABLE_INT("hw.acpi.serialize_methods", &acpi_serialize_methods);
 
-/* Allow override of whether to support the _OSI method. */
-static int acpi_osi_method;
+/*
+ * Allow override of whether to support the _OSI method.  This allows us
+ * to claim compatibility with various MS OSs without changing the value
+ * we report for _OS.  This is enabled by default since it fixes some
+ * problems with interrupt routing although it can be disabled if it
+ * causes problems.  See the definition of "AcpiGbl_ValidOsiStrings" for
+ * a list of systems we claim.
+ */
+static int acpi_osi_method = 1;
 TUNABLE_INT("hw.acpi.osi_method", &acpi_osi_method);
 
 /*

==== //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.54 2004/03/17 17:50:38 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.55 2004/03/30 10:24:52 ru Exp $");
 
 /*
  * National Semiconductor DP83820/DP83821 gigabit ethernet driver
@@ -1392,7 +1392,7 @@
 		 */
 		if (extsts & NGE_RXEXTSTS_VLANPKT) {
 			VLAN_INPUT_TAG(ifp, m,
-				extsts & NGE_RXEXTSTS_VTCI, continue);
+			    ntohs(extsts & NGE_RXEXTSTS_VTCI), continue);
 		}
 
 		(*ifp->if_input)(ifp, m);
@@ -1715,7 +1715,7 @@
 	mtag = VLAN_OUTPUT_TAG(&sc->arpcom.ac_if, m);
 	if (mtag != NULL) {
 		sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
-			(NGE_TXEXTSTS_VLANPKT|VLAN_TAG_VALUE(mtag));
+		    (NGE_TXEXTSTS_VLANPKT|htons(VLAN_TAG_VALUE(mtag)));
 	}
 
 	sc->nge_ldata->nge_tx_list[cur].nge_mbuf = m_head;

==== //depot/projects/netperf_socket/sys/fs/udf/udf_vfsops.c#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/fs/udf/udf_vfsops.c,v 1.16 2003/11/05 06:56:08 scottl Exp $
+ * $FreeBSD: src/sys/fs/udf/udf_vfsops.c,v 1.17 2004/03/30 05:01:48 scottl Exp $
  */
 
 /* udf_vfsops.c */
@@ -778,6 +778,8 @@
 		 */
 		if ((error = udf_readlblks(udfmp, pms->st_loc[0], pms->st_size,
 		    &bp)) != 0) {
+			if (bp != NULL)
+				brelse(bp);
 			printf("Failed to read Sparing Table at sector %d\n",
 			    pms->st_loc[0]);
 			return (error);

==== //depot/projects/netperf_socket/sys/fs/udf/udf_vnops.c#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/fs/udf/udf_vnops.c,v 1.34 2004/03/03 07:43:34 scottl Exp $
+ * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.35 2004/03/30 05:01:48 scottl Exp $
  */
 
 /* udf_vnops.c */
@@ -416,9 +416,8 @@
 		offset = uio->uio_offset;
 		size = uio->uio_resid;
 		error = udf_readatoffset(node, &size, offset, &bp, &data);
-		if (error)
-			return (error);
-		error = uiomove(data, size, uio);
+		if (error == 0)
+			error = uiomove(data, size, uio);
 		if (bp != NULL)
 			brelse(bp);
 		if (error)
@@ -579,6 +578,8 @@
 		    &ds->bp, &ds->data);
 		if (error) {
 			ds->error = error;
+			if (ds->bp != NULL)
+				brelse(ds->bp);
 			return (NULL);
 		}
 	}
@@ -1051,8 +1052,9 @@
  * offset passed in.  Only read in at most 'size' bytes, and then set 'size'
  * to the number of bytes pointed to.  If 'size' is zero, try to read in a
  * whole extent.
- * XXX 'size' is limited to the logical block size for now due to problems
- * with udf_read()
+ *
+ * Note that *bp may be assigned error or not.
+ *
  */
 static int
 udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp, uint8_t **data)
@@ -1066,6 +1068,7 @@
 
 	udfmp = node->udfmp;
 
+	*bp = NULL;
 	error = udf_bmap_internal(node, offset, &sector, &max_size);
 	if (error == UDF_INVALID_BMAP) {
 		/*
@@ -1075,7 +1078,6 @@
 		fentry = node->fentry;
 		*data = &fentry->data[fentry->l_ea];
 		*size = fentry->l_ad;
-		*bp = NULL;
 		return (0);
 	} else if (error != 0) {
 		return (error);
@@ -1088,6 +1090,7 @@
 
 	if ((error = udf_readlblks(udfmp, sector, *size, bp))) {
 		printf("warning: udf_readlblks returned error %d\n", error);
+		/* note: *bp may be non-NULL */
 		return (error);
 	}
 

==== //depot/projects/netperf_socket/sys/i386/conf/GENERIC#4 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.398 2004/03/15 00:49:40 obrien Exp $
+# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.399 2004/03/30 03:46:00 vkashyap Exp $
 
 machine		i386
 cpu		I486_CPU
@@ -124,6 +124,7 @@
 device		iir		# Intel Integrated RAID
 device		ips		# IBM (Adaptec) ServeRAID
 device		mly		# Mylex AcceleRAID/eXtremeRAID
+device		twa		# 3ware 9000 series PATA/SATA RAID
 
 # RAID controllers
 device		aac		# Adaptec FSA RAID

==== //depot/projects/netperf_socket/sys/kern/subr_param.c#4 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.62 2004/03/27 19:50:22 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.63 2004/03/30 08:00:11 alc Exp $");
 
 #include "opt_param.h"
 #include "opt_maxusers.h"
@@ -181,15 +181,13 @@
 void
 init_param3(long kmempages)
 {
+
 	/*
-	 * Limit pageable pipe memory usage to 5% of the kernel map
-	 * (via pipe_map).  Ensure that all have reasonable floors.
-	 * (See sys_pipe.c for more info.)
+	 * The default for maxpipekva is max(5% of the kernel map, 512KB).
+	 * See sys_pipe.c for more details.
 	 */
 	maxpipekva = (kmempages / 20) * PAGE_SIZE;
-
 	if (maxpipekva < 512 * 1024)
 		maxpipekva = 512 * 1024;
-
 	TUNABLE_INT_FETCH("kern.ipc.maxpipekva", &maxpipekva);
 }

==== //depot/projects/netperf_socket/sys/pci/if_ste.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.63 2004/03/24 17:43:45 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_ste.c,v 1.64 2004/03/30 19:23:38 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1493,25 +1493,13 @@
 		/*
 		 * We ran out of segments. We have to recopy this
 		 * mbuf chain first. Bail out if we can't get the
-		 * new buffers. Code borrowed from if_fxp.c
+		 * new buffers.
 		 */
-		MGETHDR(mn, M_DONTWAIT, MT_DATA);
+		mn = m_defrag(m_head, M_DONTWAIT);
 		if (mn == NULL) {
 			m_freem(m_head);
 			return ENOMEM;
 		}
-		if (m_head->m_pkthdr.len > MHLEN) {
-			MCLGET(mn, M_DONTWAIT);
-			if ((mn->m_flags & M_EXT) == 0) {
-				m_freem(mn);
-				m_freem(m_head);
-				return ENOMEM;
-			}
-		}
-		m_copydata(m_head, 0, m_head->m_pkthdr.len,
-		    mtod(mn, caddr_t));
-		mn->m_pkthdr.len = mn->m_len = m_head->m_pkthdr.len;
-		m_freem(m_head);
 		m_head = mn;
 		goto encap_retry;
 	}

==== //depot/projects/netperf_socket/sys/powerpc/powerpc/vm_machdep.c#5 (text+ko) ====

@@ -38,7 +38,7 @@
  *
  *	from: @(#)vm_machdep.c	7.3 (Berkeley) 5/13/91
  *	Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.99 2004/03/29 19:38:05 peter Exp $
+ * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.100 2004/03/30 13:57:34 benno Exp $
  */
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -355,7 +355,7 @@
 {
 	struct pcb *pcb;
 
-	pcb = (struct pcb *)((td->td_kstack + td2->td_kstack_pages * PAGE_SIZE -
+	pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE -
 	    sizeof(struct pcb)) & ~0x2fU);
 	td->td_pcb = pcb;
 	td->td_frame = (struct trapframe *)pcb - 1;



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