Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2008 18:22:39 GMT
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 134222 for review
Message-ID:  <200801271822.m0RIMdH1028556@repoman.freebsd.org>

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

Change 134222 by csjp@csjp_xor on 2008/01/27 18:22:31

	IFC

Affected files ...

.. //depot/projects/zcopybpf/src/sys/Makefile#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_proto.h#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscall.h#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscalls.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_sysent.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/freebsd32/syscalls.master#6 integrate
.. //depot/projects/zcopybpf/src/sys/compat/opensolaris/kern/opensolaris_kmem.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/compat/opensolaris/sys/kmem.h#4 integrate
.. //depot/projects/zcopybpf/src/sys/conf/files#18 integrate
.. //depot/projects/zcopybpf/src/sys/conf/options#14 integrate
.. //depot/projects/zcopybpf/src/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/ddb/db_capture.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/acpica/acpi.c#8 integrate
.. //depot/projects/zcopybpf/src/sys/dev/amr/amr.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/dev/amr/amrreg.h#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/amr/amrvar.h#3 integrate
.. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_sge.c#9 integrate
.. //depot/projects/zcopybpf/src/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/mii/amphy.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/dev/mii/miidevs#7 integrate
.. //depot/projects/zcopybpf/src/sys/dev/mii/nsphy.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/dev/mii/nsphyter.c#1 branch
.. //depot/projects/zcopybpf/src/sys/dev/mii/nsphyterreg.h#1 branch
.. //depot/projects/zcopybpf/src/sys/dev/mxge/if_mxge.c#10 integrate
.. //depot/projects/zcopybpf/src/sys/dev/mxge/if_mxge_var.h#7 integrate
.. //depot/projects/zcopybpf/src/sys/dev/sf/if_sf.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/sf/if_sfreg.h#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/sf/starfire_rx.h#1 branch
.. //depot/projects/zcopybpf/src/sys/dev/sf/starfire_tx.h#1 branch
.. //depot/projects/zcopybpf/src/sys/dev/syscons/syscons.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/dev/usb/ehci.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/dev/usb/if_udav.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/dev/usb/uark.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/dev/usb/uftdi.c#4 integrate
.. //depot/projects/zcopybpf/src/sys/dev/usb/uftdireg.h#2 integrate
.. //depot/projects/zcopybpf/src/sys/dev/wpi/if_wpi.c#4 integrate
.. //depot/projects/zcopybpf/src/sys/fs/cd9660/cd9660_vfsops.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/fs/coda/coda_vnops.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/fs/fifofs/fifo_vnops.c#9 integrate
.. //depot/projects/zcopybpf/src/sys/fs/hpfs/hpfs_subr.h#3 integrate
.. //depot/projects/zcopybpf/src/sys/fs/hpfs/hpfs_vfsops.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_denode.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/fs/ntfs/ntfs_subr.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/fs/nullfs/null_vnops.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/fs/nwfs/nwfs_node.c#4 integrate
.. //depot/projects/zcopybpf/src/sys/fs/smbfs/smbfs_node.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/fs/udf/udf_vfsops.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/fs/unionfs/union_subr.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/gnu/fs/reiserfs/reiserfs_inode.c#4 integrate
.. //depot/projects/zcopybpf/src/sys/kern/init_sysent.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/kern/kern_jail.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/kern/kern_lock.c#8 integrate
.. //depot/projects/zcopybpf/src/sys/kern/sched_ule.c#14 integrate
.. //depot/projects/zcopybpf/src/sys/kern/subr_bus.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/kern/subr_sleepqueue.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/kern/syscalls.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/kern/syscalls.master#6 integrate
.. //depot/projects/zcopybpf/src/sys/kern/systrace_args.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/kern/tty_pty.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/kern/vfs_aio.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/kern/vfs_default.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/kern/vfs_mount.c#13 integrate
.. //depot/projects/zcopybpf/src/sys/kern/vfs_subr.c#11 integrate
.. //depot/projects/zcopybpf/src/sys/modules/cxgb/cxgb/Makefile#3 integrate
.. //depot/projects/zcopybpf/src/sys/modules/mii/Makefile#3 integrate
.. //depot/projects/zcopybpf/src/sys/modules/sf/Makefile#2 integrate
.. //depot/projects/zcopybpf/src/sys/netgraph/netflow/netflow.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/netgraph/netflow/ng_netflow.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/netgraph/ng_ppp.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/netgraph/ng_pred1.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/netinet/in.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/netinet/ip_fw.h#3 integrate
.. //depot/projects/zcopybpf/src/sys/netinet/ip_fw2.c#11 integrate
.. //depot/projects/zcopybpf/src/sys/netinet/ip_options.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/netinet/tcp_usrreq.c#12 integrate
.. //depot/projects/zcopybpf/src/sys/netinet6/in6.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/netinet6/ip6_output.c#5 integrate
.. //depot/projects/zcopybpf/src/sys/netinet6/ip6_var.h#5 integrate
.. //depot/projects/zcopybpf/src/sys/netinet6/raw_ip6.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/netinet6/udp6_usrreq.c#9 integrate
.. //depot/projects/zcopybpf/src/sys/netncp/ncp_conn.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/netsmb/smb_conn.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/nfs4client/nfs4_idmap.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/nfsclient/nfs_node.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/pci/amdsmb.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/pci/if_sf.c#4 delete
.. //depot/projects/zcopybpf/src/sys/pci/if_sfreg.h#2 delete
.. //depot/projects/zcopybpf/src/sys/pci/nfsmb.c#3 integrate
.. //depot/projects/zcopybpf/src/sys/powerpc/powermac/ata_kauai.c#2 integrate
.. //depot/projects/zcopybpf/src/sys/sparc64/conf/GENERIC#8 integrate
.. //depot/projects/zcopybpf/src/sys/sys/buf.h#4 integrate
.. //depot/projects/zcopybpf/src/sys/sys/bus.h#3 integrate
.. //depot/projects/zcopybpf/src/sys/sys/event.h#2 integrate
.. //depot/projects/zcopybpf/src/sys/sys/lockmgr.h#6 integrate
.. //depot/projects/zcopybpf/src/sys/sys/param.h#13 integrate
.. //depot/projects/zcopybpf/src/sys/sys/priv.h#9 integrate
.. //depot/projects/zcopybpf/src/sys/sys/syscall.h#5 integrate
.. //depot/projects/zcopybpf/src/sys/sys/syscall.mk#5 integrate
.. //depot/projects/zcopybpf/src/sys/sys/sysproto.h#5 integrate
.. //depot/projects/zcopybpf/src/sys/ufs/ffs/ffs_snapshot.c#7 integrate
.. //depot/projects/zcopybpf/src/sys/ufs/ffs/ffs_vfsops.c#6 integrate
.. //depot/projects/zcopybpf/src/sys/ufs/ffs/ffs_vnops.c#9 integrate
.. //depot/projects/zcopybpf/src/sys/ufs/ufs/ufs_extattr.c#4 integrate

