PERFORCE change 65110 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun Nov 14 10:36:56 PST 2004


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

Change 65110 by marcel at marcel_nfs on 2004/11/14 18:36:36

	IFC @65109

Affected files ...

.. //depot/projects/uart/arm/arm/genassym.c#2 integrate
.. //depot/projects/uart/arm/arm/intr.c#2 integrate
.. //depot/projects/uart/arm/arm/irq_dispatch.S#2 integrate
.. //depot/projects/uart/arm/arm/pmap.c#4 integrate
.. //depot/projects/uart/arm/xscale/i80321/i80321.c#2 integrate
.. //depot/projects/uart/boot/common/commands.c#4 integrate
.. //depot/projects/uart/compat/svr4/svr4_filio.c#4 integrate
.. //depot/projects/uart/compat/svr4/svr4_misc.c#4 integrate
.. //depot/projects/uart/conf/NOTES#20 integrate
.. //depot/projects/uart/conf/files#34 integrate
.. //depot/projects/uart/conf/files.i386#11 integrate
.. //depot/projects/uart/conf/kern.post.mk#5 integrate
.. //depot/projects/uart/conf/options#15 integrate
.. //depot/projects/uart/dev/acpi_support/acpi_asus.c#1 branch
.. //depot/projects/uart/dev/acpi_support/acpi_panasonic.c#1 branch
.. //depot/projects/uart/dev/acpi_support/acpi_sony.c#1 branch
.. //depot/projects/uart/dev/acpi_support/acpi_toshiba.c#1 branch
.. //depot/projects/uart/dev/acpica/acpi_pcib.c#6 integrate
.. //depot/projects/uart/dev/acpica/acpi_snc.c#1 branch
.. //depot/projects/uart/dev/aha/aha_isa.c#5 integrate
.. //depot/projects/uart/dev/em/if_em.c#9 integrate
.. //depot/projects/uart/dev/em/if_em.h#10 integrate
.. //depot/projects/uart/dev/md/md.c#8 integrate
.. //depot/projects/uart/dev/pbio/pbio.c#2 integrate
.. //depot/projects/uart/dev/sound/pci/maestro.c#8 integrate
.. //depot/projects/uart/dev/streams/streams.c#4 integrate
.. //depot/projects/uart/dev/usb/ehci.c#7 integrate
.. //depot/projects/uart/dev/usb/ohci.c#8 integrate
.. //depot/projects/uart/dev/usb/uhci.c#9 integrate
.. //depot/projects/uart/dev/usb/usb_port.h#8 integrate
.. //depot/projects/uart/fs/devfs/devfs_vnops.c#5 integrate
.. //depot/projects/uart/fs/fdescfs/fdesc_vfsops.c#4 integrate
.. //depot/projects/uart/fs/fdescfs/fdesc_vnops.c#4 integrate
.. //depot/projects/uart/fs/fifofs/fifo_vnops.c#4 integrate
.. //depot/projects/uart/fs/unionfs/union_subr.c#4 integrate
.. //depot/projects/uart/fs/unionfs/union_vfsops.c#4 integrate
.. //depot/projects/uart/fs/unionfs/union_vnops.c#4 integrate
.. //depot/projects/uart/i386/acpica/acpi_asus.c#4 integrate
.. //depot/projects/uart/i386/include/atomic.h#3 integrate
.. //depot/projects/uart/i386/isa/pbio.c#2 delete
.. //depot/projects/uart/kern/kern_descrip.c#10 integrate
.. //depot/projects/uart/kern/kern_event.c#3 integrate
.. //depot/projects/uart/kern/kern_exec.c#8 integrate
.. //depot/projects/uart/kern/kern_fork.c#7 integrate
.. //depot/projects/uart/kern/sched_ule.c#10 integrate
.. //depot/projects/uart/kern/sys_generic.c#5 integrate
.. //depot/projects/uart/kern/sys_socket.c#3 integrate
.. //depot/projects/uart/kern/sysv_msg.c#4 integrate
.. //depot/projects/uart/kern/sysv_sem.c#4 integrate
.. //depot/projects/uart/kern/sysv_shm.c#4 integrate
.. //depot/projects/uart/kern/tty.c#4 integrate
.. //depot/projects/uart/kern/uipc_domain.c#6 integrate
.. //depot/projects/uart/kern/uipc_syscalls.c#8 integrate
.. //depot/projects/uart/kern/vfs_default.c#6 integrate
.. //depot/projects/uart/kern/vfs_subr.c#10 integrate
.. //depot/projects/uart/kern/vfs_syscalls.c#9 integrate
.. //depot/projects/uart/modules/acpi/Makefile#7 integrate
.. //depot/projects/uart/modules/acpi/acpi_snc/Makefile#1 branch
.. //depot/projects/uart/netinet/in.c#3 integrate
.. //depot/projects/uart/netinet/ip_divert.c#5 integrate
.. //depot/projects/uart/nfsserver/nfs_serv.c#3 integrate
.. //depot/projects/uart/pci/if_sf.c#6 integrate
.. //depot/projects/uart/pci/if_sk.c#7 integrate
.. //depot/projects/uart/sys/filedesc.h#4 integrate
.. //depot/projects/uart/sys/msg.h#2 integrate
.. //depot/projects/uart/sys/pbioio.h#2 delete
.. //depot/projects/uart/sys/sem.h#2 integrate
.. //depot/projects/uart/sys/shm.h#2 integrate
.. //depot/projects/uart/sys/vnode.h#7 integrate
.. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#8 integrate

