CVS commit: [nick-nhusb] src/sys/dev/usb

2014-12-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec  1 08:12:09 UTC 2014

Modified Files:
src/sys/dev/usb [nick-nhusb]: ehci.c motg.c ohci.c uhci.c usbdivar.h
xhci.c

Log Message:
Remove usbd_bus no_intrs member it was (virtually) unused.


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.4 -r1.234.2.5 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.254.2.3 -r1.254.2.4 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.3 -r1.264.4.4 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.109.2.1 -r1.109.2.2 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.28.2.1 -r1.28.2.2 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.4 src/sys/dev/usb/ehci.c:1.234.2.5
--- src/sys/dev/usb/ehci.c:1.234.2.4	Sun Nov 30 16:38:45 2014
+++ src/sys/dev/usb/ehci.c	Mon Dec  1 08:12:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.4 2014/11/30 16:38:45 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.5 2014/12/01 08:12:09 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.234.2.4 2014/11/30 16:38:45 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.234.2.5 2014/12/01 08:12:09 skrll Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -694,7 +694,6 @@ ehci_intr1(ehci_softc_t *sc)
 		return (0);
 
 	EOWRITE4(sc, EHCI_USBSTS, intrs); /* Acknowledge */
-	sc-sc_bus.no_intrs++;
 	if (eintrs  EHCI_STS_IAA) {
 		USBHIST_LOG(ehcidebug, door bell, 0, 0, 0, 0);
 		kpreempt_disable();

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.2 src/sys/dev/usb/motg.c:1.12.2.3
--- src/sys/dev/usb/motg.c:1.12.2.2	Sun Nov 30 13:14:11 2014
+++ src/sys/dev/usb/motg.c	Mon Dec  1 08:12:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.2 2014/11/30 13:14:11 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.3 2014/12/01 08:12:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include opt_motg.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: motg.c,v 1.12.2.2 2014/11/30 13:14:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: motg.c,v 1.12.2.3 2014/12/01 08:12:09 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -699,7 +699,6 @@ motg_intr(struct motg_softc *sc, uint16_
 	sc-sc_intr_ctrl = ctrl;
 
 	if (!sc-sc_bus.use_polling) {
-		sc-sc_bus.no_intrs++;
 		usb_schedsoftintr(sc-sc_bus);
 	}
 	return 1;

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.3 src/sys/dev/usb/ohci.c:1.254.2.4
--- src/sys/dev/usb/ohci.c:1.254.2.3	Sun Nov 30 16:38:45 2014
+++ src/sys/dev/usb/ohci.c	Mon Dec  1 08:12:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.3 2014/11/30 16:38:45 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.4 2014/12/01 08:12:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.254.2.3 2014/11/30 16:38:45 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.254.2.4 2014/12/01 08:12:09 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1170,7 +1170,6 @@ ohci_intr1(ohci_softc_t *sc)
 		return (0);
 	}
 
-	sc-sc_bus.no_intrs++;
 	if (eintrs  OHCI_SO) {
 		sc-sc_overrun_cnt++;
 		if (usbd_ratecheck(sc-sc_overrun_ntc)) {

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.3 src/sys/dev/usb/uhci.c:1.264.4.4
--- src/sys/dev/usb/uhci.c:1.264.4.3	Sun Nov 30 16:38:45 2014
+++ src/sys/dev/usb/uhci.c	Mon Dec  1 08:12:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.3 2014/11/30 16:38:45 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.4 2014/12/01 08:12:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.3 2014/11/30 16:38:45 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.264.4.4 2014/12/01 08:12:09 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -854,7 +854,6 @@ void
 uhci_dump_all(uhci_softc_t *sc)
 {
 	uhci_dumpregs(sc);
-	printf(intrs=%d\n, sc-sc_bus.no_intrs);
 	/*printf(framelist[i].link = %08x\n, sc-sc_framelist[0].link);*/
 	uhci_dump_qhs(sc-sc_lctl_start);
 }
@@ -1363,7 +1362,6 @@ uhci_intr1(uhci_softc_t *sc)
 		return (0);	/* nothing to acknowledge */
 	UWRITE2(sc, UHCI_STS, ack); /* acknowledge the ints */
 
-	sc-sc_bus.no_intrs++;
 	usb_schedsoftintr(sc-sc_bus);
 
 	DPRINTFN(15, (%s: uhci_intr: exit\n, device_xname(sc-sc_dev)));

Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.109.2.1 src/sys/dev/usb/usbdivar.h:1.109.2.2
--- src/sys/dev/usb/usbdivar.h:1.109.2.1	Sun Nov 30 12:18:58 2014
+++ src/sys/dev/usb/usbdivar.h	Mon Dec  1 08:12:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: 

CVS commit: src/sys/arch/arm/conf

2014-12-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec  1 08:39:43 UTC 2014

Modified Files:
src/sys/arch/arm/conf: files.arm

Log Message:
Add CPU_CORTEXA17


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/arm/conf/files.arm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/conf/files.arm
diff -u src/sys/arch/arm/conf/files.arm:1.128 src/sys/arch/arm/conf/files.arm:1.129
--- src/sys/arch/arm/conf/files.arm:1.128	Wed Nov 26 04:20:30 2014
+++ src/sys/arch/arm/conf/files.arm	Mon Dec  1 08:39:43 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arm,v 1.128 2014/11/26 04:20:30 matt Exp $
+#	$NetBSD: files.arm,v 1.129 2014/12/01 08:39:43 matt Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflagARM32
@@ -49,6 +49,7 @@ defflag	opt_cputypes.h		CPU_CORTEXA7: CP
 defflag	opt_cputypes.h		CPU_CORTEXA8: CPU_CORTEX
 defflag	opt_cputypes.h		CPU_CORTEXA9: CPU_CORTEX
 defflag	opt_cputypes.h		CPU_CORTEXA15: CPU_CORTEX
+defflag	opt_cputypes.h		CPU_CORTEXA17: CPU_CORTEX
 defflag	opt_cputypes.h		FPU_VFP
 
 defparam opt_cpuoptions.h	XSCALE_CCLKCFG



CVS commit: [netbsd-7] src/sys/arch/arm/include

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 08:59:04 UTC 2014

Modified Files:
src/sys/arch/arm/include [netbsd-7]: profile.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #273):
sys/arch/arm/include/profile.h: revision 1.16
Fix __mcount in the !(__ARM_EABI__) case by popping the right number of
registers on exit.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.2.1 src/sys/arch/arm/include/profile.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/include/profile.h
diff -u src/sys/arch/arm/include/profile.h:1.14 src/sys/arch/arm/include/profile.h:1.14.2.1
--- src/sys/arch/arm/include/profile.h:1.14	Sun May 11 02:02:14 2014
+++ src/sys/arch/arm/include/profile.h	Mon Dec  1 08:59:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.14 2014/05/11 02:02:14 joerg Exp $	*/
+/*	$NetBSD: profile.h,v 1.14.2.1 2014/12/01 08:59:04 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris
@@ -76,7 +76,7 @@
 	/*\
 	 * Restore registers that were trashed during mcount		\
 	 */\
-	__asm(pop	{r0-r3, pc});	\
+	__asm(pop	{r0-r3, lr, pc});\
 	__asm(.size	 MCOUNT_ASM_NAME , .- MCOUNT_ASM_NAME);
 #elif defined(__ARM_DWARF_EH__)
 #define	MCOUNT\



CVS commit: [netbsd-7] src/sys/net/npf

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 09:02:26 UTC 2014

Modified Files:
src/sys/net/npf [netbsd-7]: npf_nat.c npf_ruleset.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #274):
sys/net/npf/npf_nat.c: revision 1.35
sys/net/npf/npf_ruleset.c: revision 1.38
NPF: fix the reference counting and share the active NAT portmap correctly
when performing the reload.  Should fixes PR/49412, reported by kardel@.


To generate a diff of this commit:
cvs rdiff -u -r1.32.2.1 -r1.32.2.2 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/net/npf/npf_ruleset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/npf/npf_nat.c
diff -u src/sys/net/npf/npf_nat.c:1.32.2.1 src/sys/net/npf/npf_nat.c:1.32.2.2
--- src/sys/net/npf/npf_nat.c:1.32.2.1	Fri Aug 29 11:14:14 2014
+++ src/sys/net/npf/npf_nat.c	Mon Dec  1 09:02:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_nat.c,v 1.32.2.1 2014/08/29 11:14:14 martin Exp $	*/
+/*	$NetBSD: npf_nat.c,v 1.32.2.2 2014/12/01 09:02:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 Mindaugas Rasiukevicius rmind at netbsd org
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_nat.c,v 1.32.2.1 2014/08/29 11:14:14 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_nat.c,v 1.32.2.2 2014/12/01 09:02:26 martin Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -313,9 +313,10 @@ npf_nat_freepolicy(npf_natpolicy_t *np)
 		kpause(npfgcnat, false, 1, NULL);
 	}
 	KASSERT(LIST_EMPTY(np-n_nat_list));
+	KASSERT(pm == NULL || pm-p_refcnt  0);
 
 	/* Destroy the port map, on last reference. */
-	if (pm  --pm-p_refcnt == 0) {
+	if (pm  atomic_dec_uint_nv(pm-p_refcnt) == 0) {
 		KASSERT((np-n_flags  NPF_NAT_PORTMAP) != 0);
 		kmem_free(pm, PORTMAP_MEM_SIZE);
 	}
@@ -373,17 +374,21 @@ npf_nat_sharepm(npf_natpolicy_t *np, npf
 	if (memcmp(np-n_taddr, mnp-n_taddr, np-n_alen) != 0) {
 		return false;
 	}
-	/* If NAT policy has an old port map - drop the reference. */
 	mpm = mnp-n_portmap;
-	if (mpm) {
-		/* Note: at this point we cannot hold a last reference. */
-		KASSERT(mpm-p_refcnt  1);
-		mpm-p_refcnt--;
+	KASSERT(mpm == NULL || mpm-p_refcnt  0);
+
+	/*
+	 * If NAT policy has an old port map - drop the reference
+	 * and destroy the port map if it was the last.
+	 */
+	if (mpm  atomic_dec_uint_nv(mpm-p_refcnt) == 0) {
+		kmem_free(mpm, PORTMAP_MEM_SIZE);
 	}
+
 	/* Share the port map. */
 	pm = np-n_portmap;
+	atomic_inc_uint(pm-p_refcnt);
 	mnp-n_portmap = pm;
-	pm-p_refcnt++;
 	return true;
 }
 

Index: src/sys/net/npf/npf_ruleset.c
diff -u src/sys/net/npf/npf_ruleset.c:1.37 src/sys/net/npf/npf_ruleset.c:1.37.2.1
--- src/sys/net/npf/npf_ruleset.c:1.37	Mon Aug 11 01:54:12 2014
+++ src/sys/net/npf/npf_ruleset.c	Mon Dec  1 09:02:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_ruleset.c,v 1.37 2014/08/11 01:54:12 rmind Exp $	*/
+/*	$NetBSD: npf_ruleset.c,v 1.37.2.1 2014/12/01 09:02:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_ruleset.c,v 1.37 2014/08/11 01:54:12 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_ruleset.c,v 1.37.2.1 2014/12/01 09:02:26 martin Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -421,22 +421,6 @@ npf_ruleset_gc(npf_ruleset_t *rlset)
 }
 
 /*
- * npf_ruleset_cmpnat: find a matching NAT policy in the ruleset.
- */
-static inline npf_rule_t *
-npf_ruleset_cmpnat(npf_ruleset_t *rlset, npf_natpolicy_t *mnp)
-{
-	npf_rule_t *rl;
-
-	/* Find a matching NAT policy in the old ruleset. */
-	LIST_FOREACH(rl, rlset-rs_all, r_aentry) {
-		if (rl-r_natp  npf_nat_cmppolicy(rl-r_natp, mnp))
-			break;
-	}
-	return rl;
-}
-
-/*
  * npf_ruleset_reload: prepare the new ruleset by scanning the active
  * ruleset and 1) sharing the dynamic rules 2) sharing NAT policies.
  *
@@ -492,18 +476,30 @@ npf_ruleset_reload(npf_ruleset_t *newset
 			continue;
 		}
 
+		/*
+		 * First, try to share the active port map.  If this
+		 * policy will be unused, npf_nat_freepolicy() will
+		 * drop the reference.
+		 */
+		npf_ruleset_sharepm(oldset, np);
+
 		/* Does it match with any policy in the active ruleset? */
-		if ((actrl = npf_ruleset_cmpnat(oldset, np)) == NULL) {
+		LIST_FOREACH(actrl, oldset-rs_all, r_aentry) {
+			if (!actrl-r_natp)
+continue;
+			if ((actrl-r_attr  NPF_RULE_KEEPNAT) != 0)
+continue;
+			if (npf_nat_cmppolicy(actrl-r_natp, np))
+break;
+		}
+		if (!actrl) {
+			/* No: just set the ID and continue. */
 			npf_nat_setid(np, ++nid);
 			continue;
 		}
 
-		/*
-		 * Inherit the matching NAT policy and check other ones
-		 * in the new ruleset for sharing the portmap.
-		 */
+		/* Yes: inherit the matching NAT policy. */
 		rl-r_natp = actrl-r_natp;
-		npf_ruleset_sharepm(newset, rl-r_natp);
 		npf_nat_setid(rl-r_natp, ++nid);
 
 		/*
@@ -525,13 +521,8 @@ 

CVS commit: [netbsd-7] src

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 09:31:40 UTC 2014

Modified Files:
src/external/bsd/smbfs/dist/lib/smb [netbsd-7]: ctx.c
src/external/bsd/smbfs/dist/mount_smbfs [netbsd-7]: mount_smbfs.8
src/external/bsd/smbfs/dist/smbutil [netbsd-7]: smbutil.1
src/sys/fs/smbfs [netbsd-7]: smbfs_node.c smbfs_smb.c smbfs_subr.c
smbfs_subr.h
src/sys/netsmb [netbsd-7]: iconv.c mchain.h smb_subr.c subr_mchain.c
src/sys/rump/dev/lib/libnetsmb [netbsd-7]: Makefile
Added Files:
src/sys/rump/dev/lib/libnetsmb [netbsd-7]: netsmb_iconv.c netsmb_user.c
netsmb_user.h

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #275):
sys/rump/dev/lib/libnetsmb/netsmb_iconv.c: revision 1.1
external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8: revision 1.3
sys/netsmb/smb_subr.c: revision 1.37
external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8: revision 1.4
sys/fs/smbfs/smbfs_subr.c: revision 1.17
sys/rump/dev/lib/libnetsmb/Makefile: revision 1.5
sys/fs/smbfs/smbfs_smb.c: revision 1.46
sys/fs/smbfs/smbfs_node.c: revision 1.52
sys/netsmb/mchain.h: revision 1.10
external/bsd/smbfs/dist/lib/smb/ctx.c: revision 1.3
sys/netsmb/subr_mchain.c: revision 1.23
sys/rump/dev/lib/libnetsmb/netsmb_user.c: revision 1.1
sys/rump/dev/lib/libnetsmb/netsmb_user.c: revision 1.2
sys/rump/dev/lib/libnetsmb/netsmb_user.c: revision 1.3
sys/rump/dev/lib/libnetsmb/netsmb_user.h: revision 1.1
sys/netsmb/iconv.c: revision 1.14
external/bsd/smbfs/dist/smbutil/smbutil.1: revision 1.3
sys/fs/smbfs/smbfs_subr.h: revision 1.22
Make rump_smbfs(8) uses host iconv(3) to convert filenames
character set on NetBSD hosts.
Adjust smbfs/netsmb for filenames byte length changes that come as
a result of iconv conversion.  Most codes are taken from FreeBSD.
Disable unused codes that causes SIGBUS or SIGSEGV if character
sets option (-E) is specified to mount_smbfs/rump_smbfs.
Adjust man page accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/external/bsd/smbfs/dist/lib/smb/ctx.c
cvs rdiff -u -r1.2 -r1.2.6.1 \
src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8
cvs rdiff -u -r1.2 -r1.2.6.1 src/external/bsd/smbfs/dist/smbutil/smbutil.1
cvs rdiff -u -r1.51 -r1.51.4.1 src/sys/fs/smbfs/smbfs_node.c
cvs rdiff -u -r1.44.12.1 -r1.44.12.2 src/sys/fs/smbfs/smbfs_smb.c
cvs rdiff -u -r1.16 -r1.16.12.1 src/sys/fs/smbfs/smbfs_subr.c
cvs rdiff -u -r1.21 -r1.21.12.1 src/sys/fs/smbfs/smbfs_subr.h
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/netsmb/iconv.c
cvs rdiff -u -r1.9 -r1.9.34.1 src/sys/netsmb/mchain.h
cvs rdiff -u -r1.36 -r1.36.28.1 src/sys/netsmb/smb_subr.c
cvs rdiff -u -r1.22 -r1.22.14.1 src/sys/netsmb/subr_mchain.c
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/rump/dev/lib/libnetsmb/Makefile
cvs rdiff -u -r0 -r1.1.4.2 src/sys/rump/dev/lib/libnetsmb/netsmb_iconv.c \
src/sys/rump/dev/lib/libnetsmb/netsmb_user.h
cvs rdiff -u -r0 -r1.3.4.2 src/sys/rump/dev/lib/libnetsmb/netsmb_user.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/smbfs/dist/lib/smb/ctx.c
diff -u src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.2 src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.2.6.1
--- src/external/bsd/smbfs/dist/lib/smb/ctx.c:1.2	Wed Dec 25 22:03:15 2013
+++ src/external/bsd/smbfs/dist/lib/smb/ctx.c	Mon Dec  1 09:31:40 2014
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: ctx.c,v 1.2 2013/12/25 22:03:15 christos Exp $);
+__RCSID($NetBSD: ctx.c,v 1.2.6.1 2014/12/01 09:31:40 martin Exp $);
 
 #include sys/param.h
 #include sys/sysctl.h
@@ -501,8 +501,10 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 	struct sockaddr *sap;
 	struct sockaddr_nb *salocal, *saserver;
 	char *cp;
+#ifdef notyet
 	u_char cstbl[256];
 	u_int i;
+#endif
 	int error = 0;
 	
 	ctx-ct_flags = ~SMBCF_RESOLVED;
@@ -531,6 +533,7 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 	error = smb_addiconvtbl(toupper, ssn-ioc_localcs, nls_upper);
 	if (error)
 		return error;
+#ifdef notyet
 	if (ssn-ioc_servercs[0] != 0) {
 		for(i = 0; i  sizeof(cstbl); i++)
 			cstbl[i] = i;
@@ -545,6 +548,7 @@ smb_ctx_resolve(struct smb_ctx *ctx)
 		if (error)
 			return error;
 	}
+#endif
 	if (ctx-ct_srvaddr) {
 		error = nb_resolvehost_in(ctx-ct_srvaddr, sap);
 	} else {

Index: src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8
diff -u src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.2 src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.2.6.1
--- src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8:1.2	Wed Dec 25 22:03:15 2013
+++ src/external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8	Mon Dec  1 09:31:40 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: mount_smbfs.8,v 1.2 2013/12/25 22:03:15 christos Exp $
+.\ $NetBSD: mount_smbfs.8,v 1.2.6.1 2014/12/01 09:31:40 

CVS commit: [netbsd-7] src/sys/kern

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 09:54:50 UTC 2014

Modified Files:
src/sys/kern [netbsd-7]: vfs_syscalls.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #276):
sys/kern/vfs_syscalls.c: revision 1.492
Do not follow symlinks in sys_unmount()
There are situations where the underlying filesystem is unreachable
(e.g: NFS) causing symlink resolution to hang. Such a situation
should be avoided by using umount -f -R (force and raw), but while -R
causes the symlink resolution to be skipped in umount(8), the kernel was
still doing it in sys_unmount(). This changes fixes that.
When the -R flag is not given, umount(8) does symlinks resolution
through
realpath(3) before calling unmount(2), hence not doing it in the kernel
would not change behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.490.2.1 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.490 src/sys/kern/vfs_syscalls.c:1.490.2.1
--- src/sys/kern/vfs_syscalls.c:1.490	Fri Jul 25 16:28:12 2014
+++ src/sys/kern/vfs_syscalls.c	Mon Dec  1 09:54:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.490 2014/07/25 16:28:12 maxv Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.490.2.1 2014/12/01 09:54:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.490 2014/07/25 16:28:12 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.490.2.1 2014/12/01 09:54:50 martin Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -574,7 +574,7 @@ sys_unmount(struct lwp *l, const struct 
 		return error;
 	}
 
-	NDINIT(nd, LOOKUP, FOLLOW | LOCKLEAF | TRYEMULROOT, pb);
+	NDINIT(nd, LOOKUP, LOCKLEAF | TRYEMULROOT, pb);
 	if ((error = namei(nd)) != 0) {
 		pathbuf_destroy(pb);
 		return error;



CVS commit: [netbsd-7] src/sys/netinet

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 10:35:37 UTC 2014

Modified Files:
src/sys/netinet [netbsd-7]: ip_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #277):
sys/netinet/ip_output.c: revision 1.233
Call looutput with holding KERNEL_LOCK
This fixes diagnostic assertion KERNEL_LOCKED_P() in if_loop.c.
PR kern/49410


To generate a diff of this commit:
cvs rdiff -u -r1.230 -r1.230.2.1 src/sys/netinet/ip_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_output.c
diff -u src/sys/netinet/ip_output.c:1.230 src/sys/netinet/ip_output.c:1.230.2.1
--- src/sys/netinet/ip_output.c:1.230	Fri Jun  6 00:11:19 2014
+++ src/sys/netinet/ip_output.c	Mon Dec  1 10:35:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_output.c,v 1.230 2014/06/06 00:11:19 rmind Exp $	*/
+/*	$NetBSD: ip_output.c,v 1.230.2.1 2014/12/01 10:35:37 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_output.c,v 1.230 2014/06/06 00:11:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_output.c,v 1.230.2.1 2014/12/01 10:35:37 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1683,5 +1683,7 @@ ip_mloopback(struct ifnet *ifp, struct m
 
 	ip-ip_sum = 0;
 	ip-ip_sum = in_cksum(copym, ip-ip_hl  2);
+	KERNEL_LOCK(1, NULL);
 	(void)looutput(ifp, copym, sintocsa(dst), NULL);
+	KERNEL_UNLOCK_ONE(NULL);
 }



CVS commit: [netbsd-7] src/tests/ipf/expected

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 10:37:32 UTC 2014

Modified Files:
src/tests/ipf/expected [netbsd-7]: n14 n14_6

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #278):
tests/ipf/expected/n14: revision 1.6
tests/ipf/expected/n14_6: revision 1.5
Fix wrong expected outputs
IP addresses in the expected outputs looks reversed (in byte order).
It seems the expected outputs had been generated based on source code
with a bug and the bug was fixed by a commit titled #534 destination
list hashing not endian neutral by darrenr@.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.10.1 src/tests/ipf/expected/n14
cvs rdiff -u -r1.4 -r1.4.10.1 src/tests/ipf/expected/n14_6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/expected/n14
diff -u src/tests/ipf/expected/n14:1.5 src/tests/ipf/expected/n14:1.5.10.1
--- src/tests/ipf/expected/n14:1.5	Sun Jul 22 14:33:28 2012
+++ src/tests/ipf/expected/n14	Mon Dec  1 10:37:32 2014
@@ -11,9 +11,9 @@ RDR 10.1.1.253  80- - 203.1.1.
 RDR 10.1.1.254  80- - 203.1.1.1   80[10.2.2.5 2000]
 
 Hostmap table:
-10.2.2.7,203.1.1.1 - 254.1.1.10,0.0.0.0 (use = 1)
-10.2.2.6,203.1.1.1 - 253.1.1.10,0.0.0.0 (use = 1)
-10.2.2.5,203.1.1.1 - 254.1.1.10,0.0.0.0 (use = 1)
+10.2.2.7,203.1.1.1 - 10.1.1.254,0.0.0.0 (use = 1)
+10.2.2.6,203.1.1.1 - 10.1.1.253,0.0.0.0 (use = 1)
+10.2.2.5,203.1.1.1 - 10.1.1.254,0.0.0.0 (use = 1)
 List of active state sessions:
 List of configured pools
 List of configured hash tables

Index: src/tests/ipf/expected/n14_6
diff -u src/tests/ipf/expected/n14_6:1.4 src/tests/ipf/expected/n14_6:1.4.10.1
--- src/tests/ipf/expected/n14_6:1.4	Sun Jul 22 14:33:28 2012
+++ src/tests/ipf/expected/n14_6	Mon Dec  1 10:37:32 2014
@@ -11,9 +11,9 @@ RDR 10:1:1::253 80- - 203:0:1::1:1
 RDR 10:1:1::254 80- - 203:0:1::1:1 80[10::2:2:5 2000]
 
 Hostmap table:
-10::2:2:7,203:0:1:0:0:0:1:1 - 254:1:1::10,any (use = 1)
-10::2:2:6,203:0:1:0:0:0:1:1 - 253:0:1:0:0:0:1:10,any (use = 1)
-10::2:2:5,203:0:1:0:0:0:1:1 - 254:1:1::10,any (use = 3)
+10::2:2:7,203:0:1:0:0:0:1:1 - 10:1:1::254,any (use = 1)
+10::2:2:6,203:0:1:0:0:0:1:1 - 10:0:1:0:0:0:1:253,any (use = 1)
+10::2:2:5,203:0:1:0:0:0:1:1 - 10:1:1::254,any (use = 3)
 List of active state sessions:
 List of configured pools
 List of configured hash tables



CVS commit: [netbsd-7] src

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 11:38:43 UTC 2014

Modified Files:
src/share/man/man9 [netbsd-7]: callout.9
src/sys/arch/x86/pci [netbsd-7]: fwhrng.c
src/sys/arch/x86/x86 [netbsd-7]: via_padlock.c
src/sys/dev/bluetooth [netbsd-7]: bcsp.c btkbd.c
src/sys/dev/ic [netbsd-7]: nslm7x.c
src/sys/dev/ir [netbsd-7]: irframe_tty.c
src/sys/dev/isa [netbsd-7]: aps.c
src/sys/dev/pci [netbsd-7]: pccbb.c
src/sys/dev/pcmcia [netbsd-7]: btbc.c
src/sys/dev/sdmmc [netbsd-7]: sdmmc.c
src/sys/dev/sysmon [netbsd-7]: sysmon_envsys_events.c sysmonvar.h
src/sys/dev/usb [netbsd-7]: ohci.c
src/sys/dev/wscons [netbsd-7]: wskbd.c
src/sys/kern [netbsd-7]: kern_ktrace.c
src/sys/net [netbsd-7]: if_ecosubr.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #279):
sys/kern/kern_ktrace.c: revision 1.166
sys/dev/isa/aps.c: revision 1.16
sys/dev/sysmon/sysmonvar.h: revision 1.45
sys/dev/ir/irframe_tty.c: revision 1.60
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.112
sys/dev/pci/pccbb.c: revision 1.207
sys/dev/wscons/wskbd.c: revision 1.135
sys/dev/usb/ohci.c: revision 1.254
sys/net/if_ecosubr.c: revision 1.41
sys/dev/pcmcia/btbc.c: revision 1.17
sys/arch/x86/x86/via_padlock.c: revision 1.23
sys/dev/sdmmc/sdmmc.c: revision 1.23
sys/dev/bluetooth/btkbd.c: revision 1.17
sys/dev/bluetooth/bcsp.c: revision 1.25
sys/arch/x86/pci/fwhrng.c: revision 1.8
sys/dev/ic/nslm7x.c: revision 1.61
share/man/man9/callout.9: revision 1.28
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
Make it clear that we should use not callout_stop but callout_halt
before callout_destroy
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.
Reviewed by riastradh@.
Kill sme_callout_mtx and use sme_mtx instead
We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.
Discussed with riastradh@ in
http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.
Reviewed by riastradh@.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.27.2.1 src/share/man/man9/callout.9
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/arch/x86/pci/fwhrng.c
cvs rdiff -u -r1.22 -r1.22.2.1 src/sys/arch/x86/x86/via_padlock.c
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/dev/bluetooth/bcsp.c
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/dev/bluetooth/btkbd.c
cvs rdiff -u -r1.60 -r1.60.4.1 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.59 -r1.59.4.1 src/sys/dev/ir/irframe_tty.c
cvs rdiff -u -r1.15 -r1.15.14.1 src/sys/dev/isa/aps.c
cvs rdiff -u -r1.206 -r1.206.4.1 src/sys/dev/pci/pccbb.c
cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/dev/pcmcia/btbc.c
cvs rdiff -u -r1.22 -r1.22.4.1 src/sys/dev/sdmmc/sdmmc.c
cvs rdiff -u -r1.110 -r1.110.4.1 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.44 -r1.44.12.1 src/sys/dev/sysmon/sysmonvar.h
cvs rdiff -u -r1.253 -r1.253.2.1 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.134 -r1.134.2.1 src/sys/dev/wscons/wskbd.c
cvs rdiff -u -r1.164 -r1.164.4.1 src/sys/kern/kern_ktrace.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/net/if_ecosubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/callout.9
diff -u src/share/man/man9/callout.9:1.27 src/share/man/man9/callout.9:1.27.2.1
--- src/share/man/man9/callout.9:1.27	Sun Jul 27 21:35:07 2014
+++ src/share/man/man9/callout.9	Mon Dec  1 11:38:43 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: callout.9,v 1.27 2014/07/27 21:35:07 riastradh Exp $
+.\	$NetBSD: callout.9,v 1.27.2.1 2014/12/01 11:38:43 martin Exp $
 .\
 .\ Copyright (c) 2000, 2003, 2009 The NetBSD 

CVS commit: [nick-nhusb] src/sys

2014-12-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec  1 12:38:39 UTC 2014

Modified Files:
src/sys/arch/mips/adm5120/dev [nick-nhusb]: ahci.c
src/sys/dev/ic [nick-nhusb]: sl811hs.c
src/sys/dev/usb [nick-nhusb]: ehci.c motg.c ohci.c uhci.c usb.c
usb_subr.c usbdi.c usbdivar.h xhci.c
src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c
src/sys/rump/dev/lib/libugenhc [nick-nhusb]: ugenhc.c

Log Message:
Add prefixes to method structures member names. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.12.6.2 -r1.12.6.3 src/sys/arch/mips/adm5120/dev/ahci.c
cvs rdiff -u -r1.47.6.1 -r1.47.6.2 src/sys/dev/ic/sl811hs.c
cvs rdiff -u -r1.234.2.5 -r1.234.2.6 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.12.2.3 -r1.12.2.4 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.254.2.4 -r1.254.2.5 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.4 -r1.264.4.5 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.156 -r1.156.2.1 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.198 -r1.198.2.1 src/sys/dev/usb/usb_subr.c
cvs rdiff -u -r1.162.2.3 -r1.162.2.4 src/sys/dev/usb/usbdi.c
cvs rdiff -u -r1.109.2.2 -r1.109.2.3 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.28.2.2 -r1.28.2.3 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.32.2.1 -r1.32.2.2 src/sys/external/bsd/dwc2/dwc2.c
cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/sys/rump/dev/lib/libugenhc/ugenhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/adm5120/dev/ahci.c
diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.2 src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.3
--- src/sys/arch/mips/adm5120/dev/ahci.c:1.12.6.2	Sun Nov 30 13:14:11 2014
+++ src/sys/arch/mips/adm5120/dev/ahci.c	Mon Dec  1 12:38:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahci.c,v 1.12.6.2 2014/11/30 13:14:11 skrll Exp $	*/
+/*	$NetBSD: ahci.c,v 1.12.6.3 2014/12/01 12:38:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahci.c,v 1.12.6.2 2014/11/30 13:14:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahci.c,v 1.12.6.3 2014/12/01 12:38:39 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -173,68 +173,68 @@ void		print_xfer(usbd_xfer_handle);
 
 
 struct usbd_bus_methods ahci_bus_methods = {
-	.open_pipe = ahci_open,
-	.soft_intr = ahci_softintr,
-	.do_poll = ahci_poll,
-	.allocm = ahci_allocm,
-	.freem = ahci_freem,
-	.allocx = ahci_allocx,
-	.freex = ahci_freex,
-	.get_lock = ahci_get_lock,
+	.ubm_open = ahci_open,
+	.ubm_softint = ahci_softintr,
+	.ubm_dopoll = ahci_poll,
+	.ubm_allocm = ahci_allocm,
+	.ubm_freem = ahci_freem,
+	.ubm_allocx = ahci_allocx,
+	.ubm_freex = ahci_freex,
+	.ubm_getlock = ahci_get_lock,
 };
 
 struct usbd_pipe_methods ahci_root_ctrl_methods = {
-	.transfer = ahci_root_ctrl_transfer,
-	.start = ahci_root_ctrl_start,
-	.abort = ahci_root_ctrl_abort,
-	.close = ahci_root_ctrl_close,
-	.cleartoggle = ahci_noop,
-	.done = ahci_root_ctrl_done,
+	.upm_transfer = ahci_root_ctrl_transfer,
+	.upm_start = ahci_root_ctrl_start,
+	.upm_abort = ahci_root_ctrl_abort,
+	.upm_close = ahci_root_ctrl_close,
+	.upm_cleartoggle = ahci_noop,
+	.upm_done = ahci_root_ctrl_done,
 };
 
 struct usbd_pipe_methods ahci_root_intr_methods = {
-	.transfer = ahci_root_intr_transfer,
-	.start = ahci_root_intr_start,
-	.abort = ahci_root_intr_abort,
-	.close = ahci_root_intr_close,
-	.cleartoggle = ahci_noop,
-	.done = ahci_root_intr_done,
+	.upm_transfer = ahci_root_intr_transfer,
+	.upm_start = ahci_root_intr_start,
+	.upm_abort = ahci_root_intr_abort,
+	.upm_close = ahci_root_intr_close,
+	.upm_cleartoggle = ahci_noop,
+	.upm_done = ahci_root_intr_done,
 };
 
 struct usbd_pipe_methods ahci_device_ctrl_methods = {
-	.transfer = ahci_device_ctrl_transfer,
-	.start = ahci_device_ctrl_start,
-	.abort = ahci_device_ctrl_abort,
-	.close = ahci_device_ctrl_close,
-	.cleartoggle = ahci_noop,
-	.done = ahci_device_ctrl_done,
+	.upm_transfer = ahci_device_ctrl_transfer,
+	.upm_start = ahci_device_ctrl_start,
+	.upm_abort = ahci_device_ctrl_abort,
+	.upm_close = ahci_device_ctrl_close,
+	.upm_cleartoggle = ahci_noop,
+	.upm_done = ahci_device_ctrl_done,
 };
 
 struct usbd_pipe_methods ahci_device_intr_methods = {
-	.transfer = ahci_device_intr_transfer,
-	.start = ahci_device_intr_start,
-	.abort = ahci_device_intr_abort,
-	.close = ahci_device_intr_close,
-	.cleartoggle = ahci_device_clear_toggle,
-	.done = ahci_device_intr_done,
+	.upm_transfer = ahci_device_intr_transfer,
+	.upm_start = ahci_device_intr_start,
+	.upm_abort = ahci_device_intr_abort,
+	.upm_close = ahci_device_intr_close,
+	.upm_cleartoggle = ahci_device_clear_toggle,
+	.upm_done = ahci_device_intr_done,
 };
 
 struct usbd_pipe_methods ahci_device_isoc_methods = {
-	.transfer = ahci_device_isoc_transfer,
-	.start = ahci_device_isoc_start,
-	.abort = ahci_device_isoc_abort,
-	.close = ahci_device_isoc_close,
-	

CVS commit: [nick-nhusb] src/sys/dev/usb

2014-12-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec  1 13:03:05 UTC 2014

Modified Files:
src/sys/dev/usb [nick-nhusb]: aubtfwl.c if_upgt.c irmce.c pseye.c
stuirda.c udl.c udsir.c ugen.c uhidev.c uirda.c ulpt.c urio.c
usbdi_util.c usbdi_util.h uscanner.c ustir.c uvideo.c

Log Message:
Remove the lbl argument from usbd_{bulk,intr}_transfer.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.10.1 src/sys/dev/usb/aubtfwl.c
cvs rdiff -u -r1.12 -r1.12.4.1 src/sys/dev/usb/if_upgt.c
cvs rdiff -u -r1.1 -r1.1.32.1 src/sys/dev/usb/irmce.c
cvs rdiff -u -r1.21 -r1.21.34.1 src/sys/dev/usb/pseye.c
cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/dev/usb/stuirda.c
cvs rdiff -u -r1.11 -r1.11.6.1 src/sys/dev/usb/udl.c
cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/dev/usb/udsir.c
cvs rdiff -u -r1.126.2.1 -r1.126.2.2 src/sys/dev/usb/ugen.c
cvs rdiff -u -r1.61.4.1 -r1.61.4.2 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.38.6.1 -r1.38.6.2 src/sys/dev/usb/uirda.c
cvs rdiff -u -r1.95.4.1 -r1.95.4.2 src/sys/dev/usb/ulpt.c
cvs rdiff -u -r1.42.4.1 -r1.42.4.2 src/sys/dev/usb/urio.c
cvs rdiff -u -r1.63.2.2 -r1.63.2.3 src/sys/dev/usb/usbdi_util.c
cvs rdiff -u -r1.45.6.1 -r1.45.6.2 src/sys/dev/usb/usbdi_util.h
cvs rdiff -u -r1.75.4.2 -r1.75.4.3 src/sys/dev/usb/uscanner.c
cvs rdiff -u -r1.33.10.1 -r1.33.10.2 src/sys/dev/usb/ustir.c
cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/dev/usb/uvideo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/aubtfwl.c
diff -u src/sys/dev/usb/aubtfwl.c:1.5 src/sys/dev/usb/aubtfwl.c:1.5.10.1
--- src/sys/dev/usb/aubtfwl.c:1.5	Thu May  9 12:44:31 2013
+++ src/sys/dev/usb/aubtfwl.c	Mon Dec  1 13:03:05 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: aubtfwl.c,v 1.5 2013/05/09 12:44:31 aymeric Exp $ */
+/* $NetBSD: aubtfwl.c,v 1.5.10.1 2014/12/01 13:03:05 skrll Exp $ */
 
 /*
  * Copyright (c) 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aubtfwl.c,v 1.5 2013/05/09 12:44:31 aymeric Exp $);
+__KERNEL_RCSID(0, $NetBSD: aubtfwl.c,v 1.5.10.1 2014/12/01 13:03:05 skrll Exp $);
 
 #include sys/param.h
 #include dev/usb/usb.h
@@ -192,7 +192,7 @@ aubtfwl_firmware_load(device_t self, con
 		}
 		error = usbd_bulk_transfer(xfer, pipe,
 		USBD_NO_COPY, USBD_DEFAULT_TIMEOUT,
-		buf, n, device_xname(self));
+		buf, n);
 		if (error != USBD_NORMAL_COMPLETION) {
 			aprint_error_dev(self, xfer failed, %s\n,
 			   usbd_errstr(error));

Index: src/sys/dev/usb/if_upgt.c
diff -u src/sys/dev/usb/if_upgt.c:1.12 src/sys/dev/usb/if_upgt.c:1.12.4.1
--- src/sys/dev/usb/if_upgt.c:1.12	Tue May 27 13:44:25 2014
+++ src/sys/dev/usb/if_upgt.c	Mon Dec  1 13:03:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_upgt.c,v 1.12 2014/05/27 13:44:25 ryoon Exp $	*/
+/*	$NetBSD: if_upgt.c,v 1.12.4.1 2014/12/01 13:03:05 skrll Exp $	*/
 /*	$OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_upgt.c,v 1.12 2014/05/27 13:44:25 ryoon Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_upgt.c,v 1.12.4.1 2014/12/01 13:03:05 skrll Exp $);
 
 #include sys/param.h
 #include sys/callout.h
@@ -2366,8 +2366,7 @@ upgt_bulk_xmit(struct upgt_softc *sc, st
 usbd_status status;
 
 	status = usbd_bulk_transfer(data-xfer, pipeh,
-	USBD_NO_COPY | flags, UPGT_USB_TIMEOUT, data-buf, size,
-	upgt_bulk_xmit);
+	USBD_NO_COPY | flags, UPGT_USB_TIMEOUT, data-buf, size);
 	if (status != USBD_NORMAL_COMPLETION) {
 		aprint_error_dev(sc-sc_dev, %s: error %s\n, __func__,
 		usbd_errstr(status));

Index: src/sys/dev/usb/irmce.c
diff -u src/sys/dev/usb/irmce.c:1.1 src/sys/dev/usb/irmce.c:1.1.32.1
--- src/sys/dev/usb/irmce.c:1.1	Tue Jul 19 12:23:04 2011
+++ src/sys/dev/usb/irmce.c	Mon Dec  1 13:03:05 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: irmce.c,v 1.1 2011/07/19 12:23:04 jmcneill Exp $ */
+/* $NetBSD: irmce.c,v 1.1.32.1 2014/12/01 13:03:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: irmce.c,v 1.1 2011/07/19 12:23:04 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: irmce.c,v 1.1.32.1 2014/12/01 13:03:05 skrll Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -306,8 +306,7 @@ irmce_reset(struct irmce_softc *sc)
 	wlen = sizeof(reset_cmd);
 	err = usbd_bulk_transfer(sc-sc_bulkin_xfer,
 	sc-sc_bulkout_pipe, USBD_NO_COPY|USBD_FORCE_SHORT_XFER,
-	USBD_DEFAULT_TIMEOUT, sc-sc_bulkout_buffer, wlen,
-	irmcereset);
+	USBD_DEFAULT_TIMEOUT, sc-sc_bulkout_buffer, wlen);
 	if (err != USBD_NORMAL_COMPLETION) {
 		if (err == USBD_INTERRUPTED)
 			return EINTR;
@@ -553,8 +552,7 @@ irmce_read(void *priv, struct uio *uio, 
 		rlen = sc-sc_bulkin_maxpktsize;
 		err = usbd_bulk_transfer(sc-sc_bulkin_xfer,
 		sc-sc_bulkin_pipe, USBD_NO_COPY|USBD_SHORT_XFER_OK,
-		USBD_DEFAULT_TIMEOUT, 

CVS commit: [netbsd-7] src/sys/net/npf

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:05:26 UTC 2014

Modified Files:
src/sys/net/npf [netbsd-7]: npf_conf.c npf_conn.c npf_conn.h npf_impl.h
npf_nat.c npf_ruleset.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #280):
sys/net/npf/npf_ruleset.c: revision 1.40
sys/net/npf/npf_nat.c: revision 1.36
sys/net/npf/npf_nat.c: revision 1.37
sys/net/npf/npf_conn.h: revision 1.7
sys/net/npf/npf_conf.c: revision 1.9
sys/net/npf/npf_ruleset.c: revision 1.39
sys/net/npf/npf_conn.c: revision 1.13
sys/net/npf/npf_impl.h: revision 1.60
NPF:
- npf_nat_import: take the port only if using the portmap.
- Sprinkle some comments and asserts.
- npf_config_load: if loading the connections, do not perform any actice
  NAT policy take over or or portmap sharing - just replace them all.
- npf_config_fini: flush with the empty connection database.
- npf_nat_import: fix the stat counter.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 src/sys/net/npf/npf_conf.c
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/sys/net/npf/npf_conn.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/net/npf/npf_conn.h
cvs rdiff -u -r1.58.2.1 -r1.58.2.2 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.32.2.2 -r1.32.2.3 src/sys/net/npf/npf_nat.c
cvs rdiff -u -r1.37.2.1 -r1.37.2.2 src/sys/net/npf/npf_ruleset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/npf/npf_conf.c
diff -u src/sys/net/npf/npf_conf.c:1.8 src/sys/net/npf/npf_conf.c:1.8.2.1
--- src/sys/net/npf/npf_conf.c:1.8	Mon Aug 11 01:54:12 2014
+++ src/sys/net/npf/npf_conf.c	Mon Dec  1 13:05:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conf.c,v 1.8 2014/08/11 01:54:12 rmind Exp $	*/
+/*	$NetBSD: npf_conf.c,v 1.8.2.1 2014/12/01 13:05:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_conf.c,v 1.8 2014/08/11 01:54:12 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_conf.c,v 1.8.2.1 2014/12/01 13:05:26 martin Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -105,11 +105,13 @@ npf_config_destroy(npf_config_t *nc)
 void
 npf_config_fini(void)
 {
+	npf_conndb_t *cd = npf_conndb_create();
+
 	/* Flush the connections. */
 	mutex_enter(npf_config_lock);
 	npf_conn_tracking(false);
 	pserialize_perform(npf_config_psz);
-	npf_conn_load(NULL, false);
+	npf_conn_load(cd, false);
 	npf_ifmap_flush();
 	mutex_exit(npf_config_lock);
 
@@ -127,6 +129,7 @@ npf_config_load(npf_ruleset_t *rset, npf
 npf_ruleset_t *nset, npf_rprocset_t *rpset,
 npf_conndb_t *conns, bool flush)
 {
+	const bool load = conns != NULL;
 	npf_config_t *nc, *onc;
 
 	nc = kmem_zalloc(sizeof(npf_config_t), KM_SLEEP);
@@ -143,9 +146,9 @@ npf_config_load(npf_ruleset_t *rset, npf
 	 */
 	mutex_enter(npf_config_lock);
 	if ((onc = npf_config) != NULL) {
-		npf_ruleset_reload(rset, onc-n_rules);
+		npf_ruleset_reload(rset, onc-n_rules, load);
 		npf_tableset_reload(tset, onc-n_tables);
-		npf_ruleset_reload(nset, onc-n_nat_rules);
+		npf_ruleset_reload(nset, onc-n_nat_rules, load);
 	}
 
 	/*

Index: src/sys/net/npf/npf_conn.c
diff -u src/sys/net/npf/npf_conn.c:1.10.2.1 src/sys/net/npf/npf_conn.c:1.10.2.2
--- src/sys/net/npf/npf_conn.c:1.10.2.1	Fri Aug 29 11:14:14 2014
+++ src/sys/net/npf/npf_conn.c	Mon Dec  1 13:05:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conn.c,v 1.10.2.1 2014/08/29 11:14:14 martin Exp $	*/
+/*	$NetBSD: npf_conn.c,v 1.10.2.2 2014/12/01 13:05:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 Mindaugas Rasiukevicius rmind at netbsd org
@@ -99,7 +99,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_conn.c,v 1.10.2.1 2014/08/29 11:14:14 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_conn.c,v 1.10.2.2 2014/12/01 13:05:26 martin Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -680,11 +680,11 @@ npf_conn_release(npf_conn_t *con)
 }
 
 /*
- * npf_conn_retnat: return associated NAT data entry and indicate
+ * npf_conn_getnat: return associated NAT data entry and indicate
  * whether it is a forwards or backwards stream.
  */
 npf_nat_t *
-npf_conn_retnat(npf_conn_t *con, const int di, bool *forw)
+npf_conn_getnat(npf_conn_t *con, const int di, bool *forw)
 {
 	KASSERT(con-c_refcnt  0);
 	*forw = (con-c_flags  PFIL_ALL) == di;

Index: src/sys/net/npf/npf_conn.h
diff -u src/sys/net/npf/npf_conn.h:1.6 src/sys/net/npf/npf_conn.h:1.6.2.1
--- src/sys/net/npf/npf_conn.h:1.6	Sun Aug 10 19:09:43 2014
+++ src/sys/net/npf/npf_conn.h	Mon Dec  1 13:05:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conn.h,v 1.6 2014/08/10 19:09:43 rmind Exp $	*/
+/*	$NetBSD: npf_conn.h,v 1.6.2.1 2014/12/01 13:05:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -113,7 +113,7 @@ bool		npf_conn_pass(const npf_conn_t *, 
 void		npf_conn_setpass(npf_conn_t *, npf_rproc_t 

CVS commit: [netbsd-7] src/sys/netinet

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:08:14 UTC 2014

Modified Files:
src/sys/netinet [netbsd-7]: in4_cksum.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #281):
sys/netinet/in4_cksum.c: revision 1.20
Only check that the offset  sizeof(struct ip) if nxt != 0, i.e. in the
tcp and udp cases. From kre.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.12.1 src/sys/netinet/in4_cksum.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/in4_cksum.c
diff -u src/sys/netinet/in4_cksum.c:1.19 src/sys/netinet/in4_cksum.c:1.19.12.1
--- src/sys/netinet/in4_cksum.c:1.19	Tue Mar 12 21:54:36 2013
+++ src/sys/netinet/in4_cksum.c	Mon Dec  1 13:08:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in4_cksum.c,v 1.19 2013/03/12 21:54:36 christos Exp $	*/
+/*	$NetBSD: in4_cksum.c,v 1.19.12.1 2014/12/01 13:08:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 Joerg Sonnenberger jo...@netbsd.org.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in4_cksum.c,v 1.19 2013/03/12 21:54:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: in4_cksum.c,v 1.19.12.1 2014/12/01 13:08:14 martin Exp $);
 
 #include sys/param.h
 #include sys/mbuf.h
@@ -58,9 +58,6 @@ in4_cksum(struct mbuf *m, u_int8_t nxt, 
 	uint32_t sum;
 	uint16_t *w;
 
-	if (__predict_false(off  sizeof(struct ip)))
-		PANIC(%s: offset %d too short for IP header %zu, __func__,
-		off, sizeof(struct ip));
 	if (__predict_false(m-m_len  sizeof(struct ip)))
 		PANIC(%s: mbuf %d too short for IP header %zu, __func__,
 		m-m_len, sizeof(struct ip));
@@ -68,6 +65,10 @@ in4_cksum(struct mbuf *m, u_int8_t nxt, 
 	if (nxt == 0)
 		return cpu_in_cksum(m, len, off, 0);
 
+	if (__predict_false(off  sizeof(struct ip)))
+		PANIC(%s: offset %d too short for IP header %zu, __func__,
+		off, sizeof(struct ip));
+
 	/*
 	 * Compute the equivalent of:
 	 * struct ipovly ip;



CVS commit: [netbsd-7] src/external/mit/lua/dist/src

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:11:18 UTC 2014

Modified Files:
src/external/mit/lua/dist/src [netbsd-7]: luaconf.h

Log Message:
Pull up following revision(s) (requested by lneto in ticket #282):
external/mit/lua/dist/src/luaconf.h: revision 1.10
lua(4): fixed Lua stack size


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.2.1 src/external/mit/lua/dist/src/luaconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/lua/dist/src/luaconf.h
diff -u src/external/mit/lua/dist/src/luaconf.h:1.9 src/external/mit/lua/dist/src/luaconf.h:1.9.2.1
--- src/external/mit/lua/dist/src/luaconf.h:1.9	Sat Jul 19 18:38:34 2014
+++ src/external/mit/lua/dist/src/luaconf.h	Mon Dec  1 13:11:18 2014
@@ -1,7 +1,7 @@
-/*	$NetBSD: luaconf.h,v 1.9 2014/07/19 18:38:34 lneto Exp $	*/
+/*	$NetBSD: luaconf.h,v 1.9.2.1 2014/12/01 13:11:18 martin Exp $	*/
 
 /*
-** $Id: luaconf.h,v 1.9 2014/07/19 18:38:34 lneto Exp $
+** $Id: luaconf.h,v 1.9.2.1 2014/12/01 13:11:18 martin Exp $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */
@@ -13,6 +13,10 @@
 #ifndef _KERNEL
 #include limits.h
 #include stddef.h
+#else
+/* limits.h */
+#include machine/limits.h
+#include sys/systm.h
 #endif
 
 
@@ -696,7 +700,6 @@
 #ifndef _KERNEL
 #include stdint.h
 #else
-#include sys/systm.h
 
 #undef LUA_NUMBER
 #undef LUA_NUMBER_FMT
@@ -723,9 +726,6 @@
 #define BUFSIZ			(1024)
 #define sprintf(s,fmt,...)	snprintf(s, sizeof(s), fmt, __VA_ARGS__)
 
-/* limits.h */
-#include machine/limits.h
-
 /* string.h */
 #define strcoll strcmp
 



CVS commit: [netbsd-7] src/sys/modules/lua

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:13:15 UTC 2014

Modified Files:
src/sys/modules/lua [netbsd-7]: lua.c

Log Message:
Pull up following revision(s) (requested by lneto in ticket #283):
sys/modules/lua/lua.c: revision 1.15
lua(4): fixed require


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.2.1 src/sys/modules/lua/lua.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/lua/lua.c
diff -u src/sys/modules/lua/lua.c:1.13 src/sys/modules/lua/lua.c:1.13.2.1
--- src/sys/modules/lua/lua.c:1.13	Fri Jul 25 08:10:40 2014
+++ src/sys/modules/lua/lua.c	Mon Dec  1 13:13:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: lua.c,v 1.13 2014/07/25 08:10:40 dholland Exp $ */
+/*	$NetBSD: lua.c,v 1.13.2.1 2014/12/01 13:13:15 martin Exp $ */
 
 /*
  * Copyright (c) 2014 by Lourival Vieira Neto ln...@netbsd.org.
@@ -367,7 +367,11 @@ luaioctl(dev_t dev, u_long cmd, void *da
 			m-mod_name,
 			s-lua_name);
 		klua_lock(s-K);
-		m-open(s-K-L);
+		luaL_requiref(
+			s-K-L,
+			m-mod_name,
+			m-open,
+			1);
 		klua_unlock(s-K);
 		m-refcount++;
 		LIST_INSERT_HEAD(
@@ -507,7 +511,8 @@ lua_require(lua_State *L)
 	device_printf(sc_self,
 	require module %s\n,
 	md-mod_name);
-md-open(L);
+luaL_requiref(L, md-mod_name, md-open, 0);
+
 md-refcount++;
 LIST_INSERT_HEAD(s-lua_modules, md, mod_next);
 return 1;



CVS commit: [netbsd-7] src/sys/arch/arm/allwinner

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:23:49 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_debe.c awin_fb.c awin_reg.h
Added Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_mp.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #284):
sys/arch/arm/allwinner/awin_reg.h: revision 1.56
sys/arch/arm/allwinner/awin_debe.c: revision 1.9-1.10
sys/arch/arm/allwinner/awin_mp.c: revision 1.1
sys/arch/arm/allwinner/awin_fb.c: revision 1.7
hardware cursor support
hide the hw cursor when blanking the screen


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.4 -r1.6.2.5 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/allwinner/awin_mp.c
cvs rdiff -u -r1.14.2.7 -r1.14.2.8 src/sys/arch/arm/allwinner/awin_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.4 src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.5
--- src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.4	Sat Nov 15 11:31:40 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Mon Dec  1 13:23:49 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.6.2.4 2014/11/15 11:31:40 martin Exp $ */
+/* $NetBSD: awin_debe.c,v 1.6.2.5 2014/12/01 13:23:49 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -33,8 +33,10 @@
 #define AWIN_DEBE_VIDEOMEM	(16 * 1024 * 1024)
 #endif
 
+#define AWIN_DEBE_CURMAX	64
+
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.4 2014/11/15 11:31:40 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.5 2014/12/01 13:23:49 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -66,6 +68,12 @@ struct awin_debe_softc {
 	void *sc_dmap;
 
 	uint16_t sc_margin;
+
+	bool sc_cursor_enable;
+	int sc_cursor_x, sc_cursor_y;
+	int sc_hot_x, sc_hot_y;
+	uint8_t sc_cursor_bitmap[8 * AWIN_DEBE_CURMAX];
+	uint8_t sc_cursor_mask[8 * AWIN_DEBE_CURMAX];
 };
 
 #define DEBE_READ(sc, reg) \
@@ -80,6 +88,10 @@ static int	awin_debe_alloc_videomem(stru
 static void	awin_debe_setup_fbdev(struct awin_debe_softc *,
   const struct videomode *);
 
+static int	awin_debe_set_curpos(struct awin_debe_softc *, int, int);
+static int	awin_debe_set_cursor(struct awin_debe_softc *,
+ struct wsdisplay_cursor *);
+
 CFATTACH_DECL_NEW(awin_debe, sizeof(struct awin_debe_softc),
 	awin_debe_match, awin_debe_attach, NULL, NULL);
 
@@ -177,6 +189,8 @@ awin_debe_attach(device_t parent, device
 
 	DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, AWIN_DEBE_MODCTL_EN);
 
+	DEBE_WRITE(sc, AWIN_DEBE_HWC_PALETTE_TABLE, 0);
+
 	error = awin_debe_alloc_videomem(sc);
 	if (error) {
 		aprint_error_dev(sc-sc_dev,
@@ -255,6 +269,125 @@ awin_debe_setup_fbdev(struct awin_debe_s
 #endif
 }
 
+static int
+awin_debe_set_curpos(struct awin_debe_softc *sc, int x, int y)
+{
+	int xx, yy;
+	u_int yoff, xoff;
+
+	xoff = yoff = 0;
+	xx = x - sc-sc_hot_x + sc-sc_margin;
+	yy = y - sc-sc_hot_y + sc-sc_margin;
+	if (xx  0) {
+		xoff -= xx;
+		xx = 0;
+	}
+	if (yy  0) {
+		yoff -= yy;
+		yy = 0;
+	}
+
+	DEBE_WRITE(sc, AWIN_DEBE_HWCCTL_REG,
+	__SHIFTIN(yy, AWIN_DEBE_HWCCTL_YCOOR) |
+	__SHIFTIN(xx, AWIN_DEBE_HWCCTL_XCOOR));
+	DEBE_WRITE(sc, AWIN_DEBE_HWCFBCTL_REG,
+#if AWIN_DEBE_CURMAX == 32
+	__SHIFTIN(AWIN_DEBE_HWCFBCTL_YSIZE_32, AWIN_DEBE_HWCFBCTL_YSIZE) |
+	__SHIFTIN(AWIN_DEBE_HWCFBCTL_XSIZE_32, AWIN_DEBE_HWCFBCTL_XSIZE) |
+#else
+	__SHIFTIN(AWIN_DEBE_HWCFBCTL_YSIZE_64, AWIN_DEBE_HWCFBCTL_YSIZE) |
+	__SHIFTIN(AWIN_DEBE_HWCFBCTL_XSIZE_64, AWIN_DEBE_HWCFBCTL_XSIZE) |
+#endif
+	__SHIFTIN(AWIN_DEBE_HWCFBCTL_FBFMT_2BPP, AWIN_DEBE_HWCFBCTL_FBFMT) |
+	__SHIFTIN(yoff, AWIN_DEBE_HWCFBCTL_YCOOROFF) |
+	__SHIFTIN(xoff, AWIN_DEBE_HWCFBCTL_XCOOROFF));
+
+	return 0;
+}
+
+static int
+awin_debe_set_cursor(struct awin_debe_softc *sc, struct wsdisplay_cursor *cur)
+{
+	uint32_t val;
+	uint8_t r[4], g[4], b[4];
+	u_int index, count, shift, off, pcnt;
+	int i, j, idx, error;
+	uint8_t mask;
+
+	if (cur-which  WSDISPLAY_CURSOR_DOCUR) {
+		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+		if (cur-enable)
+			val |= AWIN_DEBE_MODCTL_HWC_EN;
+		else
+			val = ~AWIN_DEBE_MODCTL_HWC_EN;
+		DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
+
+		sc-sc_cursor_enable = cur-enable;
+	}
+
+	if (cur-which  WSDISPLAY_CURSOR_DOHOT) {
+		sc-sc_hot_x = cur-hot.x;
+		sc-sc_hot_y = cur-hot.y;
+		cur-which |= WSDISPLAY_CURSOR_DOPOS;
+	}
+
+	if (cur-which  WSDISPLAY_CURSOR_DOPOS) {
+		awin_debe_set_curpos(sc, cur-pos.x, cur-pos.y);
+	}
+
+	if (cur-which  WSDISPLAY_CURSOR_DOCMAP) {
+		index = cur-cmap.index;
+		count = cur-cmap.count;
+		if (index = 2 || (index + count)  2)
+			return EINVAL;
+		error = copyin(cur-cmap.red, r[index], count);
+		

CVS commit: [netbsd-7] src/sys/arch/arm/allwinner

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:30:37 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_fb.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #285):
sys/arch/arm/allwinner/awin_fb.c: revision 1.8
make the full amount of reserved video memory available to userland


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.5 -r1.4.2.6 src/sys/arch/arm/allwinner/awin_fb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_fb.c
diff -u src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.5 src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.6
--- src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.5	Mon Dec  1 13:23:49 2014
+++ src/sys/arch/arm/allwinner/awin_fb.c	Mon Dec  1 13:30:37 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_fb.c,v 1.4.2.5 2014/12/01 13:23:49 martin Exp $ */
+/* $NetBSD: awin_fb.c,v 1.4.2.6 2014/12/01 13:30:37 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.4.2.5 2014/12/01 13:23:49 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.4.2.6 2014/12/01 13:30:37 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -143,8 +143,10 @@ awin_fb_ioctl(void *v, void *vs, u_long 
 		fbi = data;
 		ri = sc-sc_gen.vd.active-scr_ri;
 		error = wsdisplayio_get_fbinfo(ri, fbi);
-		if (error == 0)
+		if (error == 0) {
 			fbi-fbi_flags |= WSFB_VRAM_IS_RAM;
+			fbi-fbi_fbsize = sc-sc_dmasegs[0].ds_len;
+		}
 		return error;
 	case WSDISPLAYIO_SVIDEO:
 	case WSDISPLAYIO_GVIDEO:
@@ -163,7 +165,7 @@ awin_fb_mmap(void *v, void *vs, off_t of
 {
 	struct awin_fb_softc *sc = v;
 
-	if (off  0 || off = sc-sc_gen.sc_fbsize)
+	if (off  0 || off = sc-sc_dmasegs[0].ds_len)
 		return -1;
 
 	return bus_dmamem_mmap(sc-sc_dmat, sc-sc_dmasegs, sc-sc_ndmasegs,



CVS commit: [netbsd-7] src

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:43:14 UTC 2014

Modified Files:
src/lib/libc/net [netbsd-7]: rcmd.c
src/usr.bin/rsh [netbsd-7]: rsh.c

Log Message:
Pull up following revision(s) (requested by enami in ticket #286):
usr.bin/rsh/rsh.c: revision 1.38
lib/libc/net/rcmd.c: revision 1.71
Changes done in rsh.c rev. 1.36 was incomplete.  As chuq pointed
in private mail, it broke rcp(1).
To achieve the documented behavior and to fix long standing incorrect
rsh(1) behavior which I've tried to fix in rev. 1.36, rcmd(1) should have
two operation mode; whether it should relay signal information on
auxiliary channel or not, depending on the argument `fd2p' passed to rcmd(3).
So, make rcmd(1) behave differntly depending on the environment variable and
set it when necessary in rcmd(3) according to how auxiliary channel
is set up by rcmd(3).


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.69.2.1 src/lib/libc/net/rcmd.c
cvs rdiff -u -r1.36 -r1.36.2.1 src/usr.bin/rsh/rsh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/net/rcmd.c
diff -u src/lib/libc/net/rcmd.c:1.69 src/lib/libc/net/rcmd.c:1.69.2.1
--- src/lib/libc/net/rcmd.c:1.69	Wed May 28 14:39:02 2014
+++ src/lib/libc/net/rcmd.c	Mon Dec  1 13:43:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $	*/
+/*	$NetBSD: rcmd.c,v 1.69.2.1 2014/12/01 13:43:14 martin Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)rcmd.c	8.3 (Berkeley) 3/26/94;
 #else
-__RCSID($NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $);
+__RCSID($NetBSD: rcmd.c,v 1.69.2.1 2014/12/01 13:43:14 martin Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -464,6 +464,9 @@ rshrcmd(int af, char **ahost, u_int32_t 
 			const char *program;
 			program = strrchr(rshcmd, '/');
 			program = program ? program + 1 : rshcmd;
+			if (fd2p)
+/* ask rcmd to relay signal information */
+setenv(RCMD_RELAY_SIGNAL, YES, 1);
 			switch (af) {
 			case AF_INET:
 execlp(rshcmd, program, -4, -l, remuser,

Index: src/usr.bin/rsh/rsh.c
diff -u src/usr.bin/rsh/rsh.c:1.36 src/usr.bin/rsh/rsh.c:1.36.2.1
--- src/usr.bin/rsh/rsh.c:1.36	Sun Jun  8 02:44:15 2014
+++ src/usr.bin/rsh/rsh.c	Mon Dec  1 13:43:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rsh.c,v 1.36 2014/06/08 02:44:15 enami Exp $	*/
+/*	$NetBSD: rsh.c,v 1.36.2.1 2014/12/01 13:43:13 martin Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1990, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)rsh.c	8.4 (Berkeley) 4/29/95;
 #else
-__RCSID($NetBSD: rsh.c,v 1.36 2014/06/08 02:44:15 enami Exp $);
+__RCSID($NetBSD: rsh.c,v 1.36.2.1 2014/12/01 13:43:13 martin Exp $);
 #endif
 #endif /* not lint */
 
@@ -76,9 +76,7 @@ int	remerr;
 static int sigs[] = { SIGINT, SIGTERM, SIGQUIT };
 
 static char   *copyargs(char **);
-#ifndef IN_RCMD
 static void	sendsig(int);
-#endif
 static int	checkfd(struct pollfd *, int);
 static void	talk(int, sigset_t *, pid_t, int);
 __dead static void	usage(void);
@@ -87,6 +85,7 @@ int	 orcmd(char **, int, const char *,
 const char *, const char *, int *);
 int	 orcmd_af(char **, int, const char *,
 const char *, const char *, int *, int);
+static int	relay_signal;
 #endif
 
 int
@@ -98,7 +97,7 @@ main(int argc, char **argv)
 	struct protoent *proto;
 
 #ifdef IN_RCMD
-	char	*locuser = 0, *loop;
+	char	*locuser = 0, *loop, *relay;
 #endif /* IN_RCMD */
 	int argoff, asrsh, ch, dflag, nflag, one, rem;
 	size_t i;
@@ -133,6 +132,8 @@ main(int argc, char **argv)
 	}
 
 #ifdef IN_RCMD
+	if ((relay = getenv(RCMD_RELAY_SIGNAL))  strcmp(relay, YES) == 0)
+		relay_signal = 1;
 	if ((loop = getenv(RCMD_LOOP))  strcmp(loop, YES) == 0)
 		warnx(rcmd appears to be looping!);
 
@@ -152,7 +153,7 @@ main(int argc, char **argv)
 	if ((name = strdup(pw-pw_name)) == NULL)
 		err(1, malloc);
 	while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1)
-		switch(ch) {
+		switch (ch) {
 		case '4':
 			family = AF_INET;
 			break;
@@ -267,16 +268,17 @@ main(int argc, char **argv)
 
 	(void)sigprocmask(SIG_BLOCK, nset, oset);
 
-#ifndef IN_RCMD
-	for (i = 0; i  sizeof(sigs) / sizeof(sigs[0]); i++) {
-		struct sigaction sa;
+#ifdef IN_RCMD
+	if (!relay_signal)
+#endif
+		for (i = 0; i  sizeof(sigs) / sizeof(sigs[0]); i++) {
+			struct sigaction sa;
 
-		if (sa.sa_handler != SIG_IGN) {
-			sa.sa_handler = sendsig;
-			(void)sigaction(sigs[i], sa, NULL);
+			if (sa.sa_handler != SIG_IGN) {
+sa.sa_handler = sendsig;
+(void)sigaction(sigs[i], sa, NULL);
+			}
 		}
-	}
-#endif
 
 	if (!nflag) {
 		pid = fork();
@@ -389,17 +391,18 @@ done:
 		exit(0);
 	}
 
-#ifdef IN_RCMD
-	fdp = fds[0];
-	nfds = 3;
-	fds[0].events = POLLIN|POLLNVAL|POLLERR|POLLHUP;
-	fds[0].fd = 2;
-#else
-	(void)sigprocmask(SIG_SETMASK, oset, NULL);
 	fdp = 

CVS commit: [netbsd-7] src/doc

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 13:45:37 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets #272 - #286


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.113 -r1.1.2.114 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.113 src/doc/CHANGES-7.0:1.1.2.114
--- src/doc/CHANGES-7.0:1.1.2.113	Fri Nov 28 10:08:37 2014
+++ src/doc/CHANGES-7.0	Mon Dec  1 13:45:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.113 2014/11/28 10:08:37 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.114 2014/12/01 13:45:37 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3013,3 +3013,139 @@ sys/external/bsd/drm2/radeon/radeondrmkm
 	Use correct linebytes.
 	[nonaka, ticket #272]
 
+sys/arch/arm/include/profile.h			1.16
+
+	Fix __mcount in the !(__ARM_EABI__) case by popping the right number
+	of registers on exit.
+	[skrll, ticket #273]
+
+sys/net/npf/npf_nat.c1.35
+sys/net/npf/npf_ruleset.c			1.38
+
+	NPF: fix the reference counting and share the active NAT portmap
+	correctly when performing the reload.  Should fixes PR/49412,
+	reported by kardel@.
+	[rmind, ticket #274]
+
+external/bsd/smbfs/dist/lib/smb/ctx.c		1.3
+external/bsd/smbfs/dist/mount_smbfs/mount_smbfs.8 1.3-1.4
+external/bsd/smbfs/dist/smbutil/smbutil.1	1.3
+sys/fs/smbfs/smbfs_node.c			1.52
+sys/fs/smbfs/smbfs_smb.c			1.46
+sys/fs/smbfs/smbfs_subr.c			1.17
+sys/fs/smbfs/smbfs_subr.h			1.22
+sys/netsmb/iconv.c1.14
+sys/netsmb/mchain.h1.10
+sys/netsmb/smb_subr.c1.37
+sys/netsmb/subr_mchain.c			1.23
+sys/rump/dev/lib/libnetsmb/Makefile		1.5
+sys/rump/dev/lib/libnetsmb/netsmb_iconv.c	1.1
+sys/rump/dev/lib/libnetsmb/netsmb_user.c	1.1-1.3
+sys/rump/dev/lib/libnetsmb/netsmb_user.h	1.1
+
+	Make rump_smbfs(8) uses host iconv(3) to convert filenames
+	character set on NetBSD hosts.
+	Adjust smbfs/netsmb for filenames byte length changes that come as
+	a result of iconv conversion.  Most codes are taken from FreeBSD.
+	Disable unused codes that causes SIGBUS or SIGSEGV if character
+	sets option (-E) is specified to mount_smbfs/rump_smbfs.
+	Adjust man page accordingly.
+	[nakayama, ticket #275]
+
+sys/kern/vfs_syscalls.c1.492
+
+	Do not follow symlinks in sys_unmount().
+	[manu, ticket #276]
+
+sys/netinet/ip_output.c1.233
+
+	Call looutput with holding KERNEL_LOCK.
+	This fixes diagnostic assertion KERNEL_LOCKED_P() in if_loop.c.
+	PR kern/49410
+	[ozaki-r, ticket #277]
+
+tests/ipf/expected/n141.6
+tests/ipf/expected/n14_6			1.5
+
+	Fix wrong expected outputs
+
+	IP addresses in the expected outputs looks reversed (in byte order).
+	It seems the expected outputs had been generated based on source code
+	with a bug and the bug was fixed by a commit titled #534 destination
+	list hashing not endian neutral by darrenr@.
+	[ozaki-r, ticket #278]
+
+share/man/man9/callout.9			1.28
+sys/arch/x86/pci/fwhrng.c			1.8
+sys/arch/x86/x86/via_padlock.c			1.23
+sys/dev/bluetooth/bcsp.c			1.25
+sys/dev/bluetooth/btkbd.c			1.17
+sys/dev/ic/nslm7x.c1.61
+sys/dev/ir/irframe_tty.c			1.60
+sys/dev/isa/aps.c1.16
+sys/dev/pci/pccbb.c1.207
+sys/dev/pcmcia/btbc.c1.17
+sys/dev/sdmmc/sdmmc.c1.23
+sys/dev/sysmon/sysmon_envsys_events.c		1.111-1.112
+sys/dev/sysmon/sysmonvar.h			1.45
+sys/dev/usb/ohci.c1.254
+sys/dev/wscons/wskbd.c1.135
+sys/kern/kern_ktrace.c1.166
+sys/net/if_ecosubr.c1.41
+
+	Replace callout_stop with callout_halt and ensure the callout
+	is not running before destroying it.
+	[ozaki-r, ticket #279]
+
+sys/net/npf/npf_conf.c1.9
+sys/net/npf/npf_conn.c1.13
+sys/net/npf/npf_conn.h1.7
+sys/net/npf/npf_impl.h1.60
+sys/net/npf/npf_nat.c1.36-1.37
+sys/net/npf/npf_ruleset.c			1.39-1.40
+
+	NPF:
+	- npf_nat_import: take the port only if using the portmap.
+	- Sprinkle some comments and asserts.
+	- npf_config_load: if loading the connections, do not perform any
+	   actice NAT policy take over or or portmap sharing - just replace
+	   them all.
+	- npf_config_fini: flush with the empty connection database.
+	- npf_nat_import: fix the stat counter.
+	[rmind, ticket #280]
+
+sys/netinet/in4_cksum.c1.20
+
+	Only check that the offset  sizeof(struct ip) if nxt != 0, i.e. in
+	the tcp and udp cases. From kre.
+	[christos, ticket #281]
+
+external/mit/lua/dist/src/luaconf.h		1.10
+
+	lua(4): fixed Lua stack size
+	[lneto, ticket #282]
+
+sys/modules/lua/lua.c1.15
+
+	lua(4): fixed require
+	[lneto, ticket #283]
+
+sys/arch/arm/allwinner/awin_debe.c		1.9-1.10
+sys/arch/arm/allwinner/awin_fb.c		1.7
+sys/arch/arm/allwinner/awin_mp.c		1.1
+sys/arch/arm/allwinner/awin_reg.h		1.56
+
+	Hardware cursor support.
+	[jmcneill, ticket #284]
+
+sys/arch/arm/allwinner/awin_fb.c		1.8
+
+	Make the full amount of 

CVS commit: src/sys/netinet

2014-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  1 17:07:43 UTC 2014

Modified Files:
src/sys/netinet: in.c

Log Message:
Don't pass junk in sin_family and sin_len for SIOCGIFNETMASK, and explain why.
XXX: pullup 7?


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/netinet/in.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/in.c
diff -u src/sys/netinet/in.c:1.148 src/sys/netinet/in.c:1.149
--- src/sys/netinet/in.c:1.148	Tue Sep  9 16:16:12 2014
+++ src/sys/netinet/in.c	Mon Dec  1 12:07:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.148 2014/09/09 20:16:12 rmind Exp $	*/
+/*	$NetBSD: in.c,v 1.149 2014/12/01 17:07:43 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in.c,v 1.148 2014/09/09 20:16:12 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: in.c,v 1.149 2014/12/01 17:07:43 christos Exp $);
 
 #include opt_inet.h
 #include opt_inet_conf.h
@@ -427,6 +427,7 @@ in_control(struct socket *so, u_long cmd
 			ia-ia_ifa.ifa_getifa = NULL;
 #endif /* IPSELSRC */
 			ia-ia_sockmask.sin_len = 8;
+			ia-ia_sockmask.sin_family = AF_INET;
 			if (ifp-if_flags  IFF_BROADCAST) {
 ia-ia_broadaddr.sin_len = sizeof(ia-ia_addr);
 ia-ia_broadaddr.sin_family = AF_INET;
@@ -473,7 +474,14 @@ in_control(struct socket *so, u_long cmd
 		break;
 
 	case SIOCGIFNETMASK:
-		ifreq_setaddr(cmd, ifr, sintocsa(ia-ia_sockmask));
+		/* 
+		 * We keep the number of trailing zero bytes the sin_len field
+		 * of ia_sockmask, so we fix this before we pass it back to
+		 * userland.
+		 */
+		oldaddr = ia-ia_sockmask;
+		oldaddr.sin_len = sizeof(struct sockaddr_in);
+		ifreq_setaddr(cmd, ifr, (const void *)oldaddr);
 		break;
 
 	case SIOCSIFDSTADDR:



CVS commit: src/tests/ipf

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 19:46:29 UTC 2014

Modified Files:
src/tests/ipf: t_nat_exec.sh

Log Message:
Remove the broken on BE mark from the N14 testcase - ozaki-r fixed it
recently.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/ipf/t_nat_exec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.20 src/tests/ipf/t_nat_exec.sh:1.21
--- src/tests/ipf/t_nat_exec.sh:1.20	Tue Jul 15 20:00:23 2014
+++ src/tests/ipf/t_nat_exec.sh	Mon Dec  1 19:46:29 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.20 2014/07/15 20:00:23 martin Exp $
+# $NetBSD: t_nat_exec.sh,v 1.21 2014/12/01 19:46:29 martin Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -73,7 +73,7 @@ test_case n10 nattest hex hex -T update_
 test_case n11 nattest text text
 failing_test_case n12 nattest Known to be broken hex hex -T update_ipid=0 -v
 test_case n13 nattest text text
-failing_test_case_be n14 nattest See PR kern/47665 text text
+test_case n14 nattest text text
 test_case n15 nattest text text -T update_ipid=0
 test_case n16 nattest hex hex -D
 test_case n17 nattest hex hex -D



CVS commit: [netbsd-7] src/tests/ipf

2014-12-01 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec  1 20:03:35 UTC 2014

Modified Files:
src/tests/ipf [netbsd-7]: t_nat_exec.sh

Log Message:
Pull up following revision(s) (requested by martin in ticket #287):
tests/ipf/t_nat_exec.sh: revision 1.21
Remove the broken on BE mark from the N14 testcase - ozaki-r fixed it
recently.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.2.1 src/tests/ipf/t_nat_exec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.20 src/tests/ipf/t_nat_exec.sh:1.20.2.1
--- src/tests/ipf/t_nat_exec.sh:1.20	Tue Jul 15 20:00:23 2014
+++ src/tests/ipf/t_nat_exec.sh	Mon Dec  1 20:03:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.20 2014/07/15 20:00:23 martin Exp $
+# $NetBSD: t_nat_exec.sh,v 1.20.2.1 2014/12/01 20:03:35 snj Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -73,7 +73,7 @@ test_case n10 nattest hex hex -T update_
 test_case n11 nattest text text
 failing_test_case n12 nattest Known to be broken hex hex -T update_ipid=0 -v
 test_case n13 nattest text text
-failing_test_case_be n14 nattest See PR kern/47665 text text
+test_case n14 nattest text text
 test_case n15 nattest text text -T update_ipid=0
 test_case n16 nattest hex hex -D
 test_case n17 nattest hex hex -D



CVS commit: [netbsd-7] src/doc

2014-12-01 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec  1 20:07:59 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
287


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.114 -r1.1.2.115 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.114 src/doc/CHANGES-7.0:1.1.2.115
--- src/doc/CHANGES-7.0:1.1.2.114	Mon Dec  1 13:45:37 2014
+++ src/doc/CHANGES-7.0	Mon Dec  1 20:07:59 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.114 2014/12/01 13:45:37 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.115 2014/12/01 20:07:59 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3149,3 +3149,8 @@ usr.bin/rsh/rsh.c1.38
 	Fix changes done in rsh.c rev. 1.36 to unbreak rcp(1).
 	[enami, ticket #286]
 
+tests/ipf/t_nat_exec.sh1.21
+
+	The N14 testcase is no longer broken on BE.
+	[martin, ticket #287]
+



CVS commit: src/sbin/route

2014-12-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  1 20:30:27 UTC 2014

Modified Files:
src/sbin/route: route.8

Log Message:
Complete the routing argument table by including the ID's used in the routing
display.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sbin/route/route.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/route/route.8
diff -u src/sbin/route/route.8:1.52 src/sbin/route/route.8:1.53
--- src/sbin/route/route.8:1.52	Tue Nov 11 22:34:08 2014
+++ src/sbin/route/route.8	Mon Dec  1 15:30:27 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: route.8,v 1.52 2014/11/12 03:34:08 christos Exp $
+.\	$NetBSD: route.8,v 1.53 2014/12/01 20:30:27 christos Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)route.8	8.4 (Berkeley) 6/1/94
 .\
-.Dd November 11, 2014
+.Dd December 1, 2014
 .Dt ROUTE 8
 .Os
 .Sh NAME
@@ -286,26 +286,33 @@ is also available for similar purpose, i
 .Pp
 Routes have associated flags which influence operation of the protocols
 when sending to destinations matched by the routes.
-These flags may be set (or sometimes cleared)
+These flags are displayed using the following ID characters in the routing
+display and may be set (or sometimes cleared)
 by indicating the following corresponding modifiers:
-.Bd -literal
--cloning  RTF_CLONING- generates a new route on use
--nocloning   ~RTF_CLONING- stop generating new routes on use
--cloned   RTF_CLONED - cloned route generated by RTF_CLONING
--nocloned~RTF_CLONED - prevent removal with RTF_CLONING parent
--xresolve RTF_XRESOLVE   - emit mesg on use (for external lookup)
--iface   ~RTF_GATEWAY- destination is directly reachable
--static   RTF_STATIC - manually added route
--nostatic~RTF_STATIC - pretend route added by kernel or daemon
--reject   RTF_REJECT - emit an ICMP unreachable when matched
--noreject~RTF_REJECT - clear reject flag
--blackholeRTF_BLACKHOLE  - silently discard pkts (during updates)
--noblackhole ~RTF_BLACKHOLE  - clear blackhole flag
--proto1   RTF_PROTO1 - set protocol specific routing flag #1
--proto2   RTF_PROTO2 - set protocol specific routing flag #2
--llinfo   RTF_LLINFO - validly translates proto addr to link addr
--proxyRTF_ANNOUNCE   - make entry a link level proxy
-.Ed
+.Bl -column ID xnoblackhole xRTF_BLACKHOLE x
+.It Sy ID Ta Sy Modifier Ta Sy  Flag Bit Ta Sy Description
+.It Li   Ta -iface Ta ~RTF_GATEWAY Ta destination is directly reachable
+.It Li 1 Ta -proto1 Ta  RTF_PROTO1 Ta set protocol specific flag #1
+.It Li 2 Ta -proto2 Ta  RTF_PROTO2 Ta set protocol specific flag #2
+.It Li B Ta -blackhole Ta  RTF_BLACKHOLE Ta discard pkts (during updates)
+.It Li   Ta -noblackhole Ta ~RTF_BLACKHOLE Ta clear blackhole flag
+.It Li C Ta -cloning Ta  RTF_CLONING Ta  generates a new route on use
+.It Li   Ta -nocloning Ta ~RTF_CLONING Ta stop generating new routes on use
+.It Li c Ta -cloned Ta  RTF_CLONED Ta route generated by RTF_CLONING
+.It Li   Ta -nocloned Ta ~RTF_CLONED Ta deny removal with RTF_CLONING
+.It Li D Ta  Ta  RTF_DYNAMIC Ta created dynamically (redirect)
+.It Li G Ta  Ta  RTF_GATEWAY Ta forwarded to dest by intermediary
+.It Li H Ta  Ta  RTF_HOST Ta host entry (net otherwise)
+.It Li L Ta -llinfo Ta  RTF_LLINFO Ta translate proto to link addr
+.It Li M Ta  Ta  RTF_MODIFIED Ta modified dynamically (redirect)
+.It Li p Ta -proxy Ta  RTF_ANNOUNCE Ta make entry a link level proxy
+.It Li R Ta -reject Ta  RTF_REJECT Ta send ICMP unreachable on match
+.It Li   Ta -noreject Ta ~RTF_REJECT Ta clear reject flag
+.It Li S Ta -static Ta  RTF_STATIC Ta manually added route
+.It Li   Ta -nostatic Ta ~RTF_STATIC Ta pretend route added automatically
+.It Li U Ta  Ta  RTF_UP Ta route usable
+.It Li X Ta -xresolve Ta  RTF_XRESOLVE Ta emit mesg on use (for ext lookup)
+.El
 .Pp
 The optional modifiers
 .Fl rtt ,



CVS commit: [netbsd-7] src/etc/root

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 21:17:21 UTC 2014

Modified Files:
src/etc/root [netbsd-7]: dot.cshrc dot.profile

Log Message:
Pull up following revision(s) (requested by riz in ticket #288):
etc/root/dot.cshrc: revision 1.25
etc/root/dot.profile: revision 1.27
Freshen up the commented-out suggested PKG_PATH a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.12.1 src/etc/root/dot.cshrc
cvs rdiff -u -r1.26 -r1.26.12.1 src/etc/root/dot.profile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/root/dot.cshrc
diff -u src/etc/root/dot.cshrc:1.24 src/etc/root/dot.cshrc:1.24.12.1
--- src/etc/root/dot.cshrc:1.24	Sun Mar 11 17:28:47 2012
+++ src/etc/root/dot.cshrc	Mon Dec  1 21:17:21 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.cshrc,v 1.24 2012/03/11 17:28:47 he Exp $
+#	$NetBSD: dot.cshrc,v 1.24.12.1 2014/12/01 21:17:21 martin Exp $
 
 alias	h	history
 alias	j	jobs -l
@@ -22,9 +22,8 @@ setenv BLOCKSIZE 1k
 
 # Uncomment the following line(s) to install binary packages
 # from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
-#setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/6.0/All
-#setenv PKG_PATH ${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.1/All
-#setenv PKG_PATH ${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.0/All
+#setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/7.0/All
+#setenv PKG_PATH ${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/6.0/All
 
 set history=1000
 set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R7/bin /usr/X11R6/bin /usr/local/sbin /usr/local/bin)

Index: src/etc/root/dot.profile
diff -u src/etc/root/dot.profile:1.26 src/etc/root/dot.profile:1.26.12.1
--- src/etc/root/dot.profile:1.26	Sun Mar 11 17:28:47 2012
+++ src/etc/root/dot.profile	Mon Dec  1 21:17:21 2014
@@ -1,13 +1,12 @@
-#	$NetBSD: dot.profile,v 1.26 2012/03/11 17:28:47 he Exp $
+#	$NetBSD: dot.profile,v 1.26.12.1 2014/12/01 21:17:21 martin Exp $
 
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
 export PATH=${PATH}:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
 
 # Uncomment the following line(s) to install binary packages
 # from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
-#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/6.0/All
-#export PKG_PATH=${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All
-#export PKG_PATH=${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All
+#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/7.0/All
+#export PKG_PATH=${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/6.0/All
 
 export BLOCKSIZE=1k
 



CVS commit: [netbsd-7] src/doc

2014-12-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Dec  1 21:18:23 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #288


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.115 -r1.1.2.116 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.115 src/doc/CHANGES-7.0:1.1.2.116
--- src/doc/CHANGES-7.0:1.1.2.115	Mon Dec  1 20:07:59 2014
+++ src/doc/CHANGES-7.0	Mon Dec  1 21:18:23 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.115 2014/12/01 20:07:59 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.116 2014/12/01 21:18:23 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3154,3 +3154,9 @@ tests/ipf/t_nat_exec.sh1.21
 	The N14 testcase is no longer broken on BE.
 	[martin, ticket #287]
 
+etc/root/dot.cshrc1.25
+etc/root/dot.profile1.27
+
+	Freshen up the commented-out suggested PKG_PATH a bit.
+	[riz, ticket #288]
+



CVS commit: [nick-nhusb] src/sys/dev/usb

2014-12-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec  1 21:52:00 UTC 2014

Modified Files:
src/sys/dev/usb [nick-nhusb]: motgvar.h

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/usb/motgvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/motgvar.h
diff -u src/sys/dev/usb/motgvar.h:1.4 src/sys/dev/usb/motgvar.h:1.4.2.1
--- src/sys/dev/usb/motgvar.h:1.4	Sat Sep 13 18:36:39 2014
+++ src/sys/dev/usb/motgvar.h	Mon Dec  1 21:52:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motgvar.h,v 1.4 2014/09/13 18:36:39 jmcneill Exp $	*/
+/*	$NetBSD: motgvar.h,v 1.4.2.1 2014/12/01 21:52:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@ struct motg_pipe {
 	struct usbd_pipe pipe;
 	int nexttoggle;
 	struct motg_hw_ep *hw_ep; /* pointer to the hardware EP used */
-	SIMPLEQ_ENTRY(motg_pipe) ep_pipe_list; 
+	SIMPLEQ_ENTRY(motg_pipe) ep_pipe_list;
 };
 
 /* description of a hardware endpoint */



CVS commit: src/sys/arch/arm/cortex

2014-12-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec  1 22:39:06 UTC 2014

Modified Files:
src/sys/arch/arm/cortex: pl310.c

Log Message:
clean the a9 l2 cache before turning it on.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/cortex/pl310.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/cortex/pl310.c
diff -u src/sys/arch/arm/cortex/pl310.c:1.15 src/sys/arch/arm/cortex/pl310.c:1.16
--- src/sys/arch/arm/cortex/pl310.c:1.15	Wed Apr 16 22:40:00 2014
+++ src/sys/arch/arm/cortex/pl310.c	Mon Dec  1 22:39:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pl310.c,v 1.15 2014/04/16 22:40:00 matt Exp $	*/
+/*	$NetBSD: pl310.c,v 1.16 2014/12/01 22:39:06 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pl310.c,v 1.15 2014/04/16 22:40:00 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pl310.c,v 1.16 2014/12/01 22:39:06 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -249,11 +249,11 @@ arml2cc_enable(struct arml2cc_softc *sc)
 {
 	mutex_spin_enter(sc-sc_lock);
 
-	arml2cc_write_4(sc, L2C_CTL, 1);	// turn it on
-
 	arml2cc_cache_way_op(sc, L2C_INV_WAY, sc-sc_waymask);
 	arml2cc_cache_sync(sc);
 
+	arml2cc_write_4(sc, L2C_CTL, 1);	// turn it on
+
 	mutex_spin_exit(sc-sc_lock);
 }
 



CVS commit: src/sys/rump

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Dec  1 22:54:32 UTC 2014

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
RUMPCOMP_USER has been deprecated for long enough, remove it.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/rump/Makefile.rump

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.99 src/sys/rump/Makefile.rump:1.100
--- src/sys/rump/Makefile.rump:1.99	Tue Jul 22 20:25:13 2014
+++ src/sys/rump/Makefile.rump	Mon Dec  1 22:54:32 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.99 2014/07/22 20:25:13 alnsn Exp $
+#	$NetBSD: Makefile.rump,v 1.100 2014/12/01 22:54:32 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -124,10 +124,6 @@ DPSRCS+=	${RUMPTOP}/Makefile.rump
 
 # XXX: Warning flags are not in CWARNFLAGS.  Manually add a few important ones.
 
-.ifdef RUMPCOMP_USER
-.warning RUMPCOMP_USER is deprecated.  Use RUMPCOMP_USER_SRCS
-RUMPCOMP_USER_SRCS= rumpcomp_user.c
-.endif
 .ifdef RUMPCOMP_USER_SRCS  !defined(RUMPKERN_ONLY)
 .if empty(DESTDIR)
 DESTDIR=/



CVS commit: src/sys/rump

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Dec  1 22:58:41 UTC 2014

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
define the warnings used for hypercall components once


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/rump/Makefile.rump

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.100 src/sys/rump/Makefile.rump:1.101
--- src/sys/rump/Makefile.rump:1.100	Mon Dec  1 22:54:32 2014
+++ src/sys/rump/Makefile.rump	Mon Dec  1 22:58:41 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.100 2014/12/01 22:54:32 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.101 2014/12/01 22:58:41 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -122,7 +122,8 @@ DPSRCS+=	${RUMPTOP}/Makefile.rump
 # Support for component-specific hypercalls
 #
 
-# XXX: Warning flags are not in CWARNFLAGS.  Manually add a few important ones.
+# no easy way to get WARNS out of bsd.sys.mk
+RUMPCOMP_USER_WARNFLAGS=-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes
 
 .ifdef RUMPCOMP_USER_SRCS  !defined(RUMPKERN_ONLY)
 .if empty(DESTDIR)
@@ -137,15 +138,15 @@ ${rcusrc}.d: ${rcusrc}.c
 
 ${rcusrc}.o: ${rcusrc}.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
+	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
 
 ${rcusrc}.pico: ${rcusrc}.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
+	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
 
 ${rcusrc}.po: ${rcusrc}.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} -Wall -Wmissing-prototypes ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
+	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c}
 
 RUMPOBJ_NORENAME+=${rcusrc}.o ${rcusrc}.pico ${rcusrc}.po
 SRCS+=${rcusrc}.c



CVS commit: src/sys/rump

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Dec  1 23:08:15 UTC 2014

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
need -Wno-unused-parameter with -Wextra


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/rump/Makefile.rump

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.101 src/sys/rump/Makefile.rump:1.102
--- src/sys/rump/Makefile.rump:1.101	Mon Dec  1 22:58:41 2014
+++ src/sys/rump/Makefile.rump	Mon Dec  1 23:08:15 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.101 2014/12/01 22:58:41 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.102 2014/12/01 23:08:15 pooka Exp $
 #
 
 .if !defined(_RUMP_MK)
@@ -123,7 +123,8 @@ DPSRCS+=	${RUMPTOP}/Makefile.rump
 #
 
 # no easy way to get WARNS out of bsd.sys.mk
-RUMPCOMP_USER_WARNFLAGS=-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes
+RUMPCOMP_USER_WARNFLAGS=	-Wall -Wextra -Wno-unused-parameter
+RUMPCOMP_USER_WARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes
 
 .ifdef RUMPCOMP_USER_SRCS  !defined(RUMPKERN_ONLY)
 .if empty(DESTDIR)



CVS commit: src

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec  2 01:51:46 UTC 2014

Modified Files:
src/distrib/sets/lists/man: mi
src/sys/rump/share/man/man7: Makefile
Added Files:
src/sys/rump/share/man/man7: rumpkernel.7

Log Message:
add a high-level rumpkernel.7 manpage


To generate a diff of this commit:
cvs rdiff -u -r1.1489 -r1.1490 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/share/man/man7/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/rump/share/man/man7/rumpkernel.7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1489 src/distrib/sets/lists/man/mi:1.1490
--- src/distrib/sets/lists/man/mi:1.1489	Sat Nov 22 01:29:05 2014
+++ src/distrib/sets/lists/man/mi	Tue Dec  2 01:51:45 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1489 2014/11/22 01:29:05 pettai Exp $
+# $NetBSD: mi,v 1.1490 2014/12/02 01:51:45 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2238,6 +2238,7 @@
 ./usr/share/man/cat7/release.0			man-reference-catman	.cat
 ./usr/share/man/cat7/rfc6056.0			man-reference-catman	.cat
 ./usr/share/man/cat7/rump_sp.0			man-reference-catman	.cat,rump
+./usr/share/man/cat7/rumpkernel.0			man-reference-catman	.cat,rump
 ./usr/share/man/cat7/script.0			man-reference-catman	.cat
 ./usr/share/man/cat7/security.0			man-reference-catman	.cat
 ./usr/share/man/cat7/setuid.0			man-reference-catman	.cat
@@ -5186,6 +5187,7 @@
 ./usr/share/man/html7/release.html		man-reference-htmlman	html
 ./usr/share/man/html7/rfc6056.html		man-reference-htmlman	html
 ./usr/share/man/html7/rump_sp.html		man-reference-htmlman	html,rump
+./usr/share/man/html7/rumpkernel.html		man-reference-htmlman	html,rump
 ./usr/share/man/html7/script.html		man-reference-htmlman	html
 ./usr/share/man/html7/security.html		man-reference-htmlman	html
 ./usr/share/man/html7/setuid.html		man-reference-htmlman	html
@@ -8109,6 +8111,7 @@
 ./usr/share/man/man7/release.7			man-reference-man	.man
 ./usr/share/man/man7/rfc6056.7			man-reference-man	.man
 ./usr/share/man/man7/rump_sp.7		man-reference-man	.man,rump
+./usr/share/man/man7/rumpkernel.7		man-reference-man	.man,rump
 ./usr/share/man/man7/script.7			man-reference-man	.man
 ./usr/share/man/man7/security.7			man-reference-man	.man
 ./usr/share/man/man7/setuid.7			man-reference-man	.man

Index: src/sys/rump/share/man/man7/Makefile
diff -u src/sys/rump/share/man/man7/Makefile:1.1 src/sys/rump/share/man/man7/Makefile:1.2
--- src/sys/rump/share/man/man7/Makefile:1.1	Sun Nov  9 17:39:38 2014
+++ src/sys/rump/share/man/man7/Makefile	Tue Dec  2 01:51:45 2014
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2014/11/09 17:39:38 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2014/12/02 01:51:45 pooka Exp $
 
-MAN=	rump_sp.7
+MAN=	rumpkernel.7 rump_sp.7
 
 .include bsd.man.mk

Added files:

Index: src/sys/rump/share/man/man7/rumpkernel.7
diff -u /dev/null src/sys/rump/share/man/man7/rumpkernel.7:1.1
--- /dev/null	Tue Dec  2 01:51:46 2014
+++ src/sys/rump/share/man/man7/rumpkernel.7	Tue Dec  2 01:51:45 2014
@@ -0,0 +1,147 @@
+.\ $NetBSD: rumpkernel.7,v 1.1 2014/12/02 01:51:45 pooka Exp $
+.\
+.\ Copyright (c) 2008-2014 Antti Kantee.  All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.Dd December 1, 2014
+.Dt RUMPKERNEL 7
+.Os
+.Sh NAME
+.Nm rump kernel
+.Nd The Anykernel and Rump Kernels
+.Sh DESCRIPTION
+Rump kernels provide portable, componentized, kernel quality drivers
+such as file systems, POSIX system call handlers, PCI device drivers, a
+SCSI protocol stack, virtio and a TCP/IP stack.
+The fundamental enabling 

CVS commit: src/sys/rump/librump/rumpkern

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec  2 01:52:13 UTC 2014

Modified Files:
src/sys/rump/librump/rumpkern: rump.3

Log Message:
most of this manpage moved to rumpkernel.7, so simplify a lot


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/librump/rumpkern/rump.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.3
diff -u src/sys/rump/librump/rumpkern/rump.3:1.11 src/sys/rump/librump/rumpkern/rump.3:1.12
--- src/sys/rump/librump/rumpkern/rump.3:1.11	Sun Nov  9 17:39:38 2014
+++ src/sys/rump/librump/rumpkern/rump.3	Tue Dec  2 01:52:13 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: rump.3,v 1.11 2014/11/09 17:39:38 pooka Exp $
+.\ $NetBSD: rump.3,v 1.12 2014/12/02 01:52:13 pooka Exp $
 .\
 .\ Copyright (c) 2008-2011 Antti Kantee.  All rights reserved.
 .\
@@ -23,168 +23,33 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd July 14, 2013
+.Dd December 1, 2014
 .Dt RUMP 3
 .Os
 .Sh NAME
-.Nm rump
-.Nd Rump Kernel
+.Nm librump
+.Nd Rump kernel base
 .Sh LIBRARY
-rump Library (librump, \-lrump)
+rump kernel base (librump, \-lrump)
 .Sh SYNOPSIS
 .In rump/rump.h
+.In rump/rump_syscalls.h
 .Sh DESCRIPTION
-A rump kernel is a virtualized kernel instance which retains only part
-of the
-.Nx
-kernel.
-Rump kernels are aimed at virtualizing kernel drivers and do not support
-for example creating processes, managing virtual memory address spaces
-or scheduling threads.
-These features are unnecessary overhead when virtualizing drivers.
-Rump kernels are created by linking a desired set of components together.
-On
-.Nx ,
-these components are available as userspace libraries with
-the prefix
-.Pa librump .
-The high-level
-.Xr rumpuser 3
-hypercall interface is used by a rump kernel to request resources and
-services from the host it runs on.
-Like any virtualized kernel, a rump kernel also provides its own set
-of namespaces, such as a file system hierarchy and TCP ports,
-that are independent of the ones on the host and of any other rump
-kernel instances.
-It should be noted that the presence of the provided namespaces
-depends on the components that the rump kernel was constructed with.
-.Pp
-Since a rump kernel does not provide support for applications processes,
-existing entities are used as rump kernel clients.
-The relationship between the client and the rump kernel defines the
-execution model of the rump kernel.
-A local client will reside in the same address space and manipulate the
-rump kernel with function calls and direct memory references.
-Remote and microkernel clients are disjoint from the rump kernel
-and make requests though various protocols, see for example
-.Xr p2k 3 ,
-.Xr rump_sp 7 ,
-and
-.Xr rumphijack 3 .
-Remote clients will also work over a TCP/IP network, or other similar
-communication medium.
-.Pp
-A rump kernel is bootstrapped by calling
-.Fn rump_init .
-On a POSIX Host, environment variables can be used to adjust some
-operating parameters:
-.Bl -tag -width RUMP_MEMLIMITXX
-.It Dv RUMP_NCPU
-If set, the number indicates the number of virtual CPUs configured into a
-rump kernel.
-The special value host can be used to specify the number of
-of host CPUs available.
-If the value is unset, two CPUs will be configured.
-.It Dv RUMP_VERBOSE
-If set to non-zero, activates bootverbose.
-.It Dv RUMP_THREADS
-If set to 0, prevents the rump kernel from creating any kernel threads.
-This is possible usually only for file systems, as other subsystems
-depend on threads to work.
-.It Dv RUMP_MEMLIMIT
-If set, indicates the maximum amount of memory that a rump kernel will
-request from the hypervisor via
-.Fn rumpuser_malloc .
-When the rump kernel is close to the allocation limit, it will attempt
-to make more memory available by flushing its caches.
-The default is as much as the host allows.
-.It Dv RUMP_NVNODES
-Sets the value of the kern.maxvnodes sysctl node to the indicated amount.
-Adjusting this may be useful for example when testing vnode reclaim
-code paths.
-While the same value can be set by means of sysctl, the env variable
-is often more convenient for quick testing.
-As expected, this option has effect only in rump kernels which support VFS.
-The current default is 1024 vnodes.
-.El
+The base of a
+.Xr rumpkernel 7
+is provided by the
+.Nm
+library.
+In addition to fundamental routines such as kernel memory allocators
+and locking,
+.Nm
+provides system call wrappers.
 .Pp
-The standardized way for a client to make requests into a rump kernel
-is to use rump kernel system calls, which have equivalent syntax and
-semantics with regular
-.Nx
-system calls.
-The parameters are expected to be in the
-.Nx
-type system unless a system
-call translation component, for example librumpkern_sys_linux,
-is linked into the rump kernel, in which case system call 

CVS commit: src/sys/rump

2014-12-01 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec  2 01:59:17 UTC 2014

Modified Files:
src/sys/rump: Makefile.rump
src/sys/rump/librump/rumpdev: Makefile.rumpdev
src/sys/rump/librump/rumpkern: Makefile.rumpkern
src/sys/rump/librump/rumpnet: Makefile.rumpnet
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
Removed Files:
src/sys/rump/dev/lib/libaudio: shlib_version
src/sys/rump/dev/lib/libaudio_ac97: shlib_version
src/sys/rump/dev/lib/libbpf: shlib_version
src/sys/rump/dev/lib/libcgd: shlib_version
src/sys/rump/dev/lib/libdisk: shlib_version
src/sys/rump/dev/lib/libdm: shlib_version
src/sys/rump/dev/lib/libdrvctl: shlib_version
src/sys/rump/dev/lib/libfss: shlib_version
src/sys/rump/dev/lib/libhdaudio_hdafg: shlib_version
src/sys/rump/dev/lib/libmd: shlib_version
src/sys/rump/dev/lib/libmiiphy: shlib_version
src/sys/rump/dev/lib/libnetsmb: shlib_version
src/sys/rump/dev/lib/libopencrypto: shlib_version
src/sys/rump/dev/lib/libpad: shlib_version
src/sys/rump/dev/lib/libpci: shlib_version
src/sys/rump/dev/lib/libpci_eap: shlib_version
src/sys/rump/dev/lib/libpci_hdaudio: shlib_version
src/sys/rump/dev/lib/libpci_if_iwn: shlib_version
src/sys/rump/dev/lib/libpci_if_pcn: shlib_version
src/sys/rump/dev/lib/libpci_if_wm: shlib_version
src/sys/rump/dev/lib/libpci_virtio: shlib_version
src/sys/rump/dev/lib/libpud: shlib_version
src/sys/rump/dev/lib/libputter: shlib_version
src/sys/rump/dev/lib/libraidframe: shlib_version
src/sys/rump/dev/lib/librnd: shlib_version
src/sys/rump/dev/lib/libscsipi: shlib_version
src/sys/rump/dev/lib/libsysmon: shlib_version
src/sys/rump/dev/lib/libubt: shlib_version
src/sys/rump/dev/lib/libucom: shlib_version
src/sys/rump/dev/lib/libugenhc: shlib_version
src/sys/rump/dev/lib/libulpt: shlib_version
src/sys/rump/dev/lib/libumass: shlib_version
src/sys/rump/dev/lib/libusb: shlib_version
src/sys/rump/dev/lib/libvirtio_if_vioif: shlib_version
src/sys/rump/dev/lib/libvirtio_ld: shlib_version
src/sys/rump/dev/lib/libvirtio_viornd: shlib_version
src/sys/rump/dev/lib/libvnd: shlib_version
src/sys/rump/dev/lib/libwscons: shlib_version
src/sys/rump/dev/wip/libukbd: shlib_version
src/sys/rump/dev/wip/libums: shlib_version
src/sys/rump/dev/wip/libusbrum: shlib_version
src/sys/rump/fs/lib/libaio: shlib_version
src/sys/rump/fs/lib/libcd9660: shlib_version
src/sys/rump/fs/lib/libefs: shlib_version
src/sys/rump/fs/lib/libext2fs: shlib_version
src/sys/rump/fs/lib/libfdesc: shlib_version
src/sys/rump/fs/lib/libffs: shlib_version
src/sys/rump/fs/lib/libfifovfs: shlib_version
src/sys/rump/fs/lib/libhfs: shlib_version
src/sys/rump/fs/lib/libkernfs: shlib_version
src/sys/rump/fs/lib/liblayervfs: shlib_version
src/sys/rump/fs/lib/liblfs: shlib_version
src/sys/rump/fs/lib/libmfs: shlib_version
src/sys/rump/fs/lib/libmsdos: shlib_version
src/sys/rump/fs/lib/libnfs: shlib_version
src/sys/rump/fs/lib/libnfsserver: shlib_version
src/sys/rump/fs/lib/libnilfs: shlib_version
src/sys/rump/fs/lib/libntfs: shlib_version
src/sys/rump/fs/lib/libnull: shlib_version
src/sys/rump/fs/lib/libptyfs: shlib_version
src/sys/rump/fs/lib/libsmbfs: shlib_version
src/sys/rump/fs/lib/libsyspuffs: shlib_version
src/sys/rump/fs/lib/libsysvbfs: shlib_version
src/sys/rump/fs/lib/libtmpfs: shlib_version
src/sys/rump/fs/lib/libudf: shlib_version
src/sys/rump/fs/lib/libumap: shlib_version
src/sys/rump/fs/lib/libunion: shlib_version
src/sys/rump/fs/lib/libv7fs: shlib_version
src/sys/rump/fs/lib/libzfs: shlib_version
src/sys/rump/kern/lib/libcrypto: shlib_version
src/sys/rump/kern/lib/libsljit: shlib_version
src/sys/rump/kern/lib/libsolaris: shlib_version
src/sys/rump/kern/lib/libsys_cygwin: shlib_version
src/sys/rump/kern/lib/libsys_linux: shlib_version
src/sys/rump/kern/lib/libsys_sunos: shlib_version
src/sys/rump/kern/lib/libtty: shlib_version
src/sys/rump/kern/lib/libz: shlib_version
src/sys/rump/net/lib/libagr: shlib_version
src/sys/rump/net/lib/libbpfjit: shlib_version
src/sys/rump/net/lib/libbridge: shlib_version
src/sys/rump/net/lib/liblocal: shlib_version
src/sys/rump/net/lib/libnet: shlib_version
src/sys/rump/net/lib/libnet80211: shlib_version
src/sys/rump/net/lib/libnetbt: shlib_version
src/sys/rump/net/lib/libnetinet: shlib_version
src/sys/rump/net/lib/libnetinet6: shlib_version

CVS commit: src/external/gpl3/gcc/lib/libasan

2014-12-01 Thread Dennis Ferguson
Module Name:src
Committed By:   dennis
Date:   Tue Dec  2 03:20:39 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
Work around RISC-V compiler bug in gcc 4.8.3 (at least).
Should be reconsidered if the compiler is updated.
PR toolchain/49425


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libasan/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.7 src/external/gpl3/gcc/lib/libasan/Makefile:1.8
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.7	Thu Oct 23 23:31:26 2014
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Tue Dec  2 03:20:39 2014
@@ -56,4 +56,10 @@ CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIS
 LIBDPLIBS+=stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
 
+# Work around riscv compiler bugs in (at least) gcc 4.8.3
+.if ${MACHINE_ARCH} == riscv64
+COPTS.asan_allocator2.cc += -O0
+COPTS.sanitizer_netbsd.cc += -O0
+.endif
+
 .include bsd.lib.mk



CVS commit: src

2014-12-01 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec  2 03:51:49 UTC 2014

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man7: Makefile

Log Message:
Add missing src(7) reported by Patrick Welche.


To generate a diff of this commit:
cvs rdiff -u -r1.1490 -r1.1491 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.30 -r1.31 src/share/man/man7/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1490 src/distrib/sets/lists/man/mi:1.1491
--- src/distrib/sets/lists/man/mi:1.1490	Tue Dec  2 01:51:45 2014
+++ src/distrib/sets/lists/man/mi	Tue Dec  2 03:51:48 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1490 2014/12/02 01:51:45 pooka Exp $
+# $NetBSD: mi,v 1.1491 2014/12/02 03:51:48 msaitoh Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2243,6 +2243,7 @@
 ./usr/share/man/cat7/security.0			man-reference-catman	.cat
 ./usr/share/man/cat7/setuid.0			man-reference-catman	.cat
 ./usr/share/man/cat7/signal.0			man-reference-catman	.cat
+./usr/share/man/cat7/src.0			man-reference-catman	.cat
 ./usr/share/man/cat7/sticky.0			man-reference-catman	.cat
 ./usr/share/man/cat7/symlink.0			man-reference-catman	.cat
 ./usr/share/man/cat7/sysctl.0			man-reference-catman	.cat
@@ -5192,6 +5193,7 @@
 ./usr/share/man/html7/security.html		man-reference-htmlman	html
 ./usr/share/man/html7/setuid.html		man-reference-htmlman	html
 ./usr/share/man/html7/signal.html		man-reference-htmlman	html
+./usr/share/man/html7/src.html			man-reference-htmlman	html
 ./usr/share/man/html7/sticky.html		man-reference-htmlman	html
 ./usr/share/man/html7/symlink.html		man-reference-htmlman	html
 ./usr/share/man/html7/sysctl.html		man-reference-htmlman	html
@@ -8116,6 +8118,7 @@
 ./usr/share/man/man7/security.7			man-reference-man	.man
 ./usr/share/man/man7/setuid.7			man-reference-man	.man
 ./usr/share/man/man7/signal.7			man-reference-man	.man
+./usr/share/man/man7/src.7			man-reference-man	.man
 ./usr/share/man/man7/sticky.7			man-reference-man	.man
 ./usr/share/man/man7/symlink.7			man-reference-man	.man
 ./usr/share/man/man7/sysctl.7			man-reference-man	.man

Index: src/share/man/man7/Makefile
diff -u src/share/man/man7/Makefile:1.30 src/share/man/man7/Makefile:1.31
--- src/share/man/man7/Makefile:1.30	Wed Jul 31 11:57:24 2013
+++ src/share/man/man7/Makefile	Tue Dec  2 03:51:48 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2013/07/31 11:57:24 gdt Exp $
+#	$NetBSD: Makefile,v 1.31 2014/12/02 03:51:48 msaitoh Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include bsd.init.mk
@@ -7,8 +7,8 @@
 
 MAN=	ascii.7 c.7 environ.7 glob.7 hier.7 hostname.7 intro.7 mailaddr.7 \
 	module.7 nls.7 operator.7 orders.7 pkgsrc.7 release.7  rfc6056.7 \
-	security.7 script.7 setuid.7 signal.7 sticky.7 symlink.7 sysctl.7 \
-	tests.7
+	security.7 script.7 setuid.7 signal.7 src.7 sticky.7 symlink.7 \
+	sysctl.7 tests.7
 
 CLEANFILES=	tests.7
 .if ${MKKYUA} != no



CVS commit: src/sys

2014-12-01 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Dec  2 04:43:36 UTC 2014

Modified Files:
src/sys/kern: uipc_mbuf.c
src/sys/net: if.c if.h
src/sys/rump/librump/rumpnet: net_stub.c

Log Message:
Revert Pull if_drain routine out of m_reclaim

The commit broke dlopen()'d rumpnet on platforms where ld.so does not
override weak aliases (e.g. musl, Solaris, potentially OS X, ...).

Requested by pooka@.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.302 -r1.303 src/sys/net/if.c
cvs rdiff -u -r1.182 -r1.183 src/sys/net/if.h
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/librump/rumpnet/net_stub.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.159 src/sys/kern/uipc_mbuf.c:1.160
--- src/sys/kern/uipc_mbuf.c:1.159	Thu Nov 27 03:15:51 2014
+++ src/sys/kern/uipc_mbuf.c	Tue Dec  2 04:43:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.159 2014/11/27 03:15:51 ozaki-r Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.159 2014/11/27 03:15:51 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -543,6 +543,7 @@ m_reclaim(void *arg, int flags)
 {
 	struct domain *dp;
 	const struct protosw *pr;
+	struct ifnet *ifp;
 	int s;
 
 	KERNEL_LOCK(1, NULL);
@@ -553,7 +554,10 @@ m_reclaim(void *arg, int flags)
 			if (pr-pr_drain)
 (*pr-pr_drain)();
 	}
-	if_drain_all();
+	IFNET_FOREACH(ifp) {
+		if (ifp-if_drain)
+			(*ifp-if_drain)(ifp);
+	}
 	splx(s);
 	mbstat.m_drain++;
 	KERNEL_UNLOCK_ONE(NULL);

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.302 src/sys/net/if.c:1.303
--- src/sys/net/if.c:1.302	Mon Dec  1 07:15:42 2014
+++ src/sys/net/if.c	Tue Dec  2 04:43:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.302 2014/12/01 07:15:42 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.303 2014/12/02 04:43:35 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.302 2014/12/01 07:15:42 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.303 2014/12/02 04:43:35 ozaki-r Exp $);
 
 #include opt_inet.h
 
@@ -2329,17 +2329,6 @@ if_mcast_op(ifnet_t *ifp, const unsigned
 	return rc;
 }
 
-void
-if_drain_all(void)
-{
-	struct ifnet *ifp;
-
-	IFNET_FOREACH(ifp) {
-		if (ifp-if_drain)
-			(*ifp-if_drain)(ifp);
-	}
-}
-
 static void
 sysctl_sndq_setup(struct sysctllog **clog, const char *ifname,
 struct ifaltq *ifq)

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.182 src/sys/net/if.h:1.183
--- src/sys/net/if.h:1.182	Mon Dec  1 07:15:42 2014
+++ src/sys/net/if.h	Tue Dec  2 04:43:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.182 2014/12/01 07:15:42 ozaki-r Exp $	*/
+/*	$NetBSD: if.h,v 1.183 2014/12/02 04:43:35 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -962,7 +962,6 @@ extern struct ifnet_head ifnet_list;
 extern struct ifnet *lo0ifp;
 
 ifnet_t *	if_byindex(u_int);
-void		if_drain_all(void);
 
 /*
  * ifq sysctl support

Index: src/sys/rump/librump/rumpnet/net_stub.c
diff -u src/sys/rump/librump/rumpnet/net_stub.c:1.19 src/sys/rump/librump/rumpnet/net_stub.c:1.20
--- src/sys/rump/librump/rumpnet/net_stub.c:1.19	Thu Nov 27 03:15:51 2014
+++ src/sys/rump/librump/rumpnet/net_stub.c	Tue Dec  2 04:43:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: net_stub.c,v 1.19 2014/11/27 03:15:51 ozaki-r Exp $	*/
+/*	$NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: net_stub.c,v 1.19 2014/11/27 03:15:51 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $);
 
 #include sys/param.h
 #include sys/protosw.h
@@ -61,9 +61,7 @@ __weak_alias(agr_input,rumpnet_stub);
 __weak_alias(ieee8023ad_lacp_input,rumpnet_stub);
 __weak_alias(ieee8023ad_marker_input,rumpnet_stub);
 
-/* if */
 struct ifnet_head ifnet_list;
-__weak_alias(if_drain_all,rumpnet_stub);
 
 int
 compat_ifconf(u_long cmd, void *data)