CVS commit: src/sys/fs/smbfs

2014-12-21 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Dec 21 10:48:53 UTC 2014

Modified Files:
src/sys/fs/smbfs: smbfs.h smbfs_node.c smbfs_node.h smbfs_smb.c
smbfs_vfsops.c smbfs_vnops.c

Log Message:
Change smbfs from hashlist to vcache.
- Use (parent_vnode, name, name_len) as key.
- Change smbfs_nget() to return a referenced but unlocked vnode and
  adapt smbfs_setroot(), smbfs_create(), smbfs_mkdir() and smbfs_lookup().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/smbfs/smbfs.h
cvs rdiff -u -r1.52 -r1.53 src/sys/fs/smbfs/smbfs_node.c
cvs rdiff -u -r1.13 -r1.14 src/sys/fs/smbfs/smbfs_node.h
cvs rdiff -u -r1.46 -r1.47 src/sys/fs/smbfs/smbfs_smb.c
cvs rdiff -u -r1.103 -r1.104 src/sys/fs/smbfs/smbfs_vfsops.c
cvs rdiff -u -r1.92 -r1.93 src/sys/fs/smbfs/smbfs_vnops.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/fs/smbfs/smbfs.h
diff -u src/sys/fs/smbfs/smbfs.h:1.17 src/sys/fs/smbfs/smbfs.h:1.18
--- src/sys/fs/smbfs/smbfs.h:1.17	Sun Sep  7 13:13:04 2008
+++ src/sys/fs/smbfs/smbfs.h	Sun Dec 21 10:48:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs.h,v 1.17 2008/09/07 13:13:04 tron Exp $	*/
+/*	$NetBSD: smbfs.h,v 1.18 2014/12/21 10:48:53 hannken Exp $	*/
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -82,9 +82,6 @@ struct smbmount {
 	struct smb_share * 	sm_share;
 	struct smbnode *	sm_npstack[SMBFS_MAXPATHCOMP];
 	int			sm_caseopt;
-	kmutex_t		sm_hashlock;
-	LIST_HEAD(smbnode_hashhead, smbnode) *sm_hash;
-	u_long			sm_hashlen;
 	int			sm_didrele;
 };
 

Index: src/sys/fs/smbfs/smbfs_node.c
diff -u src/sys/fs/smbfs/smbfs_node.c:1.52 src/sys/fs/smbfs/smbfs_node.c:1.53
--- src/sys/fs/smbfs/smbfs_node.c:1.52	Tue Nov 25 12:33:13 2014
+++ src/sys/fs/smbfs/smbfs_node.c	Sun Dec 21 10:48:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_node.c,v 1.52 2014/11/25 12:33:13 nakayama Exp $	*/
+/*	$NetBSD: smbfs_node.c,v 1.53 2014/12/21 10:48:53 hannken Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbfs_node.c,v 1.52 2014/11/25 12:33:13 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: smbfs_node.c,v 1.53 2014/12/21 10:48:53 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -62,10 +62,6 @@ __KERNEL_RCSID(0, $NetBSD: smbfs_node.c
 #include fs/smbfs/smbfs_node.h
 #include fs/smbfs/smbfs_subr.h
 
-#define	SMBFS_NOHASH(smp, hval)	((smp)-sm_hash[(hval)  (smp)-sm_hashlen])
-
-MALLOC_JUSTDEFINE(M_SMBNODENAME, SMBFS nname, SMBFS node name);
-
 extern int (**smbfs_vnodeop_p)(void *);
 extern int prtactive;
 
@@ -75,37 +71,58 @@ static const struct genfs_ops smbfs_genf
 
 struct pool smbfs_node_pool;
 
-static inline char *
-smbfs_name_alloc(const u_char *name, int nmlen)
+int
+smbfs_loadvnode(struct mount *mp, struct vnode *vp,
+const void *key, size_t key_len, const void **new_key)
 {
-	u_char *cp;
+	struct smbnode *np;
+	
+	np = pool_get(smbfs_node_pool, PR_WAITOK);
+	memset(np, 0, sizeof(*np));
 
-	cp = malloc(nmlen, M_SMBNODENAME, M_WAITOK);
-	memcpy(cp, name, nmlen);
+	vp-v_tag = VT_SMBFS;
+	vp-v_op = smbfs_vnodeop_p;
+	vp-v_type = VNON;
+	vp-v_data = np;
+	genfs_node_init(vp, smbfs_genfsops);
 
-	return cp;
-}
+	mutex_init(np-n_lock, MUTEX_DEFAULT, IPL_NONE);
+	np-n_key = kmem_alloc(key_len, KM_SLEEP);
+	memcpy(np-n_key, key, key_len);
+	KASSERT(key_len == SMBFS_KEYSIZE(np-n_nmlen));
+	np-n_vnode = vp;
+	np-n_mount = VFSTOSMBFS(mp);
 
-static inline void
-smbfs_name_free(u_char *name)
-{
-	free(name, M_SMBNODENAME);
+	if (np-n_parent != NULL  (np-n_parent-v_vflag  VV_ROOT) == 0) {
+		vref(np-n_parent);
+		np-n_flag |= NREFPARENT;
+	}
+
+	*new_key = np-n_key;
+
+	return 0;
 }
 
-static int
-smbfs_node_alloc(struct mount *mp, struct vnode *dvp,
-	const char *name, int nmlen, struct smbfattr *fap, struct vnode **vpp)
+int
+smbfs_nget(struct mount *mp, struct vnode *dvp, const char *name, int nmlen,
+	struct smbfattr *fap, struct vnode **vpp)
 {
-	struct vattr vattr;
-	struct smbmount *smp = VFSTOSMBFS(mp);
-	struct smbnode_hashhead *nhpp;
-	struct smbnode *np, *np2;
+	struct smbkey *key;
+	struct smbmount *smp __diagused;
+	struct smbnode *np;
 	struct vnode *vp;
-	u_long hashval;
+	union {
+		struct smbkey u_key;
+		char u_data[64];
+	} small_key;
 	int error;
+	const int key_len = SMBFS_KEYSIZE(nmlen);
+
+	smp = VFSTOSMBFS(mp);
 
 	/* do not allow allocating root vnode twice */
 	KASSERT(dvp != NULL || smp-sm_root == NULL);
+
 	/* do not call with dot */
 	KASSERT(nmlen != 1 || name[0] != '.');
 
@@ -114,11 +131,8 @@ smbfs_node_alloc(struct mount *mp, struc
 			return EINVAL;
 		vp = VTOSMB(VTOSMB(dvp)-n_parent)-n_vnode;
 		vref(vp);
-		if ((error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY)) == 0)
-			*vpp = vp;
-		else
-			vrele(vp);
-		return (error);
+		*vpp = vp;
+		return 0;
 	}
 
 #ifdef DIAGNOSTIC
@@ -126,121 +140,71 @@ smbfs_node_alloc(struct mount *mp, struc
 	if (dnp == NULL  

CVS commit: src/tests/lib/libm

2014-12-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 21 15:37:03 UTC 2014

Modified Files:
src/tests/lib/libm: Makefile
Added Files:
src/tests/lib/libm: t_fenv.c

Log Message:
Add a test program for basic fenv.h rounding mode/exception mask testing.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_fenv.c

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

Modified files:

Index: src/tests/lib/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.26 src/tests/lib/libm/Makefile:1.27
--- src/tests/lib/libm/Makefile:1.26	Sun Aug 10 11:30:51 2014
+++ src/tests/lib/libm/Makefile	Sun Dec 21 15:37:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2014/08/10 11:30:51 martin Exp $
+# $NetBSD: Makefile,v 1.27 2014/12/21 15:37:03 martin Exp $
 
 .include bsd.own.mk
 
@@ -23,6 +23,7 @@ TESTS_C+=	t_cos
 TESTS_C+=	t_cosh
 TESTS_C+=	t_erf
 TESTS_C+=	t_exp
+TESTS_C+=	t_fenv
 TESTS_C+=	t_fmod
 TESTS_C+=	t_infinity
 TESTS_C+=	t_ldexp

Added files:

Index: src/tests/lib/libm/t_fenv.c
diff -u /dev/null src/tests/lib/libm/t_fenv.c:1.1
--- /dev/null	Sun Dec 21 15:37:03 2014
+++ src/tests/lib/libm/t_fenv.c	Sun Dec 21 15:37:03 2014
@@ -0,0 +1,205 @@
+/* $NetBSD: t_fenv.c,v 1.1 2014/12/21 15:37:03 martin Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Martin Husemann.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: t_fenv.c,v 1.1 2014/12/21 15:37:03 martin Exp $);
+
+#include atf-c.h
+
+#ifdef HAVE_FENV_H
+
+#include ieeefp.h
+#include stdlib.h
+#include fenv.h
+
+
+#if __arm__  !__SOFTFP__
+	/*
+	 * Some NEON fpus do not implement IEEE exception handling,
+	 * skip these tests if running on them and compiled for
+	 * hard float.
+	 */
+#define	FPU_PREREQ()			\
+	if (0 == fpsetmask(fpsetmask(FP_X_INV)))			\
+		atf_tc_skip(FPU does not implement exception handling);
+#endif
+
+#ifndef FPU_PREREQ
+#define	FPU_PREREQ()	/* nothing */
+#endif
+
+
+ATF_TC(fegetround);
+
+ATF_TC_HEAD(fegetround, tc)
+{
+	atf_tc_set_md_var(tc, descr,
+	verify the fegetround() function agrees with the legacy 
+	fpsetround);
+}
+
+ATF_TC_BODY(fegetround, tc)
+{
+	fpsetround(FP_RZ);
+	ATF_CHECK(fegetround() == FE_TOWARDZERO);
+	fpsetround(FP_RM);
+	ATF_CHECK(fegetround() == FE_DOWNWARD);
+	fpsetround(FP_RN);
+	ATF_CHECK(fegetround() == FE_TONEAREST);
+	fpsetround(FP_RP);
+	ATF_CHECK(fegetround() == FE_UPWARD);
+}
+
+ATF_TC(fesetround);
+
+ATF_TC_HEAD(fesetround, tc)
+{
+	atf_tc_set_md_var(tc, descr,
+	verify the fesetround() function agrees with the legacy 
+	fpgetround);
+}
+
+ATF_TC_BODY(fesetround, tc)
+{
+	fesetround(FE_TOWARDZERO);
+	ATF_CHECK(fpgetround() == FP_RZ);
+	fesetround(FE_DOWNWARD);
+	ATF_CHECK(fpgetround() == FP_RM);
+	fesetround(FE_TONEAREST);
+	ATF_CHECK(fpgetround() == FP_RN);
+	fesetround(FE_UPWARD);
+	ATF_CHECK(fpgetround() == FP_RP);
+}
+
+ATF_TC(fegetexcept);
+
+ATF_TC_HEAD(fegetexcept, tc)
+{
+	atf_tc_set_md_var(tc, descr,
+	verify the fegetexcept() function agrees with the legacy 
+	fpsetmask());
+}
+
+ATF_TC_BODY(fegetexcept, tc)
+{
+	FPU_PREREQ();
+
+	fpsetmask(0);
+	ATF_CHECK(fegetexcept() == 0);
+
+	fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
+	ATF_CHECK(fegetexcept() == (FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW
+	|FE_UNDERFLOW|FE_INEXACT));
+
+	fpsetmask(FP_X_INV);
+	ATF_CHECK(fegetexcept() == FE_INVALID);
+
+	fpsetmask(FP_X_DZ);
+	ATF_CHECK(fegetexcept() == FE_DIVBYZERO);
+
+	

CVS commit: src/distrib/sets/lists/tests

2014-12-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 21 15:38:27 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add new test program


To generate a diff of this commit:
cvs rdiff -u -r1.604 -r1.605 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.604 src/distrib/sets/lists/tests/mi:1.605
--- src/distrib/sets/lists/tests/mi:1.604	Sat Dec 20 07:02:25 2014
+++ src/distrib/sets/lists/tests/mi	Sun Dec 21 15:38:27 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.604 2014/12/20 07:02:25 uebayasi Exp $
+# $NetBSD: mi,v 1.605 2014/12/21 15:38:27 martin Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2869,6 +2869,7 @@
 ./usr/tests/lib/libm/t_cosh			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_erf			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_exp			tests-lib-tests		atf
+./usr/tests/lib/libm/t_fenv			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_floor			tests-obsolete		obsolete
 ./usr/tests/lib/libm/t_fmod			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_infinity			tests-lib-tests		atf



CVS commit: src/distrib/sets/lists/debug

2014-12-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 21 15:39:37 UTC 2014

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
Debug info for new test program


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/distrib/sets/lists/debug/mi

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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.96 src/distrib/sets/lists/debug/mi:1.97
--- src/distrib/sets/lists/debug/mi:1.96	Mon Dec  8 04:23:03 2014
+++ src/distrib/sets/lists/debug/mi	Sun Dec 21 15:39:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.96 2014/12/08 04:23:03 ozaki-r Exp $
+# $NetBSD: mi,v 1.97 2014/12/21 15:39:37 martin Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -2058,6 +2058,7 @@
 ./usr/libdata/debug/usr/tests/lib/libm/t_cosh.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_erf.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_exp.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libm/t_fenv.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_floor.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libm/t_fmod.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_infinity.debug			tests-lib-debug		debug,atf



CVS commit: src/sys/dev/raidframe

2014-12-21 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Sun Dec 21 17:04:12 UTC 2014

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Stop useless disklabel warning if there are wedges, using GPT partition.
Fix PR kern/47989.

XXX: Pullup 6 and 7 (maybe 5)


To generate a diff of this commit:
cvs rdiff -u -r1.316 -r1.317 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.316 src/sys/dev/raidframe/rf_netbsdkintf.c:1.317
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.316	Fri Nov 14 14:29:16 2014
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Sun Dec 21 17:04:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.317 2014/12/21 17:04:12 taca Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.317 2014/12/21 17:04:12 taca Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -800,6 +800,7 @@ raidopen(dev_t dev, int flags, int fmt,
 	pmask = (1  part);
 
 	if ((rs-sc_flags  RAIDF_INITED) 
+	(rs-sc_dkdev.dk_nwedges == 0) 
 	(rs-sc_dkdev.dk_openmask == 0))
 		raidgetdisklabel(dev);
 



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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 17:37:40 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_reg.h

Log Message:
add some A80 daudio and display regs


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 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_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.74 src/sys/arch/arm/allwinner/awin_reg.h:1.75
--- src/sys/arch/arm/allwinner/awin_reg.h:1.74	Sat Dec 20 16:22:17 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h	Sun Dec 21 17:37:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_reg.h,v 1.74 2014/12/20 16:22:17 skrll Exp $ */
+/* $NetBSD: awin_reg.h,v 1.75 2014/12/21 17:37:40 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -2674,6 +2674,11 @@ struct awin_a31_dma_desc {
  * These offsets are relative to AWIN_CORE_PBASE
  */
 #define AWIN_A80_SDMMC_COMM_OFFSET	0x00013000
+#define AWIN_A80_DE_BE0_OFFSET		0x0160
+#define AWIN_A80_DE_BE1_OFFSET		0x0164
+#define AWIN_A80_DE_BE2_OFFSET		0x0168
+#define AWIN_A80_LCD0_OFFSET		0x0200
+#define AWIN_A80_HDMI_OFFSET		0x0210
 #define AWIN_A80_CCU_OFFSET		0x0440
 #define AWIN_A80_CCU_SCLK_OFFSET	0x04400400
 #define AWIN_A80_PIO_OFFSET		0x04400800
@@ -2716,6 +2721,7 @@ struct awin_a31_dma_desc {
 #define AWIN_A80_CIR_OFFSET		0x2000
 #define AWIN_A80_RPIO_OFFSET		0x2c00
 #define AWIN_A80_RSB_OFFSET		0x3400
+#define AWIN_A80_DAUDIO1_OFFSET		0x6000
 
 #define AWIN_A80_SDMMC_COMM_SDC_RESET_SW	__BIT(18)
 #define AWIN_A80_SDMMC_COMM_SDC_CLOCK_SW	__BIT(16)
@@ -2739,6 +2745,13 @@ struct awin_a31_dma_desc {
 #define AWIN_A80_CCU_PLL_CxCPUX_FACTOR_N	__BITS(15,8)
 #define AWIN_A80_CCU_PLL_CxCPUX_POSTDIV_M	__BITS(1,0)
 
+#define AWIN_A80_CCU_PLL_AUDIO_ENABLE		__BIT(31)
+#define AWIN_A80_CCU_PLL_AUDIO_SDM_ENABLE	__BIT(24)
+#define AWIN_A80_CCU_PLL_AUDIO_OUTPUT_DIV	__BIT(18)
+#define AWIN_A80_CCU_PLL_AUDIO_INPUT_DIV	__BIT(16)
+#define AWIN_A80_CCU_PLL_AUDIO_FACTOR_N		__BITS(15,8)
+#define AWIN_A80_CCU_PLL_AUDIO_POSTDIV_P	__BITS(5,0)
+
 #define AWIN_A80_CCU_PLL_PERIPH0_ENABLE		__BIT(31)
 #define AWIN_A80_CCU_PLL_PERIPH0_SDM_ENABLE	__BIT(24)
 #define AWIN_A80_CCU_PLL_PERIPH0_OUTPUT_DIV	__BIT(18)
@@ -2795,6 +2808,8 @@ struct awin_a31_dma_desc {
 #define AWIN_A80_CCU_SCLK_SDMMC_OUTPUT_CLK_PHASE_CTR __BITS(10,8)
 #define AWIN_A80_CCU_SCLK_SDMMC_CLK_DIV_RATIO_M	__BITS(3,0)
 
+#define AWIN_A80_CCU_SCLK_DAUDIO_SCLK_GATING	__BIT(31)
+
 #define AWIN_A80_USBPHY_HCI_SCR_REG		0x
 #define AWIN_A80_USBPHY_HCI_PCR_REG		0x0004
 
@@ -2822,6 +2837,8 @@ struct awin_a31_dma_desc {
 
 #define AWIN_A80_RPRCM_APB0_GATING_REG		0x0028
 #define AWIN_A80_RPRCM_CIR_CLK_REG		0x0054
+#define AWIN_A80_RPRCM_DAUDIO0_CLK_REG		0x0058
+#define AWIN_A80_RPRCM_DAUDIO1_CLK_REG		0x005c
 #define AWIN_A80_RPRCM_APB0_RST_REG		0x00b0
 
 #define AWIN_A80_RPRCM_CLUSTER0_RST_REG		0x0004
@@ -2839,7 +2856,11 @@ struct awin_a31_dma_desc {
 #define AWIN_A80_RPRCM_PRIVATE_REG		0x0164
 
 #define AWIN_A80_RPRCM_APB0_GATING_CIR		__BIT(1)
+#define AWIN_A80_RPRCM_APB0_GATING_DAUDIO1	__BIT(18)
+#define AWIN_A80_RPRCM_APB0_GATING_DAUDIO0	__BIT(17)
 #define AWIN_A80_RPRCM_APB0_RST_CIR		__BIT(1)
+#define AWIN_A80_RPRCM_APB0_RST_DAUDIO1		__BIT(18)
+#define AWIN_A80_RPRCM_APB0_RST_DAUDIO0		__BIT(17)
 
 #define AWIN_A80_RCPUCFG_CLUSTER0_RST_REG	0x0080
 #define AWIN_A80_RCPUCFG_CLUSTER1_RST_REG	0x0084
@@ -2900,6 +2921,8 @@ struct awin_a31_dma_desc {
 #define AWIN_A80_PIO_PL_CIR_PINS	0x0040 /* PL pin 6 */
 
 #define AWIN_A80_PIO_PM_PINS		16
+#define AWIN_A80_PIO_PM_DAUDIO1_FUNC	3
+#define AWIN_A80_PIO_PM_DAUDIO1_PINS	0x7cf0 /* PM pins 14-10,7-4 */
 
 #define AWIN_A80_PIO_PN_PINS		2
 



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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 17:38:47 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_intr.h

Log Message:
add A80 R_DAUDIO irq


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/allwinner/awin_intr.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_intr.h
diff -u src/sys/arch/arm/allwinner/awin_intr.h:1.14 src/sys/arch/arm/allwinner/awin_intr.h:1.15
--- src/sys/arch/arm/allwinner/awin_intr.h:1.14	Sun Dec  7 18:32:13 2014
+++ src/sys/arch/arm/allwinner/awin_intr.h	Sun Dec 21 17:38:47 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_intr.h,v 1.14 2014/12/07 18:32:13 jmcneill Exp $ */
+/* $NetBSD: awin_intr.h,v 1.15 2014/12/21 17:38:47 jmcneill Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -200,6 +200,7 @@
 #define AWIN_A80_IRQ_NMI	64
 #define AWIN_A80_IRQ_R_CIR	69
 #define AWIN_A80_IRQ_R_RSB	71
+#define AWIN_A80_IRQ_R_DAUDIO	74
 #define AWIN_A80_IRQ_DMA	82
 #define AWIN_A80_IRQ_HSTIMER0	83
 #define AWIN_A80_IRQ_HSTIMER1	84



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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 17:40:17 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_io.c

Log Message:
add A80 debe, tcon, hdmi, daudio


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/allwinner/awin_io.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_io.c
diff -u src/sys/arch/arm/allwinner/awin_io.c:1.39 src/sys/arch/arm/allwinner/awin_io.c:1.40
--- src/sys/arch/arm/allwinner/awin_io.c:1.39	Sun Dec  7 18:32:13 2014
+++ src/sys/arch/arm/allwinner/awin_io.c	Sun Dec 21 17:40:17 2014
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.39 2014/12/07 18:32:13 jmcneill Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.40 2014/12/21 17:40:17 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -118,10 +118,15 @@ static const struct awin_locators awin_l
 	{ awinmp, OFFANDSIZE(MP), NOPORT, AWIN_A31_IRQ_MP, A31 },
 	{ awindebe, AWIN_DE_BE0_OFFSET, 0x1000, 0, NOINTR, A20|A31 },
 	{ awindebe, AWIN_DE_BE1_OFFSET, 0x1000, 1, NOINTR, A20|A31 },
+	{ awindebe, AWIN_A80_DE_BE0_OFFSET, 0x1000, 0, NOINTR, A80 },
+	{ awindebe, AWIN_A80_DE_BE1_OFFSET, 0x1000, 1, NOINTR, A80 },
+	{ awindebe, AWIN_A80_DE_BE2_OFFSET, 0x1000, 2, NOINTR, A80 },
 	{ awintcon, OFFANDSIZE(LCD0), 0, NOINTR, A20|A31 },
 	{ awintcon, OFFANDSIZE(LCD1), 1, NOINTR, A20|A31 },
+	{ awintcon, OFFANDSIZE(A80_LCD0), 0, NOINTR, A80 },
 	{ awinhdmi, OFFANDSIZE(HDMI), NOPORT, AWIN_IRQ_HDMI0, A20 },
 	{ awinhdmi, OFFANDSIZE(HDMI), NOPORT, AWIN_A31_IRQ_HDMI, A31 },
+	{ awinhdmi, OFFANDSIZE(A80_HDMI), NOPORT, AWIN_A80_IRQ_HDMI, A80 },
 	{ awinwdt, OFFANDSIZE(TMR), NOPORT, NOINTR, A10|A20|A31 },
 	{ awinwdt, OFFANDSIZE(A80_TIMER), NOPORT, NOINTR, A80 },
 	{ awinrtc, OFFANDSIZE(TMR), NOPORT, NOINTR, A10|A20 },
@@ -176,6 +181,7 @@ static const struct awin_locators awin_l
 	{ awincrypto, OFFANDSIZE(SS), NOPORT, AWIN_IRQ_SS, AANY },
 	{ awinac, OFFANDSIZE(AC), NOPORT, AWIN_IRQ_AC, A10|A20 },
 	{ awinac, OFFANDSIZE(AC), NOPORT, AWIN_A31_IRQ_AC, A31 },
+	{ awindaudio, OFFANDSIZE(A80_DAUDIO1), 1, AWIN_A80_IRQ_R_DAUDIO, A80 },
 	{ awinhdmiaudio, OFFANDSIZE(HDMI), NOPORT, NOINTR, A20 },
 	{ awinhdmiaudio, OFFANDSIZE(HDMI), NOPORT, NOINTR, A31 },
 	{ awinnand, OFFANDSIZE(NFC), NOPORT, AWIN_IRQ_NAND, A10|A20 },



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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 17:40:59 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_debe.c files.awin

Log Message:
add support for re-using a display mode setup by the bootloader


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/allwinner/files.awin

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.12 src/sys/arch/arm/allwinner/awin_debe.c:1.13
--- src/sys/arch/arm/allwinner/awin_debe.c:1.12	Mon Dec  8 10:48:22 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Sun Dec 21 17:40:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.12 2014/12/08 10:48:22 jmcneill Exp $ */
+/* $NetBSD: awin_debe.c,v 1.13 2014/12/21 17:40:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -37,7 +37,7 @@
 #define AWIN_DEBE_CURMAX	64
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.12 2014/12/08 10:48:22 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.13 2014/12/21 17:40:59 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -118,6 +118,9 @@ awin_debe_attach(device_t parent, device
 #if NAWIN_MP  0
 	device_t mpdev;
 #endif
+#ifdef AWIN_DEBE_FWINIT
+	struct videomode mode;
+#endif
 	int error;
 
 	sc-sc_dev = self;
@@ -139,7 +142,7 @@ awin_debe_attach(device_t parent, device
 		AWIN_A31_AHB_RESET1_REG,
 		AWIN_A31_AHB_RESET1_BE0_RST  loc-loc_port,
 		0);
-	} else {
+	} else if (awin_chip_id() == AWIN_CHIP_ID_A20) {
 		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
 		AWIN_BE0_SCLK_CFG_REG + (loc-loc_port * 4),
 		AWIN_BEx_CLK_RST,
@@ -160,7 +163,7 @@ awin_debe_attach(device_t parent, device
 			  AWIN_A31_BEx_CLK_SRC_SEL) |
 		__SHIFTIN(clk_div - 1, AWIN_BEx_CLK_DIV_RATIO_M),
 		AWIN_A31_BEx_CLK_SRC_SEL | AWIN_BEx_CLK_DIV_RATIO_M);
-	} else {
+	} else if (awin_chip_id() == AWIN_CHIP_ID_A20) {
 		uint32_t pll5x_freq = awin_pll5x_get_rate();
 		unsigned int clk_div = (pll5x_freq + 2) / 3;
 
@@ -176,23 +179,55 @@ awin_debe_attach(device_t parent, device
 		AWIN_BEx_CLK_SRC_SEL | AWIN_BEx_CLK_DIV_RATIO_M);
 	}
 
-	awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
-	AWIN_AHB_GATING1_REG, AWIN_AHB_GATING1_DE_BE0  loc-loc_port, 0);
+	if (awin_chip_id() == AWIN_CHIP_ID_A20 ||
+	awin_chip_id() == AWIN_CHIP_ID_A31) {
+		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_AHB_GATING1_REG,
+		AWIN_AHB_GATING1_DE_BE0  loc-loc_port, 0);
+
+		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_DRAM_CLK_REG,
+		AWIN_DRAM_CLK_BE0_DCLK_ENABLE  loc-loc_port, 0);
+
+		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
+		AWIN_BE0_SCLK_CFG_REG + (loc-loc_port * 4),
+		AWIN_CLK_ENABLE, 0);
+	}
 
-	awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
-	AWIN_DRAM_CLK_REG,
-	AWIN_DRAM_CLK_BE0_DCLK_ENABLE  loc-loc_port, 0);
-
-	awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
-	AWIN_BE0_SCLK_CFG_REG + (loc-loc_port * 4),
-	AWIN_CLK_ENABLE, 0);
+#ifdef AWIN_DEBE_FWINIT
+	const uint32_t modctl = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+	const uint32_t dissize = DEBE_READ(sc, AWIN_DEBE_DISSIZE_REG);
+	if ((modctl  AWIN_DEBE_MODCTL_EN) == 0) {
+		aprint_error_dev(sc-sc_dev, disabled\n);
+		return;
+	}
+	if ((modctl  AWIN_DEBE_MODCTL_START_CTL) == 0) {
+		aprint_error_dev(sc-sc_dev, stopped\n);
+		return;
+	}
+	memset(mode, 0, sizeof(mode));
+	mode.hdisplay = (dissize  0x) + 1;
 
+	if (mode.hdisplay == 1 || mode.vdisplay == 1) {
+		aprint_error_dev(sc-sc_dev,
+		couldn't determine video mode\n);
+		return;
+	}
+
+	aprint_verbose_dev(sc-sc_dev, using %dx%d mode from firmware\n,
+	mode.hdisplay, mode.vdisplay);
+
+	sc-sc_dmasize = mode.hdisplay * mode.vdisplay * 4;
+#else
 	for (unsigned int reg = 0x800; reg  0x1000; reg += 4) {
 		DEBE_WRITE(sc, reg, 0);
 	}
 
 	DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, AWIN_DEBE_MODCTL_EN);
 
+	sc-sc_dmasize = AWIN_DEBE_VIDEOMEM;
+#endif
+
 	DEBE_WRITE(sc, AWIN_DEBE_HWC_PALETTE_TABLE, 0);
 
 	error = awin_debe_alloc_videomem(sc);
@@ -211,6 +246,11 @@ awin_debe_attach(device_t parent, device
 		awin_mp_setbase(mpdev, pa, sc-sc_dmasize);
 	}
 #endif
+
+#ifdef AWIN_DEBE_FWINIT
+	awin_debe_set_videomode(mode);
+	awin_debe_enable(true);
+#endif
 }
 
 static int
@@ -218,9 +258,8 @@ awin_debe_alloc_videomem(struct awin_deb
 {
 	int error, nsegs;
 
-	sc-sc_dmasize = AWIN_DEBE_VIDEOMEM;
-	error = bus_dmamem_alloc(sc-sc_dmat, sc-sc_dmasize, 0,
-	sc-sc_dmasize, sc-sc_dmasegs, 1, nsegs, BUS_DMA_WAITOK);
+	error = bus_dmamem_alloc(sc-sc_dmat, sc-sc_dmasize, 0x1000, 0,
+	sc-sc_dmasegs, 1, nsegs, BUS_DMA_WAITOK);
 	if (error)
 		return error;
 	error = bus_dmamem_map(sc-sc_dmat, 

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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 17:42:12 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: ALLWINNER_A80

Log Message:
enable awindebe, genfb, wsdisplay


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/ALLWINNER_A80

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/evbarm/conf/ALLWINNER_A80
diff -u src/sys/arch/evbarm/conf/ALLWINNER_A80:1.13 src/sys/arch/evbarm/conf/ALLWINNER_A80:1.14
--- src/sys/arch/evbarm/conf/ALLWINNER_A80:1.13	Thu Dec 11 23:35:31 2014
+++ src/sys/arch/evbarm/conf/ALLWINNER_A80	Sun Dec 21 17:42:12 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: ALLWINNER_A80,v 1.13 2014/12/11 23:35:31 jmcneill Exp $
+#	$NetBSD: ALLWINNER_A80,v 1.14 2014/12/21 17:42:12 jmcneill Exp $
 #
 #	ALLWINNER_A80 - Allwinner A80 boards (Cubieboard4, OptimusBoard, etc)
 #
@@ -260,19 +260,21 @@ awge0		at awinio0 port ?
 
 # DE-BE
 #awindebe0	at awinio0 port 0
+awindebe0	at awinio0 port 1
+options 	AWIN_DEBE_FWINIT
 
 # Framebuffer
-#genfb0		at awindebe0
-#wsdisplay*	at genfb?
-#options 	VCONS_DRAW_INTR
-#options 	WSEMUL_VT100
-#options 	WS_KERNEL_FG=WSCOL_GREEN
-#options 	WS_KERNEL_BG=WSCOL_BLACK
-#options 	WSDISPLAY_COMPAT_PCVT
-#options 	WSDISPLAY_COMPAT_SYSCONS
-#options 	WSDISPLAY_COMPAT_USL
-#options 	WSDISPLAY_COMPAT_RAWKBD
-#options 	WSDISPLAY_DEFAULTSCREENS=4
+genfb0		at awindebe0
+wsdisplay*	at genfb?
+options 	VCONS_DRAW_INTR
+options 	WSEMUL_VT100
+options 	WS_KERNEL_FG=WSCOL_GREEN
+options 	WS_KERNEL_BG=WSCOL_BLACK
+options 	WSDISPLAY_COMPAT_PCVT
+options 	WSDISPLAY_COMPAT_SYSCONS
+options 	WSDISPLAY_COMPAT_USL
+options 	WSDISPLAY_COMPAT_RAWKBD
+options 	WSDISPLAY_DEFAULTSCREENS=4
 
 # On-board USB
 awinusb0	at awinio0 port 0



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

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec 21 18:36:05 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_debe.c

Log Message:
actually initialize mode.vdisplay


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/allwinner/awin_debe.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_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.13 src/sys/arch/arm/allwinner/awin_debe.c:1.14
--- src/sys/arch/arm/allwinner/awin_debe.c:1.13	Sun Dec 21 17:40:59 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Sun Dec 21 18:36:05 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.13 2014/12/21 17:40:59 jmcneill Exp $ */
+/* $NetBSD: awin_debe.c,v 1.14 2014/12/21 18:36:05 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -37,7 +37,7 @@
 #define AWIN_DEBE_CURMAX	64
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.13 2014/12/21 17:40:59 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.14 2014/12/21 18:36:05 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -207,6 +207,7 @@ awin_debe_attach(device_t parent, device
 	}
 	memset(mode, 0, sizeof(mode));
 	mode.hdisplay = (dissize  0x) + 1;
+	mode.vdisplay = ((dissize  16)  0x) + 1;
 
 	if (mode.hdisplay == 1 || mode.vdisplay == 1) {
 		aprint_error_dev(sc-sc_dev,



CVS commit: [netbsd-6] src/external/mit/xorg/server/xorg-server/Xi

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:03:40 UTC 2014

Modified Files:
src/external/mit/xorg/server/xorg-server/Xi [netbsd-6]: Makefile

Log Message:
Apply patch (requested by mrg in ticket 1208):
Pass -Wno-error to work around a build failure on vax with gcc 4.1


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 \
src/external/mit/xorg/server/xorg-server/Xi/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/mit/xorg/server/xorg-server/Xi/Makefile
diff -u src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4 src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4.4.1
--- src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4	Thu Aug 11 23:15:41 2011
+++ src/external/mit/xorg/server/xorg-server/Xi/Makefile	Sun Dec 21 19:03:40 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/08/11 23:15:41 joerg Exp $
+#	$NetBSD: Makefile,v 1.4.4.1 2014/12/21 19:03:40 snj Exp $
 
 .include ../Makefile.serverlib
 .include ../Makefile.servermod
@@ -38,5 +38,8 @@ CPPFLAGS+=  ${X11FLAGS.DIX}
 
 CWARNFLAGS.clang+=	-Wno-tautological-compare
 
+# XXX: uint16 vs INT_MAX
+COPTS.xichangehierarchy.c+=	-Wno-error
+
 .include bsd.x11.mk
 .include bsd.lib.mk



CVS commit: [netbsd-6] src/doc

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:04:46 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
update 1208


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.166 -r1.1.2.167 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.166 src/doc/CHANGES-6.2:1.1.2.167
--- src/doc/CHANGES-6.2:1.1.2.166	Sun Dec 14 15:16:30 2014
+++ src/doc/CHANGES-6.2	Sun Dec 21 19:04:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.166 2014/12/14 15:16:30 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.167 2014/12/21 19:04:46 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -4678,6 +4678,7 @@ sys/dev/pci/if_bnxvar.h1.4-1.6
 	From FreeBSD.
 	[msaitoh, #1207]
 
+external/mit/xorg/server/xorg-server/Xi/Makefile patch
 xsrc/external/mit/xorg-server/dist/configurepatch
 xsrc/external/mit/xorg-server/dist/configure.ac patch
 xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c patch



CVS commit: [netbsd-6-0] src/external/mit/xorg/server/xorg-server/Xi

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:05:22 UTC 2014

Modified Files:
src/external/mit/xorg/server/xorg-server/Xi [netbsd-6-0]: Makefile

Log Message:
Apply patch (requested by mrg in ticket 1208):
Pass -Wno-error to work around a build failure on vax with gcc 4.1


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 \
src/external/mit/xorg/server/xorg-server/Xi/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/mit/xorg/server/xorg-server/Xi/Makefile
diff -u src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4 src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4.10.1
--- src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4	Thu Aug 11 23:15:41 2011
+++ src/external/mit/xorg/server/xorg-server/Xi/Makefile	Sun Dec 21 19:05:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/08/11 23:15:41 joerg Exp $
+#	$NetBSD: Makefile,v 1.4.10.1 2014/12/21 19:05:22 snj Exp $
 
 .include ../Makefile.serverlib
 .include ../Makefile.servermod
@@ -38,5 +38,8 @@ CPPFLAGS+=  ${X11FLAGS.DIX}
 
 CWARNFLAGS.clang+=	-Wno-tautological-compare
 
+# XXX: uint16 vs INT_MAX
+COPTS.xichangehierarchy.c+=	-Wno-error
+
 .include bsd.x11.mk
 .include bsd.lib.mk



CVS commit: [netbsd-6-0] src/doc

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:05:57 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
update 1208


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.0.7

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-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.16 src/doc/CHANGES-6.0.7:1.1.2.17
--- src/doc/CHANGES-6.0.7:1.1.2.16	Sun Dec 14 14:06:26 2014
+++ src/doc/CHANGES-6.0.7	Sun Dec 21 19:05:57 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.16 2014/12/14 14:06:26 martin Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.17 2014/12/21 19:05:57 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -239,6 +239,7 @@ sys/dev/ppbus/ppbus_base.c			1.20
 	Fixes PR/49281.
 	[snj, ticket #1190]
 
+external/mit/xorg/server/xorg-server/Xi/Makefile patch
 xsrc/external/mit/xorg-server/dist/configurepatch
 xsrc/external/mit/xorg-server/dist/configure.ac patch
 xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c patch



CVS commit: [netbsd-6-1] src/external/mit/xorg/server/xorg-server/Xi

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:06:33 UTC 2014

Modified Files:
src/external/mit/xorg/server/xorg-server/Xi [netbsd-6-1]: Makefile

Log Message:
Apply patch (requested by mrg in ticket 1208):
Pass -Wno-error to work around a build failure on vax with gcc 4.1


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 \
src/external/mit/xorg/server/xorg-server/Xi/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/mit/xorg/server/xorg-server/Xi/Makefile
diff -u src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4 src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4.16.1
--- src/external/mit/xorg/server/xorg-server/Xi/Makefile:1.4	Thu Aug 11 23:15:41 2011
+++ src/external/mit/xorg/server/xorg-server/Xi/Makefile	Sun Dec 21 19:06:33 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/08/11 23:15:41 joerg Exp $
+#	$NetBSD: Makefile,v 1.4.16.1 2014/12/21 19:06:33 snj Exp $
 
 .include ../Makefile.serverlib
 .include ../Makefile.servermod
@@ -38,5 +38,8 @@ CPPFLAGS+=  ${X11FLAGS.DIX}
 
 CWARNFLAGS.clang+=	-Wno-tautological-compare
 
+# XXX: uint16 vs INT_MAX
+COPTS.xichangehierarchy.c+=	-Wno-error
+
 .include bsd.x11.mk
 .include bsd.lib.mk



CVS commit: [netbsd-6-1] src/doc

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:07:11 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Apply patch (requested by mrg in ticket 1208):
Pass -Wno-error to work around a build failure on vax with gcc 4.1


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.16 src/doc/CHANGES-6.1.6:1.1.2.17
--- src/doc/CHANGES-6.1.6:1.1.2.16	Sun Dec 14 14:05:42 2014
+++ src/doc/CHANGES-6.1.6	Sun Dec 21 19:07:11 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.16 2014/12/14 14:05:42 martin Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.17 2014/12/21 19:07:11 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -238,7 +238,7 @@ sys/dev/ppbus/ppbus_base.c			1.20
 	Fix debugging format in ppbus(4) reported by John D. Baker.
 	Fixes PR/49281.
 	[snj, ticket #1190]
-
+external/mit/xorg/server/xorg-server/Xi/Makefile patch
 xsrc/external/mit/xorg-server/dist/configurepatch
 xsrc/external/mit/xorg-server/dist/configure.ac patch
 xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c patch



CVS commit: [netbsd-6] src/external/mit/xorg

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 19:12:10 UTC 2014

Modified Files:
src/external/mit/xorg/lib/fontconfig/etc [netbsd-6]: fonts.conf
src/external/mit/xorg/lib/fontconfig/etc/conf.avail [netbsd-6]:
Makefile
src/external/mit/xorg/lib/fontconfig/etc/conf.d [netbsd-6]: Makefile
src/external/mit/xorg/lib/fontconfig/src [netbsd-6]: Makefile
Makefile.fcarch shlib_version
src/external/mit/xorg/tools/fc-cache [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1178):
external/mit/xorg/lib/fontconfig/etc/fonts.conf patch
external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile patch
external/mit/xorg/lib/fontconfig/etc/conf.d/Makefilepatch
external/mit/xorg/lib/fontconfig/src/Makefile   patch
external/mit/xorg/lib/fontconfig/src/Makefile.fcarchpatch
external/mit/xorg/lib/fontconfig/src/shlib_version  patch
external/mit/xorg/tools/fc-cache/Makefile   patch
xsrc/external/mit/fontconfig/Makefile.ampatch
xsrc/external/mit/fontconfig/Makefile.inpatch
xsrc/external/mit/fontconfig/ac_check_symbol.m4 patch
xsrc/external/mit/fontconfig/ax_cc_for_build.m4 patch
xsrc/external/mit/fontconfig/ax_create_stdint_h.m4  patch
xsrc/external/mit/fontconfig/ax_pthread.m4  patch
xsrc/external/mit/fontconfig/fc-pattern.1   patch
xsrc/external/mit/fontconfig/fc-pattern.c   patch
xsrc/external/mit/fontconfig/fc-pattern.sgmlpatch
xsrc/external/mit/fontconfig/fc-validate.1  patch
xsrc/external/mit/fontconfig/fc-validate.c  patch
xsrc/external/mit/fontconfig/fc-validate.sgml   patch
xsrc/external/mit/fontconfig/libtool.m4 patch
xsrc/external/mit/fontconfig/ltoptions.m4   patch
xsrc/external/mit/fontconfig/ltsugar.m4 patch
xsrc/external/mit/fontconfig/ltversion.m4   patch
xsrc/external/mit/fontconfig/lt~obsolete.m4 patch
xsrc/external/mit/fontconfig/dist/Tools.mk  patch
xsrc/external/mit/fontconfig/dist/compile   patch
xsrc/external/mit/fontconfig/dist/config-fixups.h   patch
xsrc/external/mit/fontconfig/dist/configure.ac  patch
xsrc/external/mit/fontconfig/dist/test-driver   patch
xsrc/external/mit/fontconfig/dist/conf.d/10-scale-bitmap-fonts.conf patch
xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-default.conf  patch
xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-legacy.conf   patch
xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-light.confpatch
xsrc/external/mit/fontconfig/dist/conf.d/README.in  patch
xsrc/external/mit/fontconfig/dist/doc/FcCacheCreateTagFile.3patch
xsrc/external/mit/fontconfig/dist/doc/FcCharSetDelChar.3patch
xsrc/external/mit/fontconfig/dist/doc/FcConfigGetSysRoot.3  patch
xsrc/external/mit/fontconfig/dist/doc/FcConfigSetSysRoot.3  patch
xsrc/external/mit/fontconfig/dist/doc/FcDirCacheClean.3 patch
xsrc/external/mit/fontconfig/dist/doc/FcDirCacheRescan.3patch
xsrc/external/mit/fontconfig/dist/doc/FcGetDefaultLangs.3   patch
xsrc/external/mit/fontconfig/dist/doc/FcLangNormalize.3 patch
xsrc/external/mit/fontconfig/dist/doc/FcLangSetDel.3patch
xsrc/external/mit/fontconfig/dist/doc/FcLangSetSubtract.3   patch
xsrc/external/mit/fontconfig/dist/doc/FcLangSetUnion.3  patch
xsrc/external/mit/fontconfig/dist/doc/FcStrListFirst.3  patch
xsrc/external/mit/fontconfig/dist/doc/fcatomic.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcblanks.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fccache.sgml  patch
xsrc/external/mit/fontconfig/dist/doc/fccharset.sgmlpatch
xsrc/external/mit/fontconfig/dist/doc/fcconfig.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcconstant.sgml   patch
xsrc/external/mit/fontconfig/dist/doc/fcdircache.sgml   patch
xsrc/external/mit/fontconfig/dist/doc/fcfile.sgml   patch
xsrc/external/mit/fontconfig/dist/doc/fcfontset.sgmlpatch
xsrc/external/mit/fontconfig/dist/doc/fcformat.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcfreetype.sgml   patch
xsrc/external/mit/fontconfig/dist/doc/fcinit.sgml   patch
xsrc/external/mit/fontconfig/dist/doc/fclangset.sgmlpatch
xsrc/external/mit/fontconfig/dist/doc/fcmatrix.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcobjectset.sgml  patch
xsrc/external/mit/fontconfig/dist/doc/fcobjecttype.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcpattern.sgmlpatch
xsrc/external/mit/fontconfig/dist/doc/fcstring.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcstrset.sgml patch
xsrc/external/mit/fontconfig/dist/doc/fcvalue.sgml  patch
xsrc/external/mit/fontconfig/dist/doc/fontconfig-devel/fccachecreatetagfile.html
 patch
xsrc/external/mit/fontconfig/dist/doc/fontconfig-devel/fccharsetdelchar.html
patch

CVS commit: [netbsd-6] xsrc/external/mit/fontconfig

2014-12-21 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Sun Dec 21 19:13:34 UTC 2014

Modified Files:
xsrc/external/mit/fontconfig/dist [netbsd-6]: COPYING ChangeLog INSTALL
Makefile.am Makefile.in README acinclude.m4 aclocal.m4 config.guess
config.h.in config.sub configure configure.in depcomp
fontconfig.pc.in fontconfig.spec fonts.conf.in fonts.dtd install-sh
ltmain.sh missing
xsrc/external/mit/fontconfig/dist/conf.d [netbsd-6]: 10-autohint.conf
10-no-sub-pixel.conf 10-sub-pixel-bgr.conf 10-sub-pixel-rgb.conf
10-sub-pixel-vbgr.conf 10-sub-pixel-vrgb.conf 10-unhinted.conf
20-fix-globaladvance.conf 20-unhint-small-vera.conf
25-unhint-nonlatin.conf 30-metric-aliases.conf 30-urw-aliases.conf
40-nonlatin.conf 45-latin.conf 50-user.conf 65-fonts-persian.conf
65-nonlatin.conf 80-delicious.conf Makefile.am Makefile.in README
xsrc/external/mit/fontconfig/dist/doc [netbsd-6]: FcAtomicCreate.3
FcAtomicDeleteNew.3 FcAtomicDestroy.3 FcAtomicLock.3
FcAtomicNewFile.3 FcAtomicOrigFile.3 FcAtomicReplaceOrig.3
FcAtomicUnlock.3 FcBlanksAdd.3 FcBlanksCreate.3 FcBlanksDestroy.3
FcBlanksIsMember.3 FcCacheCopySet.3 FcCacheDir.3 FcCacheNumFont.3
FcCacheNumSubdir.3 FcCacheSubdir.3 FcCharSetAddChar.3
FcCharSetCopy.3 FcCharSetCount.3 FcCharSetCoverage.3
FcCharSetCreate.3 FcCharSetDestroy.3 FcCharSetEqual.3
FcCharSetFirstPage.3 FcCharSetHasChar.3 FcCharSetIntersect.3
FcCharSetIntersectCount.3 FcCharSetIsSubset.3 FcCharSetMerge.3
FcCharSetNew.3 FcCharSetNextPage.3 FcCharSetSubtract.3
FcCharSetSubtractCount.3 FcCharSetUnion.3 FcConfigAppFontAddDir.3
FcConfigAppFontAddFile.3 FcConfigAppFontClear.3
FcConfigBuildFonts.3 FcConfigCreate.3 FcConfigDestroy.3
FcConfigEnableHome.3 FcConfigFilename.3 FcConfigGetBlanks.3
FcConfigGetCache.3 FcConfigGetCacheDirs.3 FcConfigGetConfigDirs.3
FcConfigGetConfigFiles.3 FcConfigGetCurrent.3 FcConfigGetFontDirs.3
FcConfigGetFonts.3 FcConfigGetRescanInterval.3 FcConfigHome.3
FcConfigParseAndLoad.3 FcConfigReference.3 FcConfigSetCurrent.3
FcConfigSetRescanInterval.3 FcConfigSubstitute.3
FcConfigSubstituteWithPat.3 FcConfigUptoDate.3
FcDefaultSubstitute.3 FcDirCacheLoad.3 FcDirCacheLoadFile.3
FcDirCacheRead.3 FcDirCacheUnlink.3 FcDirCacheUnload.3
FcDirCacheValid.3 FcDirSave.3 FcDirScan.3 FcFileIsDir.3
FcFileScan.3 FcFini.3 FcFontList.3 FcFontMatch.3
FcFontRenderPrepare.3 FcFontSetAdd.3 FcFontSetCreate.3
FcFontSetDestroy.3 FcFontSetList.3 FcFontSetMatch.3
FcFontSetPrint.3 FcFontSetSort.3 FcFontSetSortDestroy.3
FcFontSort.3 FcFreeTypeCharIndex.3 FcFreeTypeCharSet.3
FcFreeTypeCharSetAndSpacing.3 FcFreeTypeQuery.3
FcFreeTypeQueryFace.3 FcGetLangs.3 FcGetVersion.3 FcInit.3
FcInitBringUptoDate.3 FcInitLoadConfig.3 FcInitLoadConfigAndFonts.3
FcInitReinitialize.3 FcIsLower.3 FcIsUpper.3 FcLangGetCharSet.3
FcLangSetAdd.3 FcLangSetCompare.3 FcLangSetContains.3
FcLangSetCopy.3 FcLangSetCreate.3 FcLangSetDestroy.3
FcLangSetEqual.3 FcLangSetGetLangs.3 FcLangSetHasLang.3
FcLangSetHash.3 FcMatrixCopy.3 FcMatrixEqual.3 FcMatrixInit.3
FcMatrixMultiply.3 FcMatrixRotate.3 FcMatrixScale.3 FcMatrixShear.3
FcNameConstant.3 FcNameGetConstant.3 FcNameGetObjectType.3
FcNameParse.3 FcNameRegisterConstants.3 FcNameRegisterObjectTypes.3
FcNameUnparse.3 FcNameUnregisterConstants.3
FcNameUnregisterObjectTypes.3 FcObjectSetAdd.3 FcObjectSetBuild.3
FcObjectSetCreate.3 FcObjectSetDestroy.3 FcPatternAdd-Type.3
FcPatternAdd.3 FcPatternAddWeak.3 FcPatternBuild.3
FcPatternCreate.3 FcPatternDel.3 FcPatternDestroy.3
FcPatternDuplicate.3 FcPatternEqual.3 FcPatternEqualSubset.3
FcPatternFilter.3 FcPatternFormat.3 FcPatternGet-Type.3
FcPatternGet.3 FcPatternHash.3 FcPatternPrint.3
FcPatternReference.3 FcPatternRemove.3 FcStrBasename.3 FcStrCmp.3
FcStrCmpIgnoreCase.3 FcStrCopy.3 FcStrCopyFilename.3 FcStrDirname.3
FcStrDowncase.3 FcStrFree.3 FcStrListCreate.3 FcStrListDone.3
FcStrListNext.3 FcStrPlus.3 FcStrSetAdd.3 FcStrSetAddFilename.3
FcStrSetCreate.3 FcStrSetDel.3 FcStrSetDestroy.3 FcStrSetEqual.3
FcStrSetMember.3 FcStrStr.3 FcStrStrIgnoreCase.3 FcToLower.3
FcUcs4ToUtf8.3 FcUtf16Len.3 FcUtf16ToUcs4.3 FcUtf8Len.3
FcUtf8ToUcs4.3 FcValueDestroy.3 FcValueEqual.3 FcValuePrint.3
FcValueSave.3 Makefile.am Makefile.in confdir.sgml.in edit-sgml.c

CVS commit: [netbsd-6] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 19:13:57 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1178.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.167 -r1.1.2.168 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.167 src/doc/CHANGES-6.2:1.1.2.168
--- src/doc/CHANGES-6.2:1.1.2.167	Sun Dec 21 19:04:46 2014
+++ src/doc/CHANGES-6.2	Sun Dec 21 19:13:57 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.167 2014/12/21 19:04:46 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.168 2014/12/21 19:13:57 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -4803,3 +4803,803 @@ sys/dev/ic/rtl8169.c1.142
 	reported by the hardware.
 	[uwe, ticket #1212]
 
+external/mit/xorg/lib/fontconfig/etc/fonts.conf		patch
+external/mit/xorg/lib/fontconfig/etc/conf.avail/Makefile patch
+external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile	patch
+external/mit/xorg/lib/fontconfig/src/Makefile		patch
+external/mit/xorg/lib/fontconfig/src/Makefile.fcarch	patch
+external/mit/xorg/lib/fontconfig/src/shlib_version	patch
+external/mit/xorg/tools/fc-cache/Makefile	patch
+xsrc/external/mit/fontconfig/Makefile.am	patch
+xsrc/external/mit/fontconfig/Makefile.in	patch
+xsrc/external/mit/fontconfig/ac_check_symbol.m4	patch
+xsrc/external/mit/fontconfig/ax_cc_for_build.m4	patch
+xsrc/external/mit/fontconfig/ax_create_stdint_h.m4	patch
+xsrc/external/mit/fontconfig/ax_pthread.m4		patch
+xsrc/external/mit/fontconfig/fc-pattern.1		patch
+xsrc/external/mit/fontconfig/fc-pattern.c		patch
+xsrc/external/mit/fontconfig/fc-pattern.sgml		patch
+xsrc/external/mit/fontconfig/fc-validate.1		patch
+xsrc/external/mit/fontconfig/fc-validate.c		patch
+xsrc/external/mit/fontconfig/fc-validate.sgml		patch
+xsrc/external/mit/fontconfig/libtool.m4			patch
+xsrc/external/mit/fontconfig/ltoptions.m4		patch
+xsrc/external/mit/fontconfig/ltsugar.m4			patch
+xsrc/external/mit/fontconfig/ltversion.m4		patch
+xsrc/external/mit/fontconfig/lt~obsolete.m4		patch
+xsrc/external/mit/fontconfig/dist/Tools.mk		patch
+xsrc/external/mit/fontconfig/dist/compile		patch
+xsrc/external/mit/fontconfig/dist/config-fixups.h	patch
+xsrc/external/mit/fontconfig/dist/configure.ac		patch
+xsrc/external/mit/fontconfig/dist/test-driver		patch
+xsrc/external/mit/fontconfig/dist/conf.d/10-scale-bitmap-fonts.conf	patch
+xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-default.conf	patch
+xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-legacy.conf	patch
+xsrc/external/mit/fontconfig/dist/conf.d/11-lcdfilter-light.conf	patch
+xsrc/external/mit/fontconfig/dist/conf.d/README.in		patch
+xsrc/external/mit/fontconfig/dist/doc/FcCacheCreateTagFile.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcCharSetDelChar.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcConfigGetSysRoot.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcConfigSetSysRoot.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcDirCacheClean.3		patch
+xsrc/external/mit/fontconfig/dist/doc/FcDirCacheRescan.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcGetDefaultLangs.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcLangNormalize.3		patch
+xsrc/external/mit/fontconfig/dist/doc/FcLangSetDel.3		patch
+xsrc/external/mit/fontconfig/dist/doc/FcLangSetSubtract.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcLangSetUnion.3	patch
+xsrc/external/mit/fontconfig/dist/doc/FcStrListFirst.3	patch
+xsrc/external/mit/fontconfig/dist/doc/fcatomic.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcblanks.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fccache.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fccharset.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcconfig.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcconstant.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcdircache.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcfile.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcfontset.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcformat.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcfreetype.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcinit.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fclangset.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcmatrix.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcobjectset.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcobjecttype.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcpattern.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcstring.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcstrset.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fcvalue.sgml	patch
+xsrc/external/mit/fontconfig/dist/doc/fontconfig-devel/fccachecreatetagfile.html patch
+xsrc/external/mit/fontconfig/dist/doc/fontconfig-devel/fccharsetdelchar.html	patch

CVS commit: [netbsd-7] src/crypto/external/bsd/netpgp/dist/src/netpgpkeys

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:24:22 UTC 2014

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys [netbsd-7]:
netpgpkeys.c

Log Message:
Pull up following revision(s) (requested by agc in ticket #334):
crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c: revision 
1.26
Fix bug report from Jared - actually print the key when exporting


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.14.1 \
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.25 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.25.14.1
--- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.25	Wed Feb 22 06:58:55 2012
+++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c	Sun Dec 21 19:24:22 2014
@@ -196,6 +196,7 @@ static int
 netpgp_cmd(netpgp_t *netpgp, prog_t *p, char *f)
 {
 	char	*key;
+	char	*s;
 
 	switch (p-cmd) {
 	case LIST_KEYS:
@@ -211,8 +212,10 @@ netpgp_cmd(netpgp_t *netpgp, prog_t *p, 
 			key = netpgp_getvar(netpgp, userid);
 		}
 		if (key) {
-			printf(%s, key);
-			return 1;
+			if ((s = netpgp_export_key(netpgp, key)) != NULL) {
+printf(%s, s);
+return 1;
+			}
 		}
 		(void) fprintf(stderr, key '%s' not found\n, f);
 		return 0;



CVS commit: [netbsd-7] src/usr.sbin/perfused

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:27:11 UTC 2014

Modified Files:
src/usr.sbin/perfused [netbsd-7]: perfused.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #335):
usr.sbin/perfused/perfused.c: revision 1.25
Survive if filesystem installs a signal handler
We tested for signal(3) to return 0 for success, which is incorrect:
signal(3) returns the previous handler. Success should be tested as
!= SIG_ERR, otherwise we fail when a signal handler was previously
installed by perfused(8) parrent process, which happens to be the
FUSE filesystem.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.10.1 src/usr.sbin/perfused/perfused.c

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

Modified files:

Index: src/usr.sbin/perfused/perfused.c
diff -u src/usr.sbin/perfused/perfused.c:1.24 src/usr.sbin/perfused/perfused.c:1.24.10.1
--- src/usr.sbin/perfused/perfused.c:1.24	Sat Jul 21 05:49:42 2012
+++ src/usr.sbin/perfused/perfused.c	Sun Dec 21 19:27:11 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfused.c,v 1.24 2012/07/21 05:49:42 manu Exp $ */
+/*  $NetBSD: perfused.c,v 1.24.10.1 2014/12/21 19:27:11 snj Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -298,7 +298,7 @@ new_mount(int fd, int pmnt_flags)
 		 could not open \%s\,
 		 _PATH_VAR_RUN_PERFUSE_TRACE);
 
-	if (signal(SIGUSR1, sigusr1_handler) != 0)
+	if (signal(SIGUSR1, sigusr1_handler) == SIG_ERR)
 		DERR(EX_OSERR, signal failed);
 
 	/*
@@ -399,7 +399,7 @@ parse_options(int argc, char **argv)
 			perfuse_diagflags |= parse_debug(optarg);
 			break;
 		case 's':
-			if (signal(SIGINFO, siginfo_handler) != 0)
+			if (signal(SIGINFO, siginfo_handler) == SIG_ERR)
 DERR(EX_OSERR, signal failed);
 			break;
 		case 'f':



CVS commit: [netbsd-7] src/usr.sbin/cpuctl

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:28:38 UTC 2014

Modified Files:
src/usr.sbin/cpuctl [netbsd-7]: cpuctl.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #336):
usr.sbin/cpuctl/cpuctl.c: revision 1.25
Fix a bug that an unknown command is printed as (null).
Reported by Fredrik Pettai.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.4.1 src/usr.sbin/cpuctl/cpuctl.c

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

Modified files:

Index: src/usr.sbin/cpuctl/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.23 src/usr.sbin/cpuctl/cpuctl.c:1.23.4.1
--- src/usr.sbin/cpuctl/cpuctl.c:1.23	Mon Dec 23 12:35:33 2013
+++ src/usr.sbin/cpuctl/cpuctl.c	Sun Dec 21 19:28:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuctl.c,v 1.23 2013/12/23 12:35:33 msaitoh Exp $	*/
+/*	$NetBSD: cpuctl.c,v 1.23.4.1 2014/12/21 19:28:38 snj Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include sys/cdefs.h
-__RCSID($NetBSD: cpuctl.c,v 1.23 2013/12/23 12:35:33 msaitoh Exp $);
+__RCSID($NetBSD: cpuctl.c,v 1.23.4.1 2014/12/21 19:28:38 snj Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -119,7 +119,7 @@ main(int argc, char **argv)
 	}
 
 	if (ct-label == NULL)
-		errx(EXIT_FAILURE, unknown command ``%s'', argv[optind]);
+		errx(EXIT_FAILURE, unknown command ``%s'', argv[0]);
 
 	close(fd);
 	exit(EXIT_SUCCESS);



CVS commit: [netbsd-7] src/lib/libpci

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:30:20 UTC 2014

Modified Files:
src/lib/libpci [netbsd-7]: pci.3

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #337):
lib/libpci/pci.3: revision 1.10
  Add int showclass argument to pci_devinfo(). The API was changed 10 years
ago.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.2.1 src/lib/libpci/pci.3

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

Modified files:

Index: src/lib/libpci/pci.3
diff -u src/lib/libpci/pci.3:1.9 src/lib/libpci/pci.3:1.9.2.1
--- src/lib/libpci/pci.3:1.9	Fri Jul 25 10:21:34 2014
+++ src/lib/libpci/pci.3	Sun Dec 21 19:30:20 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: pci.3,v 1.9 2014/07/25 10:21:34 wiz Exp $
+.\	$NetBSD: pci.3,v 1.9.2.1 2014/12/21 19:30:20 snj Exp $
 .\
 .\ Copyright 2001 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd July 24, 2014
+.Dd December 16, 2014
 .Dt PCI 3
 .Os
 .Sh NAME
@@ -56,7 +56,7 @@
 .Ft char *
 .Fn pci_findvendor pcireg_t id_reg
 .Ft void
-.Fn pci_devinfo pcireg_t id_reg pcireg_t class_reg char *devinfo size_t len
+.Fn pci_devinfo pcireg_t id_reg pcireg_t class_reg int showclass char *devinfo size_t len
 .Ft void
 .Fn pci_conf_print int pcifd u_int bus u_int dev u_int func
 .Ft int
@@ -128,6 +128,9 @@ The description is placed into the buffe
 .Fa devinfo ;
 the size of that buffer is specified in
 .Fa len .
+If
+.Fa showclass
+is not 0, the class, subclass and interface are added into the buffer.
 .It Fn pci_conf_print
 Print the PCI configuration information for the device located
 at



CVS commit: [netbsd-7] src/sys/dev/pci

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:32:48 UTC 2014

Modified Files:
src/sys/dev/pci [netbsd-7]: if_wpi.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #338):
sys/dev/pci/if_wpi.c: revision 1.69
Consistently take the interface down when the radio swicth is off.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.2.1 src/sys/dev/pci/if_wpi.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/pci/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.68 src/sys/dev/pci/if_wpi.c:1.68.2.1
--- src/sys/dev/pci/if_wpi.c:1.68	Fri Aug  8 10:17:07 2014
+++ src/sys/dev/pci/if_wpi.c	Sun Dec 21 19:32:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wpi.c,v 1.68 2014/08/08 10:17:07 jmcneill Exp $	*/
+/*	$NetBSD: if_wpi.c,v 1.68.2.1 2014/12/21 19:32:48 snj Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.68 2014/08/08 10:17:07 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.68.2.1 2014/12/21 19:32:48 snj Exp $);
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -3170,6 +3170,7 @@ wpi_init(struct ifnet *ifp)
 	if (wpi_getrfkill(sc)) {
 		aprint_error_dev(sc-sc_dev,
 		radio is disabled by hardware switch\n);
+		ifp-if_flags = ~IFF_UP;
 		error = EBUSY;
 		goto fail1;
 	}



CVS commit: [netbsd-7] src/doc

2014-12-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Dec 21 19:34:13 UTC 2014

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

Log Message:
334-338


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.134 -r1.1.2.135 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.134 src/doc/CHANGES-7.0:1.1.2.135
--- src/doc/CHANGES-7.0:1.1.2.134	Wed Dec 17 19:27:37 2014
+++ src/doc/CHANGES-7.0	Sun Dec 21 19:34:13 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.134 2014/12/17 19:27:37 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.135 2014/12/21 19:34:13 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3644,3 +3644,30 @@ doc/3RDPARTY		1.1165
 	* Various bug fixes.
 	[christos, #331]
 
+crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c 1.26
+
+	Make netpgp-keys --export actually export the desired key.
+	[agc, ticket #334]
+
+usr.sbin/perfused/perfused.c			1.25
+
+	Survive if the filesystem installs a signal handler.
+	[manu, ticket #335]
+
+usr.sbin/cpuctl/cpuctl.c			1.25
+
+	Fix a bug that an unknown command is printed as (null).
+	[msaitoh, ticket #336]
+
+lib/libpci/pci.31.10
+
+	Update documentation to reflect the int showclass argument
+	to pci_devinfo().
+	[msaitoh, ticket #337]
+
+sys/dev/pci/if_wpi.c1.69
+
+	Consistently take the interface down when the radio swicth
+	is off.
+	[bouyer, ticket #338]
+



CVS commit: src/usr.sbin/postinstall

2014-12-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 21 20:14:33 UTC 2014

Modified Files:
src/usr.sbin/postinstall: postinstall.8

Log Message:
PR/49428: Travis Paul: Document x option.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/postinstall/postinstall.8

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.8
diff -u src/usr.sbin/postinstall/postinstall.8:1.16 src/usr.sbin/postinstall/postinstall.8:1.17
--- src/usr.sbin/postinstall/postinstall.8:1.16	Wed Aug 15 12:21:41 2012
+++ src/usr.sbin/postinstall/postinstall.8	Sun Dec 21 15:14:33 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: postinstall.8,v 1.16 2012/08/15 16:21:41 apb Exp $
+.\	$NetBSD: postinstall.8,v 1.17 2014/12/21 20:14:33 christos Exp $
 .\
 .\ Copyright (c) 2005-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd August 15, 2012
+.Dd December 21, 2014
 .Dt POSTINSTALL 8
 .Os
 .Sh NAME
@@ -39,6 +39,7 @@
 .Op Fl d Ar destdir
 .Op Fl m Ar machine
 .Op Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
+.Op Fl x Ar xsrcdir
 .Ar operation
 .Op Ar item Op ...
 .Sh DESCRIPTION
@@ -118,6 +119,9 @@ The
 .Dq Pa xetc.tgz
 set file is optional.
 .El
+.It Fl x Ar xsrcdir
+Location of the X11 source files.
+This must be a directory that contains a NetBSD xsrc tree.
 .El
 .Pp
 The



CVS commit: [netbsd-6] src/sys/arch/arm/broadcom

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:19:21 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6]: bcm2835_tmr.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.5
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4	Wed Feb 13 01:36:14 2013
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Sun Dec 21 20:19:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.5 2014/12/21 20:19:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.5 2014/12/21 20:19:21 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -201,7 +201,7 @@ clockhandler(void *arg)
 	if (!(status  BCM2835_STIMER_M3))
 		return 0;
 
-	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, status);
+	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3);
 
 	hardclock(frame);
 



CVS commit: [netbsd-6-1] src/sys/arch/arm/broadcom

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:21:10 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6-1]: bcm2835_tmr.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.4.2.1 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4.2.1
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.4	Wed Feb 13 01:36:14 2013
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Sun Dec 21 20:21:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.4.2.1 2014/12/21 20:21:10 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.4 2013/02/13 01:36:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.4.2.1 2014/12/21 20:21:10 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -201,7 +201,7 @@ clockhandler(void *arg)
 	if (!(status  BCM2835_STIMER_M3))
 		return 0;
 
-	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, status);
+	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3);
 
 	hardclock(frame);
 



CVS commit: [netbsd-6-0] src/sys/arch/arm/broadcom

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:21:28 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-6-0]: bcm2835_tmr.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.2.4.1 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.2 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.2.4.1
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.1.2.2	Thu Aug  9 06:36:50 2012
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Sun Dec 21 20:21:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.2 2012/08/09 06:36:50 jdc Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.1.2.2.4.1 2014/12/21 20:21:28 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.2 2012/08/09 06:36:50 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.1.2.2.4.1 2014/12/21 20:21:28 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -204,7 +204,7 @@ clockhandler(void *arg)
 	if (!(status  BCM2835_STIMER_M3))
 		return 0;
 
-	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, status);
+	bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3);
 
 	hardclock(frame);
 



CVS commit: [netbsd-6] src/usr.sbin/perfused

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:24:41 UTC 2014

Modified Files:
src/usr.sbin/perfused [netbsd-6]: perfused.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #1215):
usr.sbin/perfused/perfused.c: revision 1.25
Survive if filesystem installs a signal handler
We tested for signal(3) to return 0 for success, which is incorrect:
signal(3) returns the previous handler. Success should be tested as
!= SIG_ERR, otherwise we fail when a signal handler was previously
installed by perfused(8) parrent process, which happens to be the
FUSE filesystem.


To generate a diff of this commit:
cvs rdiff -u -r1.22.2.2 -r1.22.2.3 src/usr.sbin/perfused/perfused.c

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

Modified files:

Index: src/usr.sbin/perfused/perfused.c
diff -u src/usr.sbin/perfused/perfused.c:1.22.2.2 src/usr.sbin/perfused/perfused.c:1.22.2.3
--- src/usr.sbin/perfused/perfused.c:1.22.2.2	Sun Aug 12 13:13:21 2012
+++ src/usr.sbin/perfused/perfused.c	Sun Dec 21 20:24:40 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfused.c,v 1.22.2.2 2012/08/12 13:13:21 martin Exp $ */
+/*  $NetBSD: perfused.c,v 1.22.2.3 2014/12/21 20:24:40 msaitoh Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -298,7 +298,7 @@ new_mount(int fd, int pmnt_flags)
 		 could not open \%s\,
 		 _PATH_VAR_RUN_PERFUSE_TRACE);
 
-	if (signal(SIGUSR1, sigusr1_handler) != 0)
+	if (signal(SIGUSR1, sigusr1_handler) == SIG_ERR)
 		DERR(EX_OSERR, signal failed);
 
 	/*
@@ -399,7 +399,7 @@ parse_options(int argc, char **argv)
 			perfuse_diagflags |= parse_debug(optarg);
 			break;
 		case 's':
-			if (signal(SIGINFO, siginfo_handler) != 0)
+			if (signal(SIGINFO, siginfo_handler) == SIG_ERR)
 DERR(EX_OSERR, signal failed);
 			break;
 		case 'f':



CVS commit: [netbsd-6] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:26:30 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1214 and 1215.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.168 -r1.1.2.169 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.168 src/doc/CHANGES-6.2:1.1.2.169
--- src/doc/CHANGES-6.2:1.1.2.168	Sun Dec 21 19:13:57 2014
+++ src/doc/CHANGES-6.2	Sun Dec 21 20:26:30 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.168 2014/12/21 19:13:57 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.169 2014/12/21 20:26:30 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -5603,3 +5603,15 @@ xsrc/external/mit/fontconfig/include/fcf
 
 	Update fontconfig to version 2.11.1.
 	[mrg, ticket #1178]
+
+sys/arch/arm/broadcom/bcm2835_tmr.c		1.4
+
+	Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
+	are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
+	Addresses PR 48805.
+	[nat, ticket #1214]
+
+usr.sbin/perfused/perfused.c			1.25
+
+	Survive if filesystem installs a signal handler.
+	[manu, ticket #1215]



CVS commit: [netbsd-6-1] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:28:13 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Ticket 1214.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.17 src/doc/CHANGES-6.1.6:1.1.2.18
--- src/doc/CHANGES-6.1.6:1.1.2.17	Sun Dec 21 19:07:11 2014
+++ src/doc/CHANGES-6.1.6	Sun Dec 21 20:28:13 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.17 2014/12/21 19:07:11 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.18 2014/12/21 20:28:13 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -238,6 +238,7 @@ sys/dev/ppbus/ppbus_base.c			1.20
 	Fix debugging format in ppbus(4) reported by John D. Baker.
 	Fixes PR/49281.
 	[snj, ticket #1190]
+
 external/mit/xorg/server/xorg-server/Xi/Makefile patch
 xsrc/external/mit/xorg-server/dist/configurepatch
 xsrc/external/mit/xorg-server/dist/configure.ac patch
@@ -341,3 +342,9 @@ sys/compat/netbsd32/netbsd32_compat_30.c
 	Prevent a user-triggerable kmem_alloc(0).
 	[maxv, ticket #1209]
 
+sys/arch/arm/broadcom/bcm2835_tmr.c		1.4
+
+	Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
+	are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
+	Addresses PR 48805.
+	[nat, ticket #1214]



CVS commit: [netbsd-6-0] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:28:59 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Ticket 1214.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-6.0.7

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-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.17 src/doc/CHANGES-6.0.7:1.1.2.18
--- src/doc/CHANGES-6.0.7:1.1.2.17	Sun Dec 21 19:05:57 2014
+++ src/doc/CHANGES-6.0.7	Sun Dec 21 20:28:59 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.17 2014/12/21 19:05:57 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.18 2014/12/21 20:28:59 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -342,3 +342,9 @@ sys/compat/netbsd32/netbsd32_compat_30.c
 	Prevent a user-triggerable kmem_alloc(0).
 	[maxv, ticket #1209]
 
+sys/arch/arm/broadcom/bcm2835_tmr.c		1.4
+
+	Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
+	are used by the VideoCore on Raspberry Pi.  This fixes audio playback.
+	Addresses PR 48805.
+	[nat, ticket #1214]



CVS commit: [netbsd-5] src/sys/dev/ic

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:49:43 UTC 2014

Modified Files:
src/sys/dev/ic [netbsd-5]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1936):
sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.105.4.9 -r1.105.4.10 src/sys/dev/ic/rtl8169.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/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.105.4.9 src/sys/dev/ic/rtl8169.c:1.105.4.10
--- src/sys/dev/ic/rtl8169.c:1.105.4.9	Wed Jan 25 18:02:44 2012
+++ src/sys/dev/ic/rtl8169.c	Sun Dec 21 20:49:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.105.4.10 2014/12/21 20:49:43 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.10 2014/12/21 20:49:43 msaitoh Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1276,9 +1276,19 @@ re_rxeof(struct rtk_softc *sc)
 		M_CSUM_TCP_UDP_BAD;
 } else if (RE_UDPPKT(rxstat)) {
 	m-m_pkthdr.csum_flags |= M_CSUM_UDPv4;
-	if (rxstat  RE_RDESC_STAT_UDPSUMBAD)
-		m-m_pkthdr.csum_flags |=
-		M_CSUM_TCP_UDP_BAD;
+	if (rxstat  RE_RDESC_STAT_UDPSUMBAD) {
+		/*
+		 * XXX: 8139C+ thinks UDP csum
+		 * 0x is bad, force software
+		 * calculation.
+		 */
+		if (sc-sc_quirk  RTKQ_8139CPLUS)
+			m-m_pkthdr.csum_flags
+			= ~M_CSUM_UDPv4;
+		else
+			m-m_pkthdr.csum_flags
+			|= M_CSUM_TCP_UDP_BAD;
+	}
 }
 			}
 		} else {



CVS commit: [netbsd-5] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:51:04 UTC 2014

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket 1936.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.86 -r1.1.2.87 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.86 src/doc/CHANGES-5.3:1.1.2.87
--- src/doc/CHANGES-5.3:1.1.2.86	Mon Dec 15 07:12:24 2014
+++ src/doc/CHANGES-5.3	Sun Dec 21 20:51:04 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.86 2014/12/15 07:12:24 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.87 2014/12/21 20:51:04 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1267,3 +1267,9 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8103
 	[mrg, ticket #1935]
 
+sys/dev/ic/rtl8169.c1.142
+
+	RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
+	Force software recalculation of UDP checksum if bad checksum is
+	reported by the hardware.
+	[uwe, ticket #1936]



CVS commit: src/usr.sbin/postinstall

2014-12-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 21 21:10:13 UTC 2014

Modified Files:
src/usr.sbin/postinstall: postinstall.8

Log Message:
Use Nx.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/postinstall/postinstall.8

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall.8
diff -u src/usr.sbin/postinstall/postinstall.8:1.17 src/usr.sbin/postinstall/postinstall.8:1.18
--- src/usr.sbin/postinstall/postinstall.8:1.17	Sun Dec 21 20:14:33 2014
+++ src/usr.sbin/postinstall/postinstall.8	Sun Dec 21 21:10:13 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: postinstall.8,v 1.17 2014/12/21 20:14:33 christos Exp $
+.\	$NetBSD: postinstall.8,v 1.18 2014/12/21 21:10:13 wiz Exp $
 .\
 .\ Copyright (c) 2005-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -121,7 +121,9 @@ set file is optional.
 .El
 .It Fl x Ar xsrcdir
 Location of the X11 source files.
-This must be a directory that contains a NetBSD xsrc tree.
+This must be a directory that contains a
+.Nx
+xsrc tree.
 .El
 .Pp
 The



CVS commit: src/sys/dev

2014-12-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 21 22:21:03 UTC 2014

Modified Files:
src/sys/dev: midi_if.h

Log Message:
fix the midi_if documentation to properly describe the locks that will
be held during various operations.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/midi_if.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/midi_if.h
diff -u src/sys/dev/midi_if.h:1.25 src/sys/dev/midi_if.h:1.26
--- src/sys/dev/midi_if.h:1.25	Mon Apr  9 10:18:16 2012
+++ src/sys/dev/midi_if.h	Sun Dec 21 22:21:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: midi_if.h,v 1.25 2012/04/09 10:18:16 plunky Exp $	*/
+/*	$NetBSD: midi_if.h,v 1.26 2014/12/21 22:21:03 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -50,11 +50,11 @@ struct midi_info {
  *
  *	METHOD			INTR	NOTES
  *	--- --- -
- *	open 			-	
- *	close 			-	
- *	output 			-	
- *	getinfo 		-	Called at attach time
- *	ioctl 			-	
+ *	open 			held	
+ *	close 			held	
+ *	output 			held	
+ *	getinfo 		held	Called at attach time
+ *	ioctl 			held	
  *	get_locks 		-	Called at attach time
  */
 



CVS commit: src/sys/dev/usb

2014-12-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 21 23:00:35 UTC 2014

Modified Files:
src/sys/dev/usb: FILES umidi.c umidi_quirks.c
Removed Files:
src/sys/dev/usb: umidireg.h umidivar.h

Log Message:
various umidi clean ups:
- move the contents of umidi{reg,var}.h into umidi.c directly as they
  are not referenced by any other file.
- remove the useless include of umidi{reg,var}.h from umidi_quirks.c.
- add reference counting and wait/broadcast support to the IO paths.
- fix the error handling in midi_attach() and midi_open().
- sprinkle KASSERT() in several places.
- drop the local interrupt lock before calling into various parts of
  the USB code.  fixes lockdebug issues, and likely hangs.
- rename binded member as bound.

with these most of the panics and problems i've seen are gone.  there
is still one lockdebug panic to deal with that happens when unplugging
umidi while midiplay(1) is running.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/FILES
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/umidi.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/umidi_quirks.c
cvs rdiff -u -r1.8 -r0 src/sys/dev/usb/umidireg.h
cvs rdiff -u -r1.19 -r0 src/sys/dev/usb/umidivar.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/FILES
diff -u src/sys/dev/usb/FILES:1.12 src/sys/dev/usb/FILES:1.13
--- src/sys/dev/usb/FILES:1.12	Tue Jan 17 03:49:20 2012
+++ src/sys/dev/usb/FILES	Sun Dec 21 23:00:35 2014
@@ -55,8 +55,6 @@ umassvar.h		definitions for umass.c
 umidi.c			USB MIDI driver
 umidi_quirks.c		Strange MIDI devices
 umidi_quirks.h		  and definitions for it
-umidireg.h		Protocol definitions for umidi.c
-umidivar.h		definitions for umidi.c
 umodem.c		USB modem (CDC ACM) driver
 ums.c			USB mouse driver
 urio.c			USB Diamond Rio500 driver

Index: src/sys/dev/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.65 src/sys/dev/usb/umidi.c:1.66
--- src/sys/dev/usb/umidi.c:1.65	Tue Jan 22 21:29:53 2013
+++ src/sys/dev/usb/umidi.c	Sun Dec 21 23:00:35 2014
@@ -1,6 +1,7 @@
-/*	$NetBSD: umidi.c,v 1.65 2013/01/22 21:29:53 jmcneill Exp $	*/
+/*	$NetBSD: umidi.c,v 1.66 2014/12/21 23:00:35 mrg Exp $	*/
+
 /*
- * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
+ * Copyright (c) 2001, 2012, 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -31,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.65 2013/01/22 21:29:53 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.66 2014/12/21 23:00:35 mrg Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -54,13 +55,162 @@ __KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.
 
 #include dev/auconv.h
 #include dev/usb/usbdevs.h
-#include dev/usb/uaudioreg.h
-#include dev/usb/umidireg.h
-#include dev/usb/umidivar.h
 #include dev/usb/umidi_quirks.h
-
 #include dev/midi_if.h
 
+/* Jack Descriptor */
+#define UMIDI_MS_HEADER	0x01
+#define UMIDI_IN_JACK	0x02
+#define UMIDI_OUT_JACK	0x03
+
+/* Jack Type */
+#define UMIDI_EMBEDDED	0x01
+#define UMIDI_EXTERNAL	0x02
+
+/* generic, for iteration */
+typedef struct {
+	uByte		bLength;
+	uByte		bDescriptorType;
+	uByte		bDescriptorSubtype;
+} UPACKED umidi_cs_descriptor_t;
+
+typedef struct {
+	uByte		bLength;
+	uByte		bDescriptorType;
+	uByte		bDescriptorSubtype;
+	uWord		bcdMSC;
+	uWord		wTotalLength;
+} UPACKED umidi_cs_interface_descriptor_t;
+#define UMIDI_CS_INTERFACE_DESCRIPTOR_SIZE 7
+
+typedef struct {
+	uByte		bLength;
+	uByte		bDescriptorType;
+	uByte		bDescriptorSubtype;
+	uByte		bNumEmbMIDIJack;
+} UPACKED umidi_cs_endpoint_descriptor_t;
+#define UMIDI_CS_ENDPOINT_DESCRIPTOR_SIZE 4
+
+typedef struct {
+	uByte		bLength;
+	uByte		bDescriptorType;
+	uByte		bDescriptorSubtype;
+	uByte		bJackType;
+	uByte		bJackID;
+} UPACKED umidi_jack_descriptor_t;
+#define	UMIDI_JACK_DESCRIPTOR_SIZE	5
+
+
+#define TO_D(p) ((usb_descriptor_t *)(p))
+#define NEXT_D(desc) TO_D((char *)(desc)+(desc)-bLength)
+#define TO_IFD(desc) ((usb_interface_descriptor_t *)(desc))
+#define TO_CSIFD(desc) ((umidi_cs_interface_descriptor_t *)(desc))
+#define TO_EPD(desc) ((usb_endpoint_descriptor_t *)(desc))
+#define TO_CSEPD(desc) ((umidi_cs_endpoint_descriptor_t *)(desc))
+
+
+#define UMIDI_PACKET_SIZE 4
+
+/*
+ * hierarchie
+ *
+ * -- parent	   child --
+ *
+ * umidi(sc) - endpoint - jack   - (dynamically assignable) - mididev
+ *	   ^	 |^	|
+ *	   +-++-+
+ */
+
+/* midi device */
+struct umidi_mididev {
+	struct umidi_softc	*sc;
+	device_t		mdev;
+	/* */
+	struct umidi_jack	*in_jack;
+	struct umidi_jack	*out_jack;
+	char			*label;
+	size_t			label_len;
+	/* */
+	int			opened;
+	int			closing;
+	int			flags;
+};
+
+/* Jack Information */
+struct umidi_jack {
+	struct umidi_endpoint	*endpoint;
+	/* */
+	int			cable_number;
+	void			*arg;
+	int			bound;
+	int			opened;
+	unsigned char		

CVS commit: src/sys/arch

2014-12-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Dec 22 00:07:24 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_board.c awin_io.c awin_reg.h
awin_var.h
src/sys/arch/evbarm/awin: awin_start.S

Log Message:
read chip ID from SRAM ver reg on A80; the chip ID is 0x1639


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/allwinner/awin_board.c \
src/sys/arch/arm/allwinner/awin_var.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arm/allwinner/awin_io.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/arm/allwinner/awin_reg.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/awin/awin_start.S

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_board.c
diff -u src/sys/arch/arm/allwinner/awin_board.c:1.33 src/sys/arch/arm/allwinner/awin_board.c:1.34
--- src/sys/arch/arm/allwinner/awin_board.c:1.33	Sun Dec  7 18:32:13 2014
+++ src/sys/arch/arm/allwinner/awin_board.c	Mon Dec 22 00:07:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_board.c,v 1.33 2014/12/07 18:32:13 jmcneill Exp $	*/
+/*	$NetBSD: awin_board.c,v 1.34 2014/12/22 00:07:24 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.33 2014/12/07 18:32:13 jmcneill Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.34 2014/12/22 00:07:24 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -59,6 +59,7 @@ __KERNEL_RCSID(1, $NetBSD: awin_board.c
 
 bus_space_handle_t awin_core_bsh;
 #if defined(ALLWINNER_A80)
+bus_space_handle_t awin_core2_bsh;
 bus_space_handle_t awin_rcpus_bsh;
 #endif
 
@@ -194,6 +195,11 @@ awin_bootstrap(vaddr_t iobase, vaddr_t u
 	KASSERT(awin_core_bsh == iobase);
 
 #ifdef ALLWINNER_A80
+	error = bus_space_map(awin_bs_tag, AWIN_A80_CORE2_PBASE,
+	AWIN_A80_CORE2_SIZE, 0, awin_core2_bsh);
+	if (error)
+		panic(%s: failed to map awin %s registers: %d,
+		__func__, core2, error);
 	error = bus_space_map(awin_bs_tag, AWIN_A80_RCPUS_PBASE,
 	AWIN_A80_RCPUS_SIZE, 0, awin_rcpus_bsh);
 	if (error)
@@ -301,25 +307,26 @@ uint16_t
 awin_chip_id(void)
 {
 #if defined(ALLWINNER_A80)
-	return AWIN_CHIP_ID_A80;
+	bus_space_handle_t bsh = awin_core2_bsh;
 #else
+	bus_space_handle_t bsh = awin_core_bsh;
+#endif
 	static uint16_t chip_id = 0;
 	uint32_t ver;
 
 	if (!chip_id) {
-		ver = bus_space_read_4(awin_bs_tag, awin_core_bsh,
+		ver = bus_space_read_4(awin_bs_tag, bsh,
 		AWIN_SRAM_OFFSET + AWIN_SRAM_VER_REG);
 		ver |= AWIN_SRAM_VER_R_EN;
-		bus_space_write_4(awin_bs_tag, awin_core_bsh,
+		bus_space_write_4(awin_bs_tag, bsh,
 		AWIN_SRAM_OFFSET + AWIN_SRAM_VER_REG, ver);
-		ver = bus_space_read_4(awin_bs_tag, awin_core_bsh,
+		ver = bus_space_read_4(awin_bs_tag, bsh,
 		AWIN_SRAM_OFFSET + AWIN_SRAM_VER_REG);
 
 		chip_id = __SHIFTOUT(ver, AWIN_SRAM_VER_KEY_FIELD);
 	}
 
 	return chip_id;
-#endif
 }
 
 const char *
Index: src/sys/arch/arm/allwinner/awin_var.h
diff -u src/sys/arch/arm/allwinner/awin_var.h:1.33 src/sys/arch/arm/allwinner/awin_var.h:1.34
--- src/sys/arch/arm/allwinner/awin_var.h:1.33	Sun Dec  7 18:32:13 2014
+++ src/sys/arch/arm/allwinner/awin_var.h	Mon Dec 22 00:07:24 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_var.h,v 1.33 2014/12/07 18:32:13 jmcneill Exp $ */
+/* $NetBSD: awin_var.h,v 1.34 2014/12/22 00:07:24 jmcneill Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -94,6 +94,7 @@ extern struct bus_space awin_bs_tag;
 extern struct bus_space awin_a4x_bs_tag;
 extern bus_space_handle_t awin_core_bsh;
 #if defined(ALLWINNER_A80)
+extern bus_space_handle_t awin_core2_bsh;
 extern bus_space_handle_t awin_rcpus_bsh;
 #endif
 extern struct arm32_bus_dma_tag awin_dma_tag;
@@ -117,7 +118,7 @@ void	awin_cpu_hatch(struct cpu_info *);
 #define AWIN_CHIP_ID_A31	AWIN_SRAM_VER_KEY_A31
 #define AWIN_CHIP_ID_A23	AWIN_SRAM_VER_KEY_A23
 #define AWIN_CHIP_ID_A20	AWIN_SRAM_VER_KEY_A20
-#define AWIN_CHIP_ID_A80	0xff80	/* fake; no chip ID register */
+#define AWIN_CHIP_ID_A80	AWIN_SRAM_VER_KEY_A80
 uint16_t awin_chip_id(void);
 const char *awin_chip_name(void);
 

Index: src/sys/arch/arm/allwinner/awin_io.c
diff -u src/sys/arch/arm/allwinner/awin_io.c:1.40 src/sys/arch/arm/allwinner/awin_io.c:1.41
--- src/sys/arch/arm/allwinner/awin_io.c:1.40	Sun Dec 21 17:40:17 2014
+++ src/sys/arch/arm/allwinner/awin_io.c	Mon Dec 22 00:07:24 2014
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.40 2014/12/21 17:40:17 jmcneill Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.41 2014/12/22 00:07:24 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -228,13 +228,12 @@ awinio_attach(device_t parent, device_t 
 	switch (awin_chip_id()) {
 #ifdef ALLWINNER_A80
 	case AWIN_CHIP_ID_A80:
+		sc-sc_a80_core2_bsh = awin_core2_bsh;
 		sc-sc_a80_rcpus_bsh 

CVS commit: [netbsd-7] src/usr.bin/shmif_dumpbus

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 01:59:14 UTC 2014

Modified Files:
src/usr.bin/shmif_dumpbus [netbsd-7]: shmif_dumpbus.c

Log Message:
Pull up following revision(s) (requested by gson in ticket #343):
usr.bin/shmif_dumpbus/shmif_dumpbus.c: revision 1.12-1.17
- support endian-independent operation on all platforms.
- fix tyop in error message.
- make name more descriptive: SWAPME - FIXENDIAN.
- Add compat for bus version 2.
- Fixes tests, but, XXX, should add tests for bus version 3.
- quasi-cosmetic nit to previous: limit variable scope.
- Might as well byteswap when we assign to local variables instead of when
  we use said variables.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/usr.bin/shmif_dumpbus/shmif_dumpbus.c

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

Modified files:

Index: src/usr.bin/shmif_dumpbus/shmif_dumpbus.c
diff -u src/usr.bin/shmif_dumpbus/shmif_dumpbus.c:1.11 src/usr.bin/shmif_dumpbus/shmif_dumpbus.c:1.11.4.1
--- src/usr.bin/shmif_dumpbus/shmif_dumpbus.c:1.11	Fri Dec 20 10:04:33 2013
+++ src/usr.bin/shmif_dumpbus/shmif_dumpbus.c	Mon Dec 22 01:59:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: shmif_dumpbus.c,v 1.11 2013/12/20 10:04:33 pooka Exp $	*/
+/*	$NetBSD: shmif_dumpbus.c,v 1.11.4.1 2014/12/22 01:59:14 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -33,7 +33,7 @@
 #include rump/rumpuser_port.h
 
 #ifndef lint
-__RCSID($NetBSD: shmif_dumpbus.c,v 1.11 2013/12/20 10:04:33 pooka Exp $);
+__RCSID($NetBSD: shmif_dumpbus.c,v 1.11.4.1 2014/12/22 01:59:14 msaitoh Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -69,15 +69,49 @@ usage(void)
 }
 
 #define BUFSIZE 64*1024
-#ifdef __NetBSD__
-#define SWAPME(a) (doswap ? bswap32(a) : (a))
-#define SWAPME64(a) (doswap ? bswap64(a) : (a))
-#else
-/* lazy, but let's assume everyone uses shmif_dumpbus only locally */
-#define SWAPME(a) (a)
-#define SWAPME64(a) (a)
-#define bswap32(a) (a)
-#endif
+
+/*
+ * byte swapdom
+ */
+static uint32_t
+swp32(uint32_t x)
+{
+	uint32_t v;
+
+	v = (((x)  0xff00)  24) |
+	(((x)  0x00ff)   8) |
+	(((x)  0xff00)   8) |
+	(((x)  0x00ff)  24);
+	return v;
+}
+
+static uint64_t
+swp64(uint64_t x)
+{
+	uint64_t v;
+
+	v = (((x)  0xff00ull)  56) |
+	(((x)  0x00ffull)  40) |
+	(((x)  0xff00ull)  24) |
+	(((x)  0x00ffull)   8) |
+	(((x)  0xff00ull)   8) |
+	(((x)  0x00ffull)  24) |
+	(((x)  0xff00ull)  40) |
+	(((x)  0x00ffull)  56);
+	return v;
+}
+
+#define FIXENDIAN32(x) (doswap ? swp32(x) : (x))
+#define FIXENDIAN64(x) (doswap ? swp64(x) : (x))
+
+/* compat for bus version 2 */
+struct shmif_pkthdr2 {
+	uint32_t sp_len;
+
+	uint32_t sp_sec;
+	uint32_t sp_usec;
+};
+
 int
 main(int argc, char *argv[])
 {
@@ -92,6 +126,7 @@ main(int argc, char *argv[])
 	bool hflag = false, doswap = false;
 	pcap_dumper_t *pdump;
 	FILE *dumploc = stdout;
+	int useversion;
 
 #ifdef PLATFORM_HAS_SETGETPROGNAME
 	setprogname(argv[0]);
@@ -133,22 +168,28 @@ main(int argc, char *argv[])
 	bmem = busmem;
 
 	if (bmem-shm_magic != SHMIF_MAGIC) {
-		if (bmem-shm_magic != bswap32(SHMIF_MAGIC))
+		if (bmem-shm_magic != swp32(SHMIF_MAGIC))
 			errx(1, %s not a shmif bus, argv[0]);
-		doswap = 1;
+		doswap = true;
+	}
+	if (FIXENDIAN32(bmem-shm_version) != SHMIF_VERSION) {
+		if (FIXENDIAN32(bmem-shm_version) != 2) {
+			errx(1, bus version %d, program %d,
+			FIXENDIAN32(bmem-shm_version), SHMIF_VERSION);
+		}
+		useversion = 2;
+	} else {
+		useversion = 3;
 	}
-	if (SWAPME(bmem-shm_version) != SHMIF_VERSION)
-		errx(1, bus vesrsion %d, program %d,
-		SWAPME(bmem-shm_version), SHMIF_VERSION);
 
 	if (pcapfile  strcmp(pcapfile, -) == 0)
 		dumploc = stderr;
 
 	fprintf(dumploc, bus version %d, lock: %d, generation: % PRIu64
 	, firstoff: 0x%04x, lastoff: 0x%04x\n,
-	SWAPME(bmem-shm_version), SWAPME(bmem-shm_lock),
-	SWAPME64(bmem-shm_gen),
-	SWAPME(bmem-shm_first), SWAPME(bmem-shm_last));
+	FIXENDIAN32(bmem-shm_version), FIXENDIAN32(bmem-shm_lock),
+	FIXENDIAN64(bmem-shm_gen),
+	FIXENDIAN32(bmem-shm_first), FIXENDIAN32(bmem-shm_last));
 
 	if (hflag)
 		exit(0);
@@ -163,8 +204,8 @@ main(int argc, char *argv[])
 		pdump = NULL;
 	}
 
-	curbus = SWAPME(bmem-shm_first);
-	buslast = SWAPME(bmem-shm_last);
+	curbus = FIXENDIAN32(bmem-shm_first);
+	buslast = FIXENDIAN32(bmem-shm_last);
 	if (curbus == BUSMEM_DATASIZE)
 		curbus = 0;
 
@@ -173,31 +214,49 @@ main(int argc, char *argv[])
 		bonus = 1;
 
 	i = 0;
+
 	while (curbus = buslast || bonus) {
 		struct pcap_pkthdr packhdr;
-		struct shmif_pkthdr sp;
 		uint32_t oldoff;
 		uint32_t curlen;
+		uint32_t sp_sec, sp_usec, sp_len;
 		bool wrap;
 
 		assert(curbus  sb.st_size);
 
 		wrap = false;
 		oldoff = curbus;
-		curbus = 

CVS commit: [netbsd-7] src/sys/fs/tmpfs

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 02:05:08 UTC 2014

Modified Files:
src/sys/fs/tmpfs [netbsd-7]: tmpfs_subr.c tmpfs_vnops.c

Log Message:
Pull up following revision(s) (requested by gson in ticket #344):
sys/fs/tmpfs/tmpfs_vnops.c: revision 1.121
sys/fs/tmpfs/tmpfs_subr.c: revision 1.97
Store symlinks without a NUL terminator so that lstat(2) returns the
correct length.  Fixes the tmpfs part of PR kern/48864.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.96.4.1 src/sys/fs/tmpfs/tmpfs_subr.c
cvs rdiff -u -r1.120 -r1.120.2.1 src/sys/fs/tmpfs/tmpfs_vnops.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/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.96 src/sys/fs/tmpfs/tmpfs_subr.c:1.96.4.1
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.96	Thu Jan 23 10:13:56 2014
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Mon Dec 22 02:05:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.96 2014/01/23 10:13:56 hannken Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.96 2014/01/23 10:13:56 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.96.4.1 2014/12/22 02:05:08 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/cprng.h
@@ -185,7 +185,6 @@ tmpfs_alloc_node(tmpfs_mount_t *tmp, enu
 		}
 
 		KASSERT(nnode-tn_size  MAXPATHLEN);
-		nnode-tn_size++; /* include the NUL terminator */
 
 		nnode-tn_spec.tn_lnk.tn_link =
 		tmpfs_strname_alloc(tmp, nnode-tn_size);

Index: src/sys/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.120 src/sys/fs/tmpfs/tmpfs_vnops.c:1.120.2.1
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.120	Fri Jul 25 08:20:52 2014
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Mon Dec 22 02:05:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.120 2014/07/25 08:20:52 dholland Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.120.2.1 2014/12/22 02:05:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.120 2014/07/25 08:20:52 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.120.2.1 2014/12/22 02:05:08 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -1036,7 +1036,7 @@ tmpfs_readlink(void *v)
 	/* Note: readlink(2) returns the path without NUL terminator. */
 	if (node-tn_size  0) {
 		error = uiomove(node-tn_spec.tn_lnk.tn_link,
-		MIN(node-tn_size - 1, uio-uio_resid), uio);
+		MIN(node-tn_size, uio-uio_resid), uio);
 	} else {
 		error = 0;
 	}



CVS commit: [netbsd-7] src/tests/lib/libpthread

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 02:06:10 UTC 2014

Modified Files:
src/tests/lib/libpthread [netbsd-7]: t_cond.c

Log Message:
Pull up following revision(s) (requested by gson in ticket #346):
tests/lib/libpthread/t_cond.c: revision 1.6
The cond_timedwait_race test case is no longer expected to fail; it
has been consistently passing since CVS date 2014.01.31.19.22.00.
See also PR lib/44756.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/tests/lib/libpthread/t_cond.c

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

Modified files:

Index: src/tests/lib/libpthread/t_cond.c
diff -u src/tests/lib/libpthread/t_cond.c:1.5 src/tests/lib/libpthread/t_cond.c:1.5.4.1
--- src/tests/lib/libpthread/t_cond.c:1.5	Sat Oct 19 17:45:01 2013
+++ src/tests/lib/libpthread/t_cond.c	Mon Dec 22 02:06:10 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cond.c,v 1.5 2013/10/19 17:45:01 christos Exp $ */
+/* $NetBSD: t_cond.c,v 1.5.4.1 2014/12/22 02:06:10 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.);
-__RCSID($NetBSD: t_cond.c,v 1.5 2013/10/19 17:45:01 christos Exp $);
+__RCSID($NetBSD: t_cond.c,v 1.5.4.1 2014/12/22 02:06:10 msaitoh Exp $);
 
 #include sys/time.h
 
@@ -343,25 +343,17 @@ ATF_TC_HEAD(cond_timedwait_race, tc)
 ATF_TC_BODY(cond_timedwait_race, tc)
 {
 	pthread_t tid[64];
-	size_t i, j;
+	size_t i;
 
-	atf_tc_expect_fail(PR lib/44756);
-	/* This outer loop is to ensure that a false positive of this race
-	 * test does not report the test as broken (due to the test not
-	 * triggering the expected failure).  However, we want to make this
-	 * fail consistently when the race is resolved, and this approach
-	 * will have the desired effect. */
-	for (j = 0; j  10; j++ ) {
-		for (i = 0; i  __arraycount(tid); i++) {
-
-			PTHREAD_REQUIRE(pthread_create(tid[i], NULL,
-			pthread_cond_timedwait_func, NULL));
-		}
+	for (i = 0; i  __arraycount(tid); i++) {
 
-		for (i = 0; i  __arraycount(tid); i++) {
+		PTHREAD_REQUIRE(pthread_create(tid[i], NULL,
+		pthread_cond_timedwait_func, NULL));
+	}
+
+	for (i = 0; i  __arraycount(tid); i++) {
 
-			PTHREAD_REQUIRE(pthread_join(tid[i], NULL));
-		}
+		PTHREAD_REQUIRE(pthread_join(tid[i], NULL));
 	}
 }
 



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

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 02:10:30 UTC 2014

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

Log Message:
Pull up following revision(s) (requested by rmind in ticket #347):
sys/net/npf/npf_nat.c: revision 1.38
sys/net/npf/npf_conn.h: revision 1.8
sys/net/npf/npf_conn.c: revision 1.14
NPF: set the connection flags atomically in the post-creation logic and
fix a tiny race condition window.  Might fix PR/49488.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/sys/net/npf/npf_conn.c
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/sys/net/npf/npf_conn.h
cvs rdiff -u -r1.32.2.3 -r1.32.2.4 src/sys/net/npf/npf_nat.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_conn.c
diff -u src/sys/net/npf/npf_conn.c:1.10.2.2 src/sys/net/npf/npf_conn.c:1.10.2.3
--- src/sys/net/npf/npf_conn.c:1.10.2.2	Mon Dec  1 13:05:26 2014
+++ src/sys/net/npf/npf_conn.c	Mon Dec 22 02:10:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conn.c,v 1.10.2.2 2014/12/01 13:05:26 martin Exp $	*/
+/*	$NetBSD: npf_conn.c,v 1.10.2.3 2014/12/22 02:10:30 msaitoh 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.2 2014/12/01 13:05:26 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_conn.c,v 1.10.2.3 2014/12/22 02:10:30 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -660,7 +660,7 @@ npf_conn_setpass(npf_conn_t *con, npf_rp
 	 * If rproc is set, the caller transfers its reference to us,
 	 * which will be released on npf_conn_destroy().
 	 */
-	con-c_flags |= CONN_PASS;
+	atomic_or_uint(con-c_flags, CONN_PASS);
 	con-c_rproc = rp;
 }
 
@@ -673,7 +673,7 @@ npf_conn_release(npf_conn_t *con)
 {
 	if ((con-c_flags  (CONN_ACTIVE | CONN_EXPIRE)) == 0) {
 		/* Activate: after this, connection is globally visible. */
-		con-c_flags |= CONN_ACTIVE;
+		atomic_or_uint(con-c_flags, CONN_ACTIVE);
 	}
 	KASSERT(con-c_refcnt  0);
 	atomic_dec_uint(con-c_refcnt);

Index: src/sys/net/npf/npf_conn.h
diff -u src/sys/net/npf/npf_conn.h:1.6.2.1 src/sys/net/npf/npf_conn.h:1.6.2.2
--- src/sys/net/npf/npf_conn.h:1.6.2.1	Mon Dec  1 13:05:26 2014
+++ src/sys/net/npf/npf_conn.h	Mon Dec 22 02:10:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_conn.h,v 1.6.2.1 2014/12/01 13:05:26 martin Exp $	*/
+/*	$NetBSD: npf_conn.h,v 1.6.2.2 2014/12/22 02:10:30 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@ typedef struct npf_connkey npf_connkey_t
 #include sys/rbtree.h
 
 /*
- * See npf_conn_key() function for the description key layout.
+ * See npf_conn_conkey() function for the key layout description.
  */
 #define	NPF_CONN_NKEYWORDS	(2 + ((sizeof(npf_addr_t) * 2)  2))
 #define	NPF_CONN_MAXKEYLEN	(NPF_CONN_NKEYWORDS * sizeof(uint32_t))

Index: src/sys/net/npf/npf_nat.c
diff -u src/sys/net/npf/npf_nat.c:1.32.2.3 src/sys/net/npf/npf_nat.c:1.32.2.4
--- src/sys/net/npf/npf_nat.c:1.32.2.3	Mon Dec  1 13:05:26 2014
+++ src/sys/net/npf/npf_nat.c	Mon Dec 22 02:10:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_nat.c,v 1.32.2.3 2014/12/01 13:05:26 martin Exp $	*/
+/*	$NetBSD: npf_nat.c,v 1.32.2.4 2014/12/22 02:10:30 msaitoh 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.3 2014/12/01 13:05:26 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_nat.c,v 1.32.2.4 2014/12/22 02:10:30 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -914,8 +914,8 @@ npf_nat_dump(const npf_nat_t *nt)
 
 	np = nt-nt_natpolicy;
 	memcpy(ip, np-n_taddr, sizeof(ip));
-	printf(\tNATP(%p): type %d flags 0x%x taddr %s tport %d\n,
-	np, np-n_type, np-n_flags, inet_ntoa(ip), np-n_tport);
+	printf(\tNATP(%p): type %d flags 0x%x taddr %s tport %d\n, np,
+	np-n_type, np-n_flags, inet_ntoa(ip), ntohs(np-n_tport));
 	memcpy(ip, nt-nt_oaddr, sizeof(ip));
 	printf(\tNAT: original address %s oport %d tport %d\n,
 	inet_ntoa(ip), ntohs(nt-nt_oport), ntohs(nt-nt_tport));



CVS commit: [netbsd-7] src/sys/dev/raidframe

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 02:19:32 UTC 2014

Modified Files:
src/sys/dev/raidframe [netbsd-7]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by taca in ticket #348):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.317
Stop useless disklabel warning if there are wedges, using GPT partition.
Fix PR kern/47989.
XXX: Pullup 6 and 7 (maybe 5)


To generate a diff of this commit:
cvs rdiff -u -r1.312.2.3 -r1.312.2.4 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.312.2.3 src/sys/dev/raidframe/rf_netbsdkintf.c:1.312.2.4
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.312.2.3	Tue Nov 18 18:03:10 2014
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Mon Dec 22 02:19:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.312.2.3 2014/11/18 18:03:10 snj Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.312.2.4 2014/12/22 02:19:32 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.312.2.3 2014/11/18 18:03:10 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.312.2.4 2014/12/22 02:19:32 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -800,6 +800,7 @@ raidopen(dev_t dev, int flags, int fmt,
 	pmask = (1  part);
 
 	if ((rs-sc_flags  RAIDF_INITED) 
+	(rs-sc_dkdev.dk_nwedges == 0) 
 	(rs-sc_dkdev.dk_openmask == 0))
 		raidgetdisklabel(dev);
 



CVS commit: [netbsd-7] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 02:20:35 UTC 2014

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

Log Message:
Ticket 343-344, 346-348.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.135 -r1.1.2.136 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.135 src/doc/CHANGES-7.0:1.1.2.136
--- src/doc/CHANGES-7.0:1.1.2.135	Sun Dec 21 19:34:13 2014
+++ src/doc/CHANGES-7.0	Mon Dec 22 02:20:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.135 2014/12/21 19:34:13 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.136 2014/12/22 02:20:35 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -3671,3 +3671,39 @@ sys/dev/pci/if_wpi.c1.69
 	is off.
 	[bouyer, ticket #338]
 
+usr.bin/shmif_dumpbus/shmif_dumpbus.c		1.12-1.17
+
+	- Support endian-independent operation on all platforms.
+	- Fix tyop in error message.
+	- Make name more descriptive: SWAPME - FIXENDIAN
+	- Add compat for bus version 2.
+	- Fixes tests.
+	- Might as well byteswap when we assign to local variables instead of
+	  when we use said variables.
+	  [gson, ticket #343]
+
+sys/fs/tmpfs/tmpfs_subr.c			1.97
+sys/fs/tmpfs/tmpfs_vnops.c			1.121
+
+	Store symlinks without a NUL terminator so that lstat(2) returns the
+	correct length.  Fixes the tmpfs part of PR kern/48864.
+	[gson, ticket #344]
+
+tests/lib/libpthread/t_cond.c			1.6
+
+	The cond_timedwait_race test case is no longer expected to fail.
+	[gson, ticket #346]
+
+sys/net/npf/npf_conn.c1.14
+sys/net/npf/npf_conn.h1.8
+sys/net/npf/npf_nat.c1.38
+
+	Set the connection flags atomically in the post-creation logic and
+	fix a tiny race condition window.  Might fix PR/49488.
+	[rmind, ticket #347]
+
+sys/dev/raidframe/rf_netbsdkintf.c		1.317
+
+	Stop useless disklabel warning if there are wedges, using GPT
+	partition. Fix PR kern/47989.
+	[taca, ticket #348]



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

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 03:32:23 UTC 2014

Modified Files:
src/sys/ufs/ufs [netbsd-7]: extattr.h

Log Message:
Pull up following revision(s) (requested by manu in ticket #350):
sys/ufs/ufs/extattr.h: revision 1.11
Bump UFS1 extended attribute max name length to 256
For extended attribute name max length, kernel filesystem-independant
code use either EXTATTR_MAXNAMELEN (BSD API) or XATTR_NAME_MAX (Linux
API),
which are both defined as KERNEL_NAME_MAX and fits Linux limit of 255
without training \0.
UFS1 code had a lower limit that broke Linux compatibility. We can bump
the limit without sacrifying backward compatibility, because:
1) There is no API exposing this limit outside the kernel. Upper kernel
layers have a larger limit handle the increase without a hitch
2) Each attribute has its own backing store in the fileystem, the name
of the backing store matching the attribute name. A newer kernel can
create/read/write backing store for longer attribute names and will
have no problem with existing shorter names.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.28.1 src/sys/ufs/ufs/extattr.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/ufs/ufs/extattr.h
diff -u src/sys/ufs/ufs/extattr.h:1.10 src/sys/ufs/ufs/extattr.h:1.10.28.1
--- src/sys/ufs/ufs/extattr.h:1.10	Sun Oct  9 21:15:34 2011
+++ src/sys/ufs/ufs/extattr.h	Mon Dec 22 03:32:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: extattr.h,v 1.10 2011/10/09 21:15:34 chs Exp $	*/
+/*	$NetBSD: extattr.h,v 1.10.28.1 2014/12/22 03:32:23 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999-2001 Robert N. M. Watson
@@ -43,7 +43,7 @@
 #define	UFS_EXTATTR_FSROOTSUBDIR	.attribute
 #define	UFS_EXTATTR_SUBDIR_SYSTEM	system
 #define	UFS_EXTATTR_SUBDIR_USER		user
-#define	UFS_EXTATTR_MAXEXTATTRNAME	65	/* including null */
+#define	UFS_EXTATTR_MAXEXTATTRNAME	256	/* including null */
 
 #define	UFS_EXTATTR_ATTR_FLAG_INUSE	0x0001	/* attr has been set */
 #define	UFS_EXTATTR_PERM_KERNEL		0x



CVS commit: [netbsd-6] src/sys/dev/raidframe

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 04:11:38 UTC 2014

Modified Files:
src/sys/dev/raidframe [netbsd-6]: rf_netbsdkintf.c

Log Message:
Pull up following revision(s) (requested by taca in ticket #1216):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.317
Stop useless disklabel warning if there are wedges, using GPT partition.
Fix PR kern/47989.
XXX: Pullup 6 and 7 (maybe 5)


To generate a diff of this commit:
cvs rdiff -u -r1.295.6.3 -r1.295.6.4 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.3 src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.4
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295.6.3	Tue Dec  2 22:05:14 2014
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Mon Dec 22 04:11:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.295.6.3 2014/12/02 22:05:14 snj Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.295.6.4 2014/12/22 04:11:38 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.3 2014/12/02 22:05:14 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.295.6.4 2014/12/22 04:11:38 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -735,6 +735,7 @@ raidopen(dev_t dev, int flags, int fmt,
 	pmask = (1  part);
 
 	if ((rs-sc_flags  RAIDF_INITED) 
+	(rs-sc_dkdev.dk_nwedges == 0) 
 	(rs-sc_dkdev.dk_openmask == 0))
 		raidgetdisklabel(dev);
 



CVS commit: src/external/bsd/ntp/dist/ntpd

2014-12-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 22 04:21:47 UTC 2014

Modified Files:
src/external/bsd/ntp/dist/ntpd: refclock_gpsdjson.c

Log Message:
avoid shadowing of log2 on some platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/ntpd/refclock_gpsdjson.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/ntp/dist/ntpd/refclock_gpsdjson.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c:1.2 src/external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c:1.3
--- src/external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c:1.2	Fri Dec 19 15:43:17 2014
+++ src/external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c	Sun Dec 21 23:21:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_gpsdjson.c,v 1.2 2014/12/19 20:43:17 christos Exp $	*/
+/*	$NetBSD: refclock_gpsdjson.c,v 1.3 2014/12/22 04:21:47 christos Exp $	*/
 
 /*
  * refclock_gpsdjson.c - clock driver as GPSD JSON client
@@ -856,7 +856,7 @@ process_tpv(
 	const char * gps_time;
 	int  gps_mode;
 	double   ept, epp, epx, epy, epv;
-	int  log2;
+	int  xlog2;
 
 	gps_mode = (int)json_object_lookup_int_default(
 		jctx, 0, mode, 0);
@@ -922,9 +922,9 @@ process_tpv(
 	ept = min(ept, epp  );
 	ept = min(ept, 0.5  );
 	ept = max(ept, 1.0-9);
-	ept = frexp(ept, log2);
+	ept = frexp(ept, xlog2);
 
-	peer-precision = log2;
+	peer-precision = xlog2;
 }
 
 /* -- */



CVS commit: src/external/bsd/ntp/dist/ntpd

2014-12-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 22 04:23:58 UTC 2014

Modified Files:
src/external/bsd/ntp/dist/ntpd: refclock_nmea.c

Log Message:
avoid shadowing of recv.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/ntpd/refclock_nmea.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/ntp/dist/ntpd/refclock_nmea.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_nmea.c:1.6 src/external/bsd/ntp/dist/ntpd/refclock_nmea.c:1.7
--- src/external/bsd/ntp/dist/ntpd/refclock_nmea.c:1.6	Fri Dec 19 15:43:17 2014
+++ src/external/bsd/ntp/dist/ntpd/refclock_nmea.c	Sun Dec 21 23:23:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_nmea.c,v 1.6 2014/12/19 20:43:17 christos Exp $	*/
+/*	$NetBSD: refclock_nmea.c,v 1.7 2014/12/22 04:23:58 christos Exp $	*/
 
 /*
  * refclock_nmea.c - clock driver for an NMEA GPS CLOCK
@@ -314,7 +314,7 @@ static int	unfold_century	(struct calend
 static int	gpsfix_century	(struct calendar * jd, const gps_weektm * wd,
  u_short * ccentury);
 static l_fp eval_gps_time	(struct peer * peer, const struct calendar * gpst,
- const struct timespec * gpso, const l_fp * recv);
+ const struct timespec * gpso, const l_fp * xrecv);
 
 static int	nmead_open	(const char * device);
 static void save_ltc(struct refclockproc * const, const char * const,
@@ -1782,7 +1782,7 @@ eval_gps_time(
 	struct peer   * peer, /* for logging etc */
 	const struct calendar * gpst, /* GPS time stamp  */
 	const struct timespec * tofs, /* GPS frac second  offset */
-	const l_fp* recv  /* receive time stamp */
+	const l_fp* xrecv /* receive time stamp */
 	)
 {
 	struct refclockproc * const pp = peer-procptr;
@@ -1838,7 +1838,7 @@ eval_gps_time(
 	}
 
 	/* - get unfold base: day of full recv time - 512 weeks */
-	vi64 = ntpcal_ntp_to_ntp(recv-l_ui, NULL);
+	vi64 = ntpcal_ntp_to_ntp(xrecv-l_ui, NULL);
 	rs64 = ntpcal_daysplit(vi64);
 	rcv_sec = rs64.lo;
 	rcv_day = rs64.hi - 512 * 7;
@@ -1848,7 +1848,7 @@ eval_gps_time(
 	 * fractional day of the receive time, we shift the base day for
 	 * the unfold by 1. */
 	if (   gps_sec   rcv_sec
-	   || (gps_sec == rcv_sec  retv.l_uf  recv-l_uf))
+	   || (gps_sec == rcv_sec  retv.l_uf  xrecv-l_uf))
 		rcv_day += 1;
 
 	/* - don't warp ahead of GPS invention! */



CVS commit: [netbsd-6] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 04:37:45 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 1216.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.169 -r1.1.2.170 src/doc/CHANGES-6.2

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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.169 src/doc/CHANGES-6.2:1.1.2.170
--- src/doc/CHANGES-6.2:1.1.2.169	Sun Dec 21 20:26:30 2014
+++ src/doc/CHANGES-6.2	Mon Dec 22 04:37:45 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.169 2014/12/21 20:26:30 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.170 2014/12/22 04:37:45 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -5615,3 +5615,9 @@ usr.sbin/perfused/perfused.c			1.25
 
 	Survive if filesystem installs a signal handler.
 	[manu, ticket #1215]
+
+sys/dev/raidframe/rf_netbsdkintf.c		1.317
+
+	Stop useless disklabel warning if there are wedges, using GPT
+	partition. Fix PR kern/47989.
+	[taca, ticket #1216]



CVS commit: src/sys/dev

2014-12-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 22 07:02:22 UTC 2014

Modified Files:
src/sys/dev: midi.c midivar.h sequencer.c sequencervar.h

Log Message:
various clean ups for midi and sequencer:

midi specific:
- add reference counting for midi operations, and ensure that
  detach waits for other threads to complete before tearing
  down the device completely.
- in detach, halt midi callouts before destroying them
- re-check sc-dying after sleeping in midiread()
- in real_writebytes(), make sure we're open and not dying
- make sure we drop the interrupt lock before calling any code
  that may want to check thread locks.  this is now safe due to
  the above changes.

sequencer specific:
- avoid caching the midi softc in the sequencer softc.  instead,
  every time we want to use it, look it up again and make sure
  it still exists.

this fixes various crashes i've seen in the usb midi code when
detaching the umidi while it is active.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/midi.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/midivar.h
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/sequencer.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sequencervar.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/midi.c
diff -u src/sys/dev/midi.c:1.81 src/sys/dev/midi.c:1.82
--- src/sys/dev/midi.c:1.81	Fri Jul 25 08:10:35 2014
+++ src/sys/dev/midi.c	Mon Dec 22 07:02:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: midi.c,v 1.81 2014/07/25 08:10:35 dholland Exp $	*/
+/*	$NetBSD: midi.c,v 1.82 2014/12/22 07:02:22 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.81 2014/07/25 08:10:35 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.82 2014/12/22 07:02:22 mrg Exp $);
 
 #include midi.h
 #include sequencer.h
@@ -204,6 +204,11 @@ mididetach(device_t self, int flags)
 
 	mutex_enter(sc-lock);
 	sc-dying = 1;
+
+	if (--sc-refcnt = 0) {
+		/* Wake anything? */
+		(void)cv_timedwait(sc-detach_cv, sc-lock, hz * 60);
+	}
 	cv_broadcast(sc-wchan);
 	cv_broadcast(sc-rchan);
 	mutex_exit(sc-lock);
@@ -236,8 +241,17 @@ mididetach(device_t self, int flags)
 		sc-sih = NULL;
 	}
 
+	mutex_enter(sc-lock);
+	callout_halt(sc-xmt_asense_co, sc-lock);
+	callout_halt(sc-rcv_asense_co, sc-lock);
+	mutex_exit(sc-lock);
+
+	callout_destroy(sc-xmt_asense_co);
+	callout_destroy(sc-rcv_asense_co);
+
 	cv_destroy(sc-wchan);
 	cv_destroy(sc-rchan);
+	cv_destroy(sc-detach_cv);
 
 	return (0);
 }
@@ -266,9 +280,11 @@ midi_attach(struct midi_softc *sc)
 
 	cv_init(sc-rchan, midird);
 	cv_init(sc-wchan, midiwr);
+	cv_init(sc-detach_cv, mididet);
 
 	sc-dying = 0;
 	sc-isopen = 0;
+	sc-refcnt = 0;
 
 	mutex_enter(hwif_softc_lock);
 	mutex_enter(sc-lock);
@@ -952,6 +968,10 @@ midiread(dev_t dev, struct uio *uio, int
 mutex_enter(sc-lock);
 if (error)
 	break;
+if (sc-dying) {
+	error = EIO;
+	break;
+}
 appetite -= buf_end - buf_cur;
 buf_cur = mb-buf;
 			}
@@ -961,6 +981,10 @@ midiread(dev_t dev, struct uio *uio, int
 			mutex_enter(sc-lock);
 			if (error)
 break;
+			if (sc-dying) {
+error = EIO;
+break;
+			}
 			buf_cur += appetite;
 		}
 		
@@ -1306,9 +1330,15 @@ real_writebytes(struct midi_softc *sc, u
 	enum fst_form form;
 	MIDI_BUF_DECLARE(idx);
 	MIDI_BUF_DECLARE(buf);
+	int error;
 
 	KASSERT(mutex_owned(sc-lock));
 
+	if (sc-dying || !sc-isopen)
+		return EIO;
+
+	sc-refcnt++;
+
 	iend = ibuf + cc;
 	mb = sc-outbuf;
 	arming = 0;
@@ -1329,9 +1359,6 @@ real_writebytes(struct midi_softc *sc, u
 
 	MIDI_BUF_PRODUCER_INIT(mb,idx);
 	MIDI_BUF_PRODUCER_INIT(mb,buf);
-
-	if (sc-dying)
-		return EIO;
 	
 	while (ibuf  iend) {
 		got = midi_fst(sc-xmt, *ibuf, form);
@@ -1341,7 +1368,8 @@ real_writebytes(struct midi_softc *sc, u
 			continue;
 		case FST_ERR:
 		case FST_HUH:
-			return EPROTO;
+			error = EPROTO;
+			goto out;
 		case FST_CHN:
 		case FST_CHV: /* only occurs in VCOMP form */
 		case FST_COM:
@@ -1366,8 +1394,10 @@ real_writebytes(struct midi_softc *sc, u
 		if (idx_cur == idx_lim || count  buf_lim - buf_cur) {
 			MIDI_BUF_PRODUCER_REFRESH(mb,idx); /* get the most */
 			MIDI_BUF_PRODUCER_REFRESH(mb,buf); /*  current facts */
-			if (idx_cur == idx_lim || count  buf_lim - buf_cur)
-return EWOULDBLOCK; /* caller's problem */
+			if (idx_cur == idx_lim || count  buf_lim - buf_cur) {
+error = EWOULDBLOCK; /* caller's problem */
+goto out;
+			}
 		}
 		*idx_cur++ = PACK_MB_IDX(got,count);
 		MIDI_BUF_WRAP(idx);
@@ -1394,7 +1424,14 @@ real_writebytes(struct midi_softc *sc, u
 		callout_stop(sc-xmt_asense_co);
 		arming = 1;
 	}
-	return arming ? midi_start_output(sc) : 0;
+
+	error = arming ? midi_start_output(sc) : 0;
+
+out:
+	if (--sc-refcnt  0)
+		cv_broadcast(sc-detach_cv);
+
+	return error;
 }
 
 static int
@@ -1422,6 +1459,9 @@