Differences ...

==== //depot/projects/zcopybpf/src/sys/Makefile#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/Makefile,v 1.45 2007/07/12 21:04:55 rwatson Exp $
+# $FreeBSD: src/sys/Makefile,v 1.46 2008/01/23 08:50:34 maxim Exp $
 
 .include <bsd.own.mk>
 
@@ -8,11 +8,11 @@
 .endif
 
 # Directories to include in cscope name file and TAGS.
-CSCOPEDIRS=	bsm cam compat conf contrib crypto ddb dev fs geom gnu \
+CSCOPEDIRS=	boot bsm cam compat conf contrib crypto ddb dev fs gdb geom gnu \
 		i4b isa kern libkern modules net net80211 netatalk netatm \
 		netgraph netinet netinet6 netipsec netipx netnatm netncp \
-		netsmb nfs nfsclient nfs4client rpc pccard pci security sys \
-		ufs vm ${ARCHDIR}
+		netsmb nfs nfs4client nfsclient nfsserver opencrypto pccard \
+		pci rpc security sys ufs vm ${ARCHDIR}
 
 ARCHDIR	?=	${MACHINE}
 

==== //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_proto.h#6 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.80 2008/01/08 22:01:25 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.94 2008/01/08 21:58:14 jhb Exp 
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.81 2008/01/20 23:44:24 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_

==== //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscall.h#6 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.78 2008/01/08 22:01:25 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.94 2008/01/08 21:58:14 jhb Exp 
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.79 2008/01/20 23:44:24 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp 
  */
 
 #define	FREEBSD32_SYS_syscall	0

==== //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscalls.c#6 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.69 2008/01/08 22:01:25 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.94 2008/01/08 21:58:14 jhb Exp 
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.70 2008/01/20 23:44:24 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp 
  */
 
 const char *freebsd32_syscallnames[] = {

==== //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_sysent.c#6 (text+ko) ====

@@ -2,8 +2,8 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.79 2008/01/08 22:01:25 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.94 2008/01/08 21:58:14 jhb Exp 
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.80 2008/01/20 23:44:24 rwatson Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp 
  */
 
 #include "opt_compat.h"
@@ -521,6 +521,6 @@
 	{ AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 },	/* 479 = freebsd32_truncate */
 	{ AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 },	/* 480 = freebsd32_ftruncate */
 	{ AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 },	/* 481 = thr_kill2 */
-	{ AS(shm_open_args), (sy_call_t *)shm_open, AUE_NULL, NULL, 0, 0 },	/* 482 = shm_open */
-	{ AS(shm_unlink_args), (sy_call_t *)shm_unlink, AUE_NULL, NULL, 0, 0 },	/* 483 = shm_unlink */
+	{ AS(shm_open_args), (sy_call_t *)shm_open, AUE_SHMOPEN, NULL, 0, 0 },	/* 482 = shm_open */
+	{ AS(shm_unlink_args), (sy_call_t *)shm_unlink, AUE_SHMUNLINK, NULL, 0, 0 },	/* 483 = shm_unlink */
 };

==== //depot/projects/zcopybpf/src/sys/compat/freebsd32/syscalls.master#6 (text+ko) ====

