Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 01:59:31 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 61584 for review
Message-ID:  <200409160159.i8G1xVKt013463@repoman.freebsd.org>

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

Change 61584 by marcel@marcel_nfs on 2004/09/16 01:58:33

	IFC @61583

Affected files ...

.. //depot/projects/ia64/UPDATING#67 integrate
.. //depot/projects/ia64/etc/defaults/rc.conf#52 integrate
.. //depot/projects/ia64/etc/rc.d/Makefile#29 integrate
.. //depot/projects/ia64/etc/rc.d/ntpdate#9 branch
.. //depot/projects/ia64/etc/rc.d/rpcbind#9 integrate
.. //depot/projects/ia64/gnu/usr.bin/send-pr/send-pr.sh#7 integrate
.. //depot/projects/ia64/release/Makefile#81 integrate
.. //depot/projects/ia64/sbin/atacontrol/atacontrol.c#17 integrate
.. //depot/projects/ia64/share/man/man4/divert.4#6 integrate
.. //depot/projects/ia64/share/man/man4/ng_ubt.4#8 integrate
.. //depot/projects/ia64/share/man/man4/vge.4#2 integrate
.. //depot/projects/ia64/share/man/man5/rc.conf.5#53 integrate
.. //depot/projects/ia64/share/man/man9/vm_map.9#4 integrate
.. //depot/projects/ia64/sys/alpha/isa/isa_dma.c#7 integrate
.. //depot/projects/ia64/sys/amd64/isa/isa_dma.c#7 integrate
.. //depot/projects/ia64/sys/amd64/isa/isa_dma.h#3 delete
.. //depot/projects/ia64/sys/contrib/pf/net/pf_if.c#2 integrate
.. //depot/projects/ia64/sys/dev/aha/aha_mca.c#8 integrate
.. //depot/projects/ia64/sys/dev/amr/amr.c#23 integrate
.. //depot/projects/ia64/sys/dev/buslogic/bt_mca.c#7 integrate
.. //depot/projects/ia64/sys/dev/fdc/fdc.c#4 integrate
.. //depot/projects/ia64/sys/dev/fdc/fdc_acpi.c#3 integrate
.. //depot/projects/ia64/sys/dev/fdc/fdc_isa.c#3 integrate
.. //depot/projects/ia64/sys/dev/fdc/fdc_pccard.c#3 integrate
.. //depot/projects/ia64/sys/dev/fdc/fdcvar.h#3 integrate
.. //depot/projects/ia64/sys/dev/md/md.c#44 integrate
.. //depot/projects/ia64/sys/dev/nge/if_nge.c#30 integrate
.. //depot/projects/ia64/sys/dev/nge/if_ngereg.h#6 integrate
.. //depot/projects/ia64/sys/dev/pst/pst-iop.h#5 integrate
.. //depot/projects/ia64/sys/dev/pst/pst-pci.c#7 integrate
.. //depot/projects/ia64/sys/dev/pst/pst-raid.c#13 integrate
.. //depot/projects/ia64/sys/dev/sound/pci/fm801.c#12 integrate
.. //depot/projects/ia64/sys/fs/nwfs/nwfs_io.c#14 integrate
.. //depot/projects/ia64/sys/fs/smbfs/smbfs_io.c#17 integrate
.. //depot/projects/ia64/sys/i386/i386/gdb_machdep.c#2 integrate
.. //depot/projects/ia64/sys/i386/include/db_machdep.h#3 integrate
.. //depot/projects/ia64/sys/i386/isa/isa_dma.c#8 integrate
.. //depot/projects/ia64/sys/i386/isa/isa_dma.h#4 delete
.. //depot/projects/ia64/sys/ia64/isa/isa_dma.c#7 integrate
.. //depot/projects/ia64/sys/isa/isavar.h#5 integrate
.. //depot/projects/ia64/sys/kern/kern_event.c#26 integrate
.. //depot/projects/ia64/sys/kern/kern_switch.c#33 integrate
.. //depot/projects/ia64/sys/kern/kern_thread.c#79 integrate
.. //depot/projects/ia64/sys/kern/vfs_bio.c#70 integrate
.. //depot/projects/ia64/sys/kern/vfs_init.c#15 integrate
.. //depot/projects/ia64/sys/kern/vfs_subr.c#66 integrate
.. //depot/projects/ia64/sys/net/if_clone.c#2 integrate
.. //depot/projects/ia64/sys/netinet/ip_icmp.c#23 integrate
.. //depot/projects/ia64/sys/netinet/ip_input.c#44 integrate
.. //depot/projects/ia64/sys/netinet/ip_var.h#23 integrate
.. //depot/projects/ia64/sys/netinet/tcp_syncache.c#31 integrate
.. //depot/projects/ia64/sys/nfs4client/nfs4_vnops.c#7 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_bio.c#26 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_vnops.c#34 integrate
.. //depot/projects/ia64/sys/pc98/pc98/isa_dma.c#6 integrate
.. //depot/projects/ia64/sys/sys/buf.h#32 integrate
.. //depot/projects/ia64/sys/sys/mbuf.h#32 integrate
.. //depot/projects/ia64/sys/vm/vm_page.c#65 integrate
.. //depot/projects/ia64/tools/lib32/build32.sh#3 integrate
.. //depot/projects/ia64/tools/tools/genericize/genericize.pl#2 integrate
.. //depot/projects/ia64/usr.bin/calendar/calendars/calendar.freebsd#46 integrate
.. //depot/projects/ia64/usr.bin/uniq/uniq.c#11 integrate
.. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/Makefile#4 integrate
.. //depot/projects/ia64/usr.sbin/bluetooth/hcsecd/parser.y#4 integrate
.. //depot/projects/ia64/usr.sbin/boot0cfg/boot0cfg.8#10 integrate
.. //depot/projects/ia64/usr.sbin/boot0cfg/boot0cfg.c#8 integrate
.. //depot/projects/ia64/usr.sbin/burncd/burncd.8#17 integrate
.. //depot/projects/ia64/usr.sbin/burncd/burncd.c#17 integrate
.. //depot/projects/ia64/usr.sbin/cron/crontab/Makefile#2 integrate
.. //depot/projects/ia64/usr.sbin/cron/crontab/crontab.c#4 integrate
.. //depot/projects/ia64/usr.sbin/sysinstall/disks.c#20 integrate

