PERFORCE change 157668 for review

John Baldwin jhb at FreeBSD.org
Fri Feb 13 10:23:17 PST 2009


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

Change 157668 by jhb at jhb_jhbbsd on 2009/02/13 18:22:54

	IFC @157667

Affected files ...

.. //depot/projects/smpng/sys/arm/arm/genassym.c#12 integrate
.. //depot/projects/smpng/sys/arm/arm/machdep.c#26 integrate
.. //depot/projects/smpng/sys/arm/arm/swtch.S#19 integrate
.. //depot/projects/smpng/sys/arm/include/proc.h#6 integrate
.. //depot/projects/smpng/sys/arm/include/sysarch.h#5 integrate
.. //depot/projects/smpng/sys/arm/xscale/ixp425/avila_machdep.c#11 integrate
.. //depot/projects/smpng/sys/cam/cam_xpt.c#54 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#37 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#85 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#7 integrate
.. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#73 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_file.c#42 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_getcwd.c#28 integrate
.. //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#64 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ah_internal.h#4 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c#3 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#4 integrate
.. //depot/projects/smpng/sys/dev/ath/if_ath.c#67 integrate
.. //depot/projects/smpng/sys/dev/ath/if_athioctl.h#19 integrate
.. //depot/projects/smpng/sys/dev/cm/smc90cx6.c#16 integrate
.. //depot/projects/smpng/sys/dev/firewire/firewire.h#17 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwohci.c#42 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwohcireg.h#20 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwphyreg.h#4 integrate
.. //depot/projects/smpng/sys/dev/iwn/if_iwn.c#3 integrate
.. //depot/projects/smpng/sys/dev/mxge/if_mxge.c#25 integrate
.. //depot/projects/smpng/sys/dev/puc/pucdata.c#47 integrate
.. //depot/projects/smpng/sys/dev/sis/if_sis.c#4 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/hda/hdac.c#26 integrate
.. //depot/projects/smpng/sys/dev/usb2/ethernet/if_axe2.c#6 integrate
.. //depot/projects/smpng/sys/dev/usb2/ethernet/usb2_ethernet.c#4 integrate
.. //depot/projects/smpng/sys/dev/wpi/if_wpi.c#7 integrate
.. //depot/projects/smpng/sys/fs/cd9660/cd9660_vfsops.c#10 integrate
.. //depot/projects/smpng/sys/fs/coda/coda_vnops.c#7 integrate
.. //depot/projects/smpng/sys/fs/udf/udf_vfsops.c#44 integrate
.. //depot/projects/smpng/sys/geom/label/g_label_msdosfs.c#6 integrate
.. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_misc.c#35 integrate
.. //depot/projects/smpng/sys/kern/kern_descrip.c#121 integrate
.. //depot/projects/smpng/sys/kern/subr_disk.c#31 integrate
.. //depot/projects/smpng/sys/kern/subr_taskqueue.c#38 integrate
.. //depot/projects/smpng/sys/kern/tty.c#86 integrate
.. //depot/projects/smpng/sys/kern/vfs_syscalls.c#142 integrate
.. //depot/projects/smpng/sys/mips/mips/busdma_machdep.c#4 integrate
.. //depot/projects/smpng/sys/mips/mips/pmap.c#7 integrate
.. //depot/projects/smpng/sys/modules/Makefile#154 integrate
.. //depot/projects/smpng/sys/modules/acpi/acpi/Makefile#16 integrate
.. //depot/projects/smpng/sys/modules/agp/Makefile#15 integrate
.. //depot/projects/smpng/sys/modules/dtrace/dtrace/Makefile#2 integrate
.. //depot/projects/smpng/sys/modules/linux/Makefile#22 integrate
.. //depot/projects/smpng/sys/modules/svr4/Makefile#9 integrate
.. //depot/projects/smpng/sys/net/if_vlan.c#63 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211.c#35 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_ddb.c#11 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_freebsd.h#15 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_ioctl.c#42 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_node.c#40 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_proto.c#29 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_proto.h#20 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_tdma.c#4 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_var.h#34 integrate
.. //depot/projects/smpng/sys/netinet/in_systm.h#5 integrate
.. //depot/projects/smpng/sys/netinet/ip.h#16 integrate
.. //depot/projects/smpng/sys/netinet/ip_dummynet.c#52 integrate
.. //depot/projects/smpng/sys/netinet/ip_fw2.c#102 integrate
.. //depot/projects/smpng/sys/netinet/ip_icmp.c#47 integrate
.. //depot/projects/smpng/sys/netinet/ip_icmp.h#11 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.c#11 integrate
.. //depot/projects/smpng/sys/netinet/sctp_sysctl.c#11 integrate
.. //depot/projects/smpng/sys/netinet/sctp_uio.h#18 integrate
.. //depot/projects/smpng/sys/netinet/tcp_debug.h#7 integrate
.. //depot/projects/smpng/sys/netinet/tcp_subr.c#107 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#64 integrate
.. //depot/projects/smpng/sys/sys/tty.h#29 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_vfsops.c#109 integrate

Differences ...

==== //depot/projects/smpng/sys/arm/arm/genassym.c#12 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.12 2008/10/13 18:59:59 raj Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.13 2009/02/12 23:23:30 cognet Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/assym.h>
@@ -96,6 +96,8 @@
 ASSYM(TD_MD, offsetof(struct thread, td_md));
 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
 ASSYM(MD_TP, offsetof(struct mdthread, md_tp));
+ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start));
+ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end));
 
 ASSYM(TF_R0, offsetof(struct trapframe, tf_r0));
 ASSYM(TF_R1, offsetof(struct trapframe, tf_r1));

==== //depot/projects/smpng/sys/arm/arm/machdep.c#26 (text+ko) ====

@@ -46,7 +46,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.31 2008/04/25 05:18:48 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.32 2009/02/12 22:55:39 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -304,7 +304,6 @@
 	    USPACE_SVC_STACK_TOP;
 	vector_page_setprot(VM_PROT_READ);
 	pmap_set_pcb_pagedir(pmap_kernel(), pcb);
-	thread0.td_frame = (struct trapframe *)pcb->un_32.pcb32_sp - 1;
 	pmap_postinit();
 #ifdef ARM_CACHE_LOCK_ENABLE
 	pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS);

==== //depot/projects/smpng/sys/arm/arm/swtch.S#19 (text+ko) ====

@@ -83,7 +83,7 @@
 #include <machine/asm.h>
 #include <machine/asmacros.h>
 #include <machine/armreg.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.25 2008/10/16 19:06:24 raj Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.27 2009/02/13 16:00:19 cognet Exp $");
 
 
 /*
@@ -205,8 +205,12 @@
 
 	/* Set the new tp */
 	ldr	r6, [r5, #(TD_MD + MD_TP)]
-	ldr	r5, =ARM_TP_ADDRESS
-	strt	r6, [r5]
+	ldr	r4, =ARM_TP_ADDRESS
+	str	r6, [r4]
+	ldr	r6, [r5, #(TD_MD + MD_RAS_START)]
+	str	r6, [r4, #4] /* ARM_RAS_START */
+	ldr	r6, [r5, #(TD_MD + MD_RAS_END)]
+	str	r6, [r4, #8] /* ARM_RAS_END */
 
 	/* Hook in a new pcb */
 	ldr	r6, .Lcurpcb
@@ -265,12 +269,20 @@
 	 */
 	/* Store the old tp */
 	ldr	r3, =ARM_TP_ADDRESS
-	ldrt	r9, [r3]
+	ldr	r9, [r3]
 	str	r9, [r0, #(TD_MD + MD_TP)]
+	ldr	r9, [r3, #4]
+	str	r9, [r0, #(TD_MD + MD_RAS_START)]
+	ldr	r9, [r3, #8]
+	str	r9, [r0, #(TD_MD + MD_RAS_END)]
 
 	/* Set the new tp */
 	ldr	r9, [r1, #(TD_MD + MD_TP)]
-	strt	r9, [r3]
+	str	r9, [r3]
+	ldr	r9, [r1, #(TD_MD + MD_RAS_START)]
+	str	r9, [r3, #4]
+	ldr	r9, [r1, #(TD_MD + MD_RAS_END)]
+	str	r9, [r3, #8]
 
 	/* Get the user structure for the new process in r9 */
 	ldr	r9, [r1, #(TD_PCB)]

==== //depot/projects/smpng/sys/arm/include/proc.h#6 (text+ko) ====

@@ -32,7 +32,7 @@
  *
  *      from: @(#)proc.h        7.1 (Berkeley) 5/15/91
  *	from: FreeBSD: src/sys/i386/include/proc.h,v 1.11 2001/06/29
- * $FreeBSD: src/sys/arm/include/proc.h,v 1.5 2005/04/04 21:53:52 jhb Exp $
+ * $FreeBSD: src/sys/arm/include/proc.h,v 1.6 2009/02/12 23:23:30 cognet Exp $
  */
 
 #ifndef	_MACHINE_PROC_H_
@@ -51,6 +51,8 @@
 	int md_ptrace_instr;
 	int md_ptrace_addr;
 	void *md_tp;
+	void *md_ras_start;
+	void *md_ras_end;
 };
 
 struct mdproc {

==== //depot/projects/smpng/sys/arm/include/sysarch.h#5 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD: src/sys/arm/include/sysarch.h,v 1.5 2008/02/05 10:22:33 raj Exp $ */
+/* $FreeBSD: src/sys/arm/include/sysarch.h,v 1.6 2009/02/12 23:23:30 cognet Exp $ */
 
 #ifndef _ARM_SYSARCH_H_
 #define _ARM_SYSARCH_H_
@@ -42,6 +42,9 @@
  * The ARM_TP_ADDRESS points to a special purpose page, which is used as local
  * store for the ARM per-thread data and Restartable Atomic Sequences support.
  * Put it just above the "high" vectors' page.
+ * the cpu_switch() code assumes ARM_RAS_START is ARM_TP_ADDRESS + 4, and
+ * ARM_RAS_END is ARM_TP_ADDRESS + 8, so if that ever changes, be sure to
+ * update the cpu_switch() (and cpu_throw()) code as well.
  */
 #define ARM_TP_ADDRESS		(ARM_VECTORS_HIGH + 0x1000)
 #define ARM_RAS_START		(ARM_TP_ADDRESS + 4)

==== //depot/projects/smpng/sys/arm/xscale/ixp425/avila_machdep.c#11 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_msgbuf.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.15 2009/02/03 19:16:04 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.16 2009/02/11 22:34:50 sam Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -334,17 +334,20 @@
 	alloc_pages(minidataclean.pv_pa, 1);
 	valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
 #ifdef ARM_USE_SMALL_ALLOC
-#error "I am broken"		/* XXX save people grief */
 	freemempos -= PAGE_SIZE;
 	freemem_pt = trunc_page(freemem_pt);
-	freemem_after = freemempos - ((freemem_pt - 0x10100000) /
+	freemem_after = freemempos - ((freemem_pt - (PHYSADDR + 0x100000)) /
 	    PAGE_SIZE) * sizeof(struct arm_small_page);
-	arm_add_smallalloc_pages((void *)(freemem_after + (KERNVIRTADDR - KERNPHYSADDR)
-	    , (void *)0xc0100000, freemem_pt - 0x10100000, 1);
-	freemem_after -= ((freemem_after - 0x10001000) / PAGE_SIZE) *
+	arm_add_smallalloc_pages(
+	    (void *)(freemem_after + (KERNVIRTADDR - KERNPHYSADDR)),
+	    (void *)0xc0100000,
+	    freemem_pt - (PHYSADDR + 0x100000), 1);
+	freemem_after -= ((freemem_after - (PHYSADDR + 0x1000)) / PAGE_SIZE) *
 	    sizeof(struct arm_small_page);
-	arm_add_smallalloc_pages((void *)(freemem_after + (KEYVIRTADDR - KERNPHYSADDR))
-	, (void *)0xc0001000, trunc_page(freemem_after) - 0x10001000, 0);
+	arm_add_smallalloc_pages(
+	    (void *)(freemem_after + (KERNVIRTADDR - KERNPHYSADDR)),
+	    (void *)0xc0001000,
+	    trunc_page(freemem_after) - (PHYSADDR + 0x1000), 0);
 	freemempos = trunc_page(freemem_after);
 	freemempos -= PAGE_SIZE;
 #endif

==== //depot/projects/smpng/sys/cam/cam_xpt.c#54 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.209 2009/02/08 22:08:48 trasz Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.210 2009/02/13 10:04:59 scottl Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -6143,10 +6143,9 @@
 			xpt_schedule(periph, priority);
 			return;
 		}
-		xpt_release_ccb(done_ccb);
-		softc->action = PROBE_TUR_FOR_NEGOTIATION;
-		xpt_schedule(periph, priority);
-		return;
+
+		csio->data_ptr = NULL;
+		/* FALLTHROUGH */
 	}
 
 	case PROBE_SERIAL_NUM_1:

==== //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#37 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.105 2009/02/10 22:39:44 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.106 2009/02/11 22:29:09 jhb Exp $");
 
 #include "opt_cd.h"
 
@@ -401,11 +401,6 @@
 
 	xpt_print(periph->path, "removing device entry\n");
 
-	if ((softc->flags & CD_FLAG_SCTX_INIT) != 0
-	    && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
-		xpt_print(periph->path, "can't remove sysctl context\n");
-	}
-
 	/*
 	 * In the queued, non-active case, the device in question
 	 * has already been removed from the changer run queue.  Since this
@@ -474,9 +469,14 @@
 		free(softc->changer, M_DEVBUF);
 	}
 	cam_periph_unlock(periph);
+	if ((softc->flags & CD_FLAG_SCTX_INIT) != 0
+	    && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
+		xpt_print(periph->path, "can't remove sysctl context\n");
+	}
+
 	disk_destroy(softc->disk);
+	free(softc, M_DEVBUF);
 	cam_periph_lock(periph);
-	free(softc, M_DEVBUF);
 }
 
 static void

==== //depot/projects/smpng/sys/cam/scsi/scsi_da.c#85 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.234 2009/02/10 22:39:44 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.235 2009/02/11 22:29:09 jhb Exp $");
 
 #include <sys/param.h>
 
@@ -995,6 +995,8 @@
 	softc = (struct da_softc *)periph->softc;
 
 	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_unlock(periph);
+
 	/*
 	 * If we can't free the sysctl tree, oh well...
 	 */
@@ -1003,11 +1005,10 @@
 		xpt_print(periph->path, "can't remove sysctl context\n");
 	}
 
-	cam_periph_unlock(periph);
 	disk_destroy(softc->disk);
 	callout_drain(&softc->sendordered_c);
+	free(softc, M_DEVBUF);
 	cam_periph_lock(periph);
-	free(softc, M_DEVBUF);
 }
 
 static void

==== //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#7 (text+ko) ====

@@ -4697,8 +4697,8 @@
 		return (error);
 	}
 
-	NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | MPSAFE, UIO_SYSSPACE,
-	    ".", xvp, td);
+	NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE,
+	    UIO_SYSSPACE, ".", xvp, td);
 	error = namei(&nd);
 	vp = nd.ni_vp;
 	NDFREE(&nd, NDF_ONLY_PNBUF);

==== //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#73 (text+ko) ====

@@ -42,7 +42,7 @@
 #include "opt_compat.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.134 2009/01/22 17:06:33 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.135 2009/02/13 15:32:03 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -327,7 +327,7 @@
 	error = namei(&nd);
 	lep = linux_emul_path;
 	if (error == 0) {
-		if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0)
+		if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0)
 			lep = dlep;
 		vrele(nd.ni_vp);
 		VFS_UNLOCK_GIANT(NDHASGIANT(&nd));

==== //depot/projects/smpng/sys/compat/linux/linux_file.c#42 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.115 2008/09/09 16:00:17 rdivacky Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.117 2009/02/13 18:18:14 jhb Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -345,7 +345,7 @@
 		/* readdir(2) case. Always struct dirent. */
 		if (is64bit)
 			return (EINVAL);
-		nbytes = sizeof(linux_dirent);
+		nbytes = sizeof(*linux_dirent);
 		justone = 1;
 	} else
 		justone = 0;
@@ -372,7 +372,7 @@
 	buflen = min(buflen, MAXBSIZE);
 	buf = malloc(buflen, M_TEMP, M_WAITOK);
 	lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 
 again:
 	aiov.iov_base = buf;

==== //depot/projects/smpng/sys/compat/linux/linux_getcwd.c#28 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_getcwd.c,v 1.31 2008/10/28 13:44:11 trasz Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_getcwd.c,v 1.32 2009/02/13 18:18:14 jhb Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -163,7 +163,7 @@
 	cn.cn_nameptr = "..";
 	cn.cn_namelen = 2;
 	cn.cn_consume = 0;
-	cn.cn_lkflags = LK_EXCLUSIVE;
+	cn.cn_lkflags = LK_SHARED;
 	
 	/*
 	 * At this point, lvp is locked and will be unlocked by the lookup.

==== //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#64 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.101 2008/04/21 21:24:08 rdivacky Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.102 2009/02/13 18:18:14 jhb Exp $");
 
 #include "opt_mac.h"
 
@@ -278,7 +278,7 @@
 	buflen = max(DIRBLKSIZ, nbytes);
 	buflen = min(buflen, MAXBSIZE);
 	buf = malloc(buflen, M_TEMP, M_WAITOK);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 again:
 	aiov.iov_base = buf;
 	aiov.iov_len = buflen;
@@ -447,7 +447,7 @@
 
 	buflen = min(MAXBSIZE, uap->nbytes);
 	buf = malloc(buflen, M_TEMP, M_WAITOK);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	vn_lock(vp, LK_SHARED | LK_RETRY);
 	off = fp->f_offset;
 again:
 	aiov.iov_base = buf;

==== //depot/projects/smpng/sys/dev/ath/ath_hal/ah_internal.h#4 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ah_internal.h,v 1.3 2009/01/28 18:00:22 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ah_internal.h,v 1.5 2009/02/11 22:34:22 sam Exp $
  */
 #ifndef _ATH_AH_INTERAL_H_
 #define _ATH_AH_INTERAL_H_
@@ -79,12 +79,12 @@
 };
 #ifndef AH_CHIP
 #define	AH_CHIP(_name, _probe, _attach)				\
-static struct ath_hal_chip name##_chip = {			\
+static struct ath_hal_chip _name##_chip = {			\
 	.name		= #_name,				\
 	.probe		= _probe,				\
 	.attach		= _attach				\
 };								\
-OS_DATA_SET(ah_chips, name##_chip)
+OS_DATA_SET(ah_chips, _name##_chip)
 #endif
 
 /*

==== //depot/projects/smpng/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c#3 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c,v 1.3 2008/12/15 00:29:26 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c,v 1.4 2009/02/13 01:50:04 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -321,6 +321,7 @@
 		case AR5212_AR2315_REV7:
 			return "Atheros 2315 WiSoC";
 		case AR5212_AR2317_REV1:
+		case AR5212_AR2317_REV2:
 			return "Atheros 2317 WiSoC";
 		case AR5212_AR2413:
 			return "Atheros 2413";

==== //depot/projects/smpng/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#4 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.3 2009/01/28 18:00:22 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.4 2009/02/11 22:15:37 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -2710,6 +2710,7 @@
         }
     }
     HALASSERT(0);
+    *indexL = *indexR = 0;
     return AH_FALSE;
 }
 

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

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.233 2009/02/10 23:48:29 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.235 2009/02/13 05:38:03 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -56,6 +56,7 @@
 #include <sys/endian.h>
 #include <sys/kthread.h>
 #include <sys/taskqueue.h>
+#include <sys/priv.h>
 
 #include <machine/bus.h>
  
@@ -2071,7 +2072,6 @@
 ath_start(struct ifnet *ifp)
 {
 	struct ath_softc *sc = ifp->if_softc;
-	struct ieee80211com *ic = ifp->if_l2com;
 	struct ieee80211_node *ni;
 	struct ath_buf *bf;
 	struct mbuf *m, *next;
@@ -2141,7 +2141,7 @@
 		    !ath_txfrag_setup(sc, &frags, m, ni)) {
 			DPRINTF(sc, ATH_DEBUG_XMIT,
 			    "%s: out of txfrag buffers\n", __func__);
-			ic->ic_stats.is_tx_nobuf++;	/* XXX */
+			sc->sc_stats.ast_tx_nofrag++;
 			ath_freetx(m);
 			goto bad;
 		}
@@ -6584,6 +6584,11 @@
 		    rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC;
 		return copyout(&sc->sc_stats,
 		    ifr->ifr_data, sizeof (sc->sc_stats));
+	case SIOCZATHSTATS:
+		error = priv_check(curthread, PRIV_DRIVER);
+		if (error == 0)
+			memset(&sc->sc_stats, 0, sizeof(sc->sc_stats));
+		break;
 #ifdef ATH_DIAGAPI
 	case SIOCGATHDIAG:
 		error = ath_ioctl_diag(sc, (struct ath_diag *) ifr);

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

@@ -26,7 +26,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.22 2009/02/05 21:02:40 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.24 2009/02/13 05:38:03 sam Exp $
  */
 
 /*
@@ -117,10 +117,12 @@
 	u_int16_t	ast_tdma_tsfadjm;/* TDMA slot adjust- (usec, smoothed)*/
 	u_int32_t	ast_tdma_ack;	/* TDMA tx failed 'cuz ACK required */
 	u_int32_t	ast_tx_raw_fail;/* raw tx failed 'cuz h/w down */
-	u_int32_t	ast_pad[15];
+	u_int32_t	ast_tx_nofrag;	/* tx dropped 'cuz no ath frag buffer */
+	u_int32_t	ast_pad[14];
 };
 
 #define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)
+#define	SIOCZATHSTATS	_IOWR('i', 139, struct ifreq)
 
 struct ath_diag {
 	char	ad_name[IFNAMSIZ];	/* if name, e.g. "ath0" */

==== //depot/projects/smpng/sys/dev/cm/smc90cx6.c#16 (text+ko) ====

@@ -1,7 +1,7 @@
 /*	$NetBSD: smc90cx6.c,v 1.38 2001/07/07 15:57:53 thorpej Exp $ */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cm/smc90cx6.c,v 1.19 2007/10/12 06:03:42 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cm/smc90cx6.c,v 1.20 2009/02/12 23:55:35 rwatson Exp $");
 
 /*-
  * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
@@ -861,14 +861,10 @@
 	caddr_t data;
 {
 	struct cm_softc *sc;
-	struct ifaddr *ifa;
-	struct ifreq *ifr;
 	int error;
 
 	error = 0;
 	sc = ifp->if_softc;
-	ifa = (struct ifaddr *)data;
-	ifr = (struct ifreq *)data;
 
 #if defined(CM_DEBUG) && (CM_DEBUG > 2)
 	if_printf(ifp, "ioctl() called, cmd = 0x%lx\n", command);

==== //depot/projects/smpng/sys/dev/firewire/firewire.h#17 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/firewire.h,v 1.22 2008/09/27 08:51:18 ed Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.h,v 1.24 2009/02/13 17:45:09 sbruno Exp $
  *
  */
 
@@ -99,9 +99,16 @@
 #define FWRCODE_ER_TYPE		6
 #define FWRCODE_ER_ADDR		7
 
+/*
+ * Defined 1394a-2000
+ * Table 5B-1
+ */
 #define FWSPD_S100	0
 #define FWSPD_S200	1
 #define FWSPD_S400	2
+#define FWSPD_S800	3
+#define FWSPD_S1600	4
+#define FWSPD_S3200	5
 
 #define	FWP_TL_VALID (1 << 7)
 
@@ -277,6 +284,10 @@
 	struct fw_devinfo dev[FW_MAX_DEVLST];
 };
 
+/*
+ * Defined in IEEE 1394a-2000
+ * 4.3.4.1
+ */
 #define FW_SELF_ID_PORT_CONNECTED_TO_CHILD 3
 #define FW_SELF_ID_PORT_CONNECTED_TO_PARENT 2
 #define FW_SELF_ID_PORT_NOT_CONNECTED 1
@@ -305,18 +316,32 @@
 			  phy_id:6,
 			  sequel:1,
 			  sequence_num:3,
-			  :2,
-			  porta:2,
-			  portb:2,
-			  portc:2,
-			  portd:2,
-			  porte:2,
-			  portf:2,
-			  portg:2,
-			  porth:2,
-			  :1,
+			  reserved2:2,
+			  port3:2,
+			  port4:2,
+			  port5:2,
+			  port6:2,
+			  port7:2,
+			  port8:2,
+			  port9:2,
+			  port10:2,
+			  reserved1:1,
 			  more_packets:1;
 	} p1;
+	struct {
+		uint32_t
+			  id:2,
+			  phy_id:6,
+			  sequel:1,
+			  sequence_num:3,
+			  :2,
+			  port11:2,
+			  port12:2,
+			  port13:2,
+			  port14:2,
+			  port15:2,
+			  :8;
+	} p2;
 };
 #else
 union fw_self_id {
@@ -339,20 +364,34 @@
 	struct {
 		uint32_t  more_packets:1,
 			  reserved1:1,
-			  porth:2,
-			  portg:2,
-			  portf:2,
-			  porte:2,
-			  portd:2,
-			  portc:2,
-			  portb:2,
-			  porta:2,
+			  port10:2,
+			  port9:2,
+			  port8:2,
+			  port7:2,
+			  port6:2,
+			  port5:2,
+			  port4:2,
+			  port3:2,
 			  reserved2:2,
 			  sequence_num:3,
 			  sequel:1,
 			  phy_id:6,
 			  id:2;
 	} p1;
+	struct {
+		uint32_t
+			  reserved3:8,
+			  port15:2,
+			  port14:2,
+			  port13:2,
+			  port12:2,
+			  port11:2,
+			  reserved4:2,
+			  sequence_num:3,
+			  sequel:1,
+			  phy_id:6,
+			  id:2;
+	} p2;
 };
 #endif
 

==== //depot/projects/smpng/sys/dev/firewire/fwohci.c#42 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.96 2009/02/01 23:28:52 sbruno Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.98 2009/02/13 17:44:07 sbruno Exp $
  *
  */
 
@@ -306,8 +306,8 @@
 	if((bm & 0x3f) == 0x3f)
 		bm = node;
 	if (firewire_debug)
-		device_printf(sc->fc.dev,
-			"fw_set_bus_manager: %d->%d (loop=%d)\n", bm, node, i);
+		device_printf(sc->fc.dev, "%s: %d->%d (loop=%d)\n",
+				__func__, bm, node, i);
 
 	return(bm);
 }
@@ -332,7 +332,7 @@
 	}
 	if(i >= MAX_RETRY) {
 		if (firewire_debug)
-			device_printf(sc->fc.dev, "phy read failed(1).\n");
+			device_printf(sc->fc.dev, "%s: failed(1).\n", __func__);
 		if (++retry < MAX_RETRY) {
 			DELAY(100);
 			goto again;
@@ -343,15 +343,16 @@
 	if ((stat & OHCI_INT_REG_FAIL) != 0 ||
 			((fun >> PHYDEV_REGADDR) & 0xf) != addr) {
 		if (firewire_debug)
-			device_printf(sc->fc.dev, "phy read failed(2).\n");
+			device_printf(sc->fc.dev, "%s: failed(2).\n", __func__);
 		if (++retry < MAX_RETRY) {
 			DELAY(100);
 			goto again;
 		}
 	}
-	if (firewire_debug || retry >= MAX_RETRY)
+	if (firewire_debug > 1 || retry >= MAX_RETRY)
 		device_printf(sc->fc.dev, 
-		    "fwphy_rddata: 0x%x loop=%d, retry=%d\n", addr, i, retry);
+		    "%s:: 0x%x loop=%d, retry=%d\n",
+			__func__, addr, i, retry);
 #undef MAX_RETRY
 	return((fun >> PHYDEV_RDDATA )& 0xff);
 }
@@ -1848,7 +1849,7 @@
 		/* Disable bus reset interrupt until sid recv. */
 		OWRITE(sc, FWOHCI_INTMASKCLR,  OHCI_INT_PHY_BUS_R);
 	
-		device_printf(fc->dev, "BUS reset\n");
+		device_printf(fc->dev, "%s: BUS reset\n", __func__);
 		OWRITE(sc, FWOHCI_INTMASKCLR,  OHCI_INT_CYC_LOST);
 		OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC);
 
@@ -1885,10 +1886,11 @@
 		plen = OREAD(sc, OHCI_SID_CNT);
 
 		fc->nodeid = node_id & 0x3f;
-		device_printf(fc->dev, "node_id=0x%08x, SelfID Count=%d, ",
-				fc->nodeid, (plen >> 16) & 0xff);
+		device_printf(fc->dev, "%s: node_id=0x%08x, SelfID Count=%d, ",
+				__func__, fc->nodeid, (plen >> 16) & 0xff);
 		if (!(node_id & OHCI_NODE_VALID)) {
-			printf("Bus reset failure\n");
+			device_printf(fc->dev, "%s: Bus reset failure\n",
+				__func__);
 			goto sidout;
 		}
 
@@ -2977,7 +2979,7 @@
 		db_tr = STAILQ_NEXT(db_tr, link);
 		resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res)
 						& OHCI_COUNT_MASK;
-	} while (resCount == 0)
+	}
 	printf(" done\n");
 	dbch->top = db_tr;
 	dbch->buf_offset = dbch->xferq.psize - resCount;

==== //depot/projects/smpng/sys/dev/firewire/fwohcireg.h#20 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.23 2007/04/30 14:06:30 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.24 2009/02/12 03:05:42 sbruno Exp $
  *
  */
 #define		PCI_CBMEM		PCIR_BAR(0)
@@ -411,32 +411,31 @@
 #define	OHCI_CNTL_PHYPKT	(0x1 << 10)
 #define	OHCI_CNTL_SID		(0x1 << 9)
 
+/*
+ * defined in OHCI 1.1 
+ * chapter 6.1
+ */
 #define OHCI_INT_DMA_ATRQ	(0x1 << 0)
 #define OHCI_INT_DMA_ATRS	(0x1 << 1)
 #define OHCI_INT_DMA_ARRQ	(0x1 << 2)
 #define OHCI_INT_DMA_ARRS	(0x1 << 3)
 #define OHCI_INT_DMA_PRRQ	(0x1 << 4)
 #define OHCI_INT_DMA_PRRS	(0x1 << 5)
-#define OHCI_INT_DMA_IT	(0x1 << 6)
-#define OHCI_INT_DMA_IR	(0x1 << 7)
-#define OHCI_INT_PW_ERR	(0x1 << 8)
-#define OHCI_INT_LR_ERR	(0x1 << 9)
-
+#define OHCI_INT_DMA_IT 	(0x1 << 6)
+#define OHCI_INT_DMA_IR 	(0x1 << 7)
+#define OHCI_INT_PW_ERR 	(0x1 << 8)
+#define OHCI_INT_LR_ERR 	(0x1 << 9)
 #define OHCI_INT_PHY_SID	(0x1 << 16)
 #define OHCI_INT_PHY_BUS_R	(0x1 << 17)
-
 #define OHCI_INT_REG_FAIL	(0x1 << 18)
-
 #define OHCI_INT_PHY_INT	(0x1 << 19)
 #define OHCI_INT_CYC_START	(0x1 << 20)
 #define OHCI_INT_CYC_64SECOND	(0x1 << 21)
 #define OHCI_INT_CYC_LOST	(0x1 << 22)
 #define OHCI_INT_CYC_ERR	(0x1 << 23)
-
 #define OHCI_INT_ERR		(0x1 << 24)
 #define OHCI_INT_CYC_LONG	(0x1 << 25)
 #define OHCI_INT_PHY_REG	(0x1 << 26)
-
 #define OHCI_INT_EN		(0x1 << 31)
 
 #define IP_CHANNELS             0x0234

==== //depot/projects/smpng/sys/dev/firewire/fwphyreg.h#4 (text+ko) ====

@@ -31,9 +31,13 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwphyreg.h,v 1.3 2005/01/06 01:42:41 imp Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwphyreg.h,v 1.4 2009/02/12 03:05:42 sbruno Exp $
  */
 
+/*
+ * IEEE 1394a
+ * Figure 5B - 1
+ */
 struct phyreg_base {
 #if BYTE_ORDER == BIG_ENDIAN
 	uint8_t	phy_id:6,
@@ -100,6 +104,10 @@
 #endif
 };
 
+/*
+ * IEEE 1394a
+ * Figure 5B - 2
+ */
 struct phyreg_page0 {
 #if BYTE_ORDER == BIG_ENDIAN
 	uint8_t	astat:2,
@@ -160,6 +168,10 @@
 #endif
 };
 
+/* 
+ * IEEE 1394a
+ * Figure 5B - 3
+ */
 struct phyreg_page1 {
 	uint8_t	compliance;
 	uint8_t	:8;

==== //depot/projects/smpng/sys/dev/iwn/if_iwn.c#3 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwn/if_iwn.c,v 1.9 2008/10/27 16:46:50 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwn/if_iwn.c,v 1.10 2009/02/13 16:17:05 sam Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -1442,7 +1442,6 @@
 	if (len < sizeof (struct ieee80211_frame)) {
 		DPRINTF(sc, IWN_DEBUG_RECV, "%s: frame too short: %d\n",
 		    __func__, len);
-		ic->ic_stats.is_rx_tooshort++;
 		ifp->if_ierrors++;
 		return;
 	}
@@ -1452,7 +1451,6 @@
 	if (mnew == NULL) {
 		DPRINTF(sc, IWN_DEBUG_ANY, "%s: no mbuf to restock ring\n",
 		    __func__);
-		ic->ic_stats.is_rx_nobuf++;
 		ifp->if_ierrors++;
 		return;
 	}
@@ -1463,7 +1461,6 @@
 		device_printf(sc->sc_dev,
 		    "%s: bus_dmamap_load failed, error %d\n", __func__, error);
 		m_freem(mnew);
-		ic->ic_stats.is_rx_nobuf++;	/* XXX need stat */
 		ifp->if_ierrors++;
 		return;
 	}

==== //depot/projects/smpng/sys/dev/mxge/if_mxge.c#25 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mxge/if_mxge.c,v 1.51 2008/11/24 19:00:57 gallatin Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mxge/if_mxge.c,v 1.52 2009/02/12 18:33:56 rdivacky Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -300,7 +300,7 @@
 	return ENXIO;
 }
 
-#if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__
+#if defined __i386 || defined i386 || defined __i386__ || defined __x86_64__
 static void

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


More information about the p4-projects mailing list