@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.94 2008/01/08 21:58:14 jhb Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.95 2008/01/20 23:43:06 rwatson Exp $
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 ;	from: src/sys/kern/syscalls.master 1.107
 ;
@@ -796,6 +796,6 @@
 480	AUE_FTRUNCATE	STD	{ int freebsd32_ftruncate(int fd, \
 				    u_int32_t lengthlo, u_int32_t lengthhi); }
 481	AUE_KILL	NOPROTO	{ int thr_kill2(pid_t pid, long id, int sig); }
-482	AUE_NULL	NOPROTO	{ int shm_open(const char *path, int flags, \
+482	AUE_SHMOPEN	NOPROTO	{ int shm_open(const char *path, int flags, \
 				    mode_t mode); }
-483	AUE_NULL	NOPROTO	{ int shm_unlink(const char *path); }
+483	AUE_SHMUNLINK	NOPROTO	{ int shm_unlink(const char *path); }

==== //depot/projects/zcopybpf/src/sys/compat/opensolaris/kern/opensolaris_kmem.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_kmem.c,v 1.2 2007/04/10 02:35:56 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_kmem.c,v 1.3 2008/01/24 11:21:54 pjd Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -108,18 +108,18 @@
 	free(buf, M_SOLARIS);
 }
 
-u_long
+uint64_t
 kmem_size(void)
 {
 
-	return ((u_long)vm_kmem_size);
+	return ((uint64_t)vm_kmem_size);
 }
 
-u_long
+uint64_t
 kmem_used(void)
 {
 
-	return ((u_long)kmem_map->size);
+	return ((uint64_t)kmem_map->size);
 }
 
 static int

==== //depot/projects/zcopybpf/src/sys/compat/opensolaris/sys/kmem.h#4 (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/compat/opensolaris/sys/kmem.h,v 1.3 2007/11/28 21:48:25 jb Exp $
+ * $FreeBSD: src/sys/compat/opensolaris/sys/kmem.h,v 1.4 2008/01/24 11:21:54 pjd Exp $
  */
 
 #ifndef _OPENSOLARIS_SYS_KMEM_H_
@@ -56,8 +56,8 @@
 
 void *zfs_kmem_alloc(size_t size, int kmflags);
 void zfs_kmem_free(void *buf, size_t size);
-u_long kmem_size(void);
-u_long kmem_used(void);
+uint64_t kmem_size(void);
+uint64_t kmem_used(void);
 kmem_cache_t *kmem_cache_create(char *name, size_t bufsize, size_t align,
     int (*constructor)(void *, void *, int), void (*destructor)(void *, void *),
     void (*reclaim)(void *) __unused, void *private, vmem_t *vmp, int cflags);

==== //depot/projects/zcopybpf/src/sys/conf/files#18 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1264 2008/01/15 20:34:47 gallatin Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1266 2008/01/27 01:10:41 marius Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -798,6 +798,7 @@
 dev/mii/mlphy.c			optional miibus | mlphy
 dev/mii/nsgphy.c		optional miibus | nsgphy
 dev/mii/nsphy.c			optional miibus | nsphy
+dev/mii/nsphyter.c		optional miibus | nsphyter
 dev/mii/pnaphy.c		optional miibus | pnaphy
 dev/mii/qsphy.c			optional miibus | qsphy
 dev/mii/rgephy.c		optional miibus | rgephy
@@ -937,6 +938,7 @@
 dev/scc/scc_dev_z8530.c		optional scc
 dev/scd/scd.c			optional scd isa
 dev/scd/scd_isa.c		optional scd isa
+dev/sf/if_sf.c			optional sf pci
 dev/si/si.c			optional si
 dev/si/si2_z280.c		optional si
 dev/si/si3_t225.c		optional si
@@ -2022,7 +2024,6 @@
 pci/if_mn.c			optional mn pci
 pci/if_pcn.c			optional pcn pci
 pci/if_rl.c			optional rl pci
-pci/if_sf.c			optional sf pci
 pci/if_sis.c			optional sis pci
 pci/if_ste.c			optional ste pci
 pci/if_tl.c			optional tl pci

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.615 2008/01/07 21:40:09 jhb Exp $
+# $FreeBSD: src/sys/conf/options,v 1.616 2008/01/26 22:32:23 rwatson Exp $
 #
 #        On the handling of kernel options
 #
@@ -48,6 +48,8 @@
 
 # Debugging options.
 DDB
+DDB_CAPTURE_DEFAULTBUFSIZE	opt_ddb.h
+DDB_CAPTURE_MAXBUFSIZE	opt_ddb.h
 DDB_NUMSYM	opt_ddb.h
 GDB
 KDB		opt_global.h

==== //depot/projects/zcopybpf/src/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#7 (text+ko) ====

@@ -1439,7 +1439,7 @@
 		return (1);
 #endif
 #else
-	if (kmem_used() > (kmem_size() * 4) / 5)
+	if (kmem_used() > (kmem_size() * 3) / 4)
 		return (1);
 #endif
 
@@ -2729,7 +2729,7 @@
 		arc_c_max = (arc_c * 8) - (1<<30);
 	else
 		arc_c_max = arc_c_min;
-	arc_c_max = MAX(arc_c * 6, arc_c_max);
+	arc_c_max = MAX(arc_c * 5, arc_c_max);
 #ifdef _KERNEL
 	/*
 	 * Allow the tunables to override our calculations if they are
@@ -2800,11 +2800,12 @@
 	arc_dead = FALSE;
 
 #ifdef _KERNEL
-	/* Warn about ZFS memory requirements. */
+	/* Warn about ZFS memory and address space requirements. */
 	if (((uint64_t)physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) {
 		printf("ZFS WARNING: Recommended minimum RAM size is 512MB; "
 		    "expect unstable behavior.\n");
-	} else if (kmem_size() < 512 * (1 << 20)) {
+	}
+	if (kmem_size() < 512 * (1 << 20)) {
 		printf("ZFS WARNING: Recommended minimum kmem_size is 512MB; "
 		    "expect unstable behavior.\n");
 		printf("	     Consider tuning vm.kmem_size and "

==== //depot/projects/zcopybpf/src/sys/ddb/db_capture.c#2 (text+ko) ====

@@ -30,7 +30,9 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ddb/db_capture.c,v 1.2 2007/12/26 11:32:32 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/ddb/db_capture.c,v 1.5 2008/01/26 23:02:14 rwatson Exp $");
+
+#include "opt_ddb.h"
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -52,16 +54,24 @@
  * kernel dumper routines without restarting the kernel, which is undesirable
  * in the midst of debugging.  Instead, we maintain a large static global
  * buffer that we fill from DDB's output routines.
+ *
+ * We enforce an invariant at runtime that buffer sizes are even multiples of
+ * the textdump block size, which is a design choice that we might want to
+ * reconsider.
  */
-static MALLOC_DEFINE(M_DB_CAPTURE, "db_capture", "DDB capture buffer");
+static MALLOC_DEFINE(M_DDB_CAPTURE, "ddb_capture", "DDB capture buffer");
 
-#define	DB_CAPTURE_DEFAULTBUFSIZE	48*1024
-#define	DB_CAPTURE_MAXBUFSIZE	512*1024
-#define	DB_CAPTURE_FILENAME	"ddb.txt"	/* Captured DDB output. */
+#ifndef DDB_CAPTURE_DEFAULTBUFSIZE
+#define	DDB_CAPTURE_DEFAULTBUFSIZE	48*1024
+#endif
+#ifndef DDB_CAPTURE_MAXBUFSIZE
+#define	DDB_CAPTURE_MAXBUFSIZE	5*1024*1024
+#endif
+#define	DDB_CAPTURE_FILENAME	"ddb.txt"	/* Captured DDB output. */
 
 static char *db_capture_buf;
-static u_int db_capture_bufsize = DB_CAPTURE_DEFAULTBUFSIZE;
-static u_int db_capture_maxbufsize = DB_CAPTURE_MAXBUFSIZE; /* Read-only. */
+static u_int db_capture_bufsize = DDB_CAPTURE_DEFAULTBUFSIZE;
+static u_int db_capture_maxbufsize = DDB_CAPTURE_MAXBUFSIZE; /* Read-only. */
 static u_int db_capture_bufoff;		/* Next location to write in buffer. */
 static u_int db_capture_bufpadding;	/* Amount of zero padding. */
 static int db_capture_inpager;		/* Suspend capture in pager. */
@@ -81,26 +91,21 @@
     "Maximum value for debug.ddb.capture.bufsize");
 
 /*
- * Various compile-time assertions: defaults must be even multiples of
- * textdump block size.  We also perform run-time checking of
- * user-configurable values.
+ * Boot-time allocation of the DDB capture buffer, if any.  Force all buffer
+ * sizes, including the maximum size, to be rounded to block sizes.
  */
-CTASSERT(DB_CAPTURE_DEFAULTBUFSIZE % TEXTDUMP_BLOCKSIZE == 0);
-CTASSERT(DB_CAPTURE_MAXBUFSIZE % TEXTDUMP_BLOCKSIZE == 0);
-
-/*
- * Boot-time allocation of the DDB capture buffer, if any.
- */
 static void
 db_capture_sysinit(__unused void *dummy)
 {
 
 	TUNABLE_INT_FETCH("debug.ddb.capture.bufsize", &db_capture_bufsize);
+	db_capture_maxbufsize = roundup(db_capture_maxbufsize,
+	    TEXTDUMP_BLOCKSIZE);
 	db_capture_bufsize = roundup(db_capture_bufsize, TEXTDUMP_BLOCKSIZE);
-	if (db_capture_bufsize > DB_CAPTURE_MAXBUFSIZE)
-		db_capture_bufsize = DB_CAPTURE_MAXBUFSIZE;
+	if (db_capture_bufsize > db_capture_maxbufsize)
+		db_capture_bufsize = db_capture_maxbufsize;
 	if (db_capture_bufsize != 0)
-		db_capture_buf = malloc(db_capture_bufsize, M_DB_CAPTURE,
+		db_capture_buf = malloc(db_capture_bufsize, M_DDB_CAPTURE,
 		    M_WAITOK);
 }
 SYSINIT(db_capture, SI_SUB_DDB_SERVICES, SI_ORDER_ANY, db_capture_sysinit,
@@ -121,7 +126,7 @@
 	if (error || req->newptr == NULL)
 		return (error);
 	size = roundup(size, TEXTDUMP_BLOCKSIZE);
-	if (size > DB_CAPTURE_MAXBUFSIZE)
+	if (size > db_capture_maxbufsize)
 		return (EINVAL);
 	sx_xlock(&db_capture_sx);
 	if (size != 0) {
@@ -129,7 +134,7 @@
 		 * Potentially the buffer is quite large, so if we can't
 		 * allocate it, fail rather than waiting.
 		 */
-		buf = malloc(size, M_DB_CAPTURE, M_NOWAIT);
+		buf = malloc(size, M_DDB_CAPTURE, M_NOWAIT);
 		if (buf == NULL) {
 			sx_xunlock(&db_capture_sx);
 			return (ENOMEM);
@@ -142,7 +147,7 @@
 	if (db_capture_buf != NULL && buf != NULL)
 		bcopy(db_capture_buf, buf, len);
 	if (db_capture_buf != NULL)
-		free(db_capture_buf, M_DB_CAPTURE);
+		free(db_capture_buf, M_DDB_CAPTURE);
 	db_capture_bufoff = len;
 	db_capture_buf = buf;
 	db_capture_bufsize = size;
@@ -150,7 +155,7 @@
 
 	KASSERT(db_capture_bufoff <= db_capture_bufsize,
 	    ("sysctl_debug_ddb_capture_bufsize: bufoff > bufsize"));
-	KASSERT(db_capture_bufsize <= DB_CAPTURE_MAXBUFSIZE,
+	KASSERT(db_capture_bufsize <= db_capture_maxbufsize,
 	    ("sysctl_debug_ddb_capture_maxbufsize: bufsize > maxbufsize"));
 
 	return (0);
@@ -297,7 +302,7 @@
 		return;
 
 	db_capture_zeropad();
-	textdump_mkustar(textdump_block_buffer, DB_CAPTURE_FILENAME,
+	textdump_mkustar(textdump_block_buffer, DDB_CAPTURE_FILENAME,
 	    db_capture_bufoff);
 	(void)textdump_writenextblock(di, textdump_block_buffer);
 	for (offset = 0; offset < db_capture_bufoff + db_capture_bufpadding;

==== //depot/projects/zcopybpf/src/sys/dev/acpica/acpi.c#8 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.243 2007/10/09 07:48:07 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.244 2008/01/27 16:11:04 iwasaki Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -2195,6 +2195,12 @@
 	}
     }
 
+    /* If devd(8) is not running, immediately enter the sleep state. */
+    if (devctl_process_running() == FALSE) {
+    	ACPI_UNLOCK(acpi);
+	return (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)));
+    }
+
     /* Now notify devd(8) also. */
     acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state);
 

==== //depot/projects/zcopybpf/src/sys/dev/amr/amr.c#3 (text+ko) ====

@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.84 2007/12/12 05:55:03 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.85 2008/01/24 07:26:53 scottl Exp $");
 
 /*
  * Driver for the AMI MegaRaid family of controllers.
@@ -139,10 +139,11 @@
 static int	amr_mapcmd(struct amr_command *ac);
 static void	amr_unmapcmd(struct amr_command *ac);
 static int	amr_start(struct amr_command *ac);
-static void	amr_complete(void *context, int pending);
+static void	amr_complete(void *context, ac_qhead_t *head);
 static void	amr_setup_sg(void *arg, bus_dma_segment_t *segs, int nsegments, int error);
 static void	amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegments, int error);
 static void	amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegments, int error);
+static void	amr_abort_load(struct amr_command *ac);
 
 /*
  * Status monitoring
@@ -207,10 +208,9 @@
     /*
      * Initialise per-controller queues.
      */
-    TAILQ_INIT(&sc->amr_completed);
-    TAILQ_INIT(&sc->amr_freecmds);
+    amr_init_qhead(&sc->amr_freecmds);
+    amr_init_qhead(&sc->amr_ready);
     TAILQ_INIT(&sc->amr_cmd_clusters);
-    TAILQ_INIT(&sc->amr_ready);
     bioq_init(&sc->amr_bioq);
 
     debug(2, "queue init done");
@@ -236,6 +236,11 @@
 #endif
 
     /*
+     * Allocate initial commands.
+     */
+    amr_alloccmd_cluster(sc);
+
+    /*
      * Quiz controller for features and limits.
      */
     if (amr_query_controller(sc))
@@ -244,6 +249,12 @@
     debug(2, "controller query complete");
 
     /*
+     * preallocate the remaining commands.
+     */
+    while (sc->amr_nextslot < sc->amr_maxio)
+	amr_alloccmd_cluster(sc);
+
+    /*
      * Setup sysctls.
      */
     amr_init_sysctl(sc);
@@ -357,6 +368,18 @@
 	SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)),
 	OID_AUTO, "allow_volume_configure", CTLFLAG_RW, &sc->amr_allow_vol_config, 0,
 	"");
+    SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev),
+	SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)),
+	OID_AUTO, "nextslot", CTLFLAG_RD, &sc->amr_nextslot, 0,
+	"");
+    SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev),
+	SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)),
+	OID_AUTO, "busyslots", CTLFLAG_RD, &sc->amr_busyslots, 0,
+	"");
+    SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev),
+	SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)),
+	OID_AUTO, "maxio", CTLFLAG_RD, &sc->amr_maxio, 0,
+	"");
 }
 
 