Differences ...

==== //depot/projects/ia64/UPDATING#67 (text+ko) ====

@@ -24,16 +24,6 @@
 	to maximize performance.
 
 20040914:
-	/etc/rc.d/ntpdate has been removed in favor of using the -g
-	flag to ntpd(1).  By default, if ntpd is enabled,  it will sync
-	with the time servers listed in /etc/ntp.conf regardless of the
-	time difference (slew).  To prevent this, add
-	ntpd_sync_on_start="NO" to /etc/rc.conf.
-
-	NOTE: Doing a sync (ntpd -g) is noticably slower than ntpdate(1),
-	but is also more accurate (hence ntpdate(1) being depreciated).
-
-20040914:
 	The format of the pflogd(8) logfile "/var/log/pflog" has changed for
 	architectures that have a 64 bit long type to make it compatible to
 	the standard pcap format. In order to prevent corruption move away
@@ -1869,4 +1859,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.358 2004/09/14 03:01:38 seanc Exp $
+$FreeBSD: src/UPDATING,v 1.359 2004/09/15 01:08:32 seanc Exp $

==== //depot/projects/ia64/etc/defaults/rc.conf#52 (text+ko) ====

@@ -13,7 +13,7 @@
 #
 # All arguments must be in double or single quotes.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.213 2004/09/14 03:01:38 seanc Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.214 2004/09/15 01:08:32 seanc Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -219,9 +219,12 @@
 ### Network Time Services options: ###
 timed_enable="NO"		# Run the time daemon (or NO).
 timed_flags=""			# Flags to timed (if enabled).
+ntpdate_enable="NO"		# Run ntpdate to sync time on boot (or NO).
+ntpdate_program="/usr/sbin/ntpdate"	# path to ntpdate, if you want a different one.
+ntpdate_flags="-b"		# Flags to ntpdate (if enabled).
 ntpd_enable="NO"		# Run ntpd Network Time Protocol (or NO).
 ntpd_program="/usr/sbin/ntpd"	# path to ntpd, if you want a different one.
-ntpd_sync_on_start="YES"	# Sync time on ntpd startup, even if offset is high
+ntpd_sync_on_start="NO"		# Sync time on ntpd startup, even if offset is high
 ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
 				# Flags to ntpd (if enabled).
 

==== //depot/projects/ia64/etc/rc.d/Makefile#29 (text+ko) ====

@@ -1,5 +1,5 @@
 # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
-# $FreeBSD: src/etc/rc.d/Makefile,v 1.42 2004/09/14 03:01:38 seanc Exp $
+# $FreeBSD: src/etc/rc.d/Makefile,v 1.43 2004/09/15 01:08:33 seanc Exp $
 
 FILES=	DAEMON LOGIN NETWORKING SERVERS \
 	abi accounting addswap adjkerntz amd \
@@ -23,7 +23,7 @@
 	mountd moused mroute6d mrouted msgs \
 	named natd netif netoptions \
 	network_ipv6 nfsclient nfsd \
-	nfslocking nfsserver nisdomain nsswitch ntpd \
+	nfslocking nfsserver nisdomain nsswitch ntpd ntpdate \
 	othermta \
 	pccard pcvt pf pflog preseedrandom \
 	power_profile ppp-user pppoed pwcheck \

==== //depot/projects/ia64/etc/rc.d/rpcbind#9 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
 # $NetBSD: rpcbind,v 1.6 2002/01/31 01:26:06 lukem Exp $
-# $FreeBSD: src/etc/rc.d/rpcbind,v 1.10 2004/09/14 03:01:38 seanc Exp $
+# $FreeBSD: src/etc/rc.d/rpcbind,v 1.11 2004/09/15 01:08:33 seanc Exp $
 #
 
 # PROVIDE: rpcbind
-# REQUIRE: NETWORKING ntpd syslogd named
+# REQUIRE: NETWORKING ntpdate syslogd named
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64/gnu/usr.bin/send-pr/send-pr.sh#7 (text+ko) ====