Differences ...

==== //depot/projects/uart/arm/arm/genassym.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.2 2004/09/23 22:11:06 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.3 2004/11/12 21:49:05 cognet Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/assym.h>
@@ -43,6 +43,7 @@
 #include <machine/proc.h>
 #include <machine/cpufunc.h>
 #include <machine/pte.h>
+#include <machine/intr.h>
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
@@ -109,3 +110,6 @@
 ASSYM(P_SIGEVENT, P_SIGEVENT);
 ASSYM(P_PROFIL, P_PROFIL);
 ASSYM(TRAPFRAMESIZE, sizeof(struct trapframe));
+
+ASSYM(MAXCOMLEN, MAXCOMLEN);
+ASSYM(NIRQ, NIRQ);

==== //depot/projects/uart/arm/arm/intr.c#2 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.3 2004/09/23 22:09:57 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.4 2004/11/12 21:49:05 cognet Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/syslog.h> 
@@ -50,7 +50,10 @@
 #include <machine/intr.h>
 #include <machine/cpu.h>
 
-struct ithd *ithreads[NIRQ];
+static struct ithd *ithreads[NIRQ];
+static int intrcnt_tab[NIRQ];
+static int intrcnt_index = 0;
+static int last_printed = 0;
 struct arm_intr {
 	driver_intr_t *handler;
 	void *arg;
@@ -69,7 +72,8 @@
 
 void	arm_handler_execute(void *, int);
 
-void arm_setup_irqhandler(const char *name, void (*hand)(void*), void *arg, 
+void
+arm_setup_irqhandler(const char *name, void (*hand)(void*), void *arg, 
     int irq, int flags, void **cookiep)
 {
 	struct ithd *cur_ith;
@@ -87,6 +91,14 @@
 		if (error)
 			return;
 		ithreads[irq] = cur_ith;
+		last_printed += 
+		    snprintf(intrnames + last_printed,
+		    MAXCOMLEN + 1,
+		    "irq%d: %s", irq, name);
+		last_printed++;
+		intrcnt_tab[irq] = intrcnt_index;
+		intrcnt_index++;
+		
 	}
 	if (!(flags & INTR_FAST)) {
 		intr->handler = hand;
@@ -120,6 +132,7 @@
 	arm_mask_irqs(irqnb);
 	while (irqnb != 0) {
 		i = ffs(irqnb) - 1;
+		intrcnt[intrcnt_tab[i]]++;
 		irqnb &= ~(1U << i);
 		ithd = ithreads[i];
 		if (!ithd)

==== //depot/projects/uart/arm/arm/irq_dispatch.S#2 (text+ko) ====

@@ -72,7 +72,7 @@
 #include <machine/asm.h>
 #include <machine/asmacros.h>
 #include <machine/armreg.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/irq_dispatch.S,v 1.2 2004/09/23 22:09:57 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/irq_dispatch.S,v 1.3 2004/11/12 21:49:05 cognet Exp $");
 
 /*
  * irq_entry:
@@ -102,18 +102,13 @@
 	.align	0
 
 
-	/*
-	 * XXX Provide intrnames/intrcnt for legacy code, but
-	 * don't actually use them.
-	 */
-
 	.global _C_LABEL(intrnames), _C_LABEL(eintrnames)
 	.global _C_LABEL(intrcnt), _C_LABEL(eintrcnt)
 _C_LABEL(intrnames): 
+	.space NIRQ * (MAXCOMLEN + 1)
 _C_LABEL(eintrnames):
-
-	.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt)
 _C_LABEL(intrcnt):
+	.space NIRQ * 4
 _C_LABEL(eintrcnt):
 
 	.global _C_LABEL(current_intr_depth)

==== //depot/projects/uart/arm/arm/pmap.c#4 (text+ko) ====

@@ -147,7 +147,7 @@
 #include "opt_vm.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.17 2004/11/10 22:11:08 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.19 2004/11/13 14:54:31 cognet Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -1668,6 +1668,8 @@
 	simple_unlock(&pg->mdpage.pvh_slock);
 	PMAP_HEAD_TO_MAP_UNLOCK();
 #endif
+	if (maskbits & PVF_WRITE)
+		vm_page_flag_clear(pg, PG_WRITEABLE);
 	return (count);
 }
 
@@ -1789,6 +1791,8 @@
 			pg->md.urw_mappings--;
 		else
 			pg->md.uro_mappings--;
+	if (TAILQ_FIRST(&pg->md.pv_list) == NULL)
+		vm_page_flag_clear(pg, PG_WRITEABLE);
 }
 
 static struct pv_entry *
@@ -1921,9 +1925,6 @@
 	pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, 
 	    NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE);
 	uma_prealloc(pvzone, MINPV);