@@ -646,8 +669,18 @@
 	    error = ENOIOCTL;
 	    break;
 	} else {
-	    if (len)
-		dp = malloc(len, M_AMR, M_WAITOK | M_ZERO);
+	    /*
+	     * Bug-for-bug compatibility with Linux!
+	     * Some apps will send commands with inlen and outlen set to 0,
+	     * even though they expect data to be transfered to them from the
+	     * card.  Linux accidentally allows this by allocating a 4KB
+	     * buffer for the transfer anyways, but it then throws it away
+	     * without copying it back to the app.
+	     */
+	    if (!len)
+		len = 4096;
+
+	    dp = malloc(len, M_AMR, M_WAITOK | M_ZERO);
 
 	    if (ali.inlen) {
 		error = copyin((void *)(uintptr_t)mb->mb_physaddr, dp, len);
@@ -793,8 +826,7 @@
 	    if (sc == NULL)
 		return (ENOENT);
 
-	return (amr_linux_ioctl_int(sc->amr_dev_t, cmd,
-	    addr, 0, td));
+	    return (amr_linux_ioctl_int(sc->amr_dev_t, cmd, addr, 0, td));
 	}
     default:
 	debug(1, "unknown ioctl 0x%lx", cmd);
@@ -956,13 +988,6 @@
     int			ldrv;
     int			status;
 
-    /* 
-     * If we haven't found the real limit yet, let us have a couple of commands in
-     * order to be able to probe.
-     */
-    if (sc->amr_maxio == 0)
-	sc->amr_maxio = 2;
-
     /*
      * Greater than 10 byte cdb support
      */
@@ -1278,7 +1303,7 @@
     int			driveno;
     int			cmd;
 
-    *acp = NULL;
+    ac = NULL;
     error = 0;
 
     /* get a command */
@@ -1340,6 +1365,7 @@
 
     /* we fill in the s/g related data when the command is mapped */
 
+
     *acp = ac;
     return(error);
 }
