CVS commit: src/bin/rm

2012-06-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun 13 07:35:37 UTC 2012

Modified Files:
src/bin/rm: rm.c

Log Message:
Rectify race condition in rm -P processing by checking that the file
we opened is the one we expected to get. Also use O_NOFOLLOW to help
avoid even opening devices, which sometimes produce side effects.

Reported by Radoslaw A. Zarzynski.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/bin/rm/rm.c

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

Modified files:

Index: src/bin/rm/rm.c
diff -u src/bin/rm/rm.c:1.51 src/bin/rm/rm.c:1.52
--- src/bin/rm/rm.c:1.51	Sat Jan 21 16:38:41 2012
+++ src/bin/rm/rm.c	Wed Jun 13 07:35:37 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: rm.c,v 1.51 2012/01/21 16:38:41 christos Exp $ */
+/* $NetBSD: rm.c,v 1.52 2012/06/13 07:35:37 dholland Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993, 1994, 2003
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1990, 19
 #if 0
 static char sccsid[] = @(#)rm.c	8.8 (Berkeley) 4/27/95;
 #else
-__RCSID($NetBSD: rm.c,v 1.51 2012/01/21 16:38:41 christos Exp $);
+__RCSID($NetBSD: rm.c,v 1.52 2012/06/13 07:35:37 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -380,7 +380,7 @@ rm_file(char **argv)
 static int
 rm_overwrite(char *file, struct stat *sbp)
 {
-	struct stat sb;
+	struct stat sb, sb2;
 	int fd, randint;
 	char randchar;
 
@@ -394,8 +394,18 @@ rm_overwrite(char *file, struct stat *sb
 		return 0;
 
 	/* flags to try to defeat hidden caching by forcing seeks */
-	if ((fd = open(file, O_RDWR|O_SYNC|O_RSYNC, 0)) == -1)
+	if ((fd = open(file, O_RDWR|O_SYNC|O_RSYNC|O_NOFOLLOW, 0)) == -1)
+		goto err;
+
+	if (fstat(fd, sb2)) {
 		goto err;
+	}
+
+	if (sb2.st_dev != sbp-st_dev || sb2.st_ino != sbp-st_ino ||
+	!S_ISREG(sb2.st_mode)) {
+		errno = EPERM;
+		goto err;
+	}
 
 #define RAND_BYTES	1
 #define THIS_BYTE	0



CVS commit: src/tests/lib/libc/gen

2012-06-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 13 11:45:18 UTC 2012

Modified Files:
src/tests/lib/libc/gen: t_siginfo.c

Log Message:
Skip sigbus_adraln testcase on alpha unless global
machdep.unaligned_sigbus sysctl is enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libc/gen/t_siginfo.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/libc/gen/t_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.17 src/tests/lib/libc/gen/t_siginfo.c:1.18
--- src/tests/lib/libc/gen/t_siginfo.c:1.17	Mon Apr 23 15:07:56 2012
+++ src/tests/lib/libc/gen/t_siginfo.c	Wed Jun 13 11:45:17 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.17 2012/04/23 15:07:56 martin Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.18 2012/06/13 11:45:17 njoly Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
 
 #include sys/inttypes.h
 #include sys/resource.h
+#include sys/sysctl.h
 #include sys/time.h
 #include sys/ucontext.h
 #include sys/wait.h
@@ -441,8 +442,21 @@ ATF_TC_HEAD(sigbus_adraln, tc)
 
 ATF_TC_BODY(sigbus_adraln, tc)
 {
+	const char *arch = atf_config_get(atf_arch);
 	struct sigaction sa;
 
+	if (strcmp(arch, alpha) == 0) {
+		int rv, val;
+		size_t len = sizeof(val);
+		rv = sysctlbyname(machdep.unaligned_sigbus, val, len,
+			NULL, 0);
+		ATF_REQUIRE(rv == 0);
+		if (val == 0)
+			atf_tc_skip(SIGBUS signal not enabled for
+ unaligned accesses);
+
+	}
+
 	sa.sa_flags = SA_SIGINFO;
 	sa.sa_sigaction = sigbus_action;
 	sigemptyset(sa.sa_mask);
@@ -458,8 +472,7 @@ ATF_TC_BODY(sigbus_adraln, tc)
 	addr = calloc(2, sizeof(int));
 	ATF_REQUIRE(addr != NULL);
 
-	if (strcmp(atf_config_get(atf_arch), i386) == 0 ||
-	strcmp(atf_config_get(atf_arch), x86_64) == 0) {
+	if (strcmp(arch, i386) == 0 || strcmp(arch, x86_64) == 0) {
 		if (system(cpuctl identify 0 | grep -q QEMU) == 0) {
 			atf_tc_expect_fail(QEMU fails to trap unaligned 
 			accesses);



CVS commit: [netbsd-5] src

2012-06-13 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Jun 13 14:00:49 UTC 2012

Modified Files:
src/sbin/raidctl [netbsd-5]: raidctl.c
src/sys/dev/raidframe [netbsd-5]: raidframevar.h rf_copyback.c
rf_disks.c rf_netbsdkintf.c rf_reconstruct.c

Log Message:
Pull up the following revisions(s) (requested by mrg in ticket #1774):
sbin/raidctl/raidctl.c: revision 1.52
sys/dev/raidframe/raidframevar.h:   revision 1.15
sys/dev/raidframe/rf_copyback.c:revision 1.45
sys/dev/raidframe/rf_disks.c:   revision 1.78
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.282,1.284
sys/dev/raidframe/rf_reconstruct.c: revision 1.111

Fix garbage values in partitionSizeHi with RAID array  2TB. Stops the check 
against
rf_component_label_partitionsize() failing and stopping auto-configure.


To generate a diff of this commit:
cvs rdiff -u -r1.39.4.3 -r1.39.4.4 src/sbin/raidctl/raidctl.c
cvs rdiff -u -r1.12.10.2 -r1.12.10.3 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.41.20.2 -r1.41.20.3 src/sys/dev/raidframe/rf_copyback.c
cvs rdiff -u -r1.70.10.4 -r1.70.10.5 src/sys/dev/raidframe/rf_disks.c
cvs rdiff -u -r1.250.4.11 -r1.250.4.12 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.105.4.5 -r1.105.4.6 src/sys/dev/raidframe/rf_reconstruct.c

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

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.39.4.3 src/sbin/raidctl/raidctl.c:1.39.4.4
--- src/sbin/raidctl/raidctl.c:1.39.4.3	Fri Dec 11 09:37:09 2009
+++ src/sbin/raidctl/raidctl.c	Wed Jun 13 14:00:48 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.39.4.3 2009/12/11 09:37:09 sborrill Exp $   */
+/*  $NetBSD: raidctl.c,v 1.39.4.4 2012/06/13 14:00:48 sborrill Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: raidctl.c,v 1.39.4.3 2009/12/11 09:37:09 sborrill Exp $);
+__RCSID($NetBSD: raidctl.c,v 1.39.4.4 2012/06/13 14:00:48 sborrill Exp $);
 #endif
 
 
@@ -751,9 +751,9 @@ get_component_label(int fd, char *compon
 	printf(   sectPerSU: %d, SUsPerPU: %d, SUsPerRU: %d\n,
 	   component_label.sectPerSU, component_label.SUsPerPU, 
 	   component_label.SUsPerRU);
-	printf(   Queue size: %d, blocksize: %d, numBlocks: %u\n,
+	printf(   Queue size: %d, blocksize: %d, numBlocks: %PRIu64\n,
 	   component_label.maxOutstanding, component_label.blockSize,
-	   component_label.numBlocks);
+	   rf_component_label_numblocks(component_label));
 	printf(   RAID Level: %c\n, (char) component_label.parityConfig);
 	printf(   Autoconfig: %s\n, 
 	   component_label.autoconfigure ? Yes : No );

Index: src/sys/dev/raidframe/raidframevar.h
diff -u src/sys/dev/raidframe/raidframevar.h:1.12.10.2 src/sys/dev/raidframe/raidframevar.h:1.12.10.3
--- src/sys/dev/raidframe/raidframevar.h:1.12.10.2	Sun Nov 21 22:06:53 2010
+++ src/sys/dev/raidframe/raidframevar.h	Wed Jun 13 14:00:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: raidframevar.h,v 1.12.10.2 2010/11/21 22:06:53 riz Exp $ */
+/*	$NetBSD: raidframevar.h,v 1.12.10.3 2012/06/13 14:00:49 sborrill Exp $ */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -444,9 +444,9 @@ typedef struct RF_ComponentLabel_s {
 	int maxOutstanding;   /* maxOutstanding disk requests */
 	int blockSize;/* size of component block.
  (disklabel-d_secsize) */
-	u_int numBlocks;  /* number of blocks on this component.  May
+	u_int __numBlocks;/* number of blocks on this component.  May
 			 be smaller than the partition size. */
-	u_int partitionSize;  /* number of blocks on this *partition*.
+	u_int __partitionSize;/* number of blocks on this *partition*.
  Must exactly match the partition size
  from the disklabel. */
 	/* Parity map stuff. */
@@ -476,6 +476,43 @@ typedef struct RF_ComponentLabel_s {
 	int future_use2[42];  /* More future expansion */
 } RF_ComponentLabel_t;
 
+/*
+ * Following four functions are access macros for the number of blocks
+ * and partition size in component label.
+ */
+static inline RF_SectorCount_t
+rf_component_label_numblocks(const RF_ComponentLabel_t *cl)
+{
+
+	return ((RF_SectorCount_t)cl-numBlocksHi  32) |
+	cl-__numBlocks;
+}
+
+static inline void
+rf_component_label_set_numblocks(RF_ComponentLabel_t *cl, RF_SectorCount_t siz)
+{
+
+	cl-numBlocksHi = siz  32;
+	cl-__numBlocks = siz;
+}
+
+static inline RF_SectorCount_t
+rf_component_label_partitionsize(const RF_ComponentLabel_t *cl)
+{
+
+	return ((RF_SectorCount_t)cl-partitionSizeHi  32) |
+	cl-__partitionSize;
+}
+
+static inline void
+rf_component_label_set_partitionsize(RF_ComponentLabel_t *cl,
+RF_SectorCount_t siz)
+{
+
+	cl-partitionSizeHi = siz  32;
+	cl-__partitionSize = siz;
+}
+
 typedef 

CVS commit: [netbsd-5] src/doc

2012-06-13 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Jun 13 14:01:22 UTC 2012

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

Log Message:
Ticket #1774


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.174 -r1.1.2.175 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.174 src/doc/CHANGES-5.2:1.1.2.175
--- src/doc/CHANGES-5.2:1.1.2.174	Tue Jun 12 23:18:43 2012
+++ src/doc/CHANGES-5.2	Wed Jun 13 14:01:22 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.174 2012/06/12 23:18:43 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.175 2012/06/13 14:01:22 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6465,3 +6465,14 @@ sys/arch/amd64/amd64/netbsd32_machdep.c	
 	now instead of trying to jump to the bogus address.
 	[spz, ticket #1773]
 
+sbin/raidctl/raidctl.c	1.52
+sys/dev/raidframe/raidframevar.h			1.15
+sys/dev/raidframe/rf_copyback.c1.45
+sys/dev/raidframe/rf_disks.c1.78
+sys/dev/raidframe/rf_netbsdkintf.c			1.282,1.284
+sys/dev/raidframe/rf_reconstruct.c			1.111
+
+	Fix garbage values in partitionSizeHi with RAID array  2TB. Stops the check
+	against rf_component_label_partitionsize() failing and stopping auto-configure.
+	[mrg, ticket #1774]
+



CVS commit: [yamt-pagecache] src/common/lib/libc/gen

2012-06-13 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Jun 13 14:18:50 UTC 2012

Modified Files:
src/common/lib/libc/gen [yamt-pagecache]: radixtree.c

Log Message:
comment


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.17.2.2 src/common/lib/libc/gen/radixtree.c:1.17.2.3
--- src/common/lib/libc/gen/radixtree.c:1.17.2.2	Fri Feb 17 08:16:55 2012
+++ src/common/lib/libc/gen/radixtree.c	Wed Jun 13 14:18:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.17.2.2 2012/02/17 08:16:55 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.17.2.3 2012/06/13 14:18:49 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011,2012 YAMAMOTO Takashi,
@@ -56,6 +56,11 @@
  *  - the best case: about RADIX_TREE_PTR_PER_NODE items per intermediate node.
  *  - the worst case: RADIX_TREE_MAX_HEIGHT intermediate nodes per item.
  *
+ * The height of tree is dynamic.  It's smaller if only small index values are
+ * used.  As an extreme case, if only index 0 is used, the corresponding value
+ * is directly stored in the root of the tree (struct radix_tree) without
+ * allocating any intermediate nodes.
+ *
  * Gang lookup:
  *
  * This implementation provides a way to scan many nodes quickly via
@@ -75,7 +80,7 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.17.2.2 2012/02/17 08:16:55 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.17.2.3 2012/06/13 14:18:49 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -85,7 +90,7 @@ __KERNEL_RCSID(0, $NetBSD: radixtree.c,
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.17.2.2 2012/02/17 08:16:55 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.17.2.3 2012/06/13 14:18:49 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h



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

2012-06-13 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Jun 13 15:55:03 UTC 2012

Modified Files:
src/sys/dev/pci [netbsd-4]: if_bge.c

Log Message:
Pull up the following revisions(s) (requested by buhrow in ticket #1449):
sys/dev/pci/if_bge.c:   1.194 via patch

Instruct hardware to perform checksumming over the entire packet not just
over the payload and notify upper layers appropriately. Fixes PR kern/40018.


To generate a diff of this commit:
cvs rdiff -u -r1.122.2.11 -r1.122.2.12 src/sys/dev/pci/if_bge.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_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.122.2.11 src/sys/dev/pci/if_bge.c:1.122.2.12
--- src/sys/dev/pci/if_bge.c:1.122.2.11	Tue Aug 18 10:10:19 2009
+++ src/sys/dev/pci/if_bge.c	Wed Jun 13 15:55:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.122.2.11 2009/08/18 10:10:19 bouyer Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.122.2.12 2012/06/13 15:55:03 sborrill Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.122.2.11 2009/08/18 10:10:19 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.122.2.12 2012/06/13 15:55:03 sborrill Exp $);
 
 #include bpfilter.h
 #include vlan.h
@@ -1638,7 +1638,7 @@ bge_chipinit(struct bge_softc *sc)
 	 */
 	CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
 		BGE_MODECTL_MAC_ATTN_INTR | BGE_MODECTL_HOST_SEND_BDS |
-		BGE_MODECTL_TX_NO_PHDR_CSUM | BGE_MODECTL_RX_NO_PHDR_CSUM);
+		BGE_MODECTL_TX_NO_PHDR_CSUM);
 
 	/*
 	 * Disable memory write invalidate.  Apparently it is not supported
@@ -3029,7 +3029,7 @@ bge_rxeof(struct bge_softc *sc)
 			cur_rx-bge_tcp_udp_csum;
 			m-m_pkthdr.csum_flags |=
 			(M_CSUM_TCPv4|M_CSUM_UDPv4|
-			 M_CSUM_DATA|M_CSUM_NO_PSEUDOHDR);
+			 M_CSUM_DATA);
 		}
 
 		/*



CVS commit: [netbsd-4] src/doc

2012-06-13 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Jun 13 15:56:48 UTC 2012

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Ticket #1449 plus a few whitespace changes


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.242 -r1.1.2.243 src/doc/CHANGES-4.1

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-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.242 src/doc/CHANGES-4.1:1.1.2.243
--- src/doc/CHANGES-4.1:1.1.2.242	Tue Jun 12 23:23:52 2012
+++ src/doc/CHANGES-4.1	Wed Jun 13 15:56:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.242 2012/06/12 23:23:52 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.243 2012/06/13 15:56:47 sborrill Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4636,17 +4636,17 @@ crypto/dist/openssl/ssl/d1_enc.c		patch
 	Address CVE-2012-2333.
 	[drochner, ticket #1446]
 
-dist/bind/CHANGES	patch
-dist/bind/version	patch
-dist/bind/lib/dns/rdata.cpatch
-dist/bind/lib/dns/rdataslab.cpatch
+dist/bind/CHANGESpatch
+dist/bind/versionpatch
+dist/bind/lib/dns/rdata.c			patch
+dist/bind/lib/dns/rdataslab.c			patch
 	
 	Update bind to 9.4-ESV-R4-P2:
 	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
 			   rdataslabs. [RT #29644]
 	[christos, ticket #1447]
 
-sys/dev/mii/mii_physubr.c1.73 via patch
+sys/dev/mii/mii_physubr.c			1.73 via patch
 
 	Make 1000baseT connections work even when the user specifies
 	media 1000baseT connections with ifconfig(8) rather than only
@@ -4660,3 +4660,10 @@ sys/arch/amd64/amd64/netbsd32_machdep.c	
 	now instead of trying to jump to the bogus address.
 	[spz, ticket #1450]
 
+sys/dev/pci/if_bge.c1.194 via patch
+
+	Instruct hardware to perform checksumming over the entire packet
+	not just over the payload and notify upper layers appropriately.
+	Fixes PR kern/40018.
+	[buhrow, ticket #1449]
+



CVS commit: src/sys/arch/alpha/alpha

2012-06-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Jun 13 17:13:41 UTC 2012

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
Add some descriptions to machdep.unaligned_* sysctls.


To generate a diff of this commit:
cvs rdiff -u -r1.339 -r1.340 src/sys/arch/alpha/alpha/machdep.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/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.339 src/sys/arch/alpha/alpha/machdep.c:1.340
--- src/sys/arch/alpha/alpha/machdep.c:1.339	Mon May 21 14:15:16 2012
+++ src/sys/arch/alpha/alpha/machdep.c	Wed Jun 13 17:13:41 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.339 2012/05/21 14:15:16 martin Exp $ */
+/* $NetBSD: machdep.c,v 1.340 2012/06/13 17:13:41 njoly Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.339 2012/05/21 14:15:16 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.340 2012/06/13 17:13:41 njoly Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1550,17 +1550,20 @@ SYSCTL_SETUP(sysctl_machdep_setup, sysc
 		   CTL_MACHDEP, CPU_ROOT_DEVICE, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-		   CTLTYPE_INT, unaligned_print, NULL,
+		   CTLTYPE_INT, unaligned_print,
+		   SYSCTL_DESCR(Warn about unaligned accesses),
 		   NULL, 0, alpha_unaligned_print, 0,
 		   CTL_MACHDEP, CPU_UNALIGNED_PRINT, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-		   CTLTYPE_INT, unaligned_fix, NULL,
+		   CTLTYPE_INT, unaligned_fix,
+		   SYSCTL_DESCR(Fix up unaligned accesses),
 		   NULL, 0, alpha_unaligned_fix, 0,
 		   CTL_MACHDEP, CPU_UNALIGNED_FIX, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-		   CTLTYPE_INT, unaligned_sigbus, NULL,
+		   CTLTYPE_INT, unaligned_sigbus,
+		   SYSCTL_DESCR(Do SIGBUS for fixed unaligned accesses),
 		   NULL, 0, alpha_unaligned_sigbus, 0,
 		   CTL_MACHDEP, CPU_UNALIGNED_SIGBUS, CTL_EOL);
 	sysctl_createv(clog, 0, NULL, NULL,



CVS commit: src/sys/arch/i386/stand/lib

2012-06-13 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Wed Jun 13 18:34:20 UTC 2012

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Sanity check the values coming back from the int13 extensions of the bios,
so we can catch impossible return values.  Allows the bootloader to work
again on the Soekris net4501.

Fixes PR kern/46027.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/i386/stand/lib/biosdisk.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/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.40 src/sys/arch/i386/stand/lib/biosdisk.c:1.41
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.40	Mon Jan 16 18:47:57 2012
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Wed Jun 13 18:34:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.40 2012/01/16 18:47:57 christos Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.41 2012/06/13 18:34:20 perseant Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -316,7 +316,9 @@ read_gpt(struct biosdisk *d)
 	gptsector[0] = GPT_HDR_BLKNO;
 	if (set_geometry(d-ll, ed) == 0  d-ll.flags  BIOSDISK_INT13EXT) {
 		gptsector[1] = ed.totsec - 1;
-		d-ll.secsize = ed.sbytes;
+		/* Sanity check values returned from BIOS */
+		if (ed.sbytes = 512  (ed.sbytes  (ed.sbytes - 1)) == 0)
+			d-ll.secsize = ed.sbytes;
 	} else {
 #ifdef DISK_DEBUG
 		printf(Unable to determine extended disk geometry - 



CVS commit: [netbsd-6] src/tests/lib/libcurses/director

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 18:55:24 UTC 2012

Modified Files:
src/tests/lib/libcurses/director [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by joerg in ticket #327):
tests/lib/libcurses/director/Makefile: revision 1.6
Spell NetBSD correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/tests/lib/libcurses/director/Makefile

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/libcurses/director/Makefile
diff -u src/tests/lib/libcurses/director/Makefile:1.5 src/tests/lib/libcurses/director/Makefile:1.5.4.1
--- src/tests/lib/libcurses/director/Makefile:1.5	Thu Sep  8 18:44:38 2011
+++ src/tests/lib/libcurses/director/Makefile	Wed Jun 13 18:55:24 2012
@@ -1,4 +1,4 @@
-#	$NetSD$
+#	$NetBSD: Makefile,v 1.5.4.1 2012/06/13 18:55:24 riz Exp $
 #
 .include bsd.own.mk
 



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

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:09:39 UTC 2012

Modified Files:
src/usr.sbin/fssconfig [netbsd-6]: fssconfig.8

Log Message:
Pull up following revision(s) (requested by hannken in ticket #329):
usr.sbin/fssconfig/fssconfig.8: revision 1.8
File system snapshots are no longer experimental.
Forgot to chang this man page in Nov 2011.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.22.1 src/usr.sbin/fssconfig/fssconfig.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/fssconfig/fssconfig.8
diff -u src/usr.sbin/fssconfig/fssconfig.8:1.7 src/usr.sbin/fssconfig/fssconfig.8:1.7.22.1
--- src/usr.sbin/fssconfig/fssconfig.8:1.7	Wed Apr 30 13:11:02 2008
+++ src/usr.sbin/fssconfig/fssconfig.8	Wed Jun 13 19:09:39 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fssconfig.8,v 1.7 2008/04/30 13:11:02 martin Exp $	*/
+.\	$NetBSD: fssconfig.8,v 1.7.22.1 2012/06/13 19:09:39 riz Exp $	*/
 .\
 .\
 .\ Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 31, 2005
+.Dd June 11, 2012
 .Dt FSSCONFIG 8
 .Os
 .Sh NAME
@@ -161,9 +161,3 @@ The
 .Nm
 command appeared in
 .Nx 2.0 .
-.Sh BUGS
-The
-.Xr fss 4
-driver is
-.Em experimental .
-Be sure you have a backup before you use it.



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

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:12:24 UTC 2012

Modified Files:
src/sys/netinet [netbsd-6]: in.c

Log Message:
Pull up following revision(s) (requested by gdt in ticket #330):
sys/netinet/in.c: revision 1.143
Simply use the ifa_addr pointer, rather than taking its address.
Resolves failure to match addresses in SIOC[GD]LIFADDR calls.
Diagnosis and fix is due to Mark Keaton of BBN.


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

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

Modified files:

Index: src/sys/netinet/in.c
diff -u src/sys/netinet/in.c:1.142 src/sys/netinet/in.c:1.142.2.1
--- src/sys/netinet/in.c:1.142	Mon Dec 12 00:06:39 2011
+++ src/sys/netinet/in.c	Wed Jun 13 19:12:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.142 2011/12/12 00:06:39 roy Exp $	*/
+/*	$NetBSD: in.c,v 1.142.2.1 2012/06/13 19:12:23 riz Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in.c,v 1.142 2011/12/12 00:06:39 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: in.c,v 1.142.2.1 2012/06/13 19:12:23 riz Exp $);
 
 #include opt_inet.h
 #include opt_inet_conf.h
@@ -729,7 +729,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo
 continue;
 			if (cmp == 0)
 break;
-			candidate.s_addr = ((struct sockaddr_in *)ifa-ifa_addr)-sin_addr.s_addr;
+			candidate.s_addr = ((struct sockaddr_in *)ifa-ifa_addr)-sin_addr.s_addr;
 			candidate.s_addr = mask.s_addr;
 			if (candidate.s_addr == match.s_addr)
 break;



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

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:14:18 UTC 2012

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

Log Message:
Pull up following revision(s) (requested by mrg in ticket #331):
sys/dev/audio.c: revision 1.261
ensure that the intr lock is held for all audio_clear() callers.


To generate a diff of this commit:
cvs rdiff -u -r1.257.2.3 -r1.257.2.4 src/sys/dev/audio.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/audio.c
diff -u src/sys/dev/audio.c:1.257.2.3 src/sys/dev/audio.c:1.257.2.4
--- src/sys/dev/audio.c:1.257.2.3	Mon May  7 03:03:18 2012
+++ src/sys/dev/audio.c	Wed Jun 13 19:14:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.257.2.3 2012/05/07 03:03:18 riz Exp $	*/
+/*	$NetBSD: audio.c,v 1.257.2.4 2012/06/13 19:14:17 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.257.2.3 2012/05/07 03:03:18 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.257.2.4 2012/06/13 19:14:17 riz Exp $);
 
 #include audio.h
 #if NAUDIO  0
@@ -1991,7 +1991,7 @@ void
 audio_clear(struct audio_softc *sc)
 {
 
-	KASSERT(mutex_owned(sc-sc_lock));
+	KASSERT(mutex_owned(sc-sc_intr_lock));
 
 	if (sc-sc_rbus) {
 		cv_broadcast(sc-sc_rchan);
@@ -2387,8 +2387,8 @@ audio_ioctl(struct audio_softc *sc, u_lo
 		DPRINTF((AUDIO_FLUSH\n));
 		rbus = sc-sc_rbus;
 		pbus = sc-sc_pbus;
-		audio_clear(sc);
 		mutex_enter(sc-sc_intr_lock);
+		audio_clear(sc);
 		error = audio_initbufs(sc);
 		if (error) {
 			mutex_exit(sc-sc_intr_lock);



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

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:17:43 UTC 2012

Modified Files:
src/sys/dev/pci [netbsd-6]: eso.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #332):
sys/dev/pci/eso.c: revision 1.60
don't kassert that the sc_intr_lock is held in eso_reset().  it's only
called from attach and doesn't need to have it held, and PR 46451 shows
that it currently asserts.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.59.4.1 src/sys/dev/pci/eso.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/eso.c
diff -u src/sys/dev/pci/eso.c:1.59 src/sys/dev/pci/eso.c:1.59.4.1
--- src/sys/dev/pci/eso.c:1.59	Thu Nov 24 03:35:59 2011
+++ src/sys/dev/pci/eso.c	Wed Jun 13 19:17:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: eso.c,v 1.59 2011/11/24 03:35:59 mrg Exp $	*/
+/*	$NetBSD: eso.c,v 1.59.4.1 2012/06/13 19:17:43 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: eso.c,v 1.59 2011/11/24 03:35:59 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: eso.c,v 1.59.4.1 2012/06/13 19:17:43 riz Exp $);
 
 #include mpu.h
 
@@ -670,8 +670,6 @@ eso_reset(struct eso_softc *sc)
 {
 	int i;
 
-	KASSERT(mutex_owned(sc-sc_intr_lock));
-
 	bus_space_write_1(sc-sc_sb_iot, sc-sc_sb_ioh, ESO_SB_RESET,
 	ESO_SB_RESET_SW | ESO_SB_RESET_FIFO);
 	/* `Delay' suggested in the data sheet. */



CVS commit: [netbsd-6] src/doc

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:21:02 UTC 2012

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

Log Message:
Tickets 327, 329-332.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-6.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-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.126 src/doc/CHANGES-6.0:1.1.2.127
--- src/doc/CHANGES-6.0:1.1.2.126	Tue Jun 12 23:16:18 2012
+++ src/doc/CHANGES-6.0	Wed Jun 13 19:21:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.126 2012/06/12 23:16:18 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.127 2012/06/13 19:21:02 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -5525,3 +5525,28 @@ sys/arch/amd64/amd64/netbsd32_machdep.c	
 	now instead of trying to jump to the bogus address.
 	[spz, ticket #337]
 
+tests/lib/libcurses/director/Makefile		1.6
+
+	Spell NetBSD correctly.
+	[joerg, ticket #327]
+
+usr.sbin/fssconfig/fssconfig.8			1.8
+
+	File system snapshots are no longer experimental.
+	[hannken, ticket #329]
+
+sys/netinet/in.c1.143
+
+	Fix a pointer bug in SIOCGLIFADDR processing.
+	[gdt, ticket #330]
+
+sys/dev/audio.c	1.261
+
+	Fix locking issue.
+	[mrg, ticket #331]
+
+sys/dev/pci/eso.c1.60
+
+	Fix locking issue.  PR#46451.
+	[mrg, ticket #332]
+



CVS commit: [netbsd-6] src/sys/external/bsd/drm/dist

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:39:04 UTC 2012

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core [netbsd-6]: drm_pciids.h
src/sys/external/bsd/drm/dist/shared-core [netbsd-6]: drm_pciids.txt
i915_drv.h i915_reg.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #334):
sys/external/bsd/drm/dist/shared-core/i915_drv.h: revision 1.5
sys/external/bsd/drm/dist/bsd-core/drm_pciids.h: revision 1.8
sys/external/bsd/drm/dist/shared-core/drm_pciids.txt: revision 1.3
sys/external/bsd/drm/dist/shared-core/i915_reg.h: revision 1.2
Make i915drm work on Atom N4xx/D410/D510 + GMA3150 integrated graphic devices.
Patch is taken from FreeBSD:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=143427
and tested on MSI U135DX running NetBSD/i386 6.0_BETA2 with this patch.
Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.8.1 \
src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
cvs rdiff -u -r1.2 -r1.2.18.1 \
src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt
cvs rdiff -u -r1.4 -r1.4.10.1 \
src/sys/external/bsd/drm/dist/shared-core/i915_drv.h
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.24.1 \
src/sys/external/bsd/drm/dist/shared-core/i915_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/external/bsd/drm/dist/bsd-core/drm_pciids.h
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.7 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.7.8.1
--- src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.7	Mon Jul 25 14:21:52 2011
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h	Wed Jun 13 19:39:03 2012
@@ -581,7 +581,9 @@
 	{0x8086, 0x29B2, CHIP_I9XX|CHIP_I915, Intel Q35}, \
 	{0x8086, 0x29D2, CHIP_I9XX|CHIP_I915, Intel Q33}, \
 	{0x8086, 0x2A42, CHIP_I9XX|CHIP_I965, Mobile IntelĀ® GM45 Express Chipset}, \
-	{0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, Intel Integrated Graphics Device}, \
+	{0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, Intel Eaglelake}, \
+	{0x8086, 0xA001, CHIP_I9XX|CHIP_I965, Intel Pineview}, \
+	{0x8086, 0xA011, CHIP_I9XX|CHIP_I965, Intel Pineview (M)}, \
 	{0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, Intel Q45/Q43}, \
 	{0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, Intel G45/G43}, \
 	{0, 0, 0, NULL}

Index: src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt
diff -u src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt:1.2 src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt:1.2.18.1
--- src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt:1.2	Fri Jun 19 03:50:05 2009
+++ src/sys/external/bsd/drm/dist/shared-core/drm_pciids.txt	Wed Jun 13 19:39:03 2012
@@ -514,7 +514,9 @@
 0x8086 0x29B2 CHIP_I9XX|CHIP_I915 Intel Q35
 0x8086 0x29D2 CHIP_I9XX|CHIP_I915 Intel Q33
 0x8086 0x2A42 CHIP_I9XX|CHIP_I965 Mobile IntelĀ® GM45 Express Chipset
-0x8086 0x2E02 CHIP_I9XX|CHIP_I965 Intel Integrated Graphics Device
+0x8086 0x2E02 CHIP_I9XX|CHIP_I965 Intel Eaglelake
+0x8086 0xA001 CHIP_I9XX|CHIP_I965 Intel Pineview
+0x8086 0xA011 CHIP_I9XX|CHIP_I965 Intel Pineview (M)
 0x8086 0x2E12 CHIP_I9XX|CHIP_I965 Intel Q45/Q43
 0x8086 0x2E22 CHIP_I9XX|CHIP_I965 Intel G45/G43
 

Index: src/sys/external/bsd/drm/dist/shared-core/i915_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.4 src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.4.10.1
--- src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.4	Thu Feb 24 08:02:55 2011
+++ src/sys/external/bsd/drm/dist/shared-core/i915_drv.h	Wed Jun 13 19:39:03 2012
@@ -633,15 +633,21 @@ extern int i915_wait_ring(struct drm_dev
 		 (dev)-pci_device == 0x2E12 || \
 		 (dev)-pci_device == 0x2E22)
 
+#define IS_IGDG(dev) ((dev)-pci_device == 0xA001)
+#define IS_IGDGM(dev) ((dev)-pci_device == 0xA011)
+#define IS_IGD(dev) (IS_IGDG(dev) || IS_IGDGM(dev))
+
 #define IS_G33(dev)((dev)-pci_device == 0x29C2 ||	\
 			(dev)-pci_device == 0x29B2 ||	\
-			(dev)-pci_device == 0x29D2)
+			(dev)-pci_device == 0x29D2 ||	\
+			IS_IGD(dev))
 
 #define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(dev) || \
 		  IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))
 
 #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
-			IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
+			IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \
+			IS_IGD(dev))
 
 #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
 

Index: src/sys/external/bsd/drm/dist/shared-core/i915_reg.h
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_reg.h:1.1.1.1 src/sys/external/bsd/drm/dist/shared-core/i915_reg.h:1.1.1.1.24.1
--- src/sys/external/bsd/drm/dist/shared-core/i915_reg.h:1.1.1.1	Fri Jun 19 03:22:24 2009
+++ src/sys/external/bsd/drm/dist/shared-core/i915_reg.h	Wed Jun 13 19:39:03 2012
@@ -334,6 +334,7 @@
 #define   DPLLB_LVDS_P2_CLOCK_DIV_7	(1  24) /* i915 */
 #define   

CVS commit: [netbsd-6] src/sys/arch/powerpc/booke

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:41:28 UTC 2012

Modified Files:
src/sys/arch/powerpc/booke [netbsd-6]: e500_intr.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #338):
sys/arch/powerpc/booke/e500_intr.c: revision 1.17
Compute softintr mask correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.8.1 src/sys/arch/powerpc/booke/e500_intr.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/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.16 src/sys/arch/powerpc/booke/e500_intr.c:1.16.8.1
--- src/sys/arch/powerpc/booke/e500_intr.c:1.16	Tue Sep 27 01:02:35 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Wed Jun 13 19:41:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.16 2011/09/27 01:02:35 jym Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.16.8.1 2012/06/13 19:41:28 riz Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 #define __INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: e500_intr.c,v 1.16 2011/09/27 01:02:35 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: e500_intr.c,v 1.16.8.1 2012/06/13 19:41:28 riz Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -506,7 +506,7 @@ e500_splx(int ipl)
 	// const
 	register_t msr = wrtee(0);
 #ifdef __HAVE_FAST_SOFTINTS
-	const u_int softints = (ci-ci_data.cpu_softints  ipl)  IPL_SOFTMASK;
+	const u_int softints = ci-ci_data.cpu_softints  (IPL_SOFTMASK  ipl);
 	if (__predict_false(softints != 0)) {
 		e500_splset(ci, IPL_HIGH);
 		powerpc_softint(ci, ipl,
@@ -940,7 +940,7 @@ e500_extintr(struct trapframe *tf)
 	/*
 	 * Before exiting, deal with any softints that need to be dealt with.
 	 */
-	const u_int softints = (ci-ci_data.cpu_softints  old_ipl)  IPL_SOFTMASK;
+	const u_int softints = ci-ci_data.cpu_softints  (IPL_SOFTMASK  old_ipl);
 	if (__predict_false(softints != 0)) {
 		KASSERT(old_ipl  IPL_VM);
 		e500_splset(ci, IPL_HIGH);	/* pop to high */



CVS commit: [netbsd-6] src/sys/arch/powerpc/booke

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:42:56 UTC 2012

Modified Files:
src/sys/arch/powerpc/booke [netbsd-6]: spe_subr.S

Log Message:
Pull up following revision(s) (requested by matt in ticket #339):
sys/arch/powerpc/booke/spe_subr.S: revision 1.3
Fix SPE loading typo as described in PR/45731


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.16.1 src/sys/arch/powerpc/booke/spe_subr.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/powerpc/booke/spe_subr.S
diff -u src/sys/arch/powerpc/booke/spe_subr.S:1.2 src/sys/arch/powerpc/booke/spe_subr.S:1.2.16.1
--- src/sys/arch/powerpc/booke/spe_subr.S:1.2	Tue Jan 18 01:02:52 2011
+++ src/sys/arch/powerpc/booke/spe_subr.S	Wed Jun 13 19:42:56 2012
@@ -30,7 +30,7 @@
 #include machine/asm.h
 #include assym.h
 
-RCSID($NetBSD: spe_subr.S,v 1.2 2011/01/18 01:02:52 matt Exp $)
+RCSID($NetBSD: spe_subr.S,v 1.2.16.1 2012/06/13 19:42:56 riz Exp $)
 
 	.text
 	.machine	e500x2
@@ -90,11 +90,11 @@ ENTRY(vec_load_from_vreg)
 	evldw %r10,(10  2)(%r3)
 		evmergelo %r11,%r10,%r11
 	evldw %r8,(8  2)(%r3)
-		evmergelo %r19,%r8,%r19
+		evmergelo %r9,%r8,%r9
 	evldw %r6,(6  2)(%r3)
-		evmergelo %r17,%r6,%r17
+		evmergelo %r7,%r6,%r7
 	evldw %r4,(4  2)(%r3)
-		evmergelo %r15,%r4,%r15
+		evmergelo %r5,%r4,%r5
 
 	/*
 	 * R2 isn't a callee-saved, so load into r0 because we still need r3



CVS commit: [netbsd-6] src/sys/arch/powerpc/include

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:44:11 UTC 2012

Modified Files:
src/sys/arch/powerpc/include [netbsd-6]: types.h userret.h

Log Message:
Pull up following revision(s) (requested by matt in ticket #340):
sys/arch/powerpc/include/types.h: revision 1.47
sys/arch/powerpc/include/userret.h: revision 1.24
Add __HAVE_RAS support.  Do it in userret.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.46.8.1 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.22 -r1.22.8.1 src/sys/arch/powerpc/include/userret.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/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.46 src/sys/arch/powerpc/include/types.h:1.46.8.1
--- src/sys/arch/powerpc/include/types.h:1.46	Sun Jul 17 23:23:54 2011
+++ src/sys/arch/powerpc/include/types.h	Wed Jun 13 19:44:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.46 2011/07/17 23:23:54 dyoung Exp $	*/
+/*	$NetBSD: types.h,v 1.46.8.1 2012/06/13 19:44:11 riz Exp $	*/
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -95,5 +95,8 @@ typedef volatile __uint32_t __cpuset_t;
 
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
 #define	__HAVE_MM_MD_KERNACC
+#if defined(_KERNEL)
+#define	__HAVE_RAS
+#endif
 
 #endif	/* _MACHTYPES_H_ */

Index: src/sys/arch/powerpc/include/userret.h
diff -u src/sys/arch/powerpc/include/userret.h:1.22 src/sys/arch/powerpc/include/userret.h:1.22.8.1
--- src/sys/arch/powerpc/include/userret.h:1.22	Tue Sep 27 01:02:36 2011
+++ src/sys/arch/powerpc/include/userret.h	Wed Jun 13 19:44:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.22 2011/09/27 01:02:36 jym Exp $	*/
+/*	$NetBSD: userret.h,v 1.22.8.1 2012/06/13 19:44:11 riz Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,6 +35,7 @@
 #include opt_altivec.h
 
 #include sys/userret.h
+#include sys/ras.h
 
 #include powerpc/fpu.h
 #include powerpc/psl.h
@@ -79,4 +80,16 @@ userret(struct lwp *l, struct trapframe 
 		booke_sstep(tf);
 	}
 #endif
+
+#ifdef __HAVE_RAS
+	/*
+	 * Check to see if a RAS was interrupted and restart it if it was.  
+	 */
+	struct proc * const p = l-l_proc;
+	if (__predict_false(p-p_raslist != NULL)) {
+		void * const ras_pc = ras_lookup(p, (void *) tf-tf_srr0);
+		if (ras_pc != (void *) -1)
+			tf-tf_srr0 = (vaddr_t) ras_pc;
+	}
+#endif
 }



CVS commit: src/external/mit/xorg/bin/xdm/config

2012-06-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 13 19:44:14 UTC 2012

Modified Files:
src/external/mit/xorg/bin/xdm/config: Makefile
Added Files:
src/external/mit/xorg/bin/xdm/config: NetBSD-flag.png.uue
Removed Files:
src/external/mit/xorg/bin/xdm/config: NetBSD-flag.png

Log Message:
On second thought, do not store a binary file in the repository, instead
use the uuencoded version.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/mit/xorg/bin/xdm/config/Makefile
cvs rdiff -u -r1.1 -r0 src/external/mit/xorg/bin/xdm/config/NetBSD-flag.png
cvs rdiff -u -r0 -r1.1 \
src/external/mit/xorg/bin/xdm/config/NetBSD-flag.png.uue

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/bin/xdm/config/Makefile
diff -u src/external/mit/xorg/bin/xdm/config/Makefile:1.11 src/external/mit/xorg/bin/xdm/config/Makefile:1.12
--- src/external/mit/xorg/bin/xdm/config/Makefile:1.11	Wed Jun 13 18:51:35 2012
+++ src/external/mit/xorg/bin/xdm/config/Makefile	Wed Jun 13 19:44:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2012/06/13 18:51:35 martin Exp $
+#	$NetBSD: Makefile,v 1.12 2012/06/13 19:44:14 martin Exp $
 
 .include bsd.own.mk
 
@@ -9,6 +9,7 @@ DEFAULTVT=vt05
 DEFAULTVT=	# defined empty
 .endif
 
+UUDECODE_FILES=	NetBSD-flag.png
 CPPSCRIPTS=	Xresources Xreset Xservers.ws Xsession Xstartup xdm-config 
 
 CPPSCRIPTFLAGS_Xresources=	-DXPM -DBITMAPDIR=${X11INCDIR}/X11/pixmaps \

Added files:

Index: src/external/mit/xorg/bin/xdm/config/NetBSD-flag.png.uue
diff -u /dev/null src/external/mit/xorg/bin/xdm/config/NetBSD-flag.png.uue:1.1
--- /dev/null	Wed Jun 13 19:44:14 2012
+++ src/external/mit/xorg/bin/xdm/config/NetBSD-flag.png.uue	Wed Jun 13 19:44:14 2012
@@ -0,0 +1,165 @@
+begin 644 NetBSD-flag.png
+MB5!.1PT*@H-24A$4@```+D```6`8```5RF_7!(67,```L3
+M```+$P$`FIP8```*3VE#0U!0:]T;W-H;W`@24-#('!R;V9I;4``'C:G5-G
+M5%/I%CWWWO12XB`E$MO4A4((%)BX`4D28J(0D02H@AH=D54$1144$\B@
+MB`..CH,%5$L#(H*V`?D(:*.@Z.(BLK[X7NC:]:\]^;-_K77/NL\YVSSP?`
+M`R62#-1-8`,J4($#Q\3X0N0($*)'``$`BS9%S_2,!`/A^/#PK(L`'
+MO@`!-,+`#`39O`,!R'_P_J0IE`8$`!TD3A+(`4`$!ZCD*F`$!`8=
+MF93`*`$`#+8V+C`%`M``G?^;3`(=^)E[`0!;E$5`:1``398A$`@[
+M`*S/5HI%`%@P`!1F2\0Y`-@M`#!)5V9(`+W`,#.$`NR``@,`#!1B(4I``1[
+M`#((R-X`(29`!1\E\\2NN$.J``!XF;(\N20Y18%;UQ!U=7+AXHSDD7
+M*Q0V80)AFD`NPGF93*!-`_@\\P``*1%1'@@_/],X.KL[.-HZV#E\MZK\
+M_R)B8N/^Y^K$```.%T?M'^+^SH`[!H!M_J(E[@1H7@N@=?+9K(/0+4`
+MH.G:5_-P^'X\/$6AD+G9V7DY-A*Q$);8I7??YGPE_`5_UL^7X\_/?UX+[B
+M)($R78%'!/C@PLST3*4SY()A+YH]'_++__P=TR+$26*Y6H4XU$28Y$
+MFHSS,J4BB4*2*4ETO]DXM\L^P,^WS4`LH^`7N1+:A=8P/V2R06'3`XO`
+M`/*[;\'4*`@#@B#X]W_^\__4@)0`9DF20``7D0D+E3*LS_'```1*!
+M*K!!_3!S`!AS!!=S!_Q@-H1),30A!F2`'')@*:R0BBS;`=*F`O
+MU$`=-,!1:(:3`XNPE6X#CUP#_IA)[!*+R!01!R`@382':B`%BBE@CC@@7
+MF87X(%(!!*+)#)B!11(DN1-4@Q4HI4(%5('?(]@(YAUQNI$[R``R@OR
+MO$QE(R43W4#+5#N:@WH1H@O09'0QFH\6H)O0K0:/8PVH?0JV@/VH\^
+M0\PP.@8!S/$;#`NQL-L3@L9-CR[$BK`RKQAJP5JP#NXGU8\^Q=P02@47`
+M38$=T(@81Y!2%A,6$[82*@@'0T$=H)-PD#A%')R*3J$NT)KH1^088C(Q
+MAUA(+/6$H\3+Q![B$/$-R02B4,R)[F0`DFQI%32$M)TFY2(^DLJ9LT2!HC
+MD\G:9NR!SF4+`KR(7DG3#Y#/D^0A\EL*G6)`:3X4^(H4LIJ2AGE$.4T
+MY09EF#)!5:.:4MVHH501-8]:0JVAME*O48H$S1UFCG-@Q9)2Z6MHI73F@7
+M:/=IK^ATNA'=E1Y.E]!7TLOI1^B7Z`/T=PP-AA6#QXAG*!F;`89QEW*^8
+M3*89TXL9QU0P-S'KF.9#YEO55@JMBI\%9'*I5*E2:5RHO5*FJIJKJ@M5
+M\U7+5(^I7E-]KD95,U/CJ0G4EJM5JIU0ZU,;4VI.ZB'JFH;U0_I'Y9_8D
+M6-,PT]#I%@L5_CO,8@V,9LW@L(6L-JX9U@37$)K'-V7QV*KN8_1V[BSVJ
+MJ:$Y0S-*,US4O.49C\'XYAQ^)QT3@GG**7\WZ*WA3O*(IZ8T3+DQ95QK
+MJI:7EEBK2*M1JT?KO3:N[:=IKU%NUG[@0Y!QTHG7='9X_.!9WG4]E3W:*
+MIQ9-/3KUKBZJ:Z4;H;M$=[]NI^Z8GKY@)Y,;Z?;WG^AQ]+_U4_6WZI_5'
+M#%@LPPD!ML,SA@\Q35Q;SP=+\?;\5%#7-`0Z5AE67X821N=$\H]5C48/
+MCG7.,DXVW;:C)@8F(29+3I-[II23;FF*:8[3#M,Q\W,S:+-UIDUFSTQ
+MUS+GF^;UYO?MV!:%HLMJBVN5)LN1:IEGNMKQNA5HY6:5855I=LT:MG:TE
+MUKNMNZ1I[E.DTZKGM9GP[#QMLFVJ;9L.78!MNNMFVV?6%G8A=GM\6NP^Z3
+MO9-]NGV-_3T'#8?9#JL=6AU^[1R%#I6.MZ:SISN/WW%]);I+V=8SQ#/V#/C
+MMA/+*1IG5.;TT=G%VYX/SB(N)2X+++I^+IL;QMW(O1*=/5Q7%ZTO6=
+MF[.;PNVHVZ_N-NYI[H?G\PTGRF63-ST,/(0^!1Y=$_Y^5,O?K'Y/0T^!
+M9[7G(R]C+Y%7K=PMZ5WJO=A[Q^]CYRG^,^XSPWWC+65_,-\WR+?+3\-O
+MGE^%WT-_(_]D_WK_T0G@4!9P.)@4!6P+[^'I\(;^./SK;9?:RVU!C*Y
+M015!CX*M@N7!K2%HR.R0K2'WYYC.DYI#H50?NC6T`=AYF+PWX,)X6'A5
+M/XYPB%@:T37-7?1W$-SWT3Z1)9$WIMG,4\YKRU*-2H^JBYJ/-HWNC2Z/\8N
+M9EG,U5B=6$EL2QPY+BJN-FYLOM_\[?.'XIWB^-[%Y@OR%UP:'.PO2%IQ:I
+M+A(L.I9`3(A..)3P01`JJ!:,)?(3=R6.GG')G(B_1-M(V$-*AY.\D@J
+M37J2[)\-7DDQ3.E+.6YAID+Q,#4S=FSJ%IIV(TR/3J],8.2D9!Q0JHA
+M39.V9^IGYF9VRZQEA;+^Q6Z+MR\E0?):[.0K`59+0JV0J;H5%HHURH'LF=E
+M5V:_S8G*.9:KGBO-[RSRMN0-YSOG__M$L(2X9*VI89+5RT=6.:]KHYLCQQ
+M=L*XQ4%*X96!JP\N(JV*FW53ZOM5YN?KTFDUK@5[!RH+!M0%KZPM5N6%
+M?OU^U=3U@O6=^U8?JG1L^%8F*KA3;%Y5?]@HW'CEX=ORK^9W)2TJ:O$
+MN63/9M)FZ;+9Y;#I:JE^:7#FX-V=JT#=]6M.WU]D7;+Y?-*-N[@[9#N:._
+M/+B\9:?)SLT[/U2D5/14^E0V[M+=M6'7^[1[AM[O/8T[-7;6[SW_3[)OMM5
+M`55-U6;59?M)^[/W/ZZ)JNGXEOMM7:U.;7'MQP/2`_T'(PZVU[G4U1W2/512

CVS commit: [netbsd-6] src/doc

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 19:45:04 UTC 2012

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

Log Message:
Tickets 333,334,338-340.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-6.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-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.127 src/doc/CHANGES-6.0:1.1.2.128
--- src/doc/CHANGES-6.0:1.1.2.127	Wed Jun 13 19:21:02 2012
+++ src/doc/CHANGES-6.0	Wed Jun 13 19:45:04 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.127 2012/06/13 19:21:02 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.128 2012/06/13 19:45:04 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -5550,3 +5550,66 @@ sys/dev/pci/eso.c1.60
 	Fix locking issue.  PR#46451.
 	[mrg, ticket #332]
 
+doc/3RDPARTY	1.940 via patch
+doc/CHANGES	1.1708 via patch
+external/ibm-public/postfix/dist/HISTORY	patch
+external/ibm-public/postfix/dist/RELEASE_NOTES	patch
+external/ibm-public/postfix/dist/README_FILES/RELEASE_NOTES patch
+external/ibm-public/postfix/dist/README_FILES/TLS_README patch
+external/ibm-public/postfix/dist/html/TLS_README.html patch
+external/ibm-public/postfix/dist/html/lmtp.8.html patch
+external/ibm-public/postfix/dist/html/postconf.5.html patch
+external/ibm-public/postfix/dist/html/smtp.8.html patch
+external/ibm-public/postfix/dist/html/smtpd.8.html patch
+external/ibm-public/postfix/dist/man/man5/postconf.5 patch
+external/ibm-public/postfix/dist/man/man8/smtp.8 patch
+external/ibm-public/postfix/dist/man/man8/smtpd.8 patch
+external/ibm-public/postfix/dist/proto/TLS_README.html patch
+external/ibm-public/postfix/dist/proto/postconf.proto patch
+external/ibm-public/postfix/dist/src/cleanup/cleanup_milter.c patch
+external/ibm-public/postfix/dist/src/dnsblog/dnsblog.c patch
+external/ibm-public/postfix/dist/src/global/mail_params.h patch
+external/ibm-public/postfix/dist/src/global/mail_version.h patch
+external/ibm-public/postfix/dist/src/local/Makefile.in patch
+external/ibm-public/postfix/dist/src/postlog/postlog.c patch
+external/ibm-public/postfix/dist/src/postqueue/Makefile.in patch
+external/ibm-public/postfix/dist/src/postqueue/postqueue.c patch
+external/ibm-public/postfix/dist/src/smtp/smtp.c patch
+external/ibm-public/postfix/dist/src/smtpd/smtpd.c patch
+external/ibm-public/postfix/dist/src/tls/tls.h	patch
+external/ibm-public/postfix/dist/src/tls/tls_client.c patch
+external/ibm-public/postfix/dist/src/tls/tls_misc.c patch
+external/ibm-public/postfix/dist/src/tls/tls_server.c patch
+external/ibm-public/postfix/dist/src/util/events.c patch
+external/ibm-public/postfix/dist/src/xsasl/xsasl_cyrus.h patch
+external/ibm-public/postfix/dist/src/xsasl/xsasl_cyrus_client.c patch
+external/ibm-public/postfix/dist/src/xsasl/xsasl_cyrus_server.c patch
+
+	Update Postfix to version 2.8.11.
+	[tron, ticket #333]
+
+sys/external/bsd/drm/dist/bsd-core/drm_pciids.h	1.8
+sys/external/bsd/drm/dist/shared-core/drm_pciids.txt 1.3
+sys/external/bsd/drm/dist/shared-core/i915_drv.h 1.5
+sys/external/bsd/drm/dist/shared-core/i915_reg.h 1.2
+
+	Make i915drm work on Atom N4xx/D410/D510 + GMA3150 integrated
+	graphic devices.
+	[tsutsui, ticket #334]
+
+sys/arch/powerpc/booke/e500_intr.c		1.17
+
+	Compute softintr mask correctly on PPC BookE.
+	[matt, ticket #338]
+
+sys/arch/powerpc/booke/spe_subr.S		1.3
+
+	Fix SPE loading typo. PR#45731.
+	[matt, ticket #339]
+
+sys/arch/powerpc/include/types.h		1.47
+sys/arch/powerpc/include/userret.h		1.24
+
+	Add __HAVE_RAS support to PowerPC.
+	[matt, ticket #340]
+



CVS commit: src/sys/arch/zaurus/zaurus

2012-06-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Jun 13 20:04:30 UTC 2012

Modified Files:
src/sys/arch/zaurus/zaurus: autoconf.c

Log Message:
Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for zaurus.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/zaurus/autoconf.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/zaurus/zaurus/autoconf.c
diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.10 src/sys/arch/zaurus/zaurus/autoconf.c:1.11
--- src/sys/arch/zaurus/zaurus/autoconf.c:1.10	Thu May  5 08:46:12 2011
+++ src/sys/arch/zaurus/zaurus/autoconf.c	Wed Jun 13 20:04:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.10 2011/05/05 08:46:12 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $);
 
 #include opt_md.h
 
@@ -48,7 +48,6 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v
 #include machine/bootinfo.h
 #include machine/config_hook.h
 
-static void handle_wedges(device_t dv, int par);
 static int is_valid_disk(device_t dv);
 static int match_bootdisk(device_t dv, struct btinfo_bootdisk *bid);
 static void findroot(void);
@@ -69,17 +68,6 @@ cpu_configure(void)
 	spl0();
 }
 
-static void
-handle_wedges(device_t dv, int par)
-{
-
-	if (config_handle_wedges(dv, par) == 0)
-		return;
-
-	booted_device = dv;
-	booted_partition = par;
-}
-
 static int
 is_valid_disk(device_t dv)
 {
@@ -168,7 +156,8 @@ findroot(void)
 
 			if (strncmp(cd-cf_name, biv-devname, len) == 0 
 			biv-devname[len] - '0' == cd-cf_unit) {
-handle_wedges(dv, biv-devname[len + 1] - 'a');
+booted_device = dv;
+booted_partition = biv-devname[len + 1] - 'a';
 break;
 			}
 		}
@@ -205,7 +194,8 @@ findroot(void)
 device_xname(dv));
 continue;
 			}
-			handle_wedges(dv, bid-partition);
+			booted_device = dv;
+			booted_partition = bid-partition;
 		}
 		deviter_release(di);
 



CVS commit: src/etc

2012-06-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 13 20:49:15 UTC 2012

Modified Files:
src/etc/etc.acorn26: ttys
src/etc/etc.acorn32: ttys
src/etc/etc.alpha: ttys
src/etc/etc.amd64: ttys
src/etc/etc.amiga: ttys
src/etc/etc.amigappc: ttys
src/etc/etc.arc: ttys
src/etc/etc.atari: ttys
src/etc/etc.cats: ttys
src/etc/etc.evbarm: ttys
src/etc/etc.hp300: ttys
src/etc/etc.hpcarm: ttys
src/etc/etc.hpcmips: ttys
src/etc/etc.hpcsh: ttys
src/etc/etc.i386: ttys
src/etc/etc.ibmnws: ttys
src/etc/etc.iyonix: ttys
src/etc/etc.mac68k: ttys
src/etc/etc.mvmeppc: ttys
src/etc/etc.netwinder: ttys
src/etc/etc.newsmips: ttys
src/etc/etc.next68k: ttys
src/etc/etc.ofppc: ttys
src/etc/etc.pmax: ttys
src/etc/etc.prep: ttys
src/etc/etc.rs6000: ttys
src/etc/etc.sgimips: ttys
src/etc/etc.shark: ttys
src/etc/etc.zaurus: ttys

Log Message:
Per discussion on tech-userlevel, finally fix PR 10127:
move all ttyE* entries that use vt100 emulation to wsvt25 term type.
The terminfo vt220 entry lacked (correctly) a delete key entry, which
was a regression against the netbsd-5 termcap entry. On the other hand,
only a very small number of foreign systems lacks support for wsvt25
nowadays.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.acorn26/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.acorn32/ttys
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.alpha/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.amd64/ttys
cvs rdiff -u -r1.23 -r1.24 src/etc/etc.amiga/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.amigappc/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.arc/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.atari/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.cats/ttys
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.evbarm/ttys
cvs rdiff -u -r1.15 -r1.16 src/etc/etc.hp300/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.hpcarm/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.hpcmips/ttys
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.hpcsh/ttys
cvs rdiff -u -r1.19 -r1.20 src/etc/etc.i386/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.ibmnws/ttys
cvs rdiff -u -r1.3 -r1.4 src/etc/etc.iyonix/ttys
cvs rdiff -u -r1.19 -r1.20 src/etc/etc.mac68k/ttys
cvs rdiff -u -r1.5 -r1.6 src/etc/etc.mvmeppc/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.netwinder/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.newsmips/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.next68k/ttys
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.ofppc/ttys
cvs rdiff -u -r1.14 -r1.15 src/etc/etc.pmax/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.prep/ttys
cvs rdiff -u -r1.1 -r1.2 src/etc/etc.rs6000/ttys
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.sgimips/ttys
cvs rdiff -u -r1.7 -r1.8 src/etc/etc.shark/ttys
cvs rdiff -u -r1.2 -r1.3 src/etc/etc.zaurus/ttys

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

Modified files:

Index: src/etc/etc.acorn26/ttys
diff -u src/etc/etc.acorn26/ttys:1.3 src/etc/etc.acorn26/ttys:1.4
--- src/etc/etc.acorn26/ttys:1.3	Tue Oct  7 10:00:00 2008
+++ src/etc/etc.acorn26/ttys	Wed Jun 13 20:49:11 2012
@@ -1,11 +1,11 @@
 #
 #	from: @(#)ttys	5.1 (Berkeley) 4/17/89
-#	$NetBSD: ttys,v 1.3 2008/10/07 10:00:00 abs Exp $
+#	$NetBSD: ttys,v 1.4 2012/06/13 20:49:11 martin Exp $
 #
 # name	gettytype	status		comments
 #
-constty	/usr/libexec/getty Pc		vt220	off secure
-ttyE0	/usr/libexec/getty Pc		vt220	on secure
-ttyE1	/usr/libexec/getty Pc		vt220	off secure
-ttyE2	/usr/libexec/getty Pc		vt220	off secure
-ttyE3	/usr/libexec/getty Pc		vt220	off secure
+constty	/usr/libexec/getty Pc		wsvt25	off secure
+ttyE0	/usr/libexec/getty Pc		wsvt25	on secure
+ttyE1	/usr/libexec/getty Pc		wsvt25	off secure
+ttyE2	/usr/libexec/getty Pc		wsvt25	off secure
+ttyE3	/usr/libexec/getty Pc		wsvt25	off secure

Index: src/etc/etc.acorn32/ttys
diff -u src/etc/etc.acorn32/ttys:1.8 src/etc/etc.acorn32/ttys:1.9
--- src/etc/etc.acorn32/ttys:1.8	Tue Oct  7 10:00:00 2008
+++ src/etc/etc.acorn32/ttys	Wed Jun 13 20:49:12 2012
@@ -1,15 +1,15 @@
 #
 #	from: @(#)ttys	5.1 (Berkeley) 4/17/89
-#	$NetBSD: ttys,v 1.8 2008/10/07 10:00:00 abs Exp $
+#	$NetBSD: ttys,v 1.9 2012/06/13 20:49:12 martin Exp $
 #
 # name	gettytype	status		comments
 #
 console	/usr/libexec/getty Pc		vt100	off secure
 constty	/usr/libexec/getty Pc		vt100	off secure
-ttyE0	/usr/libexec/getty Pc		vt220	on secure
-ttyE1	/usr/libexec/getty Pc		vt220	on secure
-ttyE2	/usr/libexec/getty Pc		vt220	on secure
-ttyE3	/usr/libexec/getty Pc		vt220	on secure
+ttyE0	/usr/libexec/getty Pc		wsvt25	on secure
+ttyE1	/usr/libexec/getty Pc		wsvt25	on secure
+ttyE2	/usr/libexec/getty Pc		wsvt25	on secure
+ttyE3	/usr/libexec/getty Pc		wsvt25	on secure
 tty00	/usr/libexec/getty std.9600	unknown off secure
 tty01	/usr/libexec/getty std.9600	unknown off secure
 tty02	/usr/libexec/getty std.9600	unknown off secure

Index: 

CVS commit: src/external/atheros

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 21:17:29 UTC 2012

Modified Files:
src/external/atheros: Makefile.inc

Log Message:
Add a closing '$' to the RCSID tag.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/atheros/Makefile.inc

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

Modified files:

Index: src/external/atheros/Makefile.inc
diff -u src/external/atheros/Makefile.inc:1.1 src/external/atheros/Makefile.inc:1.2
--- src/external/atheros/Makefile.inc:1.1	Wed Nov  3 18:52:45 2010
+++ src/external/atheros/Makefile.inc	Wed Jun 13 21:17:29 2012
@@ -1,4 +1,4 @@
-# $NetBSD
+# $NetBSD: Makefile.inc,v 1.2 2012/06/13 21:17:29 riz Exp $
 
 FILESOWN=	${FIRMWAREOWN}
 FILESGRP=	${FIRMWAREGRP}



CVS commit: src/sys/fs

2012-06-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jun 13 22:56:51 UTC 2012

Modified Files:
src/sys/fs/hfs: hfs_vfsops.c
src/sys/fs/sysvbfs: sysvbfs_vfsops.c
src/sys/fs/v7fs: v7fs_vfsops.c

Log Message:
Ensure that error is initialized in all code paths.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/hfs/hfs_vfsops.c
cvs rdiff -u -r1.39 -r1.40 src/sys/fs/sysvbfs/sysvbfs_vfsops.c
cvs rdiff -u -r1.6 -r1.7 src/sys/fs/v7fs/v7fs_vfsops.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/hfs/hfs_vfsops.c
diff -u src/sys/fs/hfs/hfs_vfsops.c:1.28 src/sys/fs/hfs/hfs_vfsops.c:1.29
--- src/sys/fs/hfs/hfs_vfsops.c:1.28	Tue Mar 13 18:40:37 2012
+++ src/sys/fs/hfs/hfs_vfsops.c	Wed Jun 13 22:56:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hfs_vfsops.c,v 1.28 2012/03/13 18:40:37 elad Exp $	*/
+/*	$NetBSD: hfs_vfsops.c,v 1.29 2012/06/13 22:56:50 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hfs_vfsops.c,v 1.28 2012/03/13 18:40:37 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: hfs_vfsops.c,v 1.29 2012/06/13 22:56:50 joerg Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -201,7 +201,7 @@ hfs_mount(struct mount *mp, const char *
 	struct hfs_args *args = data;
 	struct vnode *devvp;
 	struct hfsmount *hmp;
-	int error;
+	int error = 0;
 	int update;
 	mode_t accessmode;
 

Index: src/sys/fs/sysvbfs/sysvbfs_vfsops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.39 src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.40
--- src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.39	Tue Mar 13 18:40:50 2012
+++ src/sys/fs/sysvbfs/sysvbfs_vfsops.c	Wed Jun 13 22:56:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vfsops.c,v 1.39 2012/03/13 18:40:50 elad Exp $	*/
+/*	$NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysvbfs_vfsops.c,v 1.39 2012/03/13 18:40:50 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -72,7 +72,7 @@ sysvbfs_mount(struct mount *mp, const ch
 	struct sysvbfs_args *args = data;
 	struct sysvbfs_mount *bmp = NULL;
 	struct vnode *devvp = NULL;
-	int error;
+	int error = 0;
 	bool update;
 
 	DPRINTF(%s: mnt_flag=%x\n, __func__, mp-mnt_flag);

Index: src/sys/fs/v7fs/v7fs_vfsops.c
diff -u src/sys/fs/v7fs/v7fs_vfsops.c:1.6 src/sys/fs/v7fs/v7fs_vfsops.c:1.7
--- src/sys/fs/v7fs/v7fs_vfsops.c:1.6	Tue Mar 13 18:40:51 2012
+++ src/sys/fs/v7fs/v7fs_vfsops.c	Wed Jun 13 22:56:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: v7fs_vfsops.c,v 1.6 2012/03/13 18:40:51 elad Exp $	*/
+/*	$NetBSD: v7fs_vfsops.c,v 1.7 2012/06/13 22:56:51 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: v7fs_vfsops.c,v 1.6 2012/03/13 18:40:51 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: v7fs_vfsops.c,v 1.7 2012/06/13 22:56:51 joerg Exp $);
 #if defined _KERNEL_OPT
 #include opt_v7fs.h
 #endif
@@ -85,7 +85,7 @@ v7fs_mount(struct mount *mp, const char 
 	struct v7fs_args *args = data;
 	struct v7fs_mount *v7fsmount = (void *)mp-mnt_data;
 	struct vnode *devvp = NULL;
-	int error;
+	int error = 0;
 	bool update = mp-mnt_flag  MNT_UPDATE;
 
 	DPRINTF(mnt_flag=%x %s\n, mp-mnt_flag, update ? update : );



CVS commit: src/sys/kern

2012-06-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jun 13 23:00:05 UTC 2012

Modified Files:
src/sys/kern: kern_cpu.c

Log Message:
Kill conditionals that are always true. Drop a dead assignment.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/kern_cpu.c

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

Modified files:

Index: src/sys/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.55 src/sys/kern/kern_cpu.c:1.56
--- src/sys/kern/kern_cpu.c:1.55	Sun Jan 29 22:55:40 2012
+++ src/sys/kern/kern_cpu.c	Wed Jun 13 23:00:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.55 2012/01/29 22:55:40 rmind Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.56 2012/06/13 23:00:05 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.55 2012/01/29 22:55:40 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.56 2012/06/13 23:00:05 joerg Exp $);
 
 #include opt_cpu_ucode.h
 
@@ -207,8 +207,7 @@ cpuctl_ioctl(dev_t dev, u_long cmd, void
 	mutex_enter(cpu_lock);
 	switch (cmd) {
 	case IOC_CPU_SETSTATE:
-		if (error == 0)
-			cs = data;
+		cs = data;
 		error = kauth_authorize_system(l-l_cred,
 		KAUTH_SYSTEM_CPU, KAUTH_REQ_SYSTEM_CPU_SETSTATE, cs, NULL,
 		NULL);
@@ -219,13 +218,12 @@ cpuctl_ioctl(dev_t dev, u_long cmd, void
 			error = ESRCH;
 			break;
 		}
-		error = cpu_setintr(ci, cs-cs_intr);
+		cpu_setintr(ci, cs-cs_intr);
 		error = cpu_setstate(ci, cs-cs_online);
 		break;
 
 	case IOC_CPU_GETSTATE:
-		if (error == 0)
-			cs = data;
+		cs = data;
 		id = cs-cs_id;
 		memset(cs, 0, sizeof(*cs));
 		cs-cs_id = id;



CVS commit: src/external

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jun 13 23:41:09 UTC 2012

Modified Files:
src/external: Makefile

Log Message:
Sort SUBDIR alphabetically.  Tested with build.sh -j8 on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/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/Makefile
diff -u src/external/Makefile:1.16 src/external/Makefile:1.17
--- src/external/Makefile:1.16	Thu Feb 17 07:52:10 2011
+++ src/external/Makefile	Wed Jun 13 23:41:09 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.16 2011/02/17 07:52:10 jruoho Exp $
+#	$NetBSD: Makefile,v 1.17 2012/06/13 23:41:09 riz Exp $
 
-SUBDIR+= apache2 atheros bsd intel-fw-eula intel-fw-public gpl2 gpl3 historical
-SUBDIR+= ibm-public public-domain cddl mit
+SUBDIR+= apache2 atheros bsd cddl gpl2 gpl3 historical intel-fw-eula
+SUBDIR+= intel-fw-public ibm-public mit public-domain
 
 .include bsd.subdir.mk



CVS commit: src/sys/dev/pci

2012-06-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jun 14 00:15:08 UTC 2012

Modified Files:
src/sys/dev/pci: machfb.c

Log Message:
cosmetics:
- fix/remove outdated comments
- printf() - aprint_*()
- #if 1 removal


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/machfb.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/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.75 src/sys/dev/pci/machfb.c:1.76
--- src/sys/dev/pci/machfb.c:1.75	Tue May  8 02:25:25 2012
+++ src/sys/dev/pci/machfb.c	Thu Jun 14 00:15:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.75 2012/05/08 02:25:25 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.76 2012/06/14 00:15:07 macallan Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.75 2012/05/08 02:25:25 macallan Exp $);
+	$NetBSD: machfb.c,v 1.76 2012/06/14 00:15:07 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -533,7 +533,7 @@ mach64_attach(device_t parent, device_t 
 	printf(prop_dictionary_externalize(device_properties(self)));
 #endif
 	
-	/* enable memory and disable IO access */
+	/* enable memory access */
 	screg = pci_conf_read(sc-sc_pc, sc-sc_pcitag, PCI_COMMAND_STATUS_REG);
 	if ((screg  enables) != enables) {
 		screg |= enables;
@@ -550,7 +550,7 @@ mach64_attach(device_t parent, device_t 
 		sc-sc_bars[bar].vb_busaddr = pci_conf_read(sc-sc_pc,
 		sc-sc_pcitag, reg)  0xfff0;
 	}
-	printf(%s: aperture size %08x\n, device_xname(sc-sc_dev), 
+	aprint_debug_dev(sc-sc_dev, aperture size %08x\n,
 	(uint32_t)sc-sc_apersize);
 
 	sc-sc_rom.vb_type = PCI_MAPREG_TYPE_ROM;	
@@ -637,8 +637,10 @@ mach64_attach(device_t parent, device_t 
 	else
 		sc-memtype = regr(sc, CONFIG_STAT0)  0x07;
 
-	/* XXX is there any way to calculate reference frequency from
-	   known values? */
+	/*
+	 * XXX is there any way to calculate reference frequency from
+	 * known values?
+	 */
 	if ((mach64_chip_id == PCI_PRODUCT_ATI_RAGE_XL_PCI) ||
 	((mach64_chip_id = PCI_PRODUCT_ATI_RAGE_LT_PRO_PCI) 
 	(mach64_chip_id = PCI_PRODUCT_ATI_RAGE_LT_PRO))) {
@@ -648,14 +650,14 @@ mach64_attach(device_t parent, device_t 
 		sc-ref_freq = 14318;
 
 	reg = regr(sc, CLOCK_CNTL);
-	printf(CLOCK_CNTL: %08x\n, reg);
+	aprint_debug(CLOCK_CNTL: %08x\n, reg);
 	sc-sc_clock = reg  3;
-	printf(using clock %d\n, sc-sc_clock);
+	aprint_debug(using clock %d\n, sc-sc_clock);
 
 	sc-ref_div = regrb_pll(sc, PLL_REF_DIV);
-	printf(ref_div: %d\n, sc-ref_div);
+	aprint_debug(ref_div: %d\n, sc-ref_div);
 	sc-mclk_fb_div = regrb_pll(sc, MCLK_FB_DIV);
-	printf(mclk_fb_div: %d\n, sc-mclk_fb_div);
+	aprint_debug(mclk_fb_div: %d\n, sc-mclk_fb_div);
 	sc-mem_freq = (2 * sc-ref_freq * sc-mclk_fb_div) /
 	(sc-ref_div * 2);
 	sc-mclk_post_div = (sc-mclk_fb_div * 2 * sc-ref_freq) /
@@ -688,9 +690,7 @@ mach64_attach(device_t parent, device_t 
 	}
 
 	sc-sc_console = mach64_is_console(sc);
-#ifdef DIAGNOSTIC
-	aprint_normal(gen_cntl: %08x\n, regr(sc, CRTC_GEN_CNTL));
-#endif
+	aprint_debug(gen_cntl: %08x\n, regr(sc, CRTC_GEN_CNTL));
 #if defined(__sparc__) || defined(__powerpc__)
 	if (sc-sc_console) {
 		if (mode != NULL) {
@@ -772,7 +772,7 @@ mach64_attach(device_t parent, device_t 
 		 * since we're not the console we can postpone the rest
 		 * until someone actually allocates a screen for us
 		 */
-		mach64_modeswitch(sc, sc-sc_my_mode);		 
+		mach64_modeswitch(sc, sc-sc_my_mode);
 	}
 		
 	aa.console = sc-sc_console;
@@ -998,7 +998,7 @@ mach64_set_crtcregs(struct mach64_softc 
 
 	if (sc-has_dsp)
 		mach64_set_dsp(sc);
-#if 1
+
 	regw(sc, CRTC_H_TOTAL_DISP, crtc-h_total_disp);
 	regw(sc, CRTC_H_SYNC_STRT_WID, crtc-h_sync_strt_wid);
 	regw(sc, CRTC_V_TOTAL_DISP, crtc-v_total_disp);
@@ -1014,7 +1014,6 @@ mach64_set_crtcregs(struct mach64_softc 
 	CRTC_CSYNC_EN |
 #endif
 	CRTC_EXT_DISP_EN | CRTC_EXT_EN);
-#endif
 }
 
 static int
@@ -1252,7 +1251,7 @@ mach64_set_pll(struct mach64_softc *sc, 
 	printf(q = %d\n, q);
 #endif
 	if (q  25500) {
-		printf(Warning: q  25500\n);
+		aprint_error_dev(sc-sc_dev, Warning: q  25500\n);
 		q = 25500;
 		sc-vclk_post_div = 1;
 		sc-log2_vclk_post_div = 0;
@@ -1269,15 +1268,16 @@ mach64_set_pll(struct mach64_softc *sc, 
 		sc-vclk_post_div = 8;
 		sc-log2_vclk_post_div = 3;
 	} else {
-		printf(Warning: q  1600\n);
+		aprint_error_dev(sc-sc_dev, Warning: q  1600\n);
 		sc-vclk_post_div = 8;
 		sc-log2_vclk_post_div = 3;
 	}
 	sc-vclk_fb_div = q * sc-vclk_post_div / 100;
-	printf(post_div: %d log2_post_div: %d mclk_div: %d\n, sc-vclk_post_div, sc-log2_vclk_post_div, sc-mclk_fb_div);
+	aprint_debug(post_div: %d log2_post_div: %d mclk_div: %d\n,
+	sc-vclk_post_div, sc-log2_vclk_post_div, sc-mclk_fb_div);
 
 	vclk_ctl = regrb_pll(sc, PLL_VCLK_CNTL);
-	printf(vclk_ctl: %02x\n, vclk_ctl);
+	aprint_debug(vclk_ctl: %02x\n, 

CVS commit: src/sys/dev/pci

2012-06-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jun 14 00:21:55 UTC 2012

Modified Files:
src/sys/dev/pci: machfb.c

Log Message:
do some minimal setup if we're not the console


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/machfb.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/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.76 src/sys/dev/pci/machfb.c:1.77
--- src/sys/dev/pci/machfb.c:1.76	Thu Jun 14 00:15:07 2012
+++ src/sys/dev/pci/machfb.c	Thu Jun 14 00:21:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.76 2012/06/14 00:15:07 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.77 2012/06/14 00:21:55 macallan Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.76 2012/06/14 00:15:07 macallan Exp $);
+	$NetBSD: machfb.c,v 1.77 2012/06/14 00:21:55 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -773,6 +773,11 @@ mach64_attach(device_t parent, device_t 
 		 * until someone actually allocates a screen for us
 		 */
 		mach64_modeswitch(sc, sc-sc_my_mode);
+		if (mach64_console_screen.scr_ri.ri_rows == 0) {
+			/* do some minimal setup to avoid weirdnesses later */
+			vcons_init_screen(sc-vd, mach64_console_screen, 1,
+			defattr);
+		}
 	}
 		
 	aa.console = sc-sc_console;



CVS commit: src/sbin/mount

2012-06-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 14 00:39:34 UTC 2012

Modified Files:
src/sbin/mount: mount.c

Log Message:
don't print the NULL, but the error


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sbin/mount/mount.c

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

Modified files:

Index: src/sbin/mount/mount.c
diff -u src/sbin/mount/mount.c:1.96 src/sbin/mount/mount.c:1.97
--- src/sbin/mount/mount.c:1.96	Mon Apr  9 11:50:20 2012
+++ src/sbin/mount/mount.c	Wed Jun 13 20:39:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.c,v 1.96 2012/04/09 15:50:20 mlelstv Exp $	*/
+/*	$NetBSD: mount.c,v 1.97 2012/06/14 00:39:33 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)mount.c	8.25 (Berkeley) 5/8/95;
 #else
-__RCSID($NetBSD: mount.c,v 1.96 2012/04/09 15:50:20 mlelstv Exp $);
+__RCSID($NetBSD: mount.c,v 1.97 2012/06/14 00:39:33 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -188,7 +188,7 @@ main(int argc, char *argv[])
 mntfromname = getfsspecname(buf, sizeof(buf),
 mntfromname);
 if (mntfromname == NULL)
-	err(EXIT_FAILURE, %s, mntfromname);
+	err(EXIT_FAILURE, %s, buf);
 if (mountfs(fs-fs_vfstype, mntfromname,
 fs-fs_file, init_flags, options,
 fs-fs_mntops, !forceall, NULL, 0))



CVS commit: src/sys/dev/pci

2012-06-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jun 14 00:56:38 UTC 2012

Modified Files:
src/sys/dev/pci: machfb.c

Log Message:
more preparation for alpha support:
- use R3G3B2 colour map
- consistently use ri_devcmap[]
- reshuffle cmap setup, screen cleaning, msg buffer replay etc. to deal
  with the above


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/machfb.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/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.77 src/sys/dev/pci/machfb.c:1.78
--- src/sys/dev/pci/machfb.c:1.77	Thu Jun 14 00:21:55 2012
+++ src/sys/dev/pci/machfb.c	Thu Jun 14 00:56:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.77 2012/06/14 00:21:55 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.78 2012/06/14 00:56:37 macallan Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.77 2012/06/14 00:21:55 macallan Exp $);
+	$NetBSD: machfb.c,v 1.78 2012/06/14 00:56:37 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -745,14 +745,9 @@ mach64_attach(device_t parent, device_t 
 
 	wsfont_init();
 	
-	sc-sc_bg = WS_DEFAULT_BG;
 	vcons_init(sc-vd, sc, mach64_defaultscreen, sc-sc_accessops);
 	sc-vd.init_screen = mach64_init_screen;
 
-	mach64_init_lut(sc);
-	mach64_clearscreen(sc);
-	machfb_blank(sc, 0);	/* unblank the screen */
-
 	if (sc-sc_console) {
 
 		vcons_init_screen(sc-vd, mach64_console_screen, 1,
@@ -766,7 +761,6 @@ mach64_attach(device_t parent, device_t 
 		mach64_defaultscreen.ncols = ri-ri_cols;
 
 		wsdisplay_cnattach(mach64_defaultscreen, ri, 0, 0, defattr);	
-		vcons_replay_msgbuf(mach64_console_screen);
 	} else {
 		/*
 		 * since we're not the console we can postpone the rest
@@ -779,6 +773,14 @@ mach64_attach(device_t parent, device_t 
 			defattr);
 		}
 	}
+	sc-sc_bg = mach64_console_screen.scr_ri.ri_devcmap[WS_DEFAULT_BG];
+	mach64_clearscreen(sc);
+	mach64_init_lut(sc);
+
+	if (sc-sc_console)
+		vcons_replay_msgbuf(mach64_console_screen);
+
+	machfb_blank(sc, 0);	/* unblank the screen */
 		
 	aa.console = sc-sc_console;
 	aa.scrdata = mach64_screenlist;
@@ -813,6 +815,8 @@ mach64_init_screen(void *cookie, struct 
 	ri-ri_height = sc-sc_my_mode-vdisplay;
 	ri-ri_stride = ri-ri_width;
 	ri-ri_flg = RI_CENTER;
+	if (ri-ri_depth == 8)
+		ri-ri_flg |= RI_8BIT_IS_RGB/* | RI_ENABLE_ALPHA*/;
 	set_address(ri, sc-sc_aperture);
 
 #ifdef VCONS_DRAW_INTR
@@ -1305,12 +1309,14 @@ mach64_set_pll(struct mach64_softc *sc, 
 static void
 mach64_init_lut(struct mach64_softc *sc)
 {
+	uint8_t cmap[768];
 	int i, idx;
 
+	rasops_get_cmap(mach64_console_screen.scr_ri, cmap, sizeof(cmap));
 	idx = 0;
 	for (i = 0; i  256; i++) {
-		mach64_putpalreg(sc, i, rasops_cmap[idx], rasops_cmap[idx + 1], 
-		rasops_cmap[idx + 2]);
+		mach64_putpalreg(sc, i, cmap[idx], cmap[idx + 1],
+		cmap[idx + 2]);
 		idx += 3;
 	}
 }
@@ -1537,7 +1543,7 @@ mach64_erasecols(void *cookie, int row, 
 		height = ri-ri_font-fontheight;
 		rasops_unpack_attr(fillattr, fg, bg, ul);
 
-		mach64_rectfill(sc, x, y, width, height, bg);
+		mach64_rectfill(sc, x, y, width, height, ri-ri_devcmap[bg]);
 	}
 }
 
@@ -1574,7 +1580,7 @@ mach64_eraserows(void *cookie, int row, 
 		height = ri-ri_font-fontheight * nrows;
 		rasops_unpack_attr(fillattr, fg, bg, ul);
 
-		mach64_rectfill(sc, x, y, width, height, bg);
+		mach64_rectfill(sc, x, y, width, height, ri-ri_devcmap[bg]);
 	}
 }
 



CVS commit: src/sys/fs/sysvbfs

2012-06-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Jun 14 01:08:22 UTC 2012

Modified Files:
src/sys/fs/sysvbfs: sysvbfs_vfsops.c

Log Message:
calculate inode capacities using the correct values


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/fs/sysvbfs/sysvbfs_vfsops.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/sysvbfs/sysvbfs_vfsops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.40 src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.41
--- src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.40	Wed Jun 13 22:56:50 2012
+++ src/sys/fs/sysvbfs/sysvbfs_vfsops.c	Thu Jun 14 01:08:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $	*/
+/*	$NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -277,8 +277,8 @@ sysvbfs_statvfs(struct mount *mp, struct
 	f-f_bfree = free_block;
 	f-f_bavail = f-f_bfree;
 	f-f_bresvd = 0;
-	f-f_files = bfs-n_inode;
-	f-f_ffree = bfs-max_inode - f-f_files;
+	f-f_files = bfs-max_inode;
+	f-f_ffree = bfs-max_inode - bfs-n_inode;
 	f-f_favail = f-f_ffree;
 	f-f_fresvd = 0;
 	copy_statvfs_info(f, mp);



CVS commit: src

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Jun 14 04:14:37 UTC 2012

Modified Files:
src/distrib/sets/lists/base: mi
src/etc/mtree: NetBSD.dist.base
src/external: Makefile README
src/share/man/man4: urtwn.4
src/sys/dev/usb: if_urtwn.c
Added Files:
src/external/realtek: Makefile Makefile.inc
src/external/realtek/urtwn: Makefile
src/external/realtek/urtwn/dist: Realtek-Firmware-License.txt
rtl8192cfw.bin rtl8192cfwU.bin

Log Message:
Add firmware for the RealTek RTL8192CU family of wireless chipsets, and
adapt the urtwn(4) driver to use the new files.  The firmware files were
extracted from the Linux driver at www.realtek.com, version 0005.1230.2011
and the license permits redistribution without modification.

While I'm here, install the files in /libdata/firmware/if_urtwn, like
most of the other network adapter firmware.

urtwn(4) can now operate without needing external files installed.  Tested
on my Edimax adapter.


To generate a diff of this commit:
cvs rdiff -u -r1.996 -r1.997 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.100 -r1.101 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.17 -r1.18 src/external/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/README
cvs rdiff -u -r0 -r1.1 src/external/realtek/Makefile \
src/external/realtek/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/realtek/urtwn/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt \
src/external/realtek/urtwn/dist/rtl8192cfw.bin \
src/external/realtek/urtwn/dist/rtl8192cfwU.bin
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/urtwn.4
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_urtwn.c

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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.996 src/distrib/sets/lists/base/mi:1.997
--- src/distrib/sets/lists/base/mi:1.996	Sun Jun  3 23:19:09 2012
+++ src/distrib/sets/lists/base/mi	Thu Jun 14 04:14:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.996 2012/06/03 23:19:09 joerg Exp $
+# $NetBSD: mi,v 1.997 2012/06/14 04:14:35 riz Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -166,6 +166,10 @@
 ./libdata/firmware/if_otus/otus-init		base-firmware-root
 ./libdata/firmware/if_otus/otus-license		base-firmware-root
 ./libdata/firmware/if_otus/otus-main		base-firmware-root
+./libdata/firmware/if_urtwn			base-firmware-root
+./libdata/firmware/if_urtwn/Realtek-Firmware-License.txt	base-firmware-root
+./libdata/firmware/if_urtwn/rtl8192cfw.bin	base-firmware-root
+./libdata/firmware/if_urtwn/rtl8192cfwU.bin	base-firmware-root
 ./libdata/firmware/if_wpi			base-firmware-root
 ./libdata/firmware/if_wpi/LICENSE.ipw3945-ucode	base-obsolete	obsolete
 ./libdata/firmware/if_wpi/LICENSE.iwlwifi-3945-ucode	base-firmware-root
@@ -188,7 +192,7 @@
 ./libdata/firmware/run/run-rt2870		base-firmware-root
 ./libdata/firmware/run/run-rt3071		base-firmware-root
 ./libdata/firmware/upgtbase-firmware-root
-./libdata/firmware/urtwn			base-firmware-root
+./libdata/firmware/urtwn			base-firmware-root obsolete
 ./libdata/firmware/zydbase-firmware-root
 ./libdata/firmware/zyd/zd1211-licence		base-obsolete			obsolete
 ./libdata/firmware/zyd/zd1211-license		base-firmware-root

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.100 src/etc/mtree/NetBSD.dist.base:1.101
--- src/etc/mtree/NetBSD.dist.base:1.100	Fri Jun  1 13:19:38 2012
+++ src/etc/mtree/NetBSD.dist.base	Thu Jun 14 04:14:36 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.100 2012/06/01 13:19:38 nonaka Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.101 2012/06/14 04:14:36 riz Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -67,12 +67,12 @@
 ./libdata/firmware/if_iwi
 ./libdata/firmware/if_iwn
 ./libdata/firmware/if_otus
+./libdata/firmware/if_urtwn
 ./libdata/firmware/if_wpi
 ./libdata/firmware/ral
 ./libdata/firmware/rum
 ./libdata/firmware/run
 ./libdata/firmware/upgt
-./libdata/firmware/urtwn
 ./libdata/firmware/zyd
 ./libexec
 ./libexec/dhcpcd-hooks

Index: src/external/Makefile
diff -u src/external/Makefile:1.17 src/external/Makefile:1.18
--- src/external/Makefile:1.17	Wed Jun 13 23:41:09 2012
+++ src/external/Makefile	Thu Jun 14 04:14:36 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.17 2012/06/13 23:41:09 riz Exp $
+#	$NetBSD: Makefile,v 1.18 2012/06/14 04:14:36 riz Exp $
 
 SUBDIR+= apache2 atheros bsd cddl gpl2 gpl3 historical intel-fw-eula
-SUBDIR+= intel-fw-public ibm-public mit public-domain
+SUBDIR+= intel-fw-public ibm-public mit public-domain realtek
 
 .include bsd.subdir.mk

Index: src/external/README
diff -u src/external/README:1.14 src/external/README:1.15
--- src/external/README:1.14	Wed Nov  3 18:52:44 2010
+++ src/external/README	

CVS commit: src/sys/arch

2012-06-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Jun 14 04:23:49 UTC 2012

Modified Files:
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/i386/conf: GENERIC

Log Message:
Add urtw(4) to i386/amd64 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1074 -r1.1075 src/sys/arch/i386/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.356 src/sys/arch/amd64/conf/GENERIC:1.357
--- src/sys/arch/amd64/conf/GENERIC:1.356	Tue Jun  5 08:44:07 2012
+++ src/sys/arch/amd64/conf/GENERIC	Thu Jun 14 04:23:48 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.356 2012/06/05 08:44:07 abs Exp $
+# $NetBSD: GENERIC,v 1.357 2012/06/14 04:23:48 riz Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/amd64/conf/std.amd64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.356 $
+#ident 		GENERIC-$Revision: 1.357 $
 
 maxusers	64		# estimated number of users
 
@@ -966,6 +966,7 @@ otus*	at uhub? port ?		# Atheros AR9001U
 ral*	at uhub? port ?		# Ralink Technology RT25x0 802.11a/b/g
 rum*	at uhub? port ?		# Ralink Technology RT2501/RT2601 802.11a/b/g
 run*	at uhub? port ?		# Ralink Technology RT(2[78]|30)00 802.11a/b/g/n
+urtw*	at uhub? port ?		# Realtek RTL8187/RTL8187B 802.11b/g
 urtwn*	at uhub? port ?		# Realtek RTL8188CU/RTL8192CU 802.11b/g/n
 zyd*	at uhub? port ?		# Zydas ZD1211
 

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1074 src/sys/arch/i386/conf/GENERIC:1.1075
--- src/sys/arch/i386/conf/GENERIC:1.1074	Tue Jun  5 08:44:12 2012
+++ src/sys/arch/i386/conf/GENERIC	Thu Jun 14 04:23:49 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1074 2012/06/05 08:44:12 abs Exp $
+# $NetBSD: GENERIC,v 1.1075 2012/06/14 04:23:49 riz Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1074 $
+#ident 		GENERIC-$Revision: 1.1075 $
 
 maxusers	64		# estimated number of users
 
@@ -1229,6 +1229,7 @@ ral*	at uhub? port ?		# Ralink Technolog
 rum*	at uhub? port ?		# Ralink Technology RT2501/RT2601 802.11a/b/g
 run*	at uhub? port ?		# Ralink Technology RT(2[78]|30)00 802.11a/b/g/n
 upgt*	at uhub? port ?		# Intersil PrismGT
+urtw*	at uhub? port ?		# Realtek RTL8187/RTL8187B 802.11b/g
 urtwn*	at uhub? port ?		# Realtek RTL8188CU/RTL8192CU 802.11b/g/n
 zyd*	at uhub? port ?		# Zydas ZD1211
 



CVS commit: src/sys/dev/usb

2012-06-13 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Thu Jun 14 05:14:42 UTC 2012

Modified Files:
src/sys/dev/usb: umodem.c usb.h

Log Message:
Add the CDC protocol identifier no class specific protocol required
and allow the umodem match routine to match on this protocol.  This
allows some recent arduino boards serial interfaces to attach.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/usb/umodem.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/usb.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/umodem.c
diff -u src/sys/dev/usb/umodem.c:1.63 src/sys/dev/usb/umodem.c:1.64
--- src/sys/dev/usb/umodem.c:1.63	Fri Feb 24 06:48:27 2012
+++ src/sys/dev/usb/umodem.c	Thu Jun 14 05:14:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodem.c,v 1.63 2012/02/24 06:48:27 mrg Exp $	*/
+/*	$NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umodem.c,v 1.63 2012/02/24 06:48:27 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -100,7 +100,7 @@ umodem_match(device_t parent, cfdata_t m
 
 	if (uaa-class != UICLASS_CDC ||
 	uaa-subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL ||
-	uaa-proto != UIPROTO_CDC_AT)
+	!(uaa-proto == UIPROTO_CDC_NOCLASS || uaa-proto == UIPROTO_CDC_AT))
 		return (UMATCH_NONE);
 
 	id = usbd_get_interface_descriptor(uaa-iface);

Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.94 src/sys/dev/usb/usb.h:1.95
--- src/sys/dev/usb/usb.h:1.94	Tue Mar  6 02:49:03 2012
+++ src/sys/dev/usb/usb.h	Thu Jun 14 05:14:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.94 2012/03/06 02:49:03 mrg Exp $	*/
+/*	$NetBSD: usb.h,v 1.95 2012/06/14 05:14:41 blymn Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -481,6 +481,8 @@ typedef struct {
 #define	 UISUBCLASS_CAPI_CONTROLMODEL		5
 #define	 UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6
 #define	 UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7
+#define	  UIPROTO_CDC_NOCLASS			0 /* no class specific
+		 protocol required */
 #define   UIPROTO_CDC_AT			1
 
 #define UICLASS_HID		0x03



CVS commit: src/lib/libperfuse

2012-06-13 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jun 14 05:58:22 UTC 2012

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Fix memory leak when we discard a voided setattr operation


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libperfuse/ops.c

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

Modified files:

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.56 src/lib/libperfuse/ops.c:1.57
--- src/lib/libperfuse/ops.c:1.56	Wed Jun 13 01:45:56 2012
+++ src/lib/libperfuse/ops.c	Thu Jun 14 05:58:22 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.56 2012/06/13 01:45:56 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.57 2012/06/14 05:58:22 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1696,6 +1696,7 @@ perfuse_node_setattr_ttl(struct puffs_us
 	struct fuse_attr_out *fao;
 	struct vattr *old_va;
 	int error;
+	int valid;
 #ifdef PERFUSE_DEBUG
 	struct vattr *old_vap;
 	int resize_debug = 0;
@@ -1719,39 +1720,94 @@ perfuse_node_setattr_ttl(struct puffs_us
 	}
 
 	old_va = puffs_pn_getvap((struct puffs_node *)opc);
+	valid = 0;
 
 	/*
 	 * Check for permission to change size
 	 */
-	if ((vap-va_size != (u_quad_t)PUFFS_VNOVAL) 
-	(error = mode_access(opc, pcr, PUFFS_VWRITE)) != 0)
-		return error;
+	if ((vap-va_size != (u_quad_t)PUFFS_VNOVAL)) {
+		if ((error = mode_access(opc, pcr, PUFFS_VWRITE)) != 0)
+			return error;
+		valid |= FUSE_FATTR_SIZE;
+	}
 
 	/*
-	 * Check for permission to change dates
+	 * Check for permission to change owner and group
 	 */
-	if (((vap-va_atime.tv_sec != (time_t)PUFFS_VNOVAL) ||
-	 (vap-va_mtime.tv_sec != (time_t)PUFFS_VNOVAL)) 
-	(puffs_access_times(old_va-va_uid, old_va-va_gid,
-old_va-va_mode, 0, pcr) != 0))
-		return EACCES;
+	if ((vap-va_uid != (uid_t)PUFFS_VNOVAL) ||
+	(vap-va_gid != (gid_t)PUFFS_VNOVAL)) {
+		if (puffs_access_chown(old_va-va_uid, old_va-va_gid,
+   vap-va_uid, vap-va_gid, pcr) != 0)
+			return EACCES;
+
+		if (vap-va_uid != (uid_t)PUFFS_VNOVAL)
+			valid |= FUSE_FATTR_UID;
+
+		if (vap-va_gid != (uid_t)PUFFS_VNOVAL)
+			valid |= FUSE_FATTR_GID;
+	}
 
 	/*
-	 * Check for permission to change owner and group
+	 * Check for permission to change permissions
 	 */
-	if (((vap-va_uid != (uid_t)PUFFS_VNOVAL) ||
-	 (vap-va_gid != (gid_t)PUFFS_VNOVAL)) 
-	(puffs_access_chown(old_va-va_uid, old_va-va_gid,
-vap-va_uid, vap-va_gid, pcr)) != 0)
-		return EACCES;
+	if (vap-va_mode != (mode_t)PUFFS_VNOVAL) {
+		if (puffs_access_chmod(old_va-va_uid, old_va-va_gid,
+old_va-va_type, vap-va_mode, pcr) != 0)
+			return EACCES;
+		valid |= FUSE_FATTR_MODE;
+	}
 
 	/*
-	 * Check for permission to change permissions
+	 * Check for permission to change dates
 	 */
-	if ((vap-va_mode != (mode_t)PUFFS_VNOVAL) 
-	(puffs_access_chmod(old_va-va_uid, old_va-va_gid,
-old_va-va_type, vap-va_mode, pcr)) != 0)
-		return EACCES;
+	if ((vap-va_atime.tv_sec != (time_t)PUFFS_VNOVAL) ||
+	(vap-va_mtime.tv_sec != (time_t)PUFFS_VNOVAL)) {
+		if (vap-va_atime.tv_sec != (time_t)PUFFS_VNOVAL)
+			valid |= FUSE_FATTR_ATIME;
+
+		if (vap-va_mtime.tv_sec != (time_t)PUFFS_VNOVAL)
+			valid |= FUSE_FATTR_MTIME;
+
+		/*
+		 * ftruncate() sends only va_size, and metadata cache
+		 * flush adds va_atime and va_mtime. Some FUSE
+		 * filesystems will attempt to detect ftruncate by 
+		 * checking for FATTR_SIZE being set without
+		 * FATTR_UID|FATTR_GID|FATTR_ATIME|FATTR_MTIME|FATTR_MODE
+		 * 
+		 * Try to adapt and remove FATTR_ATIME|FATTR_MTIME
+		 * if we suspect a ftruncate().
+		 */ 
+		if ((valid  FUSE_FATTR_SIZE) 
+		!(valid  (FUSE_FATTR_UID|FUSE_FATTR_GID|FUSE_FATTR_MODE)))
+			valid = ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
+
+		/*
+		 * There is the same mess with fchmod()
+		 */
+		if ((valid  FUSE_FATTR_MODE) 
+		!(valid  (FUSE_FATTR_UID|FUSE_FATTR_GID)))
+			valid = ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
+
+		/*
+		 * And if a change on atime/mtime remains, check permissions.
+		 */
+		if ((valid  (FUSE_FATTR_ATIME|FUSE_FATTR_MTIME)) 
+		(puffs_access_times(old_va-va_uid, old_va-va_gid,
+old_va-va_mode, 0, pcr) != 0))
+			return EACCES;
+	}
+
+	/*
+	 * If nothing remain, discard the operation. This happend when
+	 * only ctime is changed.
+	 */
+	if (!(valid  (FUSE_FATTR_SIZE|FUSE_FATTR_ATIME|FUSE_FATTR_MTIME|
+		   FUSE_FATTR_MODE|FUSE_FATTR_UID|FUSE_FATTR_GID))) {
+		error = 0;
+		goto out;
+	}
+
 	
 	pm = ps-ps_new_msg(pu, opc, FUSE_SETATTR, sizeof(*fsi), pcr);
 	fsi = GET_INPAYLOAD(ps, pm, fuse_setattr_in);
@@ -1766,7 +1822,7 @@ perfuse_node_setattr_ttl(struct puffs_us
 		fsi-valid |= FUSE_FATTR_FH;
 	}
 
-	if (vap-va_size != (u_quad_t)PUFFS_VNOVAL) {
+	if (valid  FUSE_FATTR_SIZE) {
 		fsi-size = vap-va_size;
 		fsi-valid |= FUSE_FATTR_SIZE;
 
@@ -1787,10 +1843,8 @@ perfuse_node_setattr_ttl(struct puffs_us
 	 * dates being reset to Epoch on