svn commit: r200767 - in user/luigi/ipfw3-head: . cddl/contrib/opensolaris/cmd/zdb contrib/top lib/libjail share/man/man4 share/man/man9 sys/amd64/conf sys/boot/i386/libi386 sys/boot/pc98/libpc98 s...

Luigi Rizzo luigi at FreeBSD.org
Mon Dec 21 10:01:04 UTC 2009


Author: luigi
Date: Mon Dec 21 10:01:03 2009
New Revision: 200767
URL: http://svn.freebsd.org/changeset/base/200767

Log:
  Merging r200605 through r200766

Added:
  user/luigi/ipfw3-head/usr.sbin/service/
     - copied from r200766, head/usr.sbin/service/
Modified:
  user/luigi/ipfw3-head/UPDATING
  user/luigi/ipfw3-head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
  user/luigi/ipfw3-head/lib/libjail/jail.c
  user/luigi/ipfw3-head/share/man/man4/mwlfw.4
  user/luigi/ipfw3-head/share/man/man4/psm.4
  user/luigi/ipfw3-head/share/man/man4/vge.4
  user/luigi/ipfw3-head/share/man/man9/LOCK_PROFILING.9
  user/luigi/ipfw3-head/sys/amd64/conf/NOTES
  user/luigi/ipfw3-head/sys/boot/i386/libi386/biosdisk.c
  user/luigi/ipfw3-head/sys/boot/pc98/libpc98/biosdisk.c
  user/luigi/ipfw3-head/sys/boot/uboot/lib/glue.c
  user/luigi/ipfw3-head/sys/cam/scsi/scsi_cd.c
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  user/luigi/ipfw3-head/sys/compat/linux/linux_signal.c
  user/luigi/ipfw3-head/sys/conf/NOTES
  user/luigi/ipfw3-head/sys/dev/agp/agp_via.c
  user/luigi/ipfw3-head/sys/dev/ata/ata-pci.h
  user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-ite.c
  user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-promise.c
  user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-serverworks.c
  user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-via.c
  user/luigi/ipfw3-head/sys/dev/atkbdc/psm.c
  user/luigi/ipfw3-head/sys/dev/ciss/ciss.c
  user/luigi/ipfw3-head/sys/dev/e1000/if_igb.c
  user/luigi/ipfw3-head/sys/dev/hwpmc/hwpmc_intel.c
  user/luigi/ipfw3-head/sys/dev/ipmi/ipmi.c
  user/luigi/ipfw3-head/sys/dev/ips/ips_pci.c
  user/luigi/ipfw3-head/sys/dev/mii/ip1000phy.c
  user/luigi/ipfw3-head/sys/dev/usb/serial/u3g.c
  user/luigi/ipfw3-head/sys/dev/usb/usb_device.c
  user/luigi/ipfw3-head/sys/dev/usb/usb_dynamic.c
  user/luigi/ipfw3-head/sys/dev/usb/usb_dynamic.h
  user/luigi/ipfw3-head/sys/dev/usb/usbdevs
  user/luigi/ipfw3-head/sys/dev/usb/usbdi.h
  user/luigi/ipfw3-head/sys/dev/vge/if_vge.c
  user/luigi/ipfw3-head/sys/dev/vge/if_vgereg.h
  user/luigi/ipfw3-head/sys/dev/vge/if_vgevar.h
  user/luigi/ipfw3-head/sys/fs/devfs/devfs_vnops.c
  user/luigi/ipfw3-head/sys/i386/conf/NOTES
  user/luigi/ipfw3-head/sys/kern/kern_exit.c
  user/luigi/ipfw3-head/sys/kern/kern_proc.c
  user/luigi/ipfw3-head/sys/kern/subr_acl_nfs4.c
  user/luigi/ipfw3-head/sys/kern/subr_eventhandler.c
  user/luigi/ipfw3-head/sys/kern/subr_turnstile.c
  user/luigi/ipfw3-head/sys/kern/tty_pts.c
  user/luigi/ipfw3-head/sys/kern/uipc_syscalls.c
  user/luigi/ipfw3-head/sys/modules/ipfw/Makefile
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw2.c
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_log.c
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_private.h
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c
  user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_table.c
  user/luigi/ipfw3-head/sys/pc98/conf/NOTES
  user/luigi/ipfw3-head/sys/powerpc/booke/clock.c
  user/luigi/ipfw3-head/sys/sys/proc.h
  user/luigi/ipfw3-head/usr.bin/calendar/calendars/calendar.all
  user/luigi/ipfw3-head/usr.bin/calendar/calendars/calendar.dutch
  user/luigi/ipfw3-head/usr.bin/calendar/io.c
  user/luigi/ipfw3-head/usr.bin/calendar/ostern.c
  user/luigi/ipfw3-head/usr.bin/make/arch.c
  user/luigi/ipfw3-head/usr.bin/make/make.c
  user/luigi/ipfw3-head/usr.bin/truss/main.c
  user/luigi/ipfw3-head/usr.bin/truss/syscalls.c
  user/luigi/ipfw3-head/usr.bin/uniq/uniq.1
  user/luigi/ipfw3-head/usr.bin/uniq/uniq.c
  user/luigi/ipfw3-head/usr.bin/yacc/defs.h
  user/luigi/ipfw3-head/usr.sbin/Makefile
  user/luigi/ipfw3-head/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  user/luigi/ipfw3-head/   (props changed)
  user/luigi/ipfw3-head/cddl/contrib/opensolaris/   (props changed)
  user/luigi/ipfw3-head/contrib/bind9/   (props changed)
  user/luigi/ipfw3-head/contrib/cpio/   (props changed)
  user/luigi/ipfw3-head/contrib/csup/   (props changed)
  user/luigi/ipfw3-head/contrib/ee/   (props changed)
  user/luigi/ipfw3-head/contrib/expat/   (props changed)
  user/luigi/ipfw3-head/contrib/file/   (props changed)
  user/luigi/ipfw3-head/contrib/gdb/   (props changed)
  user/luigi/ipfw3-head/contrib/gdtoa/   (props changed)
  user/luigi/ipfw3-head/contrib/less/   (props changed)
  user/luigi/ipfw3-head/contrib/libpcap/   (props changed)
  user/luigi/ipfw3-head/contrib/ncurses/   (props changed)
  user/luigi/ipfw3-head/contrib/netcat/   (props changed)
  user/luigi/ipfw3-head/contrib/ntp/   (props changed)
  user/luigi/ipfw3-head/contrib/openbsm/   (props changed)
  user/luigi/ipfw3-head/contrib/openpam/   (props changed)
  user/luigi/ipfw3-head/contrib/pf/   (props changed)
  user/luigi/ipfw3-head/contrib/sendmail/   (props changed)
  user/luigi/ipfw3-head/contrib/tcpdump/   (props changed)
  user/luigi/ipfw3-head/contrib/tcsh/   (props changed)
  user/luigi/ipfw3-head/contrib/top/   (props changed)
  user/luigi/ipfw3-head/contrib/top/install-sh   (props changed)
  user/luigi/ipfw3-head/contrib/wpa/   (props changed)
  user/luigi/ipfw3-head/crypto/openssh/   (props changed)
  user/luigi/ipfw3-head/crypto/openssl/   (props changed)
  user/luigi/ipfw3-head/lib/libc/   (props changed)
  user/luigi/ipfw3-head/lib/libc/stdtime/   (props changed)
  user/luigi/ipfw3-head/lib/libutil/   (props changed)
  user/luigi/ipfw3-head/sbin/   (props changed)
  user/luigi/ipfw3-head/sbin/ipfw/   (props changed)
  user/luigi/ipfw3-head/share/zoneinfo/   (props changed)
  user/luigi/ipfw3-head/sys/   (props changed)
  user/luigi/ipfw3-head/sys/amd64/include/xen/   (props changed)
  user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/   (props changed)
  user/luigi/ipfw3-head/sys/contrib/dev/acpica/   (props changed)
  user/luigi/ipfw3-head/sys/contrib/pf/   (props changed)
  user/luigi/ipfw3-head/sys/dev/xen/xenpci/   (props changed)
  user/luigi/ipfw3-head/usr.bin/csup/   (props changed)
  user/luigi/ipfw3-head/usr.bin/procstat/   (props changed)
  user/luigi/ipfw3-head/usr.sbin/zic/   (props changed)