@@ -1411,6 +1437,12 @@
     struct amr_softc *sc = ac->ac_sc;
     int mb_channel;
 
+    if (err) {
+	device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+	ac->ac_status = AMR_STATUS_ABORTED;
+	return;
+    }
+
     amr_setup_sg(arg, segs, nsegs, err);
 
     /* for AMR_CMD_CONFIG Read/Write the s/g count goes elsewhere */
@@ -1565,9 +1597,6 @@
 
     debug_called(3);
 
-    if (error)
-	printf("amr_setup_sg: error %d\n", error);
-
     /* get base address of s/g table */
     sg = ac->ac_sg.sg32;
     sg64 = ac->ac_sg.sg64;
@@ -1610,6 +1639,12 @@
     struct amr_softc *sc = ac->ac_sc;
     int mb_channel;
 
+    if (err) {
+	device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+	amr_abort_load(ac);
+	return;
+    }
+
     amr_setup_sg(arg, segs, nsegs, err);
 
     /* for AMR_CMD_CONFIG Read/Write the s/g count goes elsewhere */
@@ -1640,6 +1675,12 @@
     struct amr_passthrough *ap = &ac->ac_ccb->ccb_pthru;
     struct amr_ext_passthrough *aep = &ac->ac_ccb->ccb_epthru;
 