-	l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable),
-	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR,
-	    UMA_ZONE_VM | UMA_ZONE_NOFREE);
 	/*
 	 * Now it is safe to enable pv_table recording.
 	 */
@@ -2173,6 +2174,11 @@
 	l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor,
 	    NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE);
 	uma_prealloc(l2zone, 4096);
+	l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable),
+	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR,
+	    UMA_ZONE_VM | UMA_ZONE_NOFREE);
+	uma_prealloc(l2table_zone, 1024);
+
 	uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max);
 	uma_zone_set_obj(l2zone, &l2zone_obj, pv_entry_max);
 
@@ -3689,6 +3695,7 @@
 	pmap_acquire_pmap_lock(pm);
 #endif
 
+	vm_page_lock_queues();
 	pmap_update(pm);
 	if (!pmap_is_current(pm)) {
 		cleanlist_idx = PMAP_REMOVE_CLEAN_LIST_SIZE + 1;
@@ -3845,6 +3852,7 @@
 		pmap_free_l2_bucket(pm, l2b, mappings);
 	}
 
+	vm_page_unlock_queues();
 	if (flushall)
 		cpu_tlb_flushID();
 #if 0

==== //depot/projects/uart/arm/xscale/i80321/i80321.c#2 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.2 2004/11/13 15:12:26 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -146,7 +146,6 @@
 
 	bus_space_write_4(sc->sc_st, sc->sc_atu_sh, ATU_IALR2,
 	    (0xffffffff - (sc->sc_iwin[2].iwin_size - 1)) & 0xffffffc0);
-	printf("size : %d\n", (sc->sc_iwin[2].iwin_size - 1) / (1024 * 1024));
 	bus_space_write_4(sc->sc_st, sc->sc_atu_sh, ATU_IATVR2,
 	    sc->sc_iwin[2].iwin_xlate);
 

==== //depot/projects/uart/boot/common/commands.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/common/commands.c,v 1.20 2004/09/29 13:43:55 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/common/commands.c,v 1.22 2004/11/13 17:04:55 ru Exp $");
 
 #include <stand.h>
 #include <string.h>
@@ -214,12 +214,23 @@
 command_commandlist(int argc, char *argv[])
 {
     struct bootblk_command	**cmdp;
-    
-    printf("Available commands:\n");
+    int		res;
+    char	name[20];
+
+    res = 0;
+    pager_open();
+    res = pager_output("Available commands:\n");
     SET_FOREACH(cmdp, Xcommand_set) {
-	if (((*cmdp)->c_name != NULL) && ((*cmdp)->c_desc != NULL))
-	    printf("  %-15s  %s\n", (*cmdp)->c_name, (*cmdp)->c_desc);
+	if (res)
+	    break;
+	if (((*cmdp)->c_name != NULL) && ((*cmdp)->c_desc != NULL)) {
+	    sprintf(name, "  %-15s  ", (*cmdp)->c_name);
+	    pager_output(name);
+	    pager_output((*cmdp)->c_desc);
+	    res = pager_output("\n");
+	}
     }
+    pager_close();
     return(CMD_OK);
 }
 
@@ -301,7 +312,7 @@
     return(CMD_OK);
 }
 
-COMMAND_SET(echo, "echo", NULL, command_echo);
+COMMAND_SET(echo, "echo", "echo arguments", command_echo);
 
 static int
 command_echo(int argc, char *argv[])