Modified: user/luigi/ipfw3-head/UPDATING
==============================================================================
--- user/luigi/ipfw3-head/UPDATING	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/UPDATING	Mon Dec 21 10:01:03 2009	(r200767)
@@ -22,6 +22,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20091202:
+	The rc.firewall and rc.firewall6 were unified, and
+	rc.firewall6 and rc.d/ip6fw were removed.
+	According to the removal of rc.d/ip6fw, ipv6_firewall_* rc
+	variables are obsoleted.  Instead, the following new rc
+	variables are added to rc.d/ipfw:
+
+		firewall_client_net_ipv6, firewall_simple_iif_ipv6,
+		firewall_simple_inet_ipv6, firewall_simple_oif_ipv6,
+		firewall_simple_onet_ipv6, firewall_trusted_ipv6
+
+	The meanings correspond to the relevant IPv4 variables.
+
 20091113:
 	The default terminal emulation for syscons(4) has been changed
 	from cons25 to xterm on all platforms except pc98.  This means

Modified: user/luigi/ipfw3-head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
==============================================================================
--- user/luigi/ipfw3-head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -19,12 +19,10 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Print intent log header and statistics.
  */
@@ -345,8 +343,10 @@ dump_intent_log(zilog_t *zilog)
 	if (zh->zh_log.blk_birth == 0 || verbose < 2)
 		return;
 
-	(void) printf("\n    ZIL header: claim_txg %llu, seq %llu\n",
-	    (u_longlong_t)zh->zh_claim_txg, (u_longlong_t)zh->zh_replay_seq);
+	(void) printf("\n    ZIL header: claim_txg %llu, claim_seq %llu",
+	    (u_longlong_t)zh->zh_claim_txg, (u_longlong_t)zh->zh_claim_seq);
+	(void) printf(" replay_seq %llu, flags 0x%llx\n",
+	    (u_longlong_t)zh->zh_replay_seq, (u_longlong_t)zh->zh_flags);
 
 	if (verbose >= 4)
 		print_log_bp(&zh->zh_log, "\n\tfirst block: ");

Modified: user/luigi/ipfw3-head/lib/libjail/jail.c
==============================================================================
--- user/luigi/ipfw3-head/lib/libjail/jail.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/lib/libjail/jail.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -532,7 +532,7 @@ jailparam_get(struct jailparam *jp, unsi
 	}
 	jp_key = jp_lastjid ? jp_lastjid :
 	    jp_jid && jp_jid->jp_valuelen == sizeof(int) &&
-	    *(int *)jp_jid->jp_value ? jp_jid : jp_name;
+	    jp_jid->jp_value && *(int *)jp_jid->jp_value ? jp_jid : jp_name;
 	if (jp_key == NULL || jp_key->jp_value == NULL) {
 		strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN);
 		errno = ENOENT;

Modified: user/luigi/ipfw3-head/share/man/man4/mwlfw.4
==============================================================================
--- user/luigi/ipfw3-head/share/man/man4/mwlfw.4	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/share/man/man4/mwlfw.4	Mon Dec 21 10:01:03 2009	(r200767)
@@ -49,4 +49,4 @@ It may be
 statically linked into the kernel, or loaded as a module.
 .Sh SEE ALSO
 .Xr mwl 4 ,
-.Xr firmware 8
+.Xr firmware 9

Modified: user/luigi/ipfw3-head/share/man/man4/psm.4
==============================================================================
--- user/luigi/ipfw3-head/share/man/man4/psm.4	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/share/man/man4/psm.4	Mon Dec 21 10:01:03 2009	(r200767)
@@ -359,6 +359,18 @@ at boot-time.
 This will enable
 .Nm
 to handle packets from guest devices (sticks) and extra buttons.
+.Pp
+Tap and drag gestures can be disabled by setting
+.Va hw.psm.tap_enabled
+to
+.Em 0
+at boot-time.
+Currently, this is only supported on Synaptics touchpads with Extended
+support disabled. The behaviour may be changed after boot by setting
+the sysctl with the same name and by restarting
+.Xr moused 8
+using
+.Pa /etc/rc.d/moused .
 .Sh IOCTLS
 There are a few
 .Xr ioctl 2