+    if (err) {
+	device_printf(sc->amr_dev, "error %d in %s", err, __FUNCTION__);
+	amr_abort_load(ac);
+	return;
+    }
+
     /* Set up the mailbox portion of the command to point at the ccb */
     ac->ac_mailbox.mb_nsgelem = 0;
     ac->ac_mailbox.mb_physaddr = ac->ac_ccb_busaddr;
@@ -1729,6 +1770,23 @@
     }
 }
 
+static void
+amr_abort_load(struct amr_command *ac)
+{
+    ac_qhead_t head;
+    struct amr_softc *sc = ac->ac_sc;
+
+    mtx_assert(&sc->amr_list_lock, MA_OWNED);
+
+    ac->ac_status = AMR_STATUS_ABORTED;
+    amr_init_qhead(&head);
+    amr_enqueue_completed(ac, &head);
+
+    mtx_unlock(&sc->amr_list_lock);
+    amr_complete(sc, &head);
+    mtx_lock(&sc->amr_list_lock);
+}
+
 /********************************************************************************
  * Take a command and give it to the controller, returns 0 if successful, or
  * EBUSY if the command should be retried later.
@@ -1774,6 +1832,7 @@
 int
 amr_done(struct amr_softc *sc)
 {
+    ac_qhead_t		head;
     struct amr_command	*ac;
     struct amr_mailbox	mbox;
     int			i, idx, result;
@@ -1782,6 +1841,7 @@
 
     /* See if there's anything for us to do */
     result = 0;
