PERFORCE change 140581 for review

John Birrell jb at FreeBSD.org
Fri Apr 25 06:47:28 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=140581

Change 140581 by jb at freebsd3 on 2008/04/25 06:47:18

	IF7

Affected files ...

.. //depot/projects/dtrace7/src/gnu/usr.bin/send-pr/categories#2 integrate
.. //depot/projects/dtrace7/src/gnu/usr.bin/send-pr/send-pr.1#2 integrate
.. //depot/projects/dtrace7/src/sbin/gpt/gpt.c#4 integrate
.. //depot/projects/dtrace7/src/sbin/ifconfig/ifconfig.8#3 integrate
.. //depot/projects/dtrace7/src/share/man/man4/textdump.4#2 integrate
.. //depot/projects/dtrace7/src/sys/amd64/amd64/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/arm/arm/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/usb/ehci_pci.c#4 integrate
.. //depot/projects/dtrace7/src/sys/dev/usb/uhci_pci.c#3 integrate
.. //depot/projects/dtrace7/src/sys/i386/i386/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/ia64/ia64/machdep.c#5 integrate
.. //depot/projects/dtrace7/src/sys/ia64/ia64/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/kern/kern_thread.c#6 integrate
.. //depot/projects/dtrace7/src/sys/net80211/ieee80211_radiotap.h#2 integrate
.. //depot/projects/dtrace7/src/sys/pci/if_xl.c#3 integrate
.. //depot/projects/dtrace7/src/sys/pci/if_xlreg.h#2 integrate
.. //depot/projects/dtrace7/src/sys/powerpc/powerpc/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/include/bus.h#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/sparc64/bus_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/sparc64/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sun4v/sun4v/vm_machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sys/proc.h#7 integrate
.. //depot/projects/dtrace7/src/tools/tools/ath/athstats/Makefile#2 integrate
.. //depot/projects/dtrace7/src/tools/tools/ath/athstats/athstats.c#2 integrate
.. //depot/projects/dtrace7/src/tools/tools/ath/athstats/statfoo.c#2 integrate
.. //depot/projects/dtrace7/src/usr.bin/procstat/procstat.1#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/adduser/adduser.8#3 integrate
.. //depot/projects/dtrace7/src/usr.sbin/pkg_install/info/main.c#3 integrate
.. //depot/projects/dtrace7/src/usr.sbin/pkg_install/info/perform.c#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/wpa/wpa_supplicant/Makefile#3 integrate

Differences ...

==== //depot/projects/dtrace7/src/gnu/usr.bin/send-pr/categories#2 (text+ko) ====

@@ -1,7 +1,8 @@
-# $FreeBSD: src/gnu/usr.bin/send-pr/categories,v 1.18 2006/07/17 10:36:56 ceri Exp $
+# $FreeBSD: src/gnu/usr.bin/send-pr/categories,v 1.18.2.1 2008/04/23 04:00:23 linimon Exp $
 advocacy
 alpha
 amd64
+arm
 bin
 conf
 docs

==== //depot/projects/dtrace7/src/gnu/usr.bin/send-pr/send-pr.1#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\"
 .\" ---------------------------------------------------------------------------
 .\"
-.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.20 2006/10/15 11:50:11 ceri Exp $
+.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.20.2.1 2008/04/23 04:00:23 linimon Exp $
 .nh
 .TH SEND-PR 1 3.113 "October 2006"
 .SH NAME
@@ -191,6 +191,9 @@
 .B amd64
 AMD64 processor specific problems.
 .TP
+.B arm
+ARM processor specific problems.
+.TP
 .B bin
 Corrections or enhancements to system executables.
 .TP

==== //depot/projects/dtrace7/src/sbin/gpt/gpt.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16.2.3 2008/02/12 19:22:58 jhb Exp $");
+__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16.2.4 2008/04/23 18:48:36 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -317,6 +317,13 @@
 			return (0);
 		}
 		break;
+	case 'z':
+		if (strcmp(s, "zfs") == 0) {
+			uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS;
+			*uuid = zfs;
+			return (0);
+		}
+		break;
 	}
 	return (EINVAL);
 }

==== //depot/projects/dtrace7/src/sbin/ifconfig/ifconfig.8#3 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
-.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.142.2.3 2008/04/10 04:01:26 thompsa Exp $
+.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.142.2.4 2008/04/25 05:33:16 sam Exp $
 .\"
-.Dd December 8, 2007
+.Dd February 29, 2008
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -779,6 +779,8 @@
 .It Cm deftxkey Ar index
 Set the default key to use for transmission.
 Typically this is only set when using WEP encryption.
+Note that you must set a default transmit key
+for the system to know which key to use in encrypting outbound traffic.
 The
 .Cm weptxkey
 is an alias for this request; it is provided for backwards compatibility.
@@ -1263,6 +1265,10 @@
 If that is the case, then the first four keys
 (1-4) will be the standard temporary keys and any others will be adaptor
 specific keys such as permanent keys stored in NVRAM.
+.Pp
+Note that you must set a default transmit key with
+.Cm deftxkey
+for the system to know which key to use in encrypting outbound traffic.
 .It Cm wme
 Enable Wireless Multimedia Extensions (WME) support, if available,
 for the specified interface.

==== //depot/projects/dtrace7/src/share/man/man4/textdump.4#2 (text+ko) ====

@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/textdump.4,v 1.3.2.2 2008/03/31 22:02:28 rwatson Exp $
+.\" $FreeBSD: src/share/man/man4/textdump.4,v 1.3.2.3 2008/04/24 06:32:16 rwatson Exp $
 .\"
 .Dd 26 December, 2007
 .Dt textdump 4
@@ -48,7 +48,7 @@
 By combining
 .Nm
 with other
-.Xr DDB 4
+.Xr ddb 4
 facilities, such as scripting and output capture, detailed bug information
 can be captured in a fully automated manner.
 .Sh FORMAT
@@ -67,7 +67,7 @@
 .Bl -tag -width version.txt
 .It Pa ddb.txt
 Captured
-.Xr DDB 4
+.Xr ddb 4
 output, if the capture facility has been used.
 May be disabled by clearing the
 .Dv debug.ddb.textdump.do_ddb
@@ -110,7 +110,7 @@
 dump will be regular memory dumps; however, by using the
 .Ic textdump set
 command in
-.Xr DDB 4 ,
+.Xr ddb 4 ,
 or by setting the
 .Dv debug.ddb.textdump.pending
 sysctl to 1 using
@@ -118,7 +118,7 @@
 it is possible to request that the next dump be a textdump.
 .Pp
 If at the
-.Xr DDB 4
+.Xr ddb 4
 command line, the commands
 .Ic textdump set ,
 .Ic textdump status ,

==== //depot/projects/dtrace7/src/sys/amd64/amd64/vm_machdep.c#2 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.255 2007/06/04 23:57:29 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.255.2.1 2008/04/24 22:41:59 marcel Exp $");
 
 #include "opt_isa.h"
 #include "opt_cpu.h"
@@ -240,7 +240,7 @@
 }
 
 void
-cpu_thread_setup(struct thread *td)
+cpu_thread_alloc(struct thread *td)
 {
 
 	td->td_pcb = (struct pcb *)(td->td_kstack +
@@ -248,6 +248,11 @@
 	td->td_frame = (struct trapframe *)td->td_pcb - 1;
 }
 
+void
+cpu_thread_free(struct thread *td)
+{
+}
+
 /*
  * Initialize machine state (pcb and trap frame) for a new thread about to
  * upcall. Put enough state in the new thread's PCB to get it to go back 

==== //depot/projects/dtrace7/src/sys/arm/arm/vm_machdep.c#2 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.34 2007/09/15 18:47:01 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.34.2.1 2008/04/24 22:42:00 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -333,7 +333,7 @@
 }
 
 void
-cpu_thread_setup(struct thread *td)
+cpu_thread_alloc(struct thread *td)
 {
 	td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * 
 	    PAGE_SIZE) - 1;
@@ -344,8 +344,13 @@
 	pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE);
 #endif
 #endif  
-		
+}
+
+void
+cpu_thread_free(struct thread *td)
+{
 }
+
 void
 cpu_thread_clean(struct thread *td)
 {

==== //depot/projects/dtrace7/src/sys/dev/usb/ehci_pci.c#4 (text+ko) ====

@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.28.2.2 2008/03/19 16:38:55 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.28.2.3 2008/04/23 18:50:19 jhb Exp $");
 
 /*
  * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.
@@ -117,6 +117,10 @@
 static const char *ehci_device_ich6 = "Intel 82801FB (ICH6) USB 2.0 controller";
 #define PCI_EHCI_DEVICEID_ICH7		0x27cc8086
 static const char *ehci_device_ich7 = "Intel 82801GB/R (ICH7) USB 2.0 controller";
+#define PCI_EHCI_DEVICEID_ICH8_A	0x28368086
+static const char *ehci_device_ich8_a = "Intel 82801H (ICH8) USB 2.0 controller USB2-A";
+#define PCI_EHCI_DEVICEID_ICH8_B	0x283a8086
+static const char *ehci_device_ich8_b = "Intel 82801H (ICH8) USB 2.0 controller USB2-B";
 #define PCI_EHCI_DEVICEID_63XX		0x268c8086
 static const char *ehci_device_63XX = "Intel 63XXESB USB 2.0 controller";
  
@@ -230,6 +234,10 @@
 		return (ehci_device_ich6);
 	case PCI_EHCI_DEVICEID_ICH7:
 		return (ehci_device_ich7);
+	case PCI_EHCI_DEVICEID_ICH8_A:
+		return (ehci_device_ich8_a);
+	case PCI_EHCI_DEVICEID_ICH8_B:
+		return (ehci_device_ich8_b);
 	case PCI_EHCI_DEVICEID_NEC:
 		return (ehci_device_nec);
 	case PCI_EHCI_DEVICEID_NF2:

==== //depot/projects/dtrace7/src/sys/dev/usb/uhci_pci.c#3 (text+ko) ====

@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.61.2.1 2007/11/26 18:21:42 jfv Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.61.2.2 2008/04/23 18:50:20 jhb Exp $");
 
 /* Universal Host Controller Interface
  *
@@ -151,6 +151,21 @@
 #define PCI_UHCI_DEVICEID_63XXESB_4	0x268b8086
 static const char *uhci_device_esb_4 = "Intel 631XESB/632XESB/3100 USB controller USB-4";
 
+#define PCI_UHCI_DEVICEID_ICH8_A	0x28308086
+static const char *uhci_device_ich8_a = "Intel 82801H (ICH8) USB controller USB-A";
+
+#define PCI_UHCI_DEVICEID_ICH8_B	0x28318086
+static const char *uhci_device_ich8_b = "Intel 82801H (ICH8) USB controller USB-B";
+
+#define PCI_UHCI_DEVICEID_ICH8_C	0x28328086
+static const char *uhci_device_ich8_c = "Intel 82801H (ICH8) USB controller USB-C";
+
+#define PCI_UHCI_DEVICEID_ICH8_D	0x28348086
+static const char *uhci_device_ich8_d = "Intel 82801H (ICH8) USB controller USB-D";
+
+#define PCI_UHCI_DEVICEID_ICH8_E	0x28358086
+static const char *uhci_device_ich8_e = "Intel 82801H (ICH8) USB controller USB-E";
+
 #define PCI_UHCI_DEVICEID_440MX		0x719a8086
 static const char *uhci_device_440mx = "Intel 82443MX USB controller";
 
@@ -250,6 +265,16 @@
 		return (uhci_device_esb_3);
 	} else if (device_id == PCI_UHCI_DEVICEID_63XXESB_4) {
 		return (uhci_device_esb_4);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH8_A) {
+		return (uhci_device_ich8_a);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH8_B) {
+		return (uhci_device_ich8_b);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH8_C) {
+		return (uhci_device_ich8_c);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH8_D) {
+		return (uhci_device_ich8_d);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH8_E) {
+		return (uhci_device_ich8_e);
 	} else if (device_id == PCI_UHCI_DEVICEID_440MX) {
 		return (uhci_device_440mx);
 	} else if (device_id == PCI_UHCI_DEVICEID_460GX) {

==== //depot/projects/dtrace7/src/sys/i386/i386/vm_machdep.c#2 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.283 2007/07/07 16:59:01 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.283.2.1 2008/04/24 22:42:00 marcel Exp $");
 
 #include "opt_isa.h"
 #include "opt_npx.h"
@@ -361,7 +361,7 @@
 }
 
 void
-cpu_thread_setup(struct thread *td)
+cpu_thread_alloc(struct thread *td)
 {
 
 	td->td_pcb = (struct pcb *)(td->td_kstack +
@@ -370,6 +370,13 @@
 	td->td_pcb->pcb_ext = NULL; 
 }
 
+void
+cpu_thread_free(struct thread *td)
+{
+
+	cpu_thread_clean(td);
+}
+
 /*
  * Initialize machine state (pcb and trap frame) for a new thread about to
  * upcall. Put enough state in the new thread's PCB to get it to go back 

==== //depot/projects/dtrace7/src/sys/ia64/ia64/machdep.c#5 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.225.2.3 2008/03/30 09:19:07 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.225.2.4 2008/04/24 22:42:00 marcel Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -812,7 +812,7 @@
 	 * and make proc0's trapframe pointer point to it for sanity.
 	 * Initialise proc0's backing store to start after u area.
 	 */
-	cpu_thread_setup(&thread0);
+	cpu_thread_alloc(&thread0);
 	thread0.td_frame->tf_flags = FRAME_SYSCALL;
 	thread0.td_pcb->pcb_special.sp =
 	    (u_int64_t)thread0.td_frame - 16;

==== //depot/projects/dtrace7/src/sys/ia64/ia64/vm_machdep.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  *
  *	from: @(#)vm_machdep.c	7.3 (Berkeley) 5/13/91
  *	Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.94 2007/06/04 23:57:31 jeff Exp $
+ * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.94.2.1 2008/04/24 22:42:00 marcel Exp $
  */
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -107,7 +107,7 @@
 }
 
 void
-cpu_thread_setup(struct thread *td)
+cpu_thread_alloc(struct thread *td)
 {
 	intptr_t sp;
 
@@ -121,6 +121,13 @@
 }
 
 void
+cpu_thread_free(struct thread *td)
+{
+
+	mtx_destroy(&td->td_md.md_highfp_mtx);
+}
+
+void
 cpu_thread_swapin(struct thread *td)
 {
 }

==== //depot/projects/dtrace7/src/sys/kern/kern_thread.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.255.2.3 2008/04/11 08:47:35 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.255.2.4 2008/04/24 22:42:00 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -329,7 +329,7 @@
 		uma_zfree(thread_zone, td);
 		return (NULL);
 	}
-	cpu_thread_setup(td);
+	cpu_thread_alloc(td);
 	return (td);
 }
 
@@ -341,7 +341,7 @@
 thread_free(struct thread *td)
 {
 
-	cpu_thread_clean(td);
+	cpu_thread_free(td);
 	if (td->td_altkstack != 0)
 		vm_thread_dispose_altkstack(td);
 	if (td->td_kstack != 0)

==== //depot/projects/dtrace7/src/sys/net80211/ieee80211_radiotap.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.10 2007/07/01 06:59:30 thompsa Exp $ */
+/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.10.2.1 2008/04/25 05:28:47 sam Exp $ */
 /* $NetBSD: ieee80211_radiotap.h,v 1.16 2007/01/06 05:51:15 dyoung Exp $ */
 
 /*-
@@ -194,22 +194,19 @@
 };
 
 #ifndef _KERNEL
-/* Channel flags. */
-#define	IEEE80211_CHAN_TURBO	0x00010	/* Turbo channel */
-#define	IEEE80211_CHAN_CCK	0x00020	/* CCK channel */
-#define	IEEE80211_CHAN_OFDM	0x00040	/* OFDM channel */
-#define	IEEE80211_CHAN_2GHZ	0x00080	/* 2 GHz spectrum channel. */
-#define	IEEE80211_CHAN_5GHZ	0x00100	/* 5 GHz spectrum channel */
-#define	IEEE80211_CHAN_PASSIVE	0x00200	/* Only passive scan allowed */
-#define	IEEE80211_CHAN_DYN	0x00400	/* Dynamic CCK-OFDM channel */
-#define	IEEE80211_CHAN_GFSK	0x00800	/* GFSK channel (FHSS PHY) */
-#define	IEEE80211_CHAN_GSM	0x01000	/* 900 MHz spectrum channel */
-#define	IEEE80211_CHAN_STURBO	0x02000	/* 11a static turbo channel only */
-#define	IEEE80211_CHAN_HALF	0x04000	/* Half rate channel */
-#define	IEEE80211_CHAN_QUARTER	0x08000	/* Quarter rate channel */
-#define	IEEE80211_CHAN_HT20	0x10000	/* HT 20 channel */
-#define	IEEE80211_CHAN_HT40U	0x20000	/* HT 40 channel w/ ext above */
-#define	IEEE80211_CHAN_HT40D	0x40000	/* HT 40 channel w/ ext below */
+/* channel attributes */
+#define	IEEE80211_CHAN_TURBO	0x00000010 /* Turbo channel */
+#define	IEEE80211_CHAN_CCK	0x00000020 /* CCK channel */
+#define	IEEE80211_CHAN_OFDM	0x00000040 /* OFDM channel */
+#define	IEEE80211_CHAN_2GHZ	0x00000080 /* 2 GHz spectrum channel. */
+#define	IEEE80211_CHAN_5GHZ	0x00000100 /* 5 GHz spectrum channel */
+#define	IEEE80211_CHAN_PASSIVE	0x00000200 /* Only passive scan allowed */
+#define	IEEE80211_CHAN_DYN	0x00000400 /* Dynamic CCK-OFDM channel */
+#define	IEEE80211_CHAN_GFSK	0x00000800 /* GFSK channel (FHSS PHY) */
+#define	IEEE80211_CHAN_GSM	0x00001000 /* 900 MHz spectrum channel */
+#define	IEEE80211_CHAN_STURBO	0x00002000 /* 11a static turbo channel only */
+#define	IEEE80211_CHAN_HALF	0x00004000 /* Half rate channel */
+#define	IEEE80211_CHAN_QUARTER	0x00008000 /* Quarter rate channel */
 #endif /* !_KERNEL */
 
 /* For IEEE80211_RADIOTAP_FLAGS */

==== //depot/projects/dtrace7/src/sys/pci/if_xl.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_xl.c,v 1.210.2.1 2008/03/13 07:50:48 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_xl.c,v 1.210.2.2 2008/04/23 21:28:29 marius Exp $");
 
 /*
  * 3Com 3c90x Etherlink XL PCI NIC driver
@@ -163,7 +163,7 @@
 /*
  * Various supported device vendors/types and their names.
  */
-static struct xl_type xl_devs[] = {
+static const struct xl_type xl_devs[] = {
 	{ TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT,
 		"3Com 3c900-TPO Etherlink XL" },
 	{ TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT_COMBO,
@@ -230,7 +230,7 @@
 static int xl_newbuf(struct xl_softc *, struct xl_chain_onefrag *);
 static void xl_stats_update(void *);
 static void xl_stats_update_locked(struct xl_softc *);
-static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf *);
+static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf **);
 static void xl_rxeof(struct xl_softc *);
 static void xl_rxeof_task(void *, int);
 static int xl_rx_resync(struct xl_softc *);
@@ -278,8 +278,6 @@
 static void xl_choose_media(struct xl_softc *sc, int *media);
 static void xl_choose_xcvr(struct xl_softc *, int);
 static void xl_dma_map_addr(void *, bus_dma_segment_t *, int, int);
-static void xl_dma_map_rxbuf(void *, bus_dma_segment_t *, int, bus_size_t, int);
-static void xl_dma_map_txbuf(void *, bus_dma_segment_t *, int, bus_size_t, int);
 #ifdef notdef
 static void xl_testpacket(struct xl_softc *);
 #endif
@@ -332,46 +330,6 @@
 	*paddr = segs->ds_addr;
 }
 
-static void
-xl_dma_map_rxbuf(void *arg, bus_dma_segment_t *segs, int nseg,
-    bus_size_t mapsize, int error)
-{
-	u_int32_t *paddr;
-
-	if (error)
-		return;
-
-	KASSERT(nseg == 1, ("xl_dma_map_rxbuf: too many DMA segments"));
-	paddr = arg;
-	*paddr = segs->ds_addr;
-}
-
-static void
-xl_dma_map_txbuf(void *arg, bus_dma_segment_t *segs, int nseg,
-    bus_size_t mapsize, int error)
-{
-	struct xl_list *l;
-	int i, total_len;
-
-	if (error)
-		return;
-
-	KASSERT(nseg <= XL_MAXFRAGS, ("too many DMA segments"));
-
-	total_len = 0;
-	l = arg;
-	for (i = 0; i < nseg; i++) {
-		KASSERT(segs[i].ds_len <= MCLBYTES, ("segment size too large"));
-		l->xl_frag[i].xl_addr = htole32(segs[i].ds_addr);
-		l->xl_frag[i].xl_len = htole32(segs[i].ds_len);
-		total_len += segs[i].ds_len;
-	}
-	l->xl_frag[nseg - 1].xl_len = htole32(segs[nseg - 1].ds_len |
-	    XL_LAST_FRAG);
-	l->xl_status = htole32(total_len);
-	l->xl_next = 0;
-}
-
 /*
  * Murphy's law says that it's possible the chip can wedge and
  * the 'command in progress' bit may never clear. Hence, we wait
@@ -1052,7 +1010,7 @@
 static int
 xl_probe(device_t dev)
 {
-	struct xl_type		*t;
+	const struct xl_type	*t;
 
 	t = xl_devs;
 
@@ -1226,7 +1184,7 @@
 
 	sc = device_get_softc(dev);
 	sc->xl_dev = dev;
-	
+
 	unit = device_get_unit(dev);
 
 	mtx_init(&sc->xl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
@@ -1890,8 +1848,8 @@
 {
 	struct mbuf		*m_new = NULL;
 	bus_dmamap_t		map;
-	int			error;
-	u_int32_t		baddr;
+	bus_dma_segment_t	segs[1];
+	int			error, nseg;
 
 	XL_LOCK_ASSERT(sc);
 
@@ -1904,14 +1862,16 @@
 	/* Force longword alignment for packet payload. */
 	m_adj(m_new, ETHER_ALIGN);
 
-	error = bus_dmamap_load_mbuf(sc->xl_mtag, sc->xl_tmpmap, m_new,
-	    xl_dma_map_rxbuf, &baddr, BUS_DMA_NOWAIT);
+	error = bus_dmamap_load_mbuf_sg(sc->xl_mtag, sc->xl_tmpmap, m_new,
+	    segs, &nseg, BUS_DMA_NOWAIT);
 	if (error) {
 		m_freem(m_new);
 		device_printf(sc->xl_dev, "can't map mbuf (error %d)\n",
 		    error);
 		return (error);
 	}
+	KASSERT(nseg == 1,
+	    ("%s: too many DMA segments (%d)", __func__, nseg));
 
 	bus_dmamap_unload(sc->xl_mtag, c->xl_map);
 	map = c->xl_map;
@@ -1920,7 +1880,7 @@
 	c->xl_mbuf = m_new;
 	c->xl_ptr->xl_frag.xl_len = htole32(m_new->m_len | XL_LAST_FRAG);
 	c->xl_ptr->xl_status = 0;
-	c->xl_ptr->xl_frag.xl_addr = htole32(baddr);
+	c->xl_ptr->xl_frag.xl_addr = htole32(segs->ds_addr);
 	bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREREAD);
 	return (0);
 }
@@ -2174,7 +2134,6 @@
 	    BUS_DMASYNC_POSTREAD);
 	idx = sc->xl_cdata.xl_tx_cons;
 	while (idx != sc->xl_cdata.xl_tx_prod) {
-
 		cur_tx = &sc->xl_cdata.xl_tx_chain[idx];
 
 		if (!(le32toh(cur_tx->xl_ptr->xl_status) &
@@ -2465,26 +2424,21 @@
  * pointers to the fragment pointers.
  */
 static int
-xl_encap(struct xl_softc *sc, struct xl_chain *c, struct mbuf *m_head)
+xl_encap(struct xl_softc *sc, struct xl_chain *c, struct mbuf **m_head)
 {
-	int			error;
+	struct mbuf		*m_new;
+	struct ifnet		*ifp = sc->xl_ifp;
+	int			error, i, nseg, total_len;
 	u_int32_t		status;
-	struct ifnet		*ifp = sc->xl_ifp;
 
 	XL_LOCK_ASSERT(sc);
 
-	/*
-	 * Start packing the mbufs in this chain into
-	 * the fragment pointers. Stop when we run out
-	 * of fragments or hit the end of the mbuf chain.
-	 */
-	error = bus_dmamap_load_mbuf(sc->xl_mtag, c->xl_map, m_head,
-	    xl_dma_map_txbuf, c->xl_ptr, BUS_DMA_NOWAIT);
+	error = bus_dmamap_load_mbuf_sg(sc->xl_mtag, c->xl_map, *m_head,
+	    sc->xl_cdata.xl_tx_segs, &nseg, BUS_DMA_NOWAIT);
 
 	if (error && error != EFBIG) {
-		m_freem(m_head);
 		if_printf(ifp, "can't map mbuf (error %d)\n", error);
-		return (1);
+		return (error);
 	}
 
 	/*
@@ -2496,25 +2450,47 @@
 	 * and would waste cycles.
 	 */
 	if (error) {
-		struct mbuf		*m_new;
-
-		m_new = m_defrag(m_head, M_DONTWAIT);
+		m_new = m_collapse(*m_head, M_DONTWAIT, XL_MAXFRAGS);
 		if (m_new == NULL) {
-			m_freem(m_head);
-			return (1);
-		} else {
-			m_head = m_new;
+			m_freem(*m_head);
+			*m_head = NULL;
+			return (ENOBUFS);
 		}
+		*m_head = m_new;
 
-		error = bus_dmamap_load_mbuf(sc->xl_mtag, c->xl_map,
-			m_head, xl_dma_map_txbuf, c->xl_ptr, BUS_DMA_NOWAIT);
+		error = bus_dmamap_load_mbuf_sg(sc->xl_mtag, c->xl_map,
+		    *m_head, sc->xl_cdata.xl_tx_segs, &nseg, BUS_DMA_NOWAIT);
 		if (error) {
-			m_freem(m_head);
+			m_freem(*m_head);
+			*m_head = NULL;
 			if_printf(ifp, "can't map mbuf (error %d)\n", error);
-			return (1);
+			return (error);
 		}
 	}
 
+	KASSERT(nseg <= XL_MAXFRAGS,
+	    ("%s: too many DMA segments (%d)", __func__, nseg));
+	if (nseg == 0) {
+		m_freem(*m_head);
+		*m_head = NULL;
+		return (EIO);
+	}
+
+	total_len = 0;
+	for (i = 0; i < nseg; i++) {
+		KASSERT(sc->xl_cdata.xl_tx_segs[i].ds_len <= MCLBYTES,
+		    ("segment size too large"));
+		c->xl_ptr->xl_frag[i].xl_addr =
+		    htole32(sc->xl_cdata.xl_tx_segs[i].ds_addr);
+		c->xl_ptr->xl_frag[i].xl_len =
+		    htole32(sc->xl_cdata.xl_tx_segs[i].ds_len);
+		total_len += sc->xl_cdata.xl_tx_segs[i].ds_len;
+	}
+	c->xl_ptr->xl_frag[nseg - 1].xl_len =
+	    htole32(sc->xl_cdata.xl_tx_segs[nseg - 1].ds_len | XL_LAST_FRAG);
+	c->xl_ptr->xl_status = htole32(total_len);
+	c->xl_ptr->xl_next = 0;
+
 	if (sc->xl_type == XL_TYPE_905B) {
 		status = XL_TXSTAT_RND_DEFEAT;
 
@@ -2531,7 +2507,7 @@
 		c->xl_ptr->xl_status = htole32(status);
 	}
 
-	c->xl_mbuf = m_head;
+	c->xl_mbuf = *m_head;
 	bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE);
 	return (0);
 }
@@ -2564,7 +2540,6 @@
 	struct xl_softc		*sc = ifp->if_softc;
 	struct mbuf		*m_head = NULL;
 	struct xl_chain		*prev = NULL, *cur_tx = NULL, *start_tx;
-	struct xl_chain		*prev_tx;
 	u_int32_t		status;
 	int			error;
 
@@ -2585,20 +2560,23 @@
 
 	start_tx = sc->xl_cdata.xl_tx_free;
 
-	while (sc->xl_cdata.xl_tx_free != NULL) {
+	for (; !IFQ_DRV_IS_EMPTY(&ifp->if_snd) &&
+	    sc->xl_cdata.xl_tx_free != NULL;) {
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;
 
 		/* Pick a descriptor off the free list. */
-		prev_tx = cur_tx;
 		cur_tx = sc->xl_cdata.xl_tx_free;
 
 		/* Pack the data into the descriptor. */
-		error = xl_encap(sc, cur_tx, m_head);
+		error = xl_encap(sc, cur_tx, &m_head);
 		if (error) {
-			cur_tx = prev_tx;
-			continue;
+			if (m_head == NULL)
+				break;
+			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
+			break;
 		}
 
 		sc->xl_cdata.xl_tx_free = cur_tx->xl_next;
@@ -2628,7 +2606,7 @@
 	 * Place the request for the upload interrupt
 	 * in the last descriptor in the chain. This way, if
 	 * we're chaining several packets at once, we'll only
-	 * get an interupt once for the whole chain rather than
+	 * get an interrupt once for the whole chain rather than
 	 * once for each packet.
 	 */
 	cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) |
@@ -2691,7 +2669,6 @@
 	struct xl_softc		*sc = ifp->if_softc;
 	struct mbuf		*m_head = NULL;
 	struct xl_chain		*prev = NULL, *cur_tx = NULL, *start_tx;
-	struct xl_chain		*prev_tx;
 	int			error, idx;
 
 	XL_LOCK_ASSERT(sc);
@@ -2702,8 +2679,8 @@
 	idx = sc->xl_cdata.xl_tx_prod;
 	start_tx = &sc->xl_cdata.xl_tx_chain[idx];
 
-	while (sc->xl_cdata.xl_tx_chain[idx].xl_mbuf == NULL) {
-
+	for (; !IFQ_DRV_IS_EMPTY(&ifp->if_snd) &&
+	    sc->xl_cdata.xl_tx_chain[idx].xl_mbuf == NULL;) {
 		if ((XL_TX_LIST_CNT - sc->xl_cdata.xl_tx_cnt) < 3) {
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;
@@ -2713,14 +2690,16 @@
 		if (m_head == NULL)
 			break;
 
-		prev_tx = cur_tx;
 		cur_tx = &sc->xl_cdata.xl_tx_chain[idx];
 
 		/* Pack the data into the descriptor. */
-		error = xl_encap(sc, cur_tx, m_head);
+		error = xl_encap(sc, cur_tx, &m_head);
 		if (error) {
-			cur_tx = prev_tx;
-			continue;
+			if (m_head == NULL)
+				break;
+			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
+			break;
 		}
 
 		/* Chain it together. */
@@ -2748,7 +2727,7 @@
 	 * Place the request for the upload interrupt
 	 * in the last descriptor in the chain. This way, if
 	 * we're chaining several packets at once, we'll only
-	 * get an interupt once for the whole chain rather than
+	 * get an interrupt once for the whole chain rather than
 	 * once for each packet.
 	 */
 	cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) |
@@ -3027,10 +3006,8 @@
 	case IFM_10_2:
 	case IFM_10_5:
 		xl_setmode(sc, ifm->ifm_media);
+		XL_UNLOCK(sc);
 		return (0);
-		break;
-	default:
-		break;
 	}
 
 	if (sc->xl_media & XL_MEDIAOPT_MII ||
@@ -3198,7 +3175,6 @@
 			ifp->if_capenable |= IFCAP_POLLING;
 			XL_UNLOCK(sc);
 			return (error);
-			
 		}
 		if (!(ifr->ifr_reqcap & IFCAP_POLLING) &&
 		    ifp->if_capenable & IFCAP_POLLING) {

==== //depot/projects/dtrace7/src/sys/pci/if_xlreg.h#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/pci/if_xlreg.h,v 1.59 2006/12/06 02:18:41 marius Exp $
+ * $FreeBSD: src/sys/pci/if_xlreg.h,v 1.59.2.1 2008/04/23 21:28:29 marius Exp $
  */
 
 #define XL_EE_READ	0x0080	/* read, 5 bit address */
@@ -486,6 +486,7 @@
 struct xl_chain_data {
 	struct xl_chain_onefrag	xl_rx_chain[XL_RX_LIST_CNT];
 	struct xl_chain		xl_tx_chain[XL_TX_LIST_CNT];
+	bus_dma_segment_t	xl_tx_segs[XL_MAXFRAGS];
 
 	struct xl_chain_onefrag	*xl_rx_head;
 
@@ -589,7 +590,7 @@
 	struct resource		*xl_irq;
 	struct resource		*xl_res;
 	device_t		xl_miibus;
-	struct xl_type		*xl_info;	/* 3Com adapter info */
+	const struct xl_type	*xl_info;	/* 3Com adapter info */
 	bus_dma_tag_t		xl_mtag;
 	bus_dmamap_t		xl_tmpmap;	/* spare DMA map */
 	u_int8_t		xl_unit;	/* interface number */

==== //depot/projects/dtrace7/src/sys/powerpc/powerpc/vm_machdep.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  *
  *	from: @(#)vm_machdep.c	7.3 (Berkeley) 5/13/91
  *	Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.115 2007/06/06 06:01:56 grehan Exp $
+ * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.115.2.1 2008/04/24 22:42:00 marcel Exp $
  */
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -277,7 +277,7 @@
 }
 
 void
-cpu_thread_setup(struct thread *td)
+cpu_thread_alloc(struct thread *td)
 {
 	struct pcb *pcb;
 
@@ -288,6 +288,11 @@
 }
 
 void
+cpu_thread_free(struct thread *td)
+{
+}
+
+void
 cpu_thread_swapin(struct thread *td)
 {
 }

==== //depot/projects/dtrace7/src/sys/sparc64/include/bus.h#2 (text+ko) ====

@@ -69,7 +69,7 @@
  *	and
  *	from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09
  *
- * $FreeBSD: src/sys/sparc64/include/bus.h,v 1.41 2007/01/18 18:32:25 marius Exp $
+ * $FreeBSD: src/sys/sparc64/include/bus.h,v 1.41.2.1 2008/04/23 21:25:16 marius Exp $
  */
 
 #ifndef	_MACHINE_BUS_H_
@@ -96,8 +96,8 @@
 #define	PCI_MEMORY_BUS_SPACE	4
 #define	LAST_BUS_SPACE		5
 
-extern int bus_type_asi[];
-extern int bus_stream_asi[];
+extern const int bus_type_asi[];
+extern const int bus_stream_asi[];
 
 #define __BUS_SPACE_HAS_STREAM_METHODS	1
 

==== //depot/projects/dtrace7/src/sys/sparc64/sparc64/bus_machdep.c#2 (text+ko) ====

@@ -95,11 +95,11 @@
  *	from: @(#)machdep.c	8.6 (Berkeley) 1/14/94
  *	from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp
  *	and
- * 	from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15
+ *	from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/bus_machdep.c,v 1.46 2007/05/29 06:30:26 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/bus_machdep.c,v 1.46.2.1 2008/04/23 21:25:16 marius Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -130,8 +130,8 @@
 static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t,
     bus_size_t, bus_size_t, int);
 
-/* ASI's for bus access. */
-int bus_type_asi[] = {
+/* ASIs for bus access */
+const int bus_type_asi[] = {
 	ASI_PHYS_BYPASS_EC_WITH_EBIT,		/* nexus */
 	ASI_PHYS_BYPASS_EC_WITH_EBIT,		/* SBus */
 	ASI_PHYS_BYPASS_EC_WITH_EBIT_L,		/* PCI configuration space */
@@ -140,7 +140,7 @@
 	0
 };
 
-int bus_stream_asi[] = {
+const int bus_stream_asi[] = {
 	ASI_PHYS_BYPASS_EC_WITH_EBIT,		/* nexus */
 	ASI_PHYS_BYPASS_EC_WITH_EBIT,		/* SBus */
 	ASI_PHYS_BYPASS_EC_WITH_EBIT,		/* PCI configuration space */
@@ -244,7 +244,7 @@
 
 	newtag->dt_segments = NULL;
 
-	/* Take into account any restrictions imposed by our parent tag */
+	/* Take into account any restrictions imposed by our parent tag. */
 	newtag->dt_lowaddr = ulmin(parent->dt_lowaddr, newtag->dt_lowaddr);
 	newtag->dt_highaddr = ulmax(parent->dt_highaddr, newtag->dt_highaddr);

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


More information about the p4-projects mailing list