Modified: user/luigi/ipfw3-head/share/man/man4/vge.4
==============================================================================
--- user/luigi/ipfw3-head/share/man/man4/vge.4	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/share/man/man4/vge.4	Mon Dec 21 10:01:03 2009	(r200767)
@@ -30,12 +30,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 21, 2007
+.Dd December 18, 2009
 .Dt VGE 4
 .Os
 .Sh NAME
 .Nm vge
-.Nd "VIA Networking Technologies VT6122 PCI Gigabit Ethernet adapter driver"
+.Nd "VIA Networking Technologies Velocity Gigabit Ethernet adapter driver"
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -55,22 +55,23 @@ if_vge_load="YES"
 The
 .Nm
 driver provides support for various NICs and embedded Ethernet interfaces
-based on the VIA Networking Technologies VT6122 Gigabit Ethernet
-controller chips.
+based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity
+Family Gigabit Ethernet controller chips.
 .Pp
-The VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed MAC with
-an integrated 10/100/1000 copper PHY.
+The VT6120/VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed
+MAC with an integrated 10/100/1000 copper PHY.
 (Some older cards use an external PHY.)
+The VT6130/VT6132 is the PCI express version of Velocity family.
 The MAC supports TCP/IP hardware
 checksums (IPv4 only), TCP large send, VLAN tag insertion and stripping,
 as well as VLAN filtering, a 64-entry CAM filter and a 64-entry VLAN filter,
 64-bit multicast hash filter, 4 separate transmit DMA queues, flow control
 and jumbo frames up to 16K in size.
-The VT6122 has a 16K receive FIFO and 48K transmit FIFO.
+The Velocity family controllers have a 16K receive FIFO and 48K transmit FIFO.
 .Pp
 The
 .Nm
-driver takes advantage of the VT6122's checksum offload and VLAN
+driver takes advantage of the controller's checksum offload and VLAN
 tagging features, as well as the jumbo frame and CAM filter support.
 The CAM filter is used for multicast address filtering to provide
 64 perfect multicast address filter support.
@@ -162,7 +163,7 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver supports VIA Networking VT3119 and VT6122 based
+driver supports VIA Networking VT6120, VT6122, VT6130 and VT6132 based
 Gigabit Ethernet adapters including:
 .Pp
 .Bl -bullet -compact
@@ -173,6 +174,38 @@ ZyXEL GN650-T 64-bit PCI Gigabit Etherne
 .It
 ZyXEL GN670-T 32-bit PCI Gigabit Ethernet NIC (ZX1702)
 .El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.vge.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vge.%d.int_holdoff
+Maximum number of time to delay interrupts.
+The valid range is 0 to 5100 in units of 1us, the default is
+150 (150us).
+The resolution of of timer is about 20us so finer tuning than
+20us wouldn't be available.
+The interface should be brought down and up again before a change
+takes effect.
+.It Va dev.vge.%d.rx_coal_pkt
+Maximum number of packets to fire Rx completion interrupt.
+The valid range is 1 to 255, the default is 64.
+.It Va dev.vge.%d.tx_coal_pkt
+Maximum number of packets to fire Tx completion interrupt.
+The valid range is 1 to 255, the default is 128.
+.El
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "vge%d: couldn't map memory"

Modified: user/luigi/ipfw3-head/share/man/man9/LOCK_PROFILING.9
==============================================================================
--- user/luigi/ipfw3-head/share/man/man9/LOCK_PROFILING.9	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/share/man/man9/LOCK_PROFILING.9	Mon Dec 21 10:01:03 2009	(r200767)
@@ -114,6 +114,8 @@ The columns are as follows, from left to
 .Bl -tag -width ".Va cnt_hold"
 .It Va max
 The longest continuous hold time in microseconds.
+.It Va wait_max
+The longest continuous wait time in microseconds.
 .It Va total
 The total (accumulated) hold time in microseconds.
 .It Va wait_total

Modified: user/luigi/ipfw3-head/sys/amd64/conf/NOTES
==============================================================================
--- user/luigi/ipfw3-head/sys/amd64/conf/NOTES	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/amd64/conf/NOTES	Mon Dec 21 10:01:03 2009	(r200767)
@@ -277,7 +277,6 @@ options 	DRM_DEBUG	# Include debug print
 # iwn:	Intel Wireless WiFi Link 4965AGN 802.11 network adapters
 # nfe:	nVidia nForce MCP on-board Ethernet Networking (BSD open source)
 # nve:	nVidia nForce MCP on-board Ethernet Networking
-# ral:	Ralink Technology IEEE 802.11 wireless adapter
 # wpi:	Intel 3945ABG Wireless LAN controller
 
 device		ed
@@ -289,16 +288,8 @@ device		iwn
 device		ipw
 device		nfe
 device		nve
-device		ral
 device		wpi
 
-device		ath			# Atheros pci/cardbus NIC's
-device		ath_hal			# pci/cardbus chip support
-options 	AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
-device		ath_rate_sample		# SampleRate tx rate control for ath
-#device		ath_rate_amrr		# AMRR rate control for ath driver
-#device		ath_rate_onoe		# Onoe rate control for ath driver
-
 #
 #XXX this stores pointers in a 32bit field that is defined by the hardware
 #device	pst

Modified: user/luigi/ipfw3-head/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- user/luigi/ipfw3-head/sys/boot/i386/libi386/biosdisk.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/boot/i386/libi386/biosdisk.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -1266,11 +1266,11 @@ bd_io(struct open_disk *od, daddr_t dblk
 	}
 
 	if (write)
-	    DEBUG("%d sectors from %lld to %p (0x%x) %s", x, dblk, p, VTOP(p),
-		result ? "failed" : "ok");
+	    DEBUG("Write %d sector(s) from %p (0x%x) to %lld %s", x,
+		p, VTOP(p), dblk, result ? "failed" : "ok");
 	else
-	    DEBUG("%d sectors from %p (0x%x) to %lld %s", x, p, VTOP(p), dblk,
-		result ? "failed" : "ok");
+	    DEBUG("Read %d sector(s) from %lld to %p (0x%x) %s", x,
+		dblk, p, VTOP(p), result ? "failed" : "ok");
 	if (result) {
 	    return(-1);
 	}