@@ -20,7 +20,7 @@
 # along with GNU GNATS; see the file COPYING.  If not, write to
 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 #
-# $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.sh,v 1.35 2003/11/12 23:08:23 ceri Exp $
+# $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.sh,v 1.36 2004/09/14 20:30:35 ceri Exp $
 
 # The version of this send-pr.
 VERSION=3.113
@@ -262,7 +262,7 @@
 # Catch some signals. ($xs kludge needed by Sun /bin/sh)
 xs=0
 trap 'rm -f $REF $TEMP; exit $xs' 0
-trap 'echo "$COMMAND: Aborting ... saving unfinished PR into /tmp/pr.$$"; rm -f $REF ; mv $TEMP /tmp/pr.$$; xs=1; exit' 1 2 3 13 15
+trap 'SAV=`mktemp -t pr`;echo "$COMMAND: Aborting ... saving unfinished PR into $SAV"; rm -f $REF ; mv $TEMP $SAV; xs=1; exit' 1 2 3 13 15
 
 # If they told us to use a specific file, then do so.
 if [ -n "$IN_FILE" ]; then

==== //depot/projects/ia64/release/Makefile#81 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/release/Makefile,v 1.860 2004/09/14 04:01:57 brooks Exp $
+# $FreeBSD: src/release/Makefile,v 1.861 2004/09/15 05:14:21 brooks Exp $
 #
 # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \
 #     [RELEASETAG=tag]
@@ -919,8 +919,7 @@
 	@echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf
 .if exists(${HINTSFILE})
 	# Break the link to device.hints so we can modify it
-	@rm ${CD_DISC2}/boot/device.hints
-	@cp ${HINTSFILE} ${CD_DISC2}/boot/device.hints
+	@cp -f ${HINTSFILE} ${CD_DISC2}/boot/device.hints
 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
 	@echo 'hint.atkbd.0.flags="0x1"' >> ${CD_DISC2}/boot/device.hints
 .endif

==== //depot/projects/ia64/sbin/atacontrol/atacontrol.c#17 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.31 2004/05/20 15:01:26 des Exp $
+ * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.32 2004/09/15 11:22:05 sos Exp $
  */
 
 #include <sys/types.h>
@@ -187,16 +187,18 @@
 		parm->enabled.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no");
 
 	if (parm->satacapabilities && parm->satacapabilities != 0xffff) {
-		printf("SATA NCQ                       %s	%s	%d/0x%02X\n",
-			parm->satacapabilities & ATA_SUPPORT_NCQ ? "yes" : "no",
-			" -", ATA_QUEUE_LEN(parm->queue),
-			ATA_QUEUE_LEN(parm->queue));
+		printf("Native Command Queuing (NCQ)   %s	%s	%d/0x%02X\n",
+			parm->satacapabilities & ATA_SUPPORT_NCQ ?
+				"yes" : "no", " -",
+			(parm->satacapabilities & ATA_SUPPORT_NCQ) ?
+				ATA_QUEUE_LEN(parm->queue) : 0,
+			(parm->satacapabilities & ATA_SUPPORT_NCQ) ?
+				ATA_QUEUE_LEN(parm->queue) : 0);
 	}