+    amr_init_qhead(&head);
 
     /* loop collecting completed commands */
     for (;;) {
@@ -1803,7 +1863,7 @@
 		
 		    /* save status for later use */
 		    ac->ac_status = mbox.mb_status;
-		    amr_enqueue_completed(ac);
+		    amr_enqueue_completed(ac, &head);
 		    debug(3, "completed command with status %x", mbox.mb_status);
 		} else {
 		    device_printf(sc->amr_dev, "bad slot %d completed\n", idx);
@@ -1814,7 +1874,7 @@
     }
 
     /* handle completion and timeouts */
-    amr_complete(sc, 0);
+    amr_complete(sc, &head);
 
     return(result);
 }
@@ -1824,7 +1884,7 @@
  */
 
 static void
-amr_complete(void *context, int pending)
+amr_complete(void *context, ac_qhead_t *head)
 {
     struct amr_softc	*sc = (struct amr_softc *)context;
     struct amr_command	*ac;
@@ -1833,7 +1893,7 @@
 
     /* pull completed commands off the queue */
     for (;;) {
-	ac = amr_dequeue_completed(sc);
+	ac = amr_dequeue_completed(sc, head);
 	if (ac == NULL)
 	    break;
 
@@ -1894,10 +1954,6 @@
 
     ac = amr_dequeue_free(sc);
     if (ac == NULL) {
-	amr_alloccmd_cluster(sc);
-	ac = amr_dequeue_free(sc);
-    }
-    if (ac == NULL) {
 	sc->amr_state |= AMR_STATE_QUEUE_FRZN;
 	return(NULL);
     }
@@ -1909,6 +1965,7 @@
     ac->ac_bio = NULL;
     ac->ac_data = NULL;
     ac->ac_complete = NULL;
+    ac->ac_retries = 0;
     ac->ac_tag = NULL;
     ac->ac_datamap = NULL;
     return(ac);
@@ -1935,12 +1992,21 @@
     struct amr_command		*ac;
     int				i, nextslot;
 
+    /* 
+     * If we haven't found the real limit yet, let us have a couple of
+     * commands in order to be able to probe.
+     */
+    if (sc->amr_maxio == 0)
+	sc->amr_maxio = 2;
+
     if (sc->amr_nextslot > sc->amr_maxio)
 	return;
     acc = malloc(AMR_CMD_CLUSTERSIZE, M_AMR, M_NOWAIT | M_ZERO);
     if (acc != NULL) {
 	nextslot = sc->amr_nextslot;
+	mtx_lock(&sc->amr_list_lock);
 	TAILQ_INSERT_TAIL(&sc->amr_cmd_clusters, acc, acc_link);
+	mtx_unlock(&sc->amr_list_lock);
 	for (i = 0; i < AMR_CMD_CLUSTERCOUNT; i++) {
 	    ac = &acc->acc_command[i];
 	    ac->ac_sc = sc;
@@ -1989,6 +2055,8 @@
     int			i;
 
     for (i = 0; i < AMR_CMD_CLUSTERCOUNT; i++) {
+	if (acc->acc_command[i].ac_sc == NULL)
+	    break;
 	bus_dmamap_destroy(sc->amr_buffer_dmat, acc->acc_command[i].ac_dmamap);
 	if (AMR_IS_SG64(sc))
 		bus_dmamap_destroy(sc->amr_buffer64_dmat, acc->acc_command[i].ac_dma64map);
@@ -2009,6 +2077,8 @@
 amr_quartz_submit_command(struct amr_command *ac)
 {
     struct amr_softc	*sc = ac->ac_sc;
+    static struct timeval lastfail;
+    static int		curfail;
     int			i = 0;
   
     mtx_lock(&sc->amr_hw_lock);
@@ -2016,6 +2086,12 @@
         DELAY(1);
     if (sc->amr_mailbox->mb_busy) {
 	mtx_unlock(&sc->amr_hw_lock);
+	if (ac->ac_retries++ > 1000) {
+	    if (ppsratecheck(&lastfail, &curfail, 1))
+		device_printf(sc->amr_dev, "Too many retries on command %p.  "
+			      "Controller is likely dead\n", ac);
+	    ac->ac_retries = 0;
+	}
 	return (EBUSY);
     }
 
@@ -2040,10 +2116,18 @@
 amr_std_submit_command(struct amr_command *ac)
 {
     struct amr_softc	*sc = ac->ac_sc;
+    static struct timeval lastfail;
+    static int		curfail;
   
     mtx_lock(&sc->amr_hw_lock);
     if (AMR_SGET_MBSTAT(sc) & AMR_SMBOX_BUSYFLAG) {
 	mtx_unlock(&sc->amr_hw_lock);
+	if (ac->ac_retries++ > 1000) {
+	    if (ppsratecheck(&lastfail, &curfail, 1))
+		device_printf(sc->amr_dev, "Too many retries on command %p.  "
+			      "Controller is likely dead\n", ac);
+	    ac->ac_retries = 0;
+	}
 	return (EBUSY);
     }
 

==== //depot/projects/zcopybpf/src/sys/dev/amr/amrreg.h#2 (text+ko) ====

@@ -53,7 +53,7 @@
  * SUCH DAMAGE.
  *
  *
- *      $FreeBSD: src/sys/dev/amr/amrreg.h,v 1.10 2006/01/13 23:50:21 jkim Exp $
+ *      $FreeBSD: src/sys/dev/amr/amrreg.h,v 1.11 2008/01/24 07:26:53 scottl Exp $
  */
 
 /********************************************************************************
@@ -126,6 +126,7 @@
 
 #define AMR_CONFIG_READ_NVRAM_CONFIG	0x04
 #define AMR_CONFIG_WRITE_NVRAM_CONFIG	0x0d
+#define AMR_CONFIG_ENQ3_SOLICITED_NOTIFY       0x01
 #define AMR_CONFIG_PRODUCT_INFO		0x0e
 #define AMR_CONFIG_ENQ3			0x0f
 #define AMR_CONFIG_ENQ3_SOLICITED_NOTIFY	0x01
@@ -141,6 +142,14 @@
 #define OP_DEL_LOGDRV		0x1C
 
 /*
+ * Command for random deletion of logical drives
+ */
+#define FC_DEL_LOGDRV		0xA4
+#define OP_SUP_DEL_LOGDRV	0x2A
+#define OP_GET_LDID_MAP		0x18
+#define OP_DEL_LOGDRV		0x1C
+
+/*
  * Command results
  */
 #define AMR_STATUS_SUCCESS	0x00

==== //depot/projects/zcopybpf/src/sys/dev/amr/amrvar.h#3 (text+ko) ====

@@ -53,7 +53,7 @@
  * SUCH DAMAGE.
  *
  *
- *      $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.34 2007/12/12 05:55:03 scottl Exp $
+ *      $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.35 2008/01/24 07:26:53 scottl Exp $
  */
 
 #include <geom/geom_disk.h>
@@ -100,6 +100,9 @@
 
 #define AMR_CMD_CLUSTERSIZE	(16 * 1024)
 
+typedef STAILQ_HEAD(, amr_command)	ac_qhead_t;
+typedef STAILQ_ENTRY(amr_command)	ac_link_t;
+
 union amr_ccb {
     struct amr_passthrough	ccb_pthru;
     struct amr_ext_passthrough	ccb_epthru;
@@ -111,7 +114,7 @@
  */
 struct amr_command
 {
-    TAILQ_ENTRY(amr_command)	ac_link;
+    ac_link_t			ac_link;
 
     struct amr_softc		*ac_sc;
     u_int8_t			ac_slot;
@@ -134,6 +137,7 @@
 #define AMR_CMD_BUSY		(1<<7)
 #define AMR_CMD_SG64		(1<<8)
 #define AC_IS_SG64(ac)		((ac)->ac_flags & AMR_CMD_SG64)
+    u_int			ac_retries;
 
     struct bio			*ac_bio;
     void			(* ac_complete)(struct amr_command *ac);
@@ -219,11 +223,10 @@
 
     /* per-controller queues */
     struct bio_queue_head 	amr_bioq;		/* pending I/O with no commands */
-    TAILQ_HEAD(,amr_command)	amr_ready;		/* commands ready to be submitted */
+    ac_qhead_t			amr_ready;		/* commands ready to be submitted */
     struct amr_command		*amr_busycmd[AMR_MAXCMD];
     int				amr_busyslots;
-    TAILQ_HEAD(,amr_command)	amr_completed;
-    TAILQ_HEAD(,amr_command)	amr_freecmds;
+    ac_qhead_t			amr_freecmds;
     TAILQ_HEAD(,amr_command_cluster)	amr_cmd_clusters;
 
     /* CAM attachments for passthrough */
@@ -320,17 +323,24 @@
 }
 
 static __inline void
+amr_init_qhead(ac_qhead_t *head)
+{
+
+	STAILQ_INIT(head);
+}
+
+static __inline void
 amr_enqueue_ready(struct amr_command *ac)
 {
 
-    TAILQ_INSERT_TAIL(&ac->ac_sc->amr_ready, ac, ac_link);
+    STAILQ_INSERT_TAIL(&ac->ac_sc->amr_ready, ac, ac_link);
 }
 
 static __inline void
 amr_requeue_ready(struct amr_command *ac)
 {
 
-    TAILQ_INSERT_HEAD(&ac->ac_sc->amr_ready, ac, ac_link);
+    STAILQ_INSERT_HEAD(&ac->ac_sc->amr_ready, ac, ac_link);
 }
 
 static __inline struct amr_command *
@@ -338,25 +348,25 @@
 {
     struct amr_command	*ac;
 
-    if ((ac = TAILQ_FIRST(&sc->amr_ready)) != NULL)
-	TAILQ_REMOVE(&sc->amr_ready, ac, ac_link);
+    if ((ac = STAILQ_FIRST(&sc->amr_ready)) != NULL)
+	STAILQ_REMOVE_HEAD(&sc->amr_ready, ac_link);
     return(ac);
 }
 
 static __inline void

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



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