Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2004 13:09:23 -0800 (PST)
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 50283 for review
Message-ID:  <200404032109.i33L9Nkb069298@repoman.freebsd.org>

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

Change 50283 by imp@imp_pacopaco on 2004/04/03 13:09:16

	IFC @50276

Affected files ...

.. //depot/projects/power/sys/alpha/alpha/machdep.c#6 integrate
.. //depot/projects/power/sys/alpha/alpha/vm_machdep.c#5 integrate
.. //depot/projects/power/sys/amd64/amd64/support.S#6 integrate
.. //depot/projects/power/sys/amd64/amd64/vm_machdep.c#7 integrate
.. //depot/projects/power/sys/boot/common/loader.8#3 integrate
.. //depot/projects/power/sys/conf/NOTES#10 integrate
.. //depot/projects/power/sys/conf/files#7 integrate
.. //depot/projects/power/sys/conf/files.i386#7 integrate
.. //depot/projects/power/sys/conf/majors#8 integrate
.. //depot/projects/power/sys/dev/acpica/acpi.c#15 integrate
.. //depot/projects/power/sys/dev/acpica/acpivar.h#9 integrate
.. //depot/projects/power/sys/dev/ath/if_ath.c#9 integrate
.. //depot/projects/power/sys/dev/ath/if_ath_pci.c#6 integrate
.. //depot/projects/power/sys/dev/ath/if_athioctl.h#4 integrate
.. //depot/projects/power/sys/dev/ath/if_athvar.h#5 integrate
.. //depot/projects/power/sys/dev/fb/vga.c#2 integrate
.. //depot/projects/power/sys/dev/kbd/kbd.c#5 integrate
.. //depot/projects/power/sys/dev/md/md.c#7 integrate
.. //depot/projects/power/sys/dev/syscons/syscons.c#5 integrate
.. //depot/projects/power/sys/dev/twa/twa.c#2 integrate
.. //depot/projects/power/sys/dev/twa/twa_freebsd.c#2 integrate
.. //depot/projects/power/sys/dev/twa/twa_includes.h#2 integrate
.. //depot/projects/power/sys/dev/uart/uart_cpu_sparc64.c#5 integrate
.. //depot/projects/power/sys/dev/uart/uart_dev_ns8250.c#3 integrate
.. //depot/projects/power/sys/dev/uart/uart_kbd_sun.c#2 integrate
.. //depot/projects/power/sys/dev/usb/usb_subr.c#3 integrate
.. //depot/projects/power/sys/i386/conf/GENERIC.hints#3 integrate
.. //depot/projects/power/sys/i386/conf/NOTES#9 integrate
.. //depot/projects/power/sys/i386/i386/elan-mmcr.c#7 integrate
.. //depot/projects/power/sys/i386/i386/uio_machdep.c#2 integrate
.. //depot/projects/power/sys/i386/i386/vm_machdep.c#8 integrate
.. //depot/projects/power/sys/ia64/ia64/vm_machdep.c#7 integrate
.. //depot/projects/power/sys/kern/imgact_elf.c#5 integrate
.. //depot/projects/power/sys/kern/kern_fork.c#6 integrate
.. //depot/projects/power/sys/kern/kern_thr.c#3 integrate
.. //depot/projects/power/sys/kern/kern_thread.c#6 integrate
.. //depot/projects/power/sys/kern/subr_bus.c#6 integrate
.. //depot/projects/power/sys/kern/sys_process.c#4 integrate
.. //depot/projects/power/sys/kern/uipc_cow.c#4 integrate
.. //depot/projects/power/sys/kern/uipc_syscalls.c#7 integrate
.. //depot/projects/power/sys/net/if_sl.c#4 integrate
.. //depot/projects/power/sys/net80211/ieee80211.c#4 integrate
.. //depot/projects/power/sys/net80211/ieee80211_input.c#4 integrate
.. //depot/projects/power/sys/net80211/ieee80211_node.c#5 integrate
.. //depot/projects/power/sys/net80211/ieee80211_node.h#3 integrate
.. //depot/projects/power/sys/net80211/ieee80211_output.c#3 integrate
.. //depot/projects/power/sys/net80211/ieee80211_proto.c#5 integrate
.. //depot/projects/power/sys/net80211/ieee80211_var.h#5 integrate
.. //depot/projects/power/sys/netinet6/udp6_usrreq.c#7 integrate
.. //depot/projects/power/sys/netipsec/xform_tcp.c#1 branch
.. //depot/projects/power/sys/nfsclient/nfs_vnops.c#5 integrate
.. //depot/projects/power/sys/pc98/conf/NOTES#6 integrate
.. //depot/projects/power/sys/pci/agp_intel.c#5 integrate
.. //depot/projects/power/sys/pci/if_rl.c#8 integrate
.. //depot/projects/power/sys/pci/if_ste.c#9 integrate
.. //depot/projects/power/sys/pci/if_stereg.h#5 integrate
.. //depot/projects/power/sys/powerpc/powermac/grackle.c#3 integrate
.. //depot/projects/power/sys/powerpc/powerpc/vm_machdep.c#7 integrate
.. //depot/projects/power/sys/sparc64/sparc64/uio_machdep.c#2 integrate
.. //depot/projects/power/sys/sparc64/sparc64/vm_machdep.c#5 integrate
.. //depot/projects/power/sys/sys/proc.h#9 integrate
.. //depot/projects/power/sys/sys/sf_buf.h#4 integrate