-	else
-		printf("dma queued                     %s	%s	%d/0x%02X\n",
-			parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
-			parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
-			ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue));
+	printf("Tagged Command Queuing (TCQ)   %s	%s	%d/0x%02X\n",
+		parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
+		parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no",
+		ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue));
 
 	printf("SMART                          %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no",

==== //depot/projects/ia64/share/man/man4/divert.4#6 (text+ko) ====

@@ -1,6 +1,6 @@
-.\" $FreeBSD: src/share/man/man4/divert.4,v 1.29 2004/07/03 18:29:20 ru Exp $
+.\" $FreeBSD: src/share/man/man4/divert.4,v 1.30 2004/09/14 09:35:10 andre Exp $
 .\"
-.Dd June 18, 1996
+.Dd September 14, 2004
 .Dt DIVERT 4
 .Os
 .Sh NAME
@@ -128,6 +128,12 @@
 If different fragments divert to different ports,
 then which port ultimately gets chosen is unpredictable.
 .Pp
+Note that packets arriving on the divert socket by the
+.Xr ipfw 8
+.Cm tee
+action are delivered as-is and packet fragments do not get reassembled
+in this case.
+.Pp
 Packets are received and sent unchanged, except that
 packets read as outgoing have invalid IP header checksums, and
 packets written as outgoing have their IP header checksums overwritten

==== //depot/projects/ia64/share/man/man4/ng_ubt.4#8 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $
-.\" $FreeBSD: src/share/man/man4/ng_ubt.4,v 1.7 2004/09/13 10:36:44 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/ng_ubt.4,v 1.8 2004/09/14 16:46:16 brueffer Exp $
 .\"
 .Dd September 13, 2004
 .Dt NG_UBT 4
@@ -57,7 +57,8 @@
 .Sh HARDWARE
 The
 .Nm
-driver supports the following Bluetooth USB devices:
+driver supports all Bluetooth USB devices that conform with
+the Bluetooth specification v1.1 including:
 .Pp
 .Bl -bullet -compact
 .It

==== //depot/projects/ia64/share/man/man4/vge.4#2 (text+ko) ====

@@ -1,6 +1,5 @@
-.\" Copyright (c) 2001 Wind River Systems
-.\" Copyright (c) 1997, 1998, 1999, 2000, 2001
-.\"	Bill Paul <wpaul@bsdi.com>. All rights reserved.
+.\" Copyright (c) 2004
+.\"	Bill Paul <wpaul@windriver.com>. All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
@@ -29,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/vge.4,v 1.4 2004/09/13 17:05:07 wpaul Exp $
+.\" $FreeBSD: src/share/man/man4/vge.4,v 1.5 2004/09/14 16:08:13 wpaul Exp $
 .\"
 .Dd September 10, 2004
 .Dt VGE 4

==== //depot/projects/ia64/share/man/man5/rc.conf.5#53 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.221 2004/07/18 18:01:48 simon Exp $
+.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.222 2004/09/15 01:39:25 seanc Exp $
 .\"
 .Dd April 25, 2004
 .Dt RC.CONF 5
@@ -1604,6 +1604,25 @@
 these are the flags to pass to the
 .Xr ntpd 8
 daemon.
+.It Va ntpd_sync_on_start
+.Pq Vt bool
+If set to
+.Dq Li YES ,
+.Xr ntpd 8
+is run with the
+.Op Fl g
+flag, which syncs the system's clock on startup.
+See
+.Xr ntpd 8
+for more information regarding the
+.Op Fl g
+option.
+This is a preferred alternative to using
+.Xr ntpdate 1
+or specifying the
+.Pa /etc/rc.conf
+tunable
+.Op Ar ntpdate_enable .
 .It Va nis_client_enable
 .Pq Vt bool
 If set to

==== //depot/projects/ia64/share/man/man9/vm_map.9#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/share/man/man9/vm_map.9,v 1.4 2004/07/06 07:02:31 ru Exp $
+.\" $FreeBSD: src/share/man/man9/vm_map.9,v 1.5 2004/09/15 18:41:10 alc Exp $
 .\"
 .Dd July 19, 2003
 .Dt VM_MAP 9
@@ -52,17 +52,18 @@
 .Bd -literal -offset indent
 struct vm_map {
         struct vm_map_entry header;
-        struct lock lock;
+        struct sx lock;
         struct mtx system_mtx;
         int nentries;
         vm_size_t size;
+        u_int timestamp;
         u_char needs_wakeup;
         u_char system_map;
-        u_char infork;
+        vm_flags_t flags;
         vm_map_entry_t root;
-        unsigned int timestamp;
-        vm_map_entry_t first_free;
         pmap_t pmap;
+#define min_offset      header.start
+#define max_offset      header.end
 };
 .Ed
 .Pp
@@ -83,23 +84,38 @@
 A count of the members in use within the circular map entry list.
 .It Va size
 Specifies the size of the virtual address space.
-.It Va infork
-Indicates if the map structure is currently undergoing fork processing.
+.It Va timestamp
+Used to determine if the map has changed since its last access.
 .It Va needs_wakeup
 Indicates if a thread is waiting for an allocation within the map.
 Used only by system maps.
 .It Va system_map
 Set to TRUE to indicate that map is a system map; otherwise, it belongs
 to a user process.
+.It Va flags
+Map flags.
 .It Va root
 Root node of a binary search tree used for fast lookup of map entries.
-.It Va timestamp
-Used to determine if the map has changed since its last access.
-.It Va first_free
-Provides a hint to the first free space within the map.
 .It Va pmap
 Pointer to the underlying physical map with which this virtual map
 is associated.
+.It Va min_offset
+The minimum
+.Va vm_offset_t
+in this map.
+Programs should never use
+.Va header.start
+or
+.Va header.end
+directly, use
+.Va min_offset
+and
+.Va max_offset
+instead.
+.It Va max_offset
+The maximum
+.Va vm_offset_t
+in this map.
 .El
 .Pp
 The following flags can be passed to
@@ -141,6 +157,8 @@
         vm_offset_t start;
         vm_offset_t end;
         vm_offset_t avail_ssize;
+        vm_size_t adj_free;
+        vm_size_t max_free;
         union vm_map_object object;
         vm_ooffset_t offset;
         vm_eflags_t eflags;
@@ -171,6 +189,11 @@
 Upper address bound of this entry's region.
 .It Va avail_ssize
 If the entry is for a process stack, specifies how much the entry can grow.
+.It Va adj_free
+The amount of free, unmapped address space adjacent to and immediately
+following this map entry.
+.It Va max_free
+The maximum amount of contiguous free space in this map entry's subtree.
 .It Va object
 Pointer to the
 .Vt struct vm_map_object

==== //depot/projects/ia64/sys/alpha/isa/isa_dma.c#7 (text+ko) ====

@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.11 2004/04/05 21:00:51 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.12 2004/09/15 12:09:49 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,10 +93,8 @@
 /*
  * Setup a DMA channel's bounce buffer.
  */
-void
-isa_dmainit(chan, bouncebufsize)
-	int chan;
-	u_int bouncebufsize;
+int
+isa_dma_init(int chan, u_int bouncebufsize, int flag __unused)
 {
 	static int initted = 0;
 	bus_addr_t boundary = chan >= 4 ? 0x20000 : 0x10000;
@@ -114,10 +112,10 @@
 
 #ifdef DIAGNOSTIC
 	if (chan & ~VALID_DMA_MASK)
-		panic("isa_dmainit: channel out of range");
+		panic("isa_dma_init: channel out of range");
 
 	if (dma_tag[chan] || dma_map[chan])
-		panic("isa_dmainit: impossible request"); 
+		panic("isa_dma_init: impossible request"); 
 #endif
 
 	if (bus_dma_tag_create(/*parent*/NULL,
@@ -132,13 +130,13 @@
 			       /*lockfunc*/busdma_lock_mutex,
 			       /*lockarg*/&Giant,
 			       &dma_tag[chan]) != 0) {
-		panic("isa_dmainit: unable to create dma tag\n");
+		panic("isa_dma_init: unable to create dma tag\n");
 	}
 	
 	if (bus_dmamap_create(dma_tag[chan], 0, &dma_map[chan])) {
-		panic("isa_dmainit: unable to create dma map\n");
+		panic("isa_dma_init: unable to create dma map\n");
 	}
-
+	return (0);
 }
 
 /*
@@ -349,7 +347,7 @@
 #endif
 
 	if (!dma_tag || !dma_map[chan])
-		panic("isa_dmastart: called without isa_dmainit");
+		panic("isa_dmastart: called without isa_dma_init");
 
 	dma_busy |= (1 << chan);
 

==== //depot/projects/ia64/sys/amd64/isa/isa_dma.c#7 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.19 2004/08/16 22:51:13 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.20 2004/09/15 12:09:49 phk Exp $");
 
 /*
  * code to manage AT bus
@@ -96,15 +96,13 @@
 /*
  * Setup a DMA channel's bounce buffer.
  */
-void
-isa_dmainit(chan, bouncebufsize)
-	int chan;
-	u_int bouncebufsize;
+int
+isa_dma_init(int chan, u_int bouncebufsize, int flag)
 {
 	void *buf;
 
 	/*
-	 * If a DMA channel is shared, both drivers have to call isa_dmainit
+	 * If a DMA channel is shared, both drivers have to call isa_dma_init
 	 * since they don't know that the other driver will do it.
 	 * Just return if we're already set up good.
 	 * XXX: this only works if they agree on the bouncebuf size.  This
@@ -112,30 +110,30 @@
 	 * XXX: the same driver.
 	 */
 	if (dma_bouncebuf[chan] != NULL)
-		return;
+		return (0);
 
 #ifdef DIAGNOSTIC
 	if (chan & ~VALID_DMA_MASK)
-		panic("isa_dmainit: channel out of range");
+		panic("isa_dma_init: channel out of range");
 #endif
 
 	dma_bouncebufsize[chan] = bouncebufsize;
 
 	/* Try malloc() first.  It works better if it works. */
-	buf = malloc(bouncebufsize, M_DEVBUF, M_NOWAIT);
+	buf = malloc(bouncebufsize, M_DEVBUF, flag);
 	if (buf != NULL) {
 		if (isa_dmarangecheck(buf, bouncebufsize, chan) == 0) {
 			dma_bouncebuf[chan] = buf;
-			return;
+			return (0);
 		}
 		free(buf, M_DEVBUF);
 	}
-	buf = contigmalloc(bouncebufsize, M_DEVBUF, M_NOWAIT, 0ul, 0xfffffful,
+	buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul, 0xfffffful,
 			   1ul, chan & 4 ? 0x20000ul : 0x10000ul);
 	if (buf == NULL)
-		printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
-	else
-		dma_bouncebuf[chan] = buf;
+		return (ENOMEM);
+	dma_bouncebuf[chan] = buf;
+	return (0);
 }
 
 /*

==== //depot/projects/ia64/sys/contrib/pf/net/pf_if.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/pf_if.c,v 1.5 2004/08/16 17:58:12 mlaier Exp $ */
+/*	$FreeBSD: src/sys/contrib/pf/net/pf_if.c,v 1.6 2004/09/14 15:20:24 mlaier Exp $ */
 /*	$OpenBSD: pf_if.c,v 1.11 2004/03/15 11:38:23 cedric Exp $ */
 /* add	$OpenBSD: pf_if.c,v 1.19 2004/08/11 12:06:44 henning Exp $ */
 
@@ -638,8 +638,16 @@
 		af = ia->ifa_addr->sa_family;
 		if (af != AF_INET && af != AF_INET6)
 			continue;
-#ifdef notyet
-		if (!(ia->ifa_flags & IFA_ROUTE))
+#ifdef __FreeBSD__
+		/*
+		 * XXX: For point-to-point interfaces, (ifname:0) and IPv4,
+		 *	jump over addresses without a proper route to work
+		 *	around a problem with ppp not fully removing the
+		 *	address used during IPCP.
+		 */
+		if ((ifp->if_flags & IFF_POINTOPOINT) &&
+		    !(ia->ifa_flags & IFA_ROUTE) &&
+		    (flags & PFI_AFLAG_NOALIAS) && (af == AF_INET))
 			continue;
 #endif
 		if ((flags & PFI_AFLAG_BROADCAST) && af == AF_INET6)

==== //depot/projects/ia64/sys/dev/aha/aha_mca.c#8 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aha/aha_mca.c,v 1.11 2004/03/17 17:50:24 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aha/aha_mca.c,v 1.12 2004/09/15 11:58:34 phk Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -41,7 +41,7 @@
 #include <machine/resource.h>
 #include <sys/rman.h>
 
-#include <i386/isa/isa_dma.h>
+#include <isa/isavar.h>
 
 #include <dev/mca/mca_busreg.h>
 #include <dev/mca/mca_busvar.h>

==== //depot/projects/ia64/sys/dev/amr/amr.c#23 (text+ko) ====

@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.54 2004/08/16 17:23:09 ambrisko Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.55 2004/09/14 16:36:12 scottl Exp $");
 
 /*
  * Driver for the AMI MegaRaid family of controllers.
@@ -708,7 +708,7 @@
     if ((result = malloc(bufsize, M_DEVBUF, M_NOWAIT)) == NULL)
 	goto out;
     /* set command flags */
-    ac->ac_flags |= AMR_CMD_PRIORITY | AMR_CMD_DATAOUT;
+    ac->ac_flags |= AMR_CMD_PRIORITY | AMR_CMD_DATAIN;
     
     /* point the command at our data */
     ac->ac_data = result;

==== //depot/projects/ia64/sys/dev/buslogic/bt_mca.c#7 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_mca.c,v 1.9 2004/03/17 17:50:29 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_mca.c,v 1.10 2004/09/15 11:58:34 phk Exp $");
 
 /*
  * Written using the bt_isa/bt_pci code as a reference.
@@ -55,7 +55,7 @@
 #include <dev/mca/mca_busreg.h>
 #include <dev/mca/mca_busvar.h>
 
-#include <i386/isa/isa_dma.h>
+#include <isa/isavar.h>
 
 #include <dev/buslogic/btreg.h>
 

==== //depot/projects/ia64/sys/dev/fdc/fdc.c#4 (text+ko) ====

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.286 2004/08/27 17:08:24 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.288 2004/09/14 17:28:51 imp Exp $");
 
 #include "opt_fdc.h"
 
@@ -197,9 +197,18 @@
 #define	FDCTL	7	/* Control Register (W) */
 
 /*
- * this is the secret PIO data port (offset from base)
+ * The YE-DATA PC Card floppies use PIO to read in the data rather than
+ * DMA due to the wild variability of DMA for the PC Card devices.  In
+ * addition, if we cannot setup the DMA resources for the ISA attachment,
+ * we'll use this same offset for data transfer.
+ *
+ * For this mode, offset 0 and 1 must be used to setup the transfer
+ * for this floppy.  This means they are only available on those systems
+ * that map them to the floppy drive.  Newer systems do not do this, and
+ * we should likely prohibit access to them (or disallow NODMA to be set).
  */
-#define FDC_YE_DATAPORT 6
+#define FDBCDR		0	/* And 1 */
+#define FD_YE_DATAPORT	6	/* Drive Data port */
 
 #define	FDI_DCHG	0x80	/* diskette has been changed */
 				/* requires drive and motor being selected */
@@ -337,6 +346,19 @@
 	return bus_space_read_1(fdc->ctlt, fdc->ctlh, fdc->ctl_off);
 }
 