@@ -340,7 +351,7 @@
  * A passable emulation of the sh(1) command of the same name.
  */
 
-COMMAND_SET(read, "read", NULL, command_read);
+COMMAND_SET(read, "read", "read input from the terminal", command_read);
 
 static int
 command_read(int argc, char *argv[])

==== //depot/projects/uart/compat/svr4/svr4_filio.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.32 2004/11/07 15:59:27 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.33 2004/11/13 11:53:00 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -211,15 +211,15 @@
 
 	switch (cmd) {
 	case SVR4_FIOCLEX:
-		FILEDESC_LOCK(fdp);
+		FILEDESC_LOCK_FAST(fdp);
 		fdp->fd_ofileflags[fd] |= UF_EXCLOSE;
-		FILEDESC_UNLOCK(fdp);
+		FILEDESC_UNLOCK_FAST(fdp);
 		return 0;
 
 	case SVR4_FIONCLEX:
-		FILEDESC_LOCK(fdp);
+		FILEDESC_LOCK_FAST(fdp);
 		fdp->fd_ofileflags[fd] &= ~UF_EXCLOSE;
-		FILEDESC_UNLOCK(fdp);
+		FILEDESC_UNLOCK_FAST(fdp);
 		return 0;
 
 	case SVR4_FIOGETOWN:

==== //depot/projects/uart/compat/svr4/svr4_misc.c#4 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.74 2004/10/05 18:51:10 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.75 2004/11/13 11:53:00 phk Exp $");
 
 #include "opt_mac.h"
 
@@ -618,10 +618,10 @@
 		return error;
 	}
 	VREF(vp);
-	FILEDESC_LOCK(fdp);
+	FILEDESC_LOCK_FAST(fdp);
 	vpold = fdp->fd_rdir;
 	fdp->fd_rdir = vp;
-	FILEDESC_UNLOCK(fdp);
+	FILEDESC_UNLOCK_FAST(fdp);
 	if (vpold != NULL)
 		vrele(vpold);
 	fdrop(fp, td);

==== //depot/projects/uart/conf/NOTES#20 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1287 2004/11/08 19:05:21 phk Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1288 2004/11/12 19:44:30 peter Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -756,7 +756,6 @@
 options 	NFSCLIENT		#Network File System client
 
 # The rest are optional:
-options 	AUTOFS			#Auto File System
 options 	CD9660			#ISO 9660 filesystem
 options 	FDESCFS			#File descriptor filesystem
 options 	HPFS			#OS/2 File system

==== //depot/projects/uart/conf/files#34 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.962 2004/11/10 19:54:17 markm Exp $
+# $FreeBSD: src/sys/conf/files,v 1.966 2004/11/12 04:48:24 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -300,6 +300,7 @@
 dev/acpica/Osd/OsdStream.c	optional acpi
 dev/acpica/Osd/OsdSynch.c	optional acpi
 dev/acpica/Osd/OsdTable.c	optional acpi
+dev/acpica/acpi_snc.c		optional acpi_snc acpi
 dev/acpica/acpi_video.c		optional acpi_video acpi
 dev/adlink/adlink.c	optional adlink
 dev/advansys/adv_eisa.c	optional adv eisa
@@ -594,6 +595,7 @@
 dev/patm/if_patm_tx.c	optional patm pci
 dev/patm/if_patm_attach.c	optional patm pci
 dev/patm/if_patm_rtables.c	optional patm pci
+dev/pbio/pbio.c		optional pbio isa
 dev/pccard/card_if.m	standard
 dev/pccard/pccard.c	optional pccard
 dev/pccard/pccard_cis.c	optional pccard

==== //depot/projects/uart/conf/files.i386#11 (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.506 2004/10/24 08:53:40 scottl Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.507 2004/11/11 04:53:46 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -292,7 +292,6 @@
 i386/isa/mse.c			optional	mse
 i386/isa/nmi.c			standard
 i386/isa/npx.c			optional	npx
-i386/isa/pbio.c			optional	pbio
 i386/isa/pcf.c			optional	pcf
 i386/isa/pcvt/pcvt_drv.c	optional	vt
 i386/isa/pcvt/pcvt_ext.c	optional	vt

==== //depot/projects/uart/conf/kern.post.mk#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.70 2004/09/23 08:34:50 phk Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.73 2004/11/14 00:22:18 imp Exp $
 
 # Part of a unified Makefile for building kernels.  This part includes all
 # the definitions that need to be after all the % directives except %RULES