Modified: user/luigi/ipfw3-head/sys/boot/pc98/libpc98/biosdisk.c
==============================================================================
--- user/luigi/ipfw3-head/sys/boot/pc98/libpc98/biosdisk.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/boot/pc98/libpc98/biosdisk.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -906,11 +906,11 @@ bd_io(struct open_disk *od, daddr_t dblk
 	}
 
 	if (write)
-	    DEBUG("%d sectors from %lld to %p (0x%x) %s", x, dblk, p, VTOP(p),
-		result ? "failed" : "ok");
+	    DEBUG("Write %d sector(s) from %p (0x%x) to %lld %s", x,
+		p, VTOP(p), dblk, result ? "failed" : "ok");
 	else
-	    DEBUG("%d sectors from %p (0x%x) to %lld %s", x, p, VTOP(p), dblk,
-		result ? "failed" : "ok");
+	    DEBUG("Read %d sector(s) from %lld to %p (0x%x) %s", x,
+		dblk, p, VTOP(p), result ? "failed" : "ok");
 	if (result) {
 	    return(-1);
 	}

Modified: user/luigi/ipfw3-head/sys/boot/uboot/lib/glue.c
==============================================================================
--- user/luigi/ipfw3-head/sys/boot/uboot/lib/glue.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/boot/uboot/lib/glue.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -568,17 +568,16 @@ ub_env_enum(const char *last)
 	const char *env, *str;
 	int i;
 
-	env = NULL;
-
 	/*
 	 * It's OK to pass only the name piece as last (and not the whole
 	 * 'name=val' string), since the API_ENUM_ENV call uses envmatch()
 	 * internally, which handles such case
 	 */
-	if (!syscall(API_ENV_ENUM, NULL, (uint32_t)last, (uint32_t)&env))
+	env = NULL;
+	if (syscall(API_ENV_ENUM, NULL, (uint32_t)last, (uint32_t)&env) != 0)
 		return (NULL);
 
-	if (!env)
+	if (env == NULL)
 		/* no more env. variables to enumerate */
 		return (NULL);
 

Modified: user/luigi/ipfw3-head/sys/cam/scsi/scsi_cd.c
==============================================================================
--- user/luigi/ipfw3-head/sys/cam/scsi/scsi_cd.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cam/scsi/scsi_cd.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -1464,8 +1464,6 @@ cdstart(struct cam_periph *periph, union
 		} else {
 			bioq_remove(&softc->bio_queue, bp);
 
-			devstat_start_transaction_bio(softc->disk->d_devstat, bp);
-
 			scsi_read_write(&start_ccb->csio,
 					/*retries*/cd_retry_count,
 					/* cbfcnp */ cddone,

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -19,12 +19,10 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/dmu.h>
 #include <sys/dmu_objset.h>
 #include <sys/dmu_tx.h>
@@ -108,19 +106,51 @@ dmu_object_claim(objset_t *os, uint64_t 
 
 int
 dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot,
-    int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
+    int blocksize, dmu_object_type_t bonustype, int bonuslen)
 {
 	dnode_t *dn;
+	dmu_tx_t *tx;
+	int nblkptr;
 	int err;
 
-	if (object == DMU_META_DNODE_OBJECT && !dmu_tx_private_ok(tx))
+	if (object == DMU_META_DNODE_OBJECT)
 		return (EBADF);
 
 	err = dnode_hold_impl(os->os, object, DNODE_MUST_BE_ALLOCATED,
 	    FTAG, &dn);
 	if (err)
 		return (err);
+
+	if (dn->dn_type == ot && dn->dn_datablksz == blocksize &&
+	    dn->dn_bonustype == bonustype && dn->dn_bonuslen == bonuslen) {
+		/* nothing is changing, this is a noop */
+		dnode_rele(dn, FTAG);
+		return (0);
+	}
+
+	tx = dmu_tx_create(os);
+	dmu_tx_hold_bonus(tx, object);
+	err = dmu_tx_assign(tx, TXG_WAIT);
+	if (err) {
+		dmu_tx_abort(tx);
+		dnode_rele(dn, FTAG);
+		return (err);
+	}
+
+	nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT);
+
+	/*
+	 * If we are losing blkptrs or changing the block size this must
+	 * be a new file instance.   We must clear out the previous file
+	 * contents before we can change this type of metadata in the dnode.
+	 */
+	if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize)
+		dmu_free_long_range(os, object, 0, DMU_OBJECT_END);
+
 	dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx);