+/*
+ * Magic pseudo-DMA initialization for YE FDC. Sets count and
+ * direction.
+ */
+static void
+fdbcdr_wr(struct fdc_data *fdc, int iswrite, uint16_t count)
+{
+	bus_space_write_1(fdc->portt, fdc->porth, fdc->port_off + FDBCDR,
+	    (count - 1) & 0xff);
+	bus_space_write_1(fdc->portt, fdc->porth, fdc->port_off + FDBCDR + 1,
+	  ((iswrite ? 0x80 : 0) | (((count - 1) >> 8) & 0x7f)));
+}
+
 static int
 fdc_err(struct fdc_data *fdc, const char *s)
 {
@@ -634,18 +656,6 @@
 }
 
 /*
- * Magic pseudo-DMA initialization for YE FDC. Sets count and
- * direction.
- */
-#define SET_BCDR(fdc,wr,cnt,port) \
-	do { \
-	bus_space_write_1(fdc->portt, fdc->porth, fdc->port_off + port,	 \
-	    ((cnt)-1) & 0xff);						 \
-	bus_space_write_1(fdc->portt, fdc->porth, fdc->port_off + port + 1, \
-	    ((wr ? 0x80 : 0) | ((((cnt)-1) >> 8) & 0x7f))); \
-	} while (0)
-
-/*
  * fdc_pio(): perform programmed IO read/write for YE PCMCIA floppy.
  */
 static void
@@ -660,13 +670,13 @@
 	count = fdc->fd->fd_iosize;
 
 	if (bp->bio_cmd == BIO_READ) {
-		SET_BCDR(fdc, 0, count, 0);
+		fdbcdr_wr(fdc, 0, count);
 		bus_space_read_multi_1(fdc->portt, fdc->porth, fdc->port_off +
-		    FDC_YE_DATAPORT, cptr, count);
+		    FD_YE_DATAPORT, cptr, count);
 	} else {
 		bus_space_write_multi_1(fdc->portt, fdc->porth, fdc->port_off +
-		    FDC_YE_DATAPORT, cptr, count);
-		SET_BCDR(fdc, 0, count, 0);
+		    FD_YE_DATAPORT, cptr, count);
+		fdbcdr_wr(fdc, 0, count);	/* needed? */
 	}
 }
 
@@ -940,7 +950,7 @@
 	/* Do PIO if we have to */
 	if (fdc->flags & FDC_NODMA) {
 		if (bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_FMT))
-			SET_BCDR(fdc, 1, fd->fd_iosize, 0);
+			fdbcdr_wr(fdc, 1, fd->fd_iosize);
 		if (bp->bio_cmd & (BIO_WRITE|BIO_FMT))
 			fdc_pio(fdc);
 	}
@@ -1484,39 +1494,30 @@
 	device_t dev;
 
 	dev = fdc->fdc_dev;
-	if (fdc->fdc_intr) {
+	if (fdc->fdc_intr)
 		BUS_TEARDOWN_INTR(device_get_parent(dev), dev, fdc->res_irq,
 		    fdc->fdc_intr);
-		fdc->fdc_intr = NULL;
-	}
-	if (fdc->res_irq != 0) {
-		bus_deactivate_resource(dev, SYS_RES_IRQ, fdc->rid_irq,
-					fdc->res_irq);
+	fdc->fdc_intr = NULL;
+	if (fdc->res_irq != NULL)
 		bus_release_resource(dev, SYS_RES_IRQ, fdc->rid_irq,
-				     fdc->res_irq);
-		fdc->res_irq = NULL;
-	}
-	if (fdc->res_ctl != 0) {
-		bus_deactivate_resource(dev, SYS_RES_IOPORT, fdc->rid_ctl,
-					fdc->res_ctl);
+		    fdc->res_irq);
+	fdc->res_irq = NULL;
+	if (fdc->res_ctl != NULL)
 		bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_ctl,
-				     fdc->res_ctl);
-		fdc->res_ctl = NULL;
-	}
-	if (fdc->res_ioport != 0) {
-		bus_deactivate_resource(dev, SYS_RES_IOPORT, fdc->rid_ioport,
-					fdc->res_ioport);
+		    fdc->res_ctl);
+	fdc->res_ctl = NULL;
+	if (fdc->res_sts != NULL)
+		bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_sts,
+		    fdc->res_sts);
+	fdc->res_sts = NULL;
+	if (fdc->res_ioport != NULL)
 		bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_ioport,
-				     fdc->res_ioport);
-		fdc->res_ioport = NULL;
-	}
-	if (fdc->res_drq != 0) {
-		bus_deactivate_resource(dev, SYS_RES_DRQ, fdc->rid_drq,
-					fdc->res_drq);
+		    fdc->res_ioport);
+	fdc->res_ioport = NULL;
+	if (fdc->res_drq != NULL)
 		bus_release_resource(dev, SYS_RES_DRQ, fdc->rid_drq,
-				     fdc->res_drq);
-		fdc->res_drq = NULL;
-	}
+		    fdc->res_drq);
+	fdc->res_drq = NULL;
 }
 
 int
@@ -1685,7 +1686,7 @@
 		device_printf(dev, "does not respond\n");
 		return (error);
 	}
-	error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq,
+	error = bus_setup_intr(dev, fdc->res_irq,
            INTR_TYPE_BIO | INTR_ENTROPY | INTR_FAST | INTR_MPSAFE,
 	   fdc_intr, fdc, &fdc->fdc_intr);
 	if (error) {

==== //depot/projects/ia64/sys/dev/fdc/fdc_acpi.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_acpi.c,v 1.5 2004/08/30 21:35:34 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_acpi.c,v 1.6 2004/09/16 01:51:21 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -137,7 +137,6 @@
 			fde = (uint32_t *)obj->Buffer.Pointer;
 			if (obj->Buffer.Length < 20) {
 				device_printf(dev, "_FDE too small\n");
-				error = ENXIO;
 				goto out;
 			}
 			break;
@@ -150,7 +149,6 @@
 			fde = malloc(pkg->Package.Count * sizeof(uint32_t),
 			    M_TEMP, M_NOWAIT | M_ZERO);
 			if (fde == NULL) {
-				error = ENOMEM;
 				goto out;
 			}
 			for (i = 0; i < pkg->Package.Count; i++) {

==== //depot/projects/ia64/sys/dev/fdc/fdc_isa.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_isa.c,v 1.12 2004/08/31 20:37:10 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_isa.c,v 1.13 2004/09/14 07:06:49 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -57,9 +57,8 @@
 int
 fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)
 {
-	int ispnp, nports;
+	int nports = 6;
 
-	ispnp = (fdc->flags & FDC_ISPNP) != 0;
 	fdc->fdc_dev = dev;
 	fdc->rid_ioport = 0;
 	fdc->rid_irq = 0;
@@ -69,99 +68,89 @@
 	/*
 	 * On standard ISA, we don't just use an 8 port range
 	 * (e.g. 0x3f0-0x3f7) since that covers an IDE control
-	 * register at 0x3f6.
+	 * register at 0x3f6.  So, on older hardware, we use
+	 * 0x3f0-0x3f5 and 0x3f7.  However, some BIOSs omit the
+	 * control port, while others start at 0x3f2.  Of the latter,
+	 * sometimes we have two resources, other times we have one.
+	 * We have to deal with the following cases:
+	 *
+	 * 1:	0x3f0-0x3f5			# very rare
+	 * 2:	0x3f0				# hints -> 0x3f0-0x3f5,0x3f7
+	 * 3:	0x3f0-0x3f5,0x3f7		# Most common
+	 * 4:	0x3f2-0x3f5,0x3f7		# Second most common
+	 * 5:	0x3f2-0x3f5			# implies 0x3f7 too.
+	 * 6:	0x3f2-0x3f3,0x3f4-0x3f5,0x3f7	# becoming common
+	 * 7:	0x3f2-0x3f3,0x3f4-0x3f5		# rare
 	 *
-	 * Isn't PC hardware wonderful.
+	 * The following code is generic for any value of 0x3fx :-)
 	 */
-	nports = ispnp ? 1 : 6;
 
 	/*
-	 * Some ACPI BIOSen have _CRS objects for the floppy device that
-	 * split the I/O port resource into several resources.  We detect
-	 * this case by checking if there are more than 2 IOPORT resources.
-	 * If so, we use the resource with the smallest start address as
-	 * the port RID and the largest start address as the control RID.
+	 * First, allocated the main range of ports.  In the best of
+	 * worlds, this is 4 or 6 ports.  In others, well, that's
+	 * why this function is so complicated.
 	 */
-	if (bus_get_resource_count(dev, SYS_RES_IOPORT, 2) != 0) {
-		u_long min_start, max_start, tmp;
-		int i;
-
-		/* Find the min/max start addresses and their RIDs. */
-		max_start = 0ul;
-		min_start = ~0ul;
-		for (i = 0; bus_get_resource_count(dev, SYS_RES_IOPORT, i) > 0;
-		    i++) {
-			tmp = bus_get_resource_start(dev, SYS_RES_IOPORT, i);
-			KASSERT(tmp != 0, ("bogus resource"));
-			if (tmp < min_start) {
-				min_start = tmp;
-				fdc->rid_ioport = i;
-			}
-			if (tmp > max_start) {
-				max_start = tmp;
-				fdc->rid_ctl = i;
-			}
-		}
-	}
-
 	fdc->res_ioport = bus_alloc_resource(dev, SYS_RES_IOPORT,
 	    &fdc->rid_ioport, 0ul, ~0ul, nports, RF_ACTIVE);
 	if (fdc->res_ioport == 0) {
-		device_printf(dev, "cannot reserve I/O port range (%d ports)\n",
-			      nports);
-		return ENXIO;
+		device_printf(dev, "cannot allocate I/O port (%d ports)\n",
+		    nports);
+		return (ENXIO);
 	}
 	fdc->portt = rman_get_bustag(fdc->res_ioport);
 	fdc->porth = rman_get_bushandle(fdc->res_ioport);
 
 	/*
-	 * Some BIOSen report the device at 0x3f2-0x3f5,0x3f7
-	 * and some at 0x3f0-0x3f5,0x3f7. We detect the former
-	 * by checking the size and adjust the port address
-	 * accordingly.
+	 * Handle cases 4-7 above
 	 */
-	if (bus_get_resource_count(dev, SYS_RES_IOPORT, 0) == 4)
-		fdc->port_off = -2;
+	fdc->port_off = -(fdc->porth & 0x7);
 
 	/*
-	 * Register the control port range as rid 1 if it
-	 * isn't there already. Most PnP BIOSen will have
-	 * already done this but non-PnP configurations don't.
-	 *
-	 * And some (!!) report 0x3f2-0x3f5 and completely
-	 * leave out the control register!  It seems that some
-	 * non-antique controller chips have a different
-	 * method of programming the transfer speed which
-	 * doesn't require the control register, but it's
-	 * mighty bogus as the chip still responds to the
-	 * address for the control register.
+	 * Deal with case 6 and 7: FDSTS and FDSATA are in rid 1.
 	 */
-	if (bus_get_resource_count(dev, SYS_RES_IOPORT, 1) == 0) {
-		u_long ctlstart;
-		/* Find the control port, usually 0x3f7 */
-		ctlstart = rman_get_start(fdc->res_ioport) + fdc->port_off + 7;
-		bus_set_resource(dev, SYS_RES_IOPORT, 1, ctlstart, 1);
+	if (rman_get_size(fdc->res_ioport) == 2) {
+		fdc->rid_sts = 1;
+		fdc->res_sts = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
+		    &fdc->rid_sts, RF_ACTIVE);
+		if (fdc->res_sts == NULL) {

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



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