@@ -27,6 +27,20 @@
 .endif
 .endfor
 
+# Handle out of tree ports 
+.if defined(PORTS_MODULES)
+.if defined(SYSDIR)
+PORTSMODULESENV=SYSDIR=${SYSDIR}
+.endif
+.for target in all install clean
+${target}: ports-${target}
+ports-${target}:
+.for __i in ${PORTS_MODULES}
+	cd $${PORTSDIR:-/usr/ports/}${__i}; ${PORTSMODULESENV} ${MAKE} -B ${target}
+.endfor
+.endfor
+.endif
+
 .ORDER: kernel-install modules-install
 
 kernel-all: ${KERNEL_KO}

==== //depot/projects/uart/conf/options#15 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.486 2004/10/27 19:26:01 rwatson Exp $
+# $FreeBSD: src/sys/conf/options,v 1.487 2004/11/12 19:44:30 peter Exp $
 #
 #        On the handling of kernel options
 #
@@ -162,7 +162,6 @@
 # time, since the corresponding lkms cannot work if there are any static
 # dependencies.  Unusability is enforced by hiding the defines for the
 # options in a never-included header.
-AUTOFS		opt_dontuse.h
 CD9660		opt_dontuse.h
 CODA		opt_dontuse.h
 EXT2FS		opt_dontuse.h

==== //depot/projects/uart/dev/acpica/acpi_pcib.c#6 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib.c,v 1.50 2004/08/13 06:22:07 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib.c,v 1.51 2004/11/11 22:33:08 jhb Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -70,11 +70,13 @@
 
     /*
      * Get the PCI interrupt routing table for this bus.  If we can't
-     * get it, this is not an error but may reduce functionality.
+     * get it, this is not an error but may reduce functionality.  There
+     * are several valid bridges in the field that do not have a _PRT, so
+     * only warn about missing tables if bootverbose is set.
      */
     prt->Length = ACPI_ALLOCATE_BUFFER;
     status = AcpiGetIrqRoutingTable(acpi_get_handle(dev), prt);
-    if (ACPI_FAILURE(status))
+    if (ACPI_FAILURE(status) && (bootverbose || status != AE_NOT_FOUND))
 	device_printf(dev,
 	    "could not get PCI interrupt routing table for %s - %s\n",
 	    acpi_name(acpi_get_handle(dev)), AcpiFormatException(status));

==== //depot/projects/uart/dev/aha/aha_isa.c#5 (text+ko) ====

@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aha/aha_isa.c,v 1.29 2004/03/17 17:50:24 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aha/aha_isa.c,v 1.31 2004/11/12 02:18:42 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -122,7 +122,7 @@
 
 	port_rid = 0;
 	port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &port_rid,
-	  0, ~0, AHA_NREGS, RF_ACTIVE);
+	    0, ~0, AHA_NREGS, RF_ACTIVE);
 
 	if (port_res == NULL)
 		return (ENXIO);
@@ -150,7 +150,7 @@
 		    "settings for adapter at %#jx.  Failing probe\n",
 		    (uintmax_t)port_start);
 		aha_free(aha);
-		bus_release_resource(dev, SYS_RES_IOPORT, port_rid, 
+		bus_release_resource(dev, SYS_RES_IOPORT, port_rid,
 		    port_res);
 		return (ENXIO);
 	}
@@ -208,7 +208,8 @@
 	    RF_ACTIVE);
 	if (!aha->irq) {
 		device_printf(dev, "Unable to allocate excluse use of irq\n");
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		return ENOMEM;
 	}
 
@@ -217,7 +218,8 @@
 	    RF_ACTIVE);
 	if (!aha->drq) {
 		device_printf(dev, "Unable to allocate drq\n");
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		bus_release_resource(dev, SYS_RES_IRQ, aha->irqrid, aha->irq);
 		return ENOMEM;
 	}
@@ -247,41 +249,45 @@
 				/* lockfunc	*/ busdma_lock_mutex,
 				/* lockarg	*/ &Giant,
 				&aha->parent_dmat) != 0) {
-                aha_free(aha);
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		bus_release_resource(dev, SYS_RES_IRQ, aha->irqrid, aha->irq);
 		bus_release_resource(dev, SYS_RES_DRQ, aha->drqrid, aha->drq);
-                return (ENOMEM);
-        }                              
+		aha_free(aha);
+		return (ENOMEM);
+	}
 
-        if (aha_init(aha)) {
+	if (aha_init(aha)) {
 		device_printf(dev, "init failed\n");
-                aha_free(aha);
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		bus_release_resource(dev, SYS_RES_IRQ, aha->irqrid, aha->irq);
 		bus_release_resource(dev, SYS_RES_DRQ, aha->drqrid, aha->drq);
-                return (ENOMEM);
-        }
+		aha_free(aha);
+		return (ENOMEM);
+	}
 
 	error = aha_attach(aha);
 	if (error) {
 		device_printf(dev, "attach failed\n");
-                aha_free(aha);
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		bus_release_resource(dev, SYS_RES_IRQ, aha->irqrid, aha->irq);
 		bus_release_resource(dev, SYS_RES_DRQ, aha->drqrid, aha->drq);
-                return (error);
+		aha_free(aha);
+		return (error);
 	}
 
-	error = bus_setup_intr(dev, aha->irq, INTR_TYPE_CAM|INTR_ENTROPY, aha_intr, aha,
-	    &ih);
+	error = bus_setup_intr(dev, aha->irq, INTR_TYPE_CAM|INTR_ENTROPY,
+	    aha_intr, aha, &ih);
 	if (error) {
 		device_printf(dev, "Unable to register interrupt handler\n");
-                aha_free(aha);
-		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid, aha->port);
+		bus_release_resource(dev, SYS_RES_IOPORT, aha->portrid,
+		    aha->port);
 		bus_release_resource(dev, SYS_RES_IRQ, aha->irqrid, aha->irq);
 		bus_release_resource(dev, SYS_RES_DRQ, aha->drqrid, aha->drq);
-                return (error);
+		aha_free(aha);
+		return (error);
 	}
 
 	return (0);

==== //depot/projects/uart/dev/em/if_em.c#9 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.51 2004/11/03 14:11:18 phk Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.53 2004/11/12 11:03:07 rwatson Exp $*/
 
 #include <dev/em/if_em.h>
 
@@ -161,7 +161,7 @@
 static int  em_get_buf(int i, struct adapter *,
 		       struct mbuf *);
 static void em_enable_vlans(struct adapter *);
-static int  em_encap(struct adapter *, struct mbuf *);
+static int  em_encap(struct adapter *, struct mbuf **);
 static void em_smartspeed(struct adapter *);
 static int  em_82547_fifo_workaround(struct adapter *, int);
 static void em_82547_update_fifo_head(struct adapter *, int);
@@ -310,26 +310,14 @@
 	em_adapter_list = adapter;
 
 	/* SYSCTL stuff */
-        sysctl_ctx_init(&adapter->sysctl_ctx);
-        adapter->sysctl_tree = SYSCTL_ADD_NODE(&adapter->sysctl_ctx,
-                                               SYSCTL_STATIC_CHILDREN(_hw),
-                                               OID_AUTO,
-                                               device_get_nameunit(dev),
-                                               CTLFLAG_RD,
-                                               0, "");
-        if (adapter->sysctl_tree == NULL) {
-                error = EIO;  
-                goto err_sysctl;
-        }
-        
-        SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
-                        SYSCTL_CHILDREN(adapter->sysctl_tree),
+        SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+                        SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
                         OID_AUTO, "debug_info", CTLTYPE_INT|CTLFLAG_RW,
                         (void *)adapter, 0,
                         em_sysctl_debug_info, "I", "Debug Information");
         
-        SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
-                        SYSCTL_CHILDREN(adapter->sysctl_tree),
+        SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+                        SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
                         OID_AUTO, "stats", CTLTYPE_INT|CTLFLAG_RW,
                         (void *)adapter, 0,
                         em_sysctl_stats, "I", "Statistics");
@@ -504,8 +492,6 @@
 err_tx_desc:
 err_pci:
         em_free_pci_resources(adapter);
-        sysctl_ctx_free(&adapter->sysctl_ctx);
-err_sysctl:
         return(error);
 
 }
@@ -553,9 +539,6 @@
                 adapter->rx_desc_base = NULL;
         }
 
-	/* Free the sysctl tree */
-	sysctl_ctx_free(&adapter->sysctl_ctx);
-
 	/* Remove from the adapter list */
 	if (em_adapter_list == adapter)
 		em_adapter_list = adapter->next;
@@ -616,7 +599,7 @@
                 
                 if (m_head == NULL) break;
                         
-		if (em_encap(adapter, m_head)) { 
+		if (em_encap(adapter, &m_head)) { 
 			ifp->if_flags |= IFF_OACTIVE;
 			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
 			break;
@@ -1176,13 +1159,15 @@
  *  return 0 on success, positive on failure
  **********************************************************************/
 static int              
-em_encap(struct adapter *adapter, struct mbuf *m_head)
+em_encap(struct adapter *adapter, struct mbuf **m_headp)
 {
         u_int32_t       txd_upper;
         u_int32_t       txd_lower, txd_used = 0, txd_saved = 0;
         int             i, j, error;
         u_int64_t       address;
 
+	struct mbuf	*m_head;
+
 	/* For 82544 Workaround */
 	DESC_ARRAY              desc_array;
 	u_int32_t               array_elements;
@@ -1198,6 +1183,8 @@
         struct em_tx_desc *current_tx_desc = NULL;
         struct ifnet   *ifp = &adapter->interface_data.ac_if;
 
+	m_head = *m_headp;
+
         /*
          * Force a cleanup if number of TX descriptors
          * available hits the threshold
@@ -1250,6 +1237,36 @@
         mtag = VLAN_OUTPUT_TAG(ifp, m_head);
 #endif
 
+	/*
+	 * When operating in promiscuous mode, hardware encapsulation for
+	 * packets is disabled.  This means we have to add the vlan
+	 * encapsulation in the driver, since it will have come down from the
+	 * VLAN layer with a tag instead of a VLAN header.
+	 */
+	if (mtag != NULL && adapter->em_insert_vlan_header) {
+		struct ether_vlan_header *evl;
+		struct ether_header eh;
+
+		m_head = m_pullup(m_head, sizeof(eh));
+		if (m_head == NULL)
+			return (ENOBUFS);
+		eh = *mtod(m_head, struct ether_header *);
+		M_PREPEND(m_head, sizeof(*evl), M_DONTWAIT);
+		if (m_head == NULL)
+			return (ENOBUFS);
+		m_head = m_pullup(m_head, sizeof(*evl));
+		if (m_head == NULL)
+			return (ENOBUFS);
+		evl = mtod(m_head, struct ether_vlan_header *);
+		bcopy(&eh, evl, sizeof(*evl));
+		evl->evl_proto = evl->evl_encap_proto;
+		evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
+		evl->evl_tag = htons(VLAN_TAG_VALUE(mtag));
+		m_tag_delete(m_head, mtag);
+		mtag = NULL;
+		*m_headp = m_head;
+	}
+
         i = adapter->next_avail_tx_desc;
 	if (adapter->pcix_82544) {
 		txd_saved = i;
@@ -1497,19 +1514,20 @@
 	if (ifp->if_flags & IFF_PROMISC) {
 		reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
 		E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl);
-		
 		/* Disable VLAN stripping in promiscous mode 
 		 * This enables bridging of vlan tagged frames to occur 
 		 * and also allows vlan tags to be seen in tcpdump
 		 */
 		ctrl &= ~E1000_CTRL_VME; 
 		E1000_WRITE_REG(&adapter->hw, CTRL, ctrl);
-
+		adapter->em_insert_vlan_header = 1;
 	} else if (ifp->if_flags & IFF_ALLMULTI) {
 		reg_rctl |= E1000_RCTL_MPE;
 		reg_rctl &= ~E1000_RCTL_UPE;
 		E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl);
-	}
+		adapter->em_insert_vlan_header = 0;
+	} else
+		adapter->em_insert_vlan_header = 0;
 
 	return;
 }
@@ -1526,6 +1544,8 @@
 	E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl);
 
 	em_enable_vlans(adapter);
+	adapter->em_insert_vlan_header = 0;
+
 	return;
 }
 
@@ -3391,8 +3411,8 @@
 	info->adapter = adapter;
 	info->offset = offset;
 	info->value = value;
-	SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
-	    SYSCTL_CHILDREN(adapter->sysctl_tree),
+	SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev),
+	    SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)),
 	    OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW,
 	    info, 0, em_sysctl_int_delay, "I", description);
 }

==== //depot/projects/uart/dev/em/if_em.h#10 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.26 2004/09/01 23:22:41 pdeuskar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.29 2004/11/12 11:03:07 rwatson Exp $*/
 
 #ifndef _EM_H_DEFINED_
 #define _EM_H_DEFINED_
@@ -46,6 +46,7 @@
 #include <sys/kernel.h>
 #include <sys/module.h>
 #include <sys/sockio.h>
+#include <sys/sysctl.h>
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -74,7 +75,6 @@
 #include <dev/pci/pcireg.h>
 #include <sys/endian.h>
 #include <sys/proc.h>
-#include <sys/sysctl.h>
 #include "opt_bdg.h"
 
 #include <dev/em/if_em_hw.h>
@@ -346,6 +346,7 @@
 	int             io_rid;
 	u_int8_t        unit;
 	struct mtx	mtx;
+	int		em_insert_vlan_header;
 
 	/* Info about the board itself */
 	u_int32_t       part_num;
@@ -399,9 +400,6 @@
 	struct mbuf        *fmp;
 	struct mbuf        *lmp;
 
-	struct sysctl_ctx_list sysctl_ctx;
-        struct sysctl_oid *sysctl_tree;
-
 	/* Misc stats maintained by the driver */
 	unsigned long   dropped_pkts;
 	unsigned long   mbuf_alloc_failed;

==== //depot/projects/uart/dev/md/md.c#8 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: src/sys/dev/md/md.c,v 1.144 2004/11/06 13:16:35 pjd Exp $
+ * $FreeBSD: src/sys/dev/md/md.c,v 1.145 2004/11/13 05:00:12 marcel Exp $
  *
  */
 
@@ -1087,7 +1087,7 @@
 	case MDIOCDETACH:
 		if (mdio->md_version != MDIOVERSION)
 			return (EINVAL);
-		if (mdio->md_file != NULL || mdio->md_mediasize != 0 ||
+		if (mdio->md_file[0] != '\0' || mdio->md_mediasize != 0 ||
 		    mdio->md_options != 0)
 			return (EINVAL);
 		return (mddetach(mdio->md_unit, td));

==== //depot/projects/uart/dev/pbio/pbio.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pbio/pbio.c,v 1.5 2004/10/11 00:58:24 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pbio/pbio.c,v 1.6 2004/11/11 19:14:09 obrien Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -46,7 +46,7 @@
 #include <machine/resource.h>
 #include <machine/clock.h>	/* DELAY() */
 #include <sys/rman.h>
-#include <sys/pbioio.h>		/* pbio IOCTL definitions */
+#include <dev/pbio/pbioio.h>		/* pbio IOCTL definitions */
 #include <sys/uio.h>
 #include <sys/fcntl.h>
 

==== //depot/projects/uart/dev/sound/pci/maestro.c#8 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2000 Taku YAMAMOTO <taku at cent.saitama-u.ac.jp>
+ * Copyright (c) 2000-2004 Taku YAMAMOTO <taku at tackymt.homeip.net>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 
 #include <dev/sound/pci/maestro_reg.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/maestro.c,v 1.25 2004/11/10 04:29:09 julian Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/maestro.c,v 1.26 2004/11/11 13:01:13 ru Exp $");
 
 
 #define inline __inline
@@ -472,7 +472,7 @@
 	}
 }
 
-static inline void
+static void
 apu_setparam(struct agg_info *ess, int apuch,
     u_int32_t wpwa, u_int16_t size, int16_t pan, u_int dv)
 {

==== //depot/projects/uart/dev/streams/streams.c#4 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.47 2004/07/15 08:26:03 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/streams/streams.c,v 1.48 2004/11/13 11:53:01 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -256,26 +256,26 @@
 
 	if ((error = socreate(family, &so, type, protocol,
 	    td->td_ucred, td)) != 0) {
-	  FILEDESC_LOCK(p->p_fd);
+	  FILEDESC_LOCK_FAST(p->p_fd);
 	  /* Check the fd table entry hasn't changed since we made it. */
 	  extraref = 0;
 	  if (p->p_fd->fd_ofiles[fd] == fp) {
 	    p->p_fd->fd_ofiles[fd] = NULL;
 	    extraref = 1;
 	  }
-	  FILEDESC_UNLOCK(p->p_fd);
+	  FILEDESC_UNLOCK_FAST(p->p_fd);
 	  if (extraref)
 	    fdrop(fp, td);
 	  fdrop(fp, td);
 	  return error;
 	}
 
-	FILEDESC_LOCK(p->p_fd);
+	FILEDESC_LOCK_FAST(p->p_fd);
 	fp->f_data = so;
 	fp->f_flag = FREAD|FWRITE;
 	fp->f_ops = &svr4_netops;
 	fp->f_type = DTYPE_SOCKET;
-	FILEDESC_UNLOCK(p->p_fd);
+	FILEDESC_UNLOCK_FAST(p->p_fd);
 
 	(void)svr4_stream_get(fp);
 	fdrop(fp, td);

==== //depot/projects/uart/dev/usb/ehci.c#7 (text+ko) ====

@@ -6,7 +6,7 @@
  */
 

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


More information about the p4-projects mailing list