+
+	dmu_tx_commit(tx);
+
 	dnode_rele(dn, FTAG);
 
 	return (0);

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -828,11 +828,7 @@ restore_object(struct restorearg *ra, ob
 {
 	int err;
 	dmu_tx_t *tx;
-
-	err = dmu_object_info(os, drro->drr_object, NULL);
-
-	if (err != 0 && err != ENOENT)
-		return (EINVAL);
+	void *data = NULL;
 
 	if (drro->drr_type == DMU_OT_NONE ||
 	    drro->drr_type >= DMU_OT_NUMTYPES ||
@@ -846,12 +842,15 @@ restore_object(struct restorearg *ra, ob
 		return (EINVAL);
 	}
 
-	tx = dmu_tx_create(os);
+	err = dmu_object_info(os, drro->drr_object, NULL);
+
+	if (err != 0 && err != ENOENT)
+		return (EINVAL);
 
 	if (err == ENOENT) {
 		/* currently free, want to be allocated */
+		tx = dmu_tx_create(os);
 		dmu_tx_hold_bonus(tx, DMU_NEW_OBJECT);
-		dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, 1);
 		err = dmu_tx_assign(tx, TXG_WAIT);
 		if (err) {
 			dmu_tx_abort(tx);
@@ -860,45 +859,41 @@ restore_object(struct restorearg *ra, ob
 		err = dmu_object_claim(os, drro->drr_object,
 		    drro->drr_type, drro->drr_blksz,
 		    drro->drr_bonustype, drro->drr_bonuslen, tx);
+		dmu_tx_commit(tx);
 	} else {
 		/* currently allocated, want to be allocated */
-		dmu_tx_hold_bonus(tx, drro->drr_object);
-		/*
-		 * We may change blocksize and delete old content,
-		 * so need to hold_write and hold_free.
-		 */
-		dmu_tx_hold_write(tx, drro->drr_object, 0, 1);
-		dmu_tx_hold_free(tx, drro->drr_object, 0, DMU_OBJECT_END);
-		err = dmu_tx_assign(tx, TXG_WAIT);
-		if (err) {
-			dmu_tx_abort(tx);
-			return (err);
-		}
 
 		err = dmu_object_reclaim(os, drro->drr_object,
 		    drro->drr_type, drro->drr_blksz,
-		    drro->drr_bonustype, drro->drr_bonuslen, tx);
+		    drro->drr_bonustype, drro->drr_bonuslen);
 	}
-	if (err) {
-		dmu_tx_commit(tx);
+	if (err)
 		return (EINVAL);
+
+	if (drro->drr_bonuslen) {
+		data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8));
+		if (ra->err)
+			return (ra->err);
+	}
+
+	tx = dmu_tx_create(os);
+	dmu_tx_hold_bonus(tx, drro->drr_object);
+	err = dmu_tx_assign(tx, TXG_WAIT);
+	if (err) {
+		dmu_tx_abort(tx);
+		return (err);
 	}
 
 	dmu_object_set_checksum(os, drro->drr_object, drro->drr_checksum, tx);
 	dmu_object_set_compress(os, drro->drr_object, drro->drr_compress, tx);
 
-	if (drro->drr_bonuslen) {
+	if (data != NULL) {
 		dmu_buf_t *db;
-		void *data;
+
 		VERIFY(0 == dmu_bonus_hold(os, drro->drr_object, FTAG, &db));
 		dmu_buf_will_dirty(db, tx);
 
 		ASSERT3U(db->db_size, >=, drro->drr_bonuslen);
-		data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8));
-		if (data == NULL) {
-			dmu_tx_commit(tx);
-			return (ra->err);
-		}
 		bcopy(data, db->db_data, drro->drr_bonuslen);
 		if (ra->byteswap) {
 			dmu_ot[drro->drr_bonustype].ot_byteswap(db->db_data,

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -415,8 +415,7 @@ void
 dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
     dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
 {
-	int i, nblkptr;
-	dmu_buf_impl_t *db = NULL;
+	int nblkptr;
 
 	ASSERT3U(blocksize, >=, SPA_MINBLOCKSIZE);
 	ASSERT3U(blocksize, <=, SPA_MAXBLOCKSIZE);
@@ -428,42 +427,25 @@ dnode_reallocate(dnode_t *dn, dmu_object
 	ASSERT3U(bonustype, <, DMU_OT_NUMTYPES);
 	ASSERT3U(bonuslen, <=, DN_MAX_BONUSLEN);
 
-	for (i = 0; i < TXG_SIZE; i++)
-		ASSERT(!list_link_active(&dn->dn_dirty_link[i]));
-
 	/* clean up any unreferenced dbufs */
 	dnode_evict_dbufs(dn);
-	ASSERT3P(list_head(&dn->dn_dbufs), ==, NULL);
-
-	/*
-	 * XXX I should really have a generation number to tell if we
-	 * need to do this...
-	 */
-	if (blocksize != dn->dn_datablksz ||
-	    dn->dn_bonustype != bonustype || dn->dn_bonuslen != bonuslen) {
-		/* free all old data */
-		dnode_free_range(dn, 0, -1ULL, tx);
-	}
-
-	nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT);
 
-	/* change blocksize */
 	rw_enter(&dn->dn_struct_rwlock, RW_WRITER);
-	if (blocksize != dn->dn_datablksz &&
-	    (!BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
-	    list_head(&dn->dn_dbufs) != NULL)) {
-		db = dbuf_hold(dn, 0, FTAG);
-		dbuf_new_size(db, blocksize, tx);
-	}
-	dnode_setdblksz(dn, blocksize);
 	dnode_setdirty(dn, tx);
-	dn->dn_next_bonuslen[tx->tx_txg&TXG_MASK] = bonuslen;
-	dn->dn_next_blksz[tx->tx_txg&TXG_MASK] = blocksize;
+	if (dn->dn_datablksz != blocksize) {
+		/* change blocksize */
+		ASSERT(dn->dn_maxblkid == 0 &&
+		    (BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
+		    dnode_block_freed(dn, 0)));
+		dnode_setdblksz(dn, blocksize);
+		dn->dn_next_blksz[tx->tx_txg&TXG_MASK] = blocksize;
+	}
+	if (dn->dn_bonuslen != bonuslen)
+		dn->dn_next_bonuslen[tx->tx_txg&TXG_MASK] = bonuslen;
+	nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT);
 	if (dn->dn_nblkptr != nblkptr)
 		dn->dn_next_nblkptr[tx->tx_txg&TXG_MASK] = nblkptr;
 	rw_exit(&dn->dn_struct_rwlock);
-	if (db)
-		dbuf_rele(db, FTAG);
 
 	/* change type */
 	dn->dn_type = ot;
@@ -1187,11 +1169,6 @@ dnode_block_freed(dnode_t *dn, uint64_t 
 	if (dn->dn_free_txg)
 		return (TRUE);
 
-	/*
-	 * If dn_datablkshift is not set, then there's only a single
-	 * block, in which case there will never be a free range so it
-	 * won't matter.
-	 */
 	range_tofind.fr_blkid = blkid;
 	mutex_enter(&dn->dn_mtx);
 	for (i = 0; i < TXG_SIZE; i++) {

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Mon Dec 21 10:01:03 2009	(r200767)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -237,7 +237,7 @@ uint64_t dmu_object_alloc(objset_t *os, 
 int dmu_object_claim(objset_t *os, uint64_t object, dmu_object_type_t ot,
     int blocksize, dmu_object_type_t bonus_type, int bonus_len, dmu_tx_t *tx);
 int dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot,
-    int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
+    int blocksize, dmu_object_type_t bonustype, int bonuslen);
 
 /*
  * Free an object from this objset.

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h	Mon Dec 21 10:01:03 2009	(r200767)
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -56,10 +56,16 @@ typedef struct zil_header {
 	uint64_t zh_replay_seq;	/* highest replayed sequence number */
 	blkptr_t zh_log;	/* log chain */
 	uint64_t zh_claim_seq;	/* highest claimed sequence number */
-	uint64_t zh_pad[5];
+	uint64_t zh_flags;	/* header flags */
+	uint64_t zh_pad[4];
 } zil_header_t;
 
 /*
+ * zh_flags bit settings
+ */
+#define	ZIL_REPLAY_NEEDED 0x1	/* replay needed - internal only */
+
+/*
  * Log block trailer - structure at the end of the header and each log block
  *
  * The zit_bt contains a zbt_cksum which for the intent log is

Modified: user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -502,6 +502,25 @@ zil_rollback_destroy(zilog_t *zilog, dmu
 	    tx, zh->zh_claim_txg);
 }
 
+/*
+ * return true if the initial log block is not valid
+ */
+static boolean_t
+zil_empty(zilog_t *zilog)
+{
+	const zil_header_t *zh = zilog->zl_header;
+	arc_buf_t *abuf = NULL;
+
+	if (BP_IS_HOLE(&zh->zh_log))
+		return (B_TRUE);
+
+	if (zil_read_log_block(zilog, &zh->zh_log, &abuf) != 0)
+		return (B_TRUE);
+
+	VERIFY(arc_buf_remove_ref(abuf, &abuf) == 1);
+	return (B_FALSE);
+}
+
 int
 zil_claim(char *osname, void *txarg)
 {
@@ -522,6 +541,21 @@ zil_claim(char *osname, void *txarg)
 	zh = zil_header_in_syncing_context(zilog);
 
 	/*
+	 * Record here whether the zil has any records to replay.
+	 * If the header block pointer is null or the block points
+	 * to the stubby then we know there are no valid log records.
+	 * We use the header to store this state as the the zilog gets
+	 * freed later in dmu_objset_close().
+	 * The flags (and the rest of the header fields) are cleared in
+	 * zil_sync() as a result of a zil_destroy(), after replaying the log.
+	 *
+	 * Note, the intent log can be empty but still need the
+	 * stubby to be claimed.
+	 */
+	if (!zil_empty(zilog))
+		zh->zh_flags |= ZIL_REPLAY_NEEDED;
+
+	/*
 	 * Claim all log blocks if we haven't already done so, and remember
 	 * the highest claimed sequence number.  This ensures that if we can
 	 * read only part of the log now (e.g. due to a missing device),
@@ -1345,25 +1379,6 @@ zil_free(zilog_t *zilog)
 }
 
 /*
- * return true if the initial log block is not valid
- */
-static boolean_t
-zil_empty(zilog_t *zilog)
-{
-	const zil_header_t *zh = zilog->zl_header;
-	arc_buf_t *abuf = NULL;
-
-	if (BP_IS_HOLE(&zh->zh_log))
-		return (B_TRUE);
-
-	if (zil_read_log_block(zilog, &zh->zh_log, &abuf) != 0)
-		return (B_TRUE);
-
-	VERIFY(arc_buf_remove_ref(abuf, &abuf) == 1);
-	return (B_FALSE);
-}
-
-/*
  * Open an intent log.
  */
 zilog_t *
@@ -1418,7 +1433,7 @@ zil_suspend(zilog_t *zilog)
 	const zil_header_t *zh = zilog->zl_header;
 
 	mutex_enter(&zilog->zl_lock);
-	if (zh->zh_claim_txg != 0) {		/* unplayed log */
+	if (zh->zh_flags & ZIL_REPLAY_NEEDED) {		/* unplayed log */
 		mutex_exit(&zilog->zl_lock);
 		return (EBUSY);
 	}
@@ -1645,7 +1660,7 @@ zil_replay(objset_t *os, void *arg, uint
 	const zil_header_t *zh = zilog->zl_header;
 	zil_replay_arg_t zr;
 
-	if (zil_empty(zilog)) {
+	if ((zh->zh_flags & ZIL_REPLAY_NEEDED) == 0) {
 		zil_destroy(zilog, B_TRUE);
 		return;
 	}

Modified: user/luigi/ipfw3-head/sys/compat/linux/linux_signal.c
==============================================================================
--- user/luigi/ipfw3-head/sys/compat/linux/linux_signal.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/compat/linux/linux_signal.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -565,7 +565,7 @@ linux_do_tkill(struct thread *td, l_int 
 
 	AUDIT_ARG_PROCESS(p);
 	error = p_cansignal(td, p, signum);
-	if (error)
+	if (error != 0 || signum == 0)
 		goto out;
 
 	error = ESRCH;

Modified: user/luigi/ipfw3-head/sys/conf/NOTES
==============================================================================
--- user/luigi/ipfw3-head/sys/conf/NOTES	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/conf/NOTES	Mon Dec 21 10:01:03 2009	(r200767)
@@ -1812,14 +1812,47 @@ device		puc
 #
 # Network interfaces:
 #
-# MII bus support is required for some PCI 10/100 ethernet NICs,
+# MII bus support is required for many PCI Ethernet NICs,
 # namely those which use MII-compliant transceivers or implement
-# transceiver control interfaces that operate like an MII. Adding
+# transceiver control interfaces that operate like an MII.  Adding
 # "device miibus" to the kernel config pulls in support for
 # the generic miibus API and all of the PHY drivers, including a
 # generic one for PHYs that aren't specifically handled by an
-# individual driver.
-device		miibus
+# individual driver.  Support for specific PHYs may be built by adding
+# "device mii" then adding the appropriate PHY driver.
+device  	miibus		# MII support including all PHYs
+device  	mii		# Minimal MII support
+
+device  	acphy		# Altima Communications AC101
+device  	amphy		# AMD AM79c873 / Davicom DM910{1,2}
+device  	atphy		# Attansic/Atheros F1
+device  	axphy		# Asix Semiconductor AX88x9x
+device  	bmtphy		# Broadcom BCM5201/BCM5202 and 3Com 3c905C
+device  	brgphy		# Broadcom BCM54xx/57xx 1000baseTX
+device  	ciphy		# Cicada/Vitesse CS/VSC8xxx
+device  	e1000phy	# Marvell 88E1000 1000/100/10-BT
+device  	exphy		# 3Com internal PHY
+device  	gentbi		# Generic 10-bit 1000BASE-{LX,SX} fiber ifaces
+device  	icsphy		# ICS ICS1889-1893
+device  	inphy		# Intel 82553/82555
+device  	ip1000phy	# IC Plus IP1000A/IP1001
+device  	jmphy		# JMicron JMP211/JMP202
+device  	lxtphy		# Level One LXT-970
+device  	mlphy		# Micro Linear 6692
+device  	nsgphy		# NatSemi DP8361/DP83865/DP83891
+device  	nsphy		# NatSemi DP83840A
+device  	nsphyter	# NatSemi DP83843/DP83815
+device  	pnaphy		# HomePNA
+device  	qsphy		# Quality Semiconductor QS6612
+device  	rgephy		# RealTek 8169S/8110S/8211B/8211C
+device  	rlphy		# RealTek 8139
+device  	rlswitch	# RealTek 8305
+device  	ruephy		# RealTek RTL8150
+device  	smcphy		# SMSC LAN91C111
+device  	tdkphy		# TDK 89Q2120
+device  	tlphy		# Texas Instruments ThunderLAN
+device  	truephy		# LSI TruePHY
+device		xmphy		# XaQti XMAC II
 
 # an:   Aironet 4500/4800 802.11 wireless adapters. Supports the PCMCIA,
 #       PCI and ISA varieties.
@@ -1829,6 +1862,7 @@ device		miibus
 #       L1 PCI express gigabit ethernet controllers.
 # alc:  Support for Atheros AR8131/AR8132 PCIe ethernet controllers.
 # ale:  Support for Atheros AR8121/AR8113/AR8114 PCIe ethernet controllers.
+# ath:  Atheros a/b/g WiFi adapters (requires ath_hal and wlan)
 # bce:	Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet
 #       adapters.
 # bfe:	Broadcom BCM4401 Ethernet adapter.
@@ -1887,6 +1921,7 @@ device		miibus
 #	pcn(4) driver is left out of the kernel. The le(4) driver does not
 #	support the additional features like the MII bus and burst mode of
 #	the PCnet-FAST and greater chipsets though.
+# ral:	Ralink Technology IEEE 802.11 wireless adapter
 # re:   RealTek 8139C+/8169/816xS/811xS/8101E PCI/PCIe Ethernet adapter
 # rl:   Support for PCI fast ethernet adapters based on the RealTek 8129/8139
 #       chipset.  Note that the RealTek driver defaults to using programmed
@@ -2006,7 +2041,6 @@ device		wb		# Winbond W89C840F
 device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')
 
 # PCI Ethernet NICs.
-device		bwi		# Broadcom BCM430* BCM431*
 device		de		# DEC/Intel DC21x4x (``Tulip'')
 device		em		# Intel Pro/1000 Gigabit Ethernet
 device		igb		# Intel Pro/1000 PCIE Gigabit Ethernet
@@ -2025,6 +2059,26 @@ device		fpa
 # PCI WAN adapters.
 device		lmc
 
+# PCI IEEE 802.11 Wireless NICs
+device		ath		# Atheros pci/cardbus NIC's
+device		ath_hal		# pci/cardbus chip support
+#device		ath_ar5210	# AR5210 chips
+#device		ath_ar5211	# AR5211 chips
+#device		ath_ar5212	# AR5212 chips
+#device		ath_rf2413
+#device		ath_rf2417
+#device		ath_rf2425
+#device		ath_rf5111
+#device		ath_rf5112
+#device		ath_rf5413
+#device		ath_ar5416	# AR5416 chips
+options 	AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
+#device		ath_ar9160	# AR9160 chips
+#device		ath_ar9280	# AR9280 chips
+device		ath_rate_sample	# SampleRate tx rate control for ath
+device		bwi		# Broadcom BCM430* BCM431*
+device		ral		# Ralink Technology RT2500 wireless NICs.
+
 # Use "private" jumbo buffers allocated exclusively for the ti(4) driver.
 # This option is incompatible with the TI_JUMBO_HDRSPLIT option below.
 #options 	TI_PRIVATE_JUMBOS

Modified: user/luigi/ipfw3-head/sys/dev/agp/agp_via.c
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/agp/agp_via.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/agp/agp_via.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -165,39 +165,16 @@ agp_via_attach(device_t dev)
 	struct agp_gatt *gatt;
 	int error;
 	u_int32_t agpsel;
+	u_int32_t capid;
 
-	/* XXX: This should be keying off of whether the bridge is AGP3 capable,
-	 * rather than a bunch of device ids for chipsets that happen to do 8x.
-	 */
-	switch (pci_get_devid(dev)) {
-	case 0x01981106:
-	case 0x02591106:
-	case 0x02691106:
-	case 0x02961106:
-	case 0x03141106:
-	case 0x03241106:
-	case 0x03271106:
-	case 0x03641106:
-	case 0x31231106:
-	case 0x31681106:
-	case 0x31891106:
-	case 0x32051106:
-	case 0x32581106:
-	case 0xb1981106:
-		/* The newer VIA chipsets will select the AGP version based on
-		 * what AGP versions the card supports.  We still have to
-		 * program it using the v2 registers if it has chosen to use
-		 * compatibility mode.
-		 */
+	sc->regs = via_v2_regs;
+
+	/* Look at the capability register to see if we handle AGP3 */
+	capid = pci_read_config(dev, agp_find_caps(dev) + AGP_CAPID, 4);
+	if (((capid >> 20) & 0x0f) >= 3) { 
 		agpsel = pci_read_config(dev, AGP_VIA_AGPSEL, 1);
 		if ((agpsel & (1 << 1)) == 0)
 			sc->regs = via_v3_regs;
-		else
-			sc->regs = via_v2_regs;
-		break;
-	default:
-		sc->regs = via_v2_regs;
-		break;
 	}
 	
 	error = agp_generic_attach(dev);
@@ -235,7 +212,7 @@ agp_via_attach(device_t dev)
 		pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical, 4);
 		
 		/* Enable the aperture. */
-		gartctrl = pci_read_config(dev, sc->regs[REG_ATTBASE], 4);
+		gartctrl = pci_read_config(dev, sc->regs[REG_GARTCTRL], 4);
 		pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl | (3 << 7), 4);
 	}
 
@@ -268,7 +245,7 @@ agp_via_get_aperture(device_t dev)
 	u_int32_t apsize;
 
 	if (sc->regs == via_v2_regs) {
-		apsize = pci_read_config(dev, sc->regs[REG_APSIZE], 1) & 0x1f;
+		apsize = pci_read_config(dev, sc->regs[REG_APSIZE], 1);
 
 		/*
 		 * The size is determined by the number of low bits of
@@ -295,8 +272,14 @@ agp_via_get_aperture(device_t dev)
 			return 0x04000000;
 		case 0xf38:
 			return 0x02000000;
+		case 0xf3c:
+			return 0x01000000;
+		case 0xf3e:
+			return 0x00800000;
+		case 0xf3f:
+			return 0x00400000;
 		default:
-			device_printf(dev, "Invalid aperture setting 0x%x",
+			device_printf(dev, "Invalid aperture setting 0x%x\n",
 			    pci_read_config(dev, sc->regs[REG_APSIZE], 2));
 			return 0;
 		}
@@ -345,6 +328,15 @@ agp_via_set_aperture(device_t dev, u_int
 		case 0x02000000:
 			key = 0xf38;
 			break;
+		case 0x01000000:
+			key = 0xf3c;
+			break;
+		case 0x00800000:
+			key = 0xf3e;
+			break;
+		case 0x00400000:
+			key = 0xf3f;
+			break;
 		default:
 			device_printf(dev, "Invalid aperture size (%dMb)\n",
 			    aperture / 1024 / 1024);

Modified: user/luigi/ipfw3-head/sys/dev/ata/ata-pci.h
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/ata/ata-pci.h	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/ata/ata-pci.h	Mon Dec 21 10:01:03 2009	(r200767)
@@ -482,6 +482,11 @@ struct ata_pci_controller {
 #define ATA_VIA6410             0x31641106
 #define ATA_VIA6420             0x31491106
 #define ATA_VIA6421             0x32491106
+#define ATA_VIACX700IDE         0x05811106
+#define ATA_VIACX700            0x83241106
+#define ATA_VIASATAIDE          0x53241106
+#define ATA_VIAVX800            0x83531106
+#define ATA_VIAVX855            0x84091106
 
 /* global prototypes ata-pci.c */
 int ata_pci_probe(device_t dev);

Modified: user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-ite.c
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-ite.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-ite.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -105,6 +105,8 @@ ata_ite_chipinit(device_t dev)
 	pci_write_config(dev, 0x56, 0x31, 1);
 
 	ctlr->setmode = ata_ite_821x_setmode;
+	/* No timing restrictions initally. */
+	ctlr->chipset_data = (void *)0;
     }
     ctlr->ch_attach = ata_ite_ch_attach;
     return 0;
@@ -129,6 +131,7 @@ ata_ite_821x_setmode(device_t dev, int t
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
 	int piomode;
+	uint8_t *timings = (uint8_t*)(&ctlr->chipset_data);
 	u_int8_t udmatiming[] =
 		{ 0x44, 0x42, 0x31, 0x21, 0x11, 0xa2, 0x91 };
 	u_int8_t chtiming[] =
@@ -158,11 +161,10 @@ ata_ite_821x_setmode(device_t dev, int t
 			     (1 << (devno + 3)), 1);
 		piomode = mode;
 	}
+	timings[devno] = chtiming[ata_mode2idx(piomode)];
 	/* set active and recover timing (shared between master & slave) */
-	if (pci_read_config(parent, 0x54 + (ch->unit << 2), 1) <
-	    chtiming[ata_mode2idx(piomode)])
-		pci_write_config(parent, 0x54 + (ch->unit << 2),
-				 chtiming[ata_mode2idx(piomode)], 1);
+	pci_write_config(parent, 0x54 + (ch->unit << 2),
+	    max(timings[ch->unit << 1], timings[(ch->unit << 1) + 1]), 1);
 	return (mode);
 }
 

Modified: user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-promise.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-promise.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -957,6 +957,7 @@ ata_promise_mio_dmainit(device_t dev)
     ata_dmainit(dev);
     /* note start and stop are not used here */
     ch->dma.setprd = ata_promise_mio_setprd;
+    ch->dma.max_iosize = 65536;
 }
 
 

Modified: user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-serverworks.c
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-serverworks.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-serverworks.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -80,7 +80,7 @@ ata_serverworks_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
     static struct ata_chip_id ids[] =
-    {{ ATA_ROSB4,     0x00, SWKS_33,  0, ATA_UDMA2, "ROSB4" },
+    {{ ATA_ROSB4,     0x00, SWKS_33,  0, ATA_WDMA2, "ROSB4" },
      { ATA_CSB5,      0x92, SWKS_100, 0, ATA_UDMA5, "CSB5" },
      { ATA_CSB5,      0x00, SWKS_66,  0, ATA_UDMA4, "CSB5" },
      { ATA_CSB6,      0x00, SWKS_100, 0, ATA_UDMA5, "CSB6" },
@@ -388,10 +388,12 @@ ata_serverworks_setmode(device_t dev, in
 	    piomode = mode;
 	}
 	/* Set PIO mode and timings, calculated above. */
-	pci_write_config(parent, 0x4a,
+	if (ctlr->chip->cfg1 != SWKS_33) {
+		pci_write_config(parent, 0x4a,
 			 (pci_read_config(parent, 0x4a, 2) &
 			  ~(0xf << (devno << 2))) |
 			 ((piomode - ATA_PIO0) << (devno<<2)),2);
+	}
 	pci_write_config(parent, 0x40, 
 			 (pci_read_config(parent, 0x40, 4) &
 			  ~(0xff << offset)) |

Modified: user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-via.c
==============================================================================
--- user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-via.c	Mon Dec 21 06:24:44 2009	(r200766)
+++ user/luigi/ipfw3-head/sys/dev/ata/chipsets/ata-via.c	Mon Dec 21 10:01:03 2009	(r200767)
@@ -59,6 +59,9 @@ static void ata_via_reset(device_t dev);
 static int ata_via_old_setmode(device_t dev, int target, int mode);
 static void ata_via_southbridge_fixup(device_t dev);
 static int ata_via_new_setmode(device_t dev, int target, int mode);
+static int ata_via_sata_ch_attach(device_t dev);
+static int ata_via_sata_getrev(device_t dev, int target);
+static int ata_via_sata_setmode(device_t dev, int target, int mode);
 
 /* misc defines */
 #define VIA33           0
@@ -70,6 +73,7 @@ static int ata_via_new_setmode(device_t 
 #define VIABUG          0x02
 #define VIABAR          0x04
 #define VIAAHCI         0x08
+#define VIASATA         0x10
 
 
 /*
@@ -98,6 +102,9 @@ ata_via_probe(device_t dev)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list