Differences ...

==== //depot/projects/power/sys/alpha/alpha/machdep.c#6 (text+ko) ====

@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.218 2004/03/01 19:19:15 kensmith Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.219 2004/04/01 20:56:43 jhb Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -1914,10 +1914,9 @@
 	if (td->td_md.md_flags & (MDTD_STEP1|MDTD_STEP2))
 		panic("ptrace_single_step: step breakpoints not removed");
 
-	PROC_UNLOCK(td->td_proc);
 	error = ptrace_read_int(td, pc, &ins.bits);
 	if (error)
-		goto err;
+		return (error);
 
 	switch (ins.branch_format.opcode) {
 
@@ -1957,20 +1956,18 @@
 	td->td_md.md_sstep[0].addr = addr[0];
 	error = ptrace_set_bpt(td, &td->td_md.md_sstep[0]);
 	if (error)
-		goto err;
+		return (error);
 	if (count == 2) {
 		td->td_md.md_sstep[1].addr = addr[1];
 		error = ptrace_set_bpt(td, &td->td_md.md_sstep[1]);
 		if (error) {
 			ptrace_clear_bpt(td, &td->td_md.md_sstep[0]);
-			goto err;
+			return (error);
 		}
 		td->td_md.md_flags |= MDTD_STEP2;
 	} else
 		td->td_md.md_flags |= MDTD_STEP1;
 
-err:
-	PROC_LOCK(td->td_proc);
 	return (error);
 }
 

==== //depot/projects/power/sys/alpha/alpha/vm_machdep.c#5 (text+ko) ====

@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.101 2004/03/29 02:01:42 kensmith Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.102 2004/04/03 09:16:24 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -405,7 +405,7 @@
  * Get an sf_buf from the freelist. Will block if none are available.
  */
 struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
 {
 	struct sf_buf *sf;
 	int error;
@@ -414,7 +414,7 @@
 	while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
 		sf_buf_alloc_want++;
 		mbstat.sf_allocwait++;
-		error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+		error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
 		    "sfbufa", 0);
 		sf_buf_alloc_want--;
 

==== //depot/projects/power/sys/amd64/amd64/support.S#6 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.106 2004/03/31 02:03:49 alc Exp $
+ * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.107 2004/04/03 05:33:10 alc Exp $
  */
 
 #include "opt_ddb.h"
@@ -76,15 +76,15 @@
 
 /* Address: %rdi */
 ENTRY(pagezero)
-	lea	4096(%rdi),%rsi
+	movq	$-PAGE_SIZE,%rdx
+	subq	%rdx,%rdi
 	xorq	%rax,%rax
 1:
-	movnti	%rax,(%rdi)
-	movnti	%rax,8(%rdi)
-	movnti	%rax,16(%rdi)
-	movnti	%rax,24(%rdi)
-	addq	$32,%rdi
-	cmpq	%rsi,%rdi
+	movnti	%rax,(%rdi,%rdx)
+	movnti	%rax,8(%rdi,%rdx)
+	movnti	%rax,16(%rdi,%rdx)
+	movnti	%rax,24(%rdi,%rdx)
+	addq	$32,%rdx
 	jne	1b
 	sfence
 	retq

==== //depot/projects/power/sys/amd64/amd64/vm_machdep.c#7 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.231 2004/03/29 19:38:05 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.232 2004/04/03 09:16:25 alc Exp $");
 
 #include "opt_isa.h"
 #include "opt_cpu.h"
@@ -460,7 +460,7 @@
  * Get an sf_buf from the freelist. Will block if none are available.
  */
 struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
 {
 	struct sf_buf *sf;
 	int error;
@@ -469,7 +469,7 @@
 	while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
 		sf_buf_alloc_want++;
 		mbstat.sf_allocwait++;
-		error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+		error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
 		    "sfbufa", 0);
 		sf_buf_alloc_want--;
 

==== //depot/projects/power/sys/boot/common/loader.8#3 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.58 2004/01/27 15:59:38 des Exp $
+.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.59 2004/04/03 12:14:30 le Exp $
 .\"
 .\" Note: The date here should be updated whenever a non-trivial
 .\" change is made to the manual page.
@@ -493,12 +493,12 @@
 .Va TCBHASHSIZE
 or the preset default of 512.
 Must be a power of 2.
-.El
 .It Va vm.kmem_size
 Sets the size of kernel memory (bytes).
 This overrides the value determined when the kernel was compiled.
 Modifies
 .Va VM_KMEM_SIZE .
+.El
 .Ss BUILTIN PARSER
 When a builtin command is executed, the rest of the line is taken
 by it as arguments, and it is processed by a special parser which

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1211 2004/03/31 18:46:13 vkashyap Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1212 2004/04/02 18:50:56 vkashyap Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1388,14 +1388,6 @@
 device		twe		# 3ware ATA RAID
 
 #
-# 3ware 9000 series PATA/SATA RAID controller driver and options.
-# The driver is implemented as a SIM, and so, needs the CAM infrastructure.
-#
-options		TWA_DEBUG		# 0-10; 10 prints the most messages.
-options		TWA_FLASH_FIRMWARE	# firmware image bundled when defined.
-device		twa			# 3ware 9000 series PATA/SATA RAID
-
-#
 # The 'ATA' driver supports all ATA and ATAPI devices, including PC Card
 # devices. You only need one "device ata" for it to find all
 # PCI and PC Card ATA/ATAPI devices on modern machines.

==== //depot/projects/power/sys/conf/files#7 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.877 2004/03/20 02:14:02 marcel Exp $
+# $FreeBSD: src/sys/conf/files,v 1.881 2004/04/03 18:42:05 phk Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -499,7 +499,7 @@
 dev/joy/joy.c		optional joy
 dev/joy/joy_isa.c	optional joy isa
 dev/joy/joy_pccard.c	optional joy pccard
-dev/led/led.c		optional cpu_soekris
+dev/led/led.c		standard
 dev/lge/if_lge.c	optional lge
 dev/lnc/if_lnc.c	optional lnc
 dev/lnc/if_lnc_pci.c	optional lnc pci
@@ -668,6 +668,7 @@
 dev/sound/midi/sequencer.c	optional seq midi
 dev/sound/midi/timer.c	optional seq midi
 dev/sound/pci/als4000.c	optional pcm pci
+#dev/sound/pci/au88x0.c	optional pcm pci
 dev/sound/pci/cmi.c	optional pcm pci
 dev/sound/pci/cs4281.c	optional pcm pci
 dev/sound/pci/csa.c	optional csa pci
@@ -730,6 +731,11 @@
 dev/syscons/warp/warp_saver.c	optional warp_saver
 dev/tdfx/tdfx_pci.c	optional tdfx pci
 dev/trm/trm.c		optional trm
+dev/twa/twa.c		optional twa
+dev/twa/twa_cam.c	optional twa
+dev/twa/twa_freebsd.c	optional twa
+dev/twa/twa_fwimg.c	optional twa
+dev/twa/twa_globals.c	optional twa
 dev/twe/twe.c		optional twe
 dev/twe/twe_freebsd.c	optional twe
 dev/tx/if_tx.c		optional tx

==== //depot/projects/power/sys/conf/files.i386#7 (text+ko) ====

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

==== //depot/projects/power/sys/conf/majors#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/majors,v 1.197 2004/02/23 08:55:12 phk Exp $
+# $FreeBSD: src/sys/conf/majors,v 1.198 2004/04/01 10:00:04 des Exp $
 #
 # This list is semi-obsoleted by DEVFS, but for now it still contains
 # the current allocation of device major numbers.
@@ -90,7 +90,6 @@
 183	*smapi		SMAPI BIOS interface <mdodd>
 185	ce		Cronyx Tau-32 E1 adapter <rik@cronyx.ru>
 186	sx		Specialix I/O8+ driver <frank@exit.com>
-187	twa		3ware Apache ATA RAID (controller)
 252	??		entries from 200-252 are reserved for local use
 254	internal	Used internally by the kernel
 255	bad_choice	-1 is 255 which has magic meanings internally

==== //depot/projects/power/sys/dev/acpica/acpi.c#15 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.133 2004/03/31 17:35:28 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.134 2004/04/01 04:21:33 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -809,82 +809,6 @@
     return (0);
 }
 
-ACPI_HANDLE
-acpi_get_handle(device_t dev)
-{
-    uintptr_t up;
-    ACPI_HANDLE	h;
-
-    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, &up))
-	return(NULL);
-    h = (ACPI_HANDLE)up;
-    return (h);
-}
-	    
-int
-acpi_set_handle(device_t dev, ACPI_HANDLE h)
-{
-    uintptr_t up;
-
-    up = (uintptr_t)h;
-    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, up));
-}
-	    
-int
-acpi_get_magic(device_t dev)
-{
-    uintptr_t up;
-    int	m;
-
-    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, &up))
-	return(0);
-    m = (int)up;
-    return (m);
-}
-
-int
-acpi_set_magic(device_t dev, int m)
-{
-    uintptr_t up;
-
-    up = (uintptr_t)m;
-    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, up));
-}
-
-void *
-acpi_get_private(device_t dev)
-{
-    uintptr_t up;
-    void *p;
-
-    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, &up))
-	return (NULL);
-    p = (void *)up;
-    return (p);
-}
-
-int
-acpi_set_private(device_t dev, void *p)
-{
-    uintptr_t up;
-
-    up = (uintptr_t)p;
-    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, up));
-}
-
-ACPI_OBJECT_TYPE
-acpi_get_type(device_t dev)
-{
-    ACPI_HANDLE		h;
-    ACPI_OBJECT_TYPE	t;
-
-    if ((h = acpi_get_handle(dev)) == NULL)
-	return (ACPI_TYPE_NOT_FOUND);
-    if (AcpiGetType(h, &t) != AE_OK)
-	return (ACPI_TYPE_NOT_FOUND);
-    return (t);
-}
-
 /*
  * Handle child resource allocation/removal
  */

==== //depot/projects/power/sys/dev/acpica/acpivar.h#9 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.58 2004/03/31 17:23:46 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.59 2004/04/01 04:21:33 njl Exp $
  */
 
 #include "bus_if.h"
@@ -142,15 +142,75 @@
 #define ACPI_IVAR_MAGIC		0x101
 #define ACPI_IVAR_PRIVATE	0x102
 
-extern ACPI_HANDLE	acpi_get_handle(device_t dev);
-extern int		acpi_set_handle(device_t dev, ACPI_HANDLE h);
-extern int		acpi_get_magic(device_t dev);
-extern int		acpi_set_magic(device_t dev, int m);
-extern void *		acpi_get_private(device_t dev);
-extern int		acpi_set_private(device_t dev, void *p);
-extern ACPI_OBJECT_TYPE	acpi_get_type(device_t dev);
-struct resource *	acpi_bus_alloc_gas(device_t dev, int *rid,
-					   ACPI_GENERIC_ADDRESS *gas);
+static __inline ACPI_HANDLE
+acpi_get_handle(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, &up))
+	return (NULL);
+    return ((ACPI_HANDLE)up);
+}
+
+static __inline int
+acpi_set_handle(device_t dev, ACPI_HANDLE h)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)h;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, up));
+}
+
+static __inline int
+acpi_get_magic(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, &up))
+	return(0);
+    return ((int)up);
+}
+
+static __inline int
+acpi_set_magic(device_t dev, int m)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)m;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, up));
+}
+
+static __inline void *
+acpi_get_private(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, &up))
+	return (NULL);
+    return ((void *)up);
+}
+
+static __inline int
+acpi_set_private(device_t dev, void *p)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)p;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, up));
+}
+
+static __inline ACPI_OBJECT_TYPE
+acpi_get_type(device_t dev)
+{
+    ACPI_HANDLE		h;
+    ACPI_OBJECT_TYPE	t;
+
+    if ((h = acpi_get_handle(dev)) == NULL)
+	return (ACPI_TYPE_NOT_FOUND);
+    if (AcpiGetType(h, &t) != AE_OK)
+	return (ACPI_TYPE_NOT_FOUND);
+    return (t);
+}
 
 #ifdef ACPI_DEBUGGER
 extern void		acpi_EnterDebugger(void);
@@ -197,6 +257,8 @@
 extern ACPI_STATUS	acpi_Disable(struct acpi_softc *sc);
 extern void		acpi_UserNotify(const char *subsystem, ACPI_HANDLE h,
 					uint8_t notify);
+struct resource *	acpi_bus_alloc_gas(device_t dev, int *rid,
+					   ACPI_GENERIC_ADDRESS *gas);
 
 struct acpi_parse_resource_set {
     void	(*set_init)(device_t dev, void *arg, void **context);

==== //depot/projects/power/sys/dev/ath/if_ath.c#9 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.47 2004/04/01 00:38:45 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.53 2004/04/03 00:06:23 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -270,7 +270,6 @@
 
 	TASK_INIT(&sc->sc_txtask, 0, ath_tx_proc, sc);
 	TASK_INIT(&sc->sc_rxtask, 0, ath_rx_proc, sc);
-	TASK_INIT(&sc->sc_swbatask, 0, ath_beacon_proc, sc);
 	TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc);
 	TASK_INIT(&sc->sc_fataltask, 0, ath_fatal_proc, sc);
 	TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc);
@@ -288,7 +287,7 @@
 	);
 	if (sc->sc_txhalq == (u_int) -1) {
 		if_printf(ifp, "unable to setup a data xmit queue!\n");
-		goto bad;
+		goto bad2;
 	}
 	sc->sc_bhalq = ath_hal_setuptxqueue(ah,
 		HAL_TX_QUEUE_BEACON,
@@ -296,7 +295,7 @@
 	);
 	if (sc->sc_bhalq == (u_int) -1) {
 		if_printf(ifp, "unable to setup a beacon xmit queue!\n");
-		goto bad;
+		goto bad2;
 	}
 
 	ifp->if_softc = sc;
@@ -317,7 +316,7 @@
 		| IEEE80211_C_HOSTAP		/* hostap mode */
 		| IEEE80211_C_MONITOR		/* monitor mode */
 		| IEEE80211_C_SHPREAMBLE	/* short preamble supported */
-		| IEEE80211_C_RCVMGT;		/* recv management frames */
+		;
 
 	/* get mac address from hardware */
 	ath_hal_getmac(ah, ic->ic_myaddr);
@@ -326,7 +325,9 @@
 	ieee80211_ifattach(ifp);
 	/* override default methods */
 	ic->ic_node_alloc = ath_node_alloc;
+	sc->sc_node_free = ic->ic_node_free;
 	ic->ic_node_free = ath_node_free;
+	sc->sc_node_copy = ic->ic_node_copy;
 	ic->ic_node_copy = ath_node_copy;
 	ic->ic_node_getrssi = ath_node_getrssi;
 	sc->sc_newstate = ic->ic_newstate;
@@ -355,6 +356,8 @@
 	sc->sc_rx_th.wr_ihdr.it_present = htole32(ATH_RX_RADIOTAP_PRESENT);
 
 	return 0;
+bad2:
+	ath_desc_free(sc);
 bad:
 	if (ah)
 		ath_hal_detach(ah);
@@ -432,6 +435,8 @@
 		DPRINTF(ATH_DEBUG_ANY, ("%s: invalid; ignored\n", __func__));
 		return;
 	}
+	if (!ath_hal_intrpend(ah))		/* shared irq, not for us */
+		return;
 	if ((ifp->if_flags & (IFF_RUNNING|IFF_UP)) != (IFF_RUNNING|IFF_UP)) {
 		DPRINTF(ATH_DEBUG_ANY, ("%s: if_flags 0x%x\n",
 			__func__, ifp->if_flags));
@@ -476,8 +481,14 @@
 			taskqueue_enqueue(taskqueue_swi, &sc->sc_rxtask);
 		if (status & HAL_INT_TX)
 			taskqueue_enqueue(taskqueue_swi, &sc->sc_txtask);
-		if (status & HAL_INT_SWBA)
-			taskqueue_enqueue(taskqueue_swi, &sc->sc_swbatask);
+		if (status & HAL_INT_SWBA) {
+			/*
+			 * Handle beacon transmission directly; deferring
+			 * this is too slow to meet timing constraints
+			 * under load.
+			 */
+			ath_beacon_proc(sc, 0);
+		}
 		if (status & HAL_INT_BMISS) {
 			sc->sc_stats.ast_bmiss++;
 			taskqueue_enqueue(taskqueue_swi, &sc->sc_bmisstask);
@@ -1507,14 +1518,18 @@
 		if (bf->bf_node == ni)
 			bf->bf_node = NULL;
 	}
-	free(ni, M_DEVBUF);
+	(*sc->sc_node_free)(ic, ni);
 }
 
 static void
 ath_node_copy(struct ieee80211com *ic,
 	struct ieee80211_node *dst, const struct ieee80211_node *src)
 {
-	*(struct ath_node *)dst = *(const struct ath_node *)src;
+        struct ath_softc *sc = ic->ic_if.if_softc;
+
+	memcpy(&dst[1], &src[1],
+		sizeof(struct ath_node) - sizeof(struct ieee80211_node));
+	(*sc->sc_node_copy)(ic, dst, src);
 }
 
 

==== //depot/projects/power/sys/dev/ath/if_ath_pci.c#6 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.7 2004/03/17 17:50:27 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.8 2004/04/02 23:57:10 sam Exp $");
 
 /*
  * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.

==== //depot/projects/power/sys/dev/ath/if_athioctl.h#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.5 2003/12/28 07:00:32 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.7 2004/04/02 23:57:10 sam Exp $
  */
 
 /*
@@ -70,6 +70,8 @@
 	u_int32_t	ast_tx_rts;	/* tx frames with rts enabled */
 	u_int32_t	ast_tx_cts;	/* tx frames with cts enabled */
 	u_int32_t	ast_tx_shortpre;/* tx frames with short preamble */
+	u_int32_t	ast_tx_altrate;	/* tx frames with alternate rate */
+	u_int32_t	ast_tx_protect;	/* tx frames with protection */
 	u_int32_t	ast_rx_nombuf;	/* rx setup failed 'cuz no mbuf */
 	u_int32_t	ast_rx_busdma;	/* rx setup failed for dma resrcs */
 	u_int32_t	ast_rx_orn;	/* rx failed 'cuz of desc overrun */
@@ -79,6 +81,7 @@
 	u_int32_t	ast_rx_phyerr;	/* rx failed 'cuz of PHY err */
 	u_int32_t	ast_rx_phy[32];	/* rx PHY error per-code counts */
 	u_int32_t	ast_rx_tooshort;/* rx discarded 'cuz frame too short */
+	u_int32_t	ast_rx_toobig;	/* rx discarded 'cuz frame too large */
 	u_int32_t	ast_rx_ctl;	/* rx discarded 'cuz ctl frame */
 	u_int32_t	ast_be_nombuf;	/* beacon setup failed 'cuz no mbuf */
 	u_int32_t	ast_per_cal;	/* periodic calibration calls */

==== //depot/projects/power/sys/dev/ath/if_athvar.h#5 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.11 2004/04/01 00:38:45 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.14 2004/04/03 03:33:02 sam Exp $
  */
 
 /*
@@ -93,6 +93,11 @@
 	struct ieee80211com	sc_ic;		/* IEEE 802.11 common */
 	int			(*sc_newstate)(struct ieee80211com *,
 					enum ieee80211_state, int);
+	void 			(*sc_node_free)(struct ieee80211com *,
+					struct ieee80211_node *);
+	void			(*sc_node_copy)(struct ieee80211com *,
+					struct ieee80211_node *,
+					const struct ieee80211_node *);
 	device_t		sc_dev;
 	bus_space_tag_t		sc_st;		/* bus space tag */
 	bus_space_handle_t	sc_sh;		/* bus space handle */
@@ -147,7 +152,6 @@
 	u_int			sc_bhalq;	/* HAL q for outgoing beacons */
 	struct ath_buf		*sc_bcbuf;	/* beacon buffer */
 	struct ath_buf		*sc_bufptr;	/* allocated buffer ptr */
-	struct task		sc_swbatask;	/* swba int processing */
 	struct task		sc_bmisstask;	/* bmiss int processing */
 
 	struct callout		sc_cal_ch;	/* callout handle for cals */

==== //depot/projects/power/sys/dev/fb/vga.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.28 2003/08/24 17:46:06 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.29 2004/04/03 15:28:25 nectar Exp $");
 
 #include "opt_vga.h"
 #include "opt_fb.h"
@@ -2854,7 +2854,8 @@
     u_char *g;
     u_char *b;
 
-    if ((base < 0) || (base >= 256) || (base + count > 256))
+    if (count < 0 || base < 0 || count > 256 || base > 256 ||
+	base + count > 256)
 	return EINVAL;
 
     r = malloc(count*3, M_DEVBUF, M_WAITOK);
@@ -2885,7 +2886,8 @@
     u_char *b;
     int err;
 
-    if ((base < 0) || (base >= 256) || (base + count > 256))
+    if (count < 0 || base < 0 || count > 256 || base > 256 ||
+	base + count > 256)
 	return EINVAL;
 
     r = malloc(count*3, M_DEVBUF, M_WAITOK);

==== //depot/projects/power/sys/dev/kbd/kbd.c#5 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/kbd/kbd.c,v 1.39 2004/02/21 21:10:43 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/kbd/kbd.c,v 1.41 2004/04/02 16:41:16 des Exp $");
 
 #include "opt_kbd.h"
 
@@ -56,7 +56,7 @@
 } genkbd_softc_t;
 
 static	SLIST_HEAD(, keyboard_driver) keyboard_drivers =
- 	SLIST_HEAD_INITIALIZER(keyboard_drivers);
+	SLIST_HEAD_INITIALIZER(keyboard_drivers);
 
 SET_DECLARE(kbddriver_set, const keyboard_driver_t);
 
@@ -94,14 +94,14 @@
 	new_kbd = malloc(sizeof(*new_kbd)*newsize, M_DEVBUF, M_NOWAIT|M_ZERO);
 	if (new_kbd == NULL) {
 		splx(s);
-		return ENOMEM;
+		return (ENOMEM);
 	}
 	new_kbdsw = malloc(sizeof(*new_kbdsw)*newsize, M_DEVBUF,
 			    M_NOWAIT|M_ZERO);
 	if (new_kbdsw == NULL) {
 		free(new_kbd, M_DEVBUF);
 		splx(s);
-		return ENOMEM;
+		return (ENOMEM);
 	}
 	bcopy(keyboard, new_kbd, sizeof(*keyboard)*keyboards);
 	bcopy(kbdsw, new_kbdsw, sizeof(*kbdsw)*keyboards);
@@ -117,7 +117,7 @@
 	if (bootverbose)
 		printf("kbd: new array size %d\n", keyboards);
 
-	return 0;
+	return (0);
 }
 
 /*
@@ -166,9 +166,9 @@
 kbd_add_driver(keyboard_driver_t *driver)
 {
 	if (SLIST_NEXT(driver, link))
-		return EINVAL;
+		return (EINVAL);
 	SLIST_INSERT_HEAD(&keyboard_drivers, driver, link);
-	return 0;
+	return (0);
 }
 
 int
@@ -176,7 +176,7 @@
 {
 	SLIST_REMOVE(&keyboard_drivers, driver, keyboard_driver, link);
 	SLIST_NEXT(driver, link) = NULL;
-	return 0;
+	return (0);
 }
 
 /* register a keyboard and associate it with a function table */
@@ -193,7 +193,7 @@
 	}
 	if (index >= keyboards) {
 		if (kbd_realloc_array())
-			return -1;
+			return (-1);
 	}
 
 	kbd->kb_index = index;
@@ -208,7 +208,7 @@
 		if (strcmp(p->name, kbd->kb_name) == 0) {
 			keyboard[index] = kbd;
 			kbdsw[index] = p->kbdsw;
-			return index;
+			return (index);
 		}
 	}
 	SET_FOREACH(list, kbddriver_set) {
@@ -216,11 +216,11 @@
 		if (strcmp(p->name, kbd->kb_name) == 0) {
 			keyboard[index] = kbd;
 			kbdsw[index] = p->kbdsw;
-			return index;
+			return (index);
 		}
 	}
 
-	return -1;
+	return (-1);
 }
 
 int
@@ -230,21 +230,21 @@
 	int s;
 
 	if ((kbd->kb_index < 0) || (kbd->kb_index >= keyboards))
-		return ENOENT;
+		return (ENOENT);
 	if (keyboard[kbd->kb_index] != kbd)
-		return ENOENT;
+		return (ENOENT);
 
 	s = spltty();
 	if (KBD_IS_BUSY(kbd)) {
 		error = (*kbd->kb_callback.kc_func)(kbd, KBDIO_UNLOADING,
-						    kbd->kb_callback.kc_arg);
+		    kbd->kb_callback.kc_arg);
 		if (error) {
 			splx(s);
-			return error;
+			return (error);
 		}
 		if (KBD_IS_BUSY(kbd)) {
 			splx(s);
-			return EBUSY;
+			return (EBUSY);
 		}
 	}
 	KBD_INVALID(kbd);
@@ -252,7 +252,7 @@
 	kbdsw[kbd->kb_index] = NULL;
 
 	splx(s);
-	return 0;
+	return (0);
 }
 
 /* find a funciton table by the driver name */
@@ -264,15 +264,15 @@
 
 	SLIST_FOREACH(p, &keyboard_drivers, link) {
 		if (strcmp(p->name, driver) == 0)
-			return p->kbdsw;
+			return (p->kbdsw);
 	}
 	SET_FOREACH(list, kbddriver_set) {
 		p = *list;
 		if (strcmp(p->name, driver) == 0)
-			return p->kbdsw;
+			return (p->kbdsw);
 	}
 
-	return NULL;
+	return (NULL);
 }
 
 /*
@@ -297,9 +297,9 @@
 			continue;
 		if ((unit != -1) && (keyboard[i]->kb_unit != unit))
 			continue;
-		return i;
+		return (i);
 	}
-	return -1;
+	return (-1);
 }
 
 /* allocate a keyboard */
@@ -311,14 +311,14 @@
 	int s;
 
 	if (func == NULL)
-		return -1;
+		return (-1);
 
 	s = spltty();
 	index = kbd_find_keyboard(driver, unit);
 	if (index >= 0) {
 		if (KBD_IS_BUSY(keyboard[index])) {
 			splx(s);
-			return -1;
+			return (-1);
 		}
 		keyboard[index]->kb_token = id;
 		KBD_BUSY(keyboard[index]);
@@ -327,7 +327,7 @@
 		(*kbdsw[index]->clear_state)(keyboard[index]);
 	}
 	splx(s);
-	return index;
+	return (index);
 }
 
 int
@@ -350,7 +350,7 @@
 		error = 0;
 	}
 	splx(s);
-	return error;
+	return (error);
 }
 
 int
@@ -373,7 +373,7 @@
 		error = 0;
 	}
 	splx(s);
-	return error;
+	return (error);
 }
 
 /* get a keyboard structure */
@@ -381,12 +381,12 @@

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



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