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

2015-02-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb 23 11:40:57 UTC 2015

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

Log Message:
add gbm.pc


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/distrib/sets/lists/xcomp/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/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.160 src/distrib/sets/lists/xcomp/mi:1.161
--- src/distrib/sets/lists/xcomp/mi:1.160	Mon Feb 23 11:14:58 2015
+++ src/distrib/sets/lists/xcomp/mi	Mon Feb 23 11:40:57 2015
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.160 2015/02/23 11:14:58 martin Exp $
+#	 $NetBSD: mi,v 1.161 2015/02/23 11:40:57 jmcneill Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -6366,6 +6366,7 @@
 ./usr/X11R7/lib/pkgconfig/fontsproto.pc			-unknown-	xorg
 ./usr/X11R7/lib/pkgconfig/fontutil.pc			-unknown-	xorg,x11fonts
 ./usr/X11R7/lib/pkgconfig/freetype2.pc			-unknown-	xorg
+./usr/X11R7/lib/pkgconfig/gbm.pc			-unknown-	xorg
 ./usr/X11R7/lib/pkgconfig/gl.pc-unknown-	xorg
 ./usr/X11R7/lib/pkgconfig/glproto.pc			-unknown-	xorg
 ./usr/X11R7/lib/pkgconfig/glu.pc			-unknown-	xorg



CVS commit: xsrc/external/mit/xf86-video-tdfx/dist/src

2015-02-23 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Mon Feb 23 11:18:02 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-tdfx/dist/src: tdfx_driver.c

Log Message:
Reduce diff to upstream (whitespace only).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c
diff -u xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.3 xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.4
--- xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.3	Mon Jun  3 10:02:22 2013
+++ xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c	Mon Feb 23 11:18:02 2015
@@ -669,15 +669,15 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 } else {
   for (i = 0; i  pTDFX-numChips; i++) {
 	PCI_WRITE_LONG(initbits | BIT(10), CFG_INIT_ENABLE, i);
-	
-	#if 0
-		v=pciReadWord(pTDFX-PciTag[i], CFG_PCI_COMMAND);
-		if (!i)
-		pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x3);
-		else
-		pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x2);
-	#endif
-	
+
+#if 0
+	v=pciReadWord(pTDFX-PciTag[i], CFG_PCI_COMMAND);
+	if (!i)
+	pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x3);
+	else
+	pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x2);
+#endif
+
 	pTDFX-MMIOAddr[i] = mem0base + (i * mem0size);
 
 	PCI_WRITE_LONG(pTDFX-MMIOAddr[i], CFG_MEM0BASE, i);



CVS commit: xsrc/external/mit/xf86-video-tdfx/dist/src

2015-02-23 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Mon Feb 23 11:28:46 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-tdfx/dist/src: tdfx_driver.c

Log Message:
Make local patch smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c
diff -u xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.4 xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.5
--- xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.4	Mon Feb 23 11:18:02 2015
+++ xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c	Mon Feb 23 11:28:46 2015
@@ -660,12 +660,16 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 
 if (pTDFX-numChips == 1) {
   /*
-   * XXX
* Do not fudge BARs with only one chip present.
-   * Now this works again on NetBSD/macppc.
*/
   pTDFX-MMIOAddr[0] = mem0base  0xff00;
   pTDFX-LinearAddr[0] = mem1base  0xff00;
+  xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		 TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n,
+		 0, pTDFX-MMIOAddr[0]);
+  xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		 TDFXInitChips: LinearAddr[%d] = 0x%08lx\n,
+		 0, pTDFX-LinearAddr[0]);
 } else {
   for (i = 0; i  pTDFX-numChips; i++) {
 	PCI_WRITE_LONG(initbits | BIT(10), CFG_INIT_ENABLE, i);
@@ -680,6 +684,10 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 
 	pTDFX-MMIOAddr[i] = mem0base + (i * mem0size);
 
+	xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		   TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n,
+		   i, pTDFX-MMIOAddr[i]);
+
 	PCI_WRITE_LONG(pTDFX-MMIOAddr[i], CFG_MEM0BASE, i);
 
 	pTDFX-MMIOAddr[i] = 0xFF00;
@@ -687,18 +695,15 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 
 	PCI_WRITE_LONG(pTDFX-LinearAddr[i], CFG_MEM1BASE, i);
 
+	xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		   TDFXInitChips: LinearAddr[%d] = 0x%08lx\n,
+		   i, pTDFX-LinearAddr[i]);
 	pTDFX-LinearAddr[i] = 0xFF00;
 
 	PCI_WRITE_LONG(cfgbits, CFG_PCI_DECODE, i);
 	PCI_WRITE_LONG(initbits, CFG_INIT_ENABLE, i);
   }
 }
-xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
-		   TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n,
-		   0, pTDFX-MMIOAddr[0]);
-xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
-		   TDFXInitChips: LinearAddr[%d] = 0x%08lx\n,
-		   0, pTDFX-LinearAddr[0]);
 }
 
 void



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

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 11:14:58 UTC 2015

Modified Files:
src/distrib/sets/lists/xcomp: mi shl.mi

Log Message:
Add libgbm (hi Jared!)


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.38 -r1.39 src/distrib/sets/lists/xcomp/shl.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/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.159 src/distrib/sets/lists/xcomp/mi:1.160
--- src/distrib/sets/lists/xcomp/mi:1.159	Mon Feb 23 00:09:30 2015
+++ src/distrib/sets/lists/xcomp/mi	Mon Feb 23 11:14:58 2015
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.159 2015/02/23 00:09:30 jmcneill Exp $
+#	 $NetBSD: mi,v 1.160 2015/02/23 11:14:58 martin Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -6264,6 +6264,8 @@
 ./usr/X11R7/lib/libfontenc_p.a-unknown-	profile,xorg
 ./usr/X11R7/lib/libfreetype.a-unknown-	xorg
 ./usr/X11R7/lib/libfreetype_p.a-unknown-	profile,xorg
+./usr/X11R7/lib/libgbm.a-unknown-	xorg
+./usr/X11R7/lib/libgbm_p.a-unknown-	profile,xorg
 ./usr/X11R7/lib/libglut.a-unknown-	xorg
 ./usr/X11R7/lib/libglut_p.a-unknown-	profile,xorg
 ./usr/X11R7/lib/liblbxutil.a-obsolete-	obsolete

Index: src/distrib/sets/lists/xcomp/shl.mi
diff -u src/distrib/sets/lists/xcomp/shl.mi:1.38 src/distrib/sets/lists/xcomp/shl.mi:1.39
--- src/distrib/sets/lists/xcomp/shl.mi:1.38	Thu Dec 18 06:24:28 2014
+++ src/distrib/sets/lists/xcomp/shl.mi	Mon Feb 23 11:14:58 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: shl.mi,v 1.38 2014/12/18 06:24:28 mrg Exp $
+#	$NetBSD: shl.mi,v 1.39 2015/02/23 11:14:58 martin Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -99,6 +99,7 @@
 ./usr/X11R7/lib/libfontconfig_pic.a			-unknown-	xorg,picinstall
 ./usr/X11R7/lib/libfontenc_pic.a			-unknown-	xorg,picinstall
 ./usr/X11R7/lib/libfreetype_pic.a			-unknown-	xorg,picinstall
+./usr/X11R7/lib/libgbm_pic.a-unknown-	xorg,picinstall
 ./usr/X11R7/lib/libglut_pic.a-unknown-	xorg,picinstall
 ./usr/X11R7/lib/liblbxutil_pic.a			-obsolete-	obsolete
 ./usr/X11R7/lib/liblisp_pic.a-unknown-	xorg,picinstall



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

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 13:01:35 UTC 2015

Modified Files:
src/distrib/sets/lists/xdebug: mi shl.mi

Log Message:
libgm debug info


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/mi
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/xdebug/shl.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/xdebug/mi
diff -u src/distrib/sets/lists/xdebug/mi:1.11 src/distrib/sets/lists/xdebug/mi:1.12
--- src/distrib/sets/lists/xdebug/mi:1.11	Fri Dec 19 05:06:41 2014
+++ src/distrib/sets/lists/xdebug/mi	Mon Feb 23 13:01:35 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.11 2014/12/19 05:06:41 christos Exp $
+# $NetBSD: mi,v 1.12 2015/02/23 13:01:35 martin Exp $
 ./etc/mtree/set.xdebug	comp-sys-root
 ./usr/X11R6/lib/libFS_g.a-unknown-	debuglib,x11
 ./usr/X11R6/lib/libGLU_g.a-unknown-	debuglib,x11
@@ -100,6 +100,7 @@
 ./usr/X11R7/lib/libfontconfig_g.a			-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libfontenc_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libfreetype_g.a-unknown-	debuglib,xorg
+./usr/X11R7/lib/libggbm_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libglut_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/liblbxutil_g.a-obsolete-	obsolete
 ./usr/X11R7/lib/liblisp_g.a-unknown-	debuglib,xorg

Index: src/distrib/sets/lists/xdebug/shl.mi
diff -u src/distrib/sets/lists/xdebug/shl.mi:1.19 src/distrib/sets/lists/xdebug/shl.mi:1.20
--- src/distrib/sets/lists/xdebug/shl.mi:1.19	Thu Jan 29 22:58:20 2015
+++ src/distrib/sets/lists/xdebug/shl.mi	Mon Feb 23 13:01:35 2015
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.19 2015/01/29 22:58:20 nat Exp $
+# $NetBSD: shl.mi,v 1.20 2015/02/23 13:01:35 martin Exp $
 ./usr/libdata/debug/usr/X11R6/lib/libFS.so.6.0.debug			-unknown-		x11,debug
 ./usr/libdata/debug/usr/X11R6/lib/libGL.so.1.2.debug			-unknown-		x11,debug
 ./usr/libdata/debug/usr/X11R6/lib/libGLU.so.1.3.debug			-unknown-		x11,debug
@@ -106,6 +106,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/libfontenc.so.2.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libfreetype.so.17.2.11.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libglapi.so.0.0.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/libgbm.so.1.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libglut.so.4.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libpciaccess.so.0.3.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libpixman-1.so.2.2.debug	-unknown-		xorg,debug



CVS commit: src/sys/dev/pci

2015-02-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Feb 23 13:09:37 UTC 2015

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

Log Message:
CID 1271021: Overrunning array in-in_ridx of 15 bytes at byte offset 15 
using index i (which evaluates to 15).

http://mail-index.netbsd.org/coverity-updates/2015/02/21/msg000115.html


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_iwm.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.11 src/sys/dev/pci/if_iwm.c:1.12
--- src/sys/dev/pci/if_iwm.c:1.11	Fri Feb 20 16:16:06 2015
+++ src/sys/dev/pci/if_iwm.c	Mon Feb 23 13:09:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.11 2015/02/20 16:16:06 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.12 2015/02/23 13:09:37 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.18 2015/02/11 01:12:42 brad Exp	*/
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.11 2015/02/20 16:16:06 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.12 2015/02/23 13:09:37 nonaka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -5347,8 +5347,12 @@ iwm_setrates(struct iwm_node *in)
 		if (ridx  IWM_RIDX_MAX)
 			DPRINTF((%s: WARNING: device rate for %d not found!\n,
 			DEVNAME(sc), rate));
-		else
+		else if (i  __arraycount(in-in_ridx))
 			in-in_ridx[i] = ridx;
+		else
+			DPRINTF((%s: WARNING: out of range: 
+			i(%d) = array size(%zu)\n, DEVNAME(sc),
+			i, __arraycount(in-in_ridx)));
 	}
 
 	/* then construct a lq_cmd based on those */



CVS commit: src/etc/etc.sparc64

2015-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb 23 13:52:51 UTC 2015

Modified Files:
src/etc/etc.sparc64: ttys

Log Message:
add ttyC00/ttyC01 as found on eg, com(4)-based serial port systems like
the sunblade 2500.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.sparc64/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.sparc64/ttys
diff -u src/etc/etc.sparc64/ttys:1.10 src/etc/etc.sparc64/ttys:1.11
--- src/etc/etc.sparc64/ttys:1.10	Fri Mar 12 14:50:54 2010
+++ src/etc/etc.sparc64/ttys	Mon Feb 23 13:52:51 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: ttys,v 1.10 2010/03/12 14:50:54 roy Exp $
+#	$NetBSD: ttys,v 1.11 2015/02/23 13:52:51 mrg Exp $
 #
 #	@(#)ttys	5.1 (Berkeley) 4/17/89
 #
@@ -14,3 +14,5 @@ ttya	/usr/libexec/getty std.9600	unkno
 ttyb	/usr/libexec/getty std.9600	unknown	off secure
 ttyh0   /usr/libexec/getty std.9600   unknown off secure
 ttyh1   /usr/libexec/getty std.9600   unknown off secure
+ttyC00  /usr/libexec/getty std.9600   unknown off secure
+ttyC01  /usr/libexec/getty std.9600   unknown off secure



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

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 13:12:37 UTC 2015

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

Log Message:
fix typo in previous


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/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/xdebug/mi
diff -u src/distrib/sets/lists/xdebug/mi:1.12 src/distrib/sets/lists/xdebug/mi:1.13
--- src/distrib/sets/lists/xdebug/mi:1.12	Mon Feb 23 13:01:35 2015
+++ src/distrib/sets/lists/xdebug/mi	Mon Feb 23 13:12:37 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.12 2015/02/23 13:01:35 martin Exp $
+# $NetBSD: mi,v 1.13 2015/02/23 13:12:37 martin Exp $
 ./etc/mtree/set.xdebug	comp-sys-root
 ./usr/X11R6/lib/libFS_g.a-unknown-	debuglib,x11
 ./usr/X11R6/lib/libGLU_g.a-unknown-	debuglib,x11
@@ -100,7 +100,7 @@
 ./usr/X11R7/lib/libfontconfig_g.a			-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libfontenc_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libfreetype_g.a-unknown-	debuglib,xorg
-./usr/X11R7/lib/libggbm_g.a-unknown-	debuglib,xorg
+./usr/X11R7/lib/libgbm_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/libglut_g.a-unknown-	debuglib,xorg
 ./usr/X11R7/lib/liblbxutil_g.a-obsolete-	obsolete
 ./usr/X11R7/lib/liblisp_g.a-unknown-	debuglib,xorg



CVS commit: xsrc/external/mit/xf86-video-mga/dist/src

2015-02-23 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Mon Feb 23 12:23:47 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-mga/dist/src: mga_dac3026.c

Log Message:
Restore part of previous to fix
xf86-video-mga/dist/src/mga_dac3026.c: In function 'MGA3026Save':
xf86-video-mga/dist/src/mga_dac3026.c:856:5: error: passing argument 2 of 
'pci_device_cfg_read_u32' from incompatible pointer type [-Werror]
on i386.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c
diff -u xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c:1.4 xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c:1.5
--- xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c:1.4	Mon Feb 23 10:38:08 2015
+++ xsrc/external/mit/xf86-video-mga/dist/src/mga_dac3026.c	Mon Feb 23 12:23:47 2015
@@ -852,8 +852,12 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr
 		mgaReg-DacRegs[i]	 = inTi3026(MGADACregs[i]);
 	
 #ifdef XSERVER_LIBPCIACCESS
-	pci_device_cfg_read_u32(pMga-PciInfo,  mgaReg-Option, 
+{
+	uint32_t Option;
+	pci_device_cfg_read_u32(pMga-PciInfo,  Option, 
 PCI_OPTION_REG);
+mgaReg-Option = Option;
+}
 #else
 	mgaReg-Option = pciReadLong(pMga-PciTag, PCI_OPTION_REG);
 #endif



CVS commit: src/sys/ufs/ffs

2015-02-23 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Feb 23 13:38:54 UTC 2015

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Small changes:
 - instead of always calling DPRINTF with __func__, put __func__ directly
   in the macro
 - ffs_mountfs(): rename fsblockloc - fs_sblockloc, initialize fs_sbsize
   to zero
No real functional change


To generate a diff of this commit:
cvs rdiff -u -r1.318 -r1.319 src/sys/ufs/ffs/ffs_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/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.318 src/sys/ufs/ffs/ffs_vfsops.c:1.319
--- src/sys/ufs/ffs/ffs_vfsops.c:1.318	Sun Feb 22 14:22:34 2015
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon Feb 23 13:38:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.318 2015/02/22 14:22:34 maxv Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.319 2015/02/23 13:38:54 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.318 2015/02/22 14:22:34 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.319 2015/02/23 13:38:54 maxv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -122,9 +122,9 @@ static kauth_listener_t ffs_snapshot_lis
 int ffs_initcount = 0;
 
 #ifdef DEBUG_FFS_MOUNT
-#define DPRINTF(a)	printf a
+#define DPRINTF(_fmt, args...)	printf(%s:  _fmt \n, __func__, ##args)
 #else
-#define DPRINTF(a)	do {} while (/*CONSTCOND*/0)
+#define DPRINTF(_fmt, args...)	do {} while (/*CONSTCOND*/0)
 #endif
 
 extern const struct vnodeopv_desc ffs_vnodeop_opv_desc;
@@ -354,19 +354,18 @@ ffs_mount(struct mount *mp, const char *
 	mode_t accessmode;
 
 	if (args == NULL) {
-		DPRINTF((%s: NULL args\n, __func__));
+		DPRINTF(NULL args);
 		return EINVAL;
 	}
 	if (*data_len  sizeof(*args)) {
-		DPRINTF((%s: bad size args %zu != %zu\n,
-		__func__, *data_len, sizeof(*args)));
+		DPRINTF(bad size args %zu != %zu, *data_len, sizeof(*args));
 		return EINVAL;
 	}
 
 	if (mp-mnt_flag  MNT_GETARGS) {
 		ump = VFSTOUFS(mp);
 		if (ump == NULL) {
-			DPRINTF((%s: no ump\n, __func__));
+			DPRINTF(no ump);
 			return EIO;
 		}
 		args-fspec = NULL;
@@ -384,8 +383,7 @@ ffs_mount(struct mount *mp, const char *
 		error = namei_simple_user(args-fspec,
 		NSM_FOLLOW_NOEMULROOT, devvp);
 		if (error != 0) {
-			DPRINTF((%s: namei_simple_user %d\n, __func__,
-			error));
+			DPRINTF(namei_simple_user returned %d, error);
 			return error;
 		}
 
@@ -394,12 +392,11 @@ ffs_mount(struct mount *mp, const char *
 			 * Be sure this is a valid block device
 			 */
 			if (devvp-v_type != VBLK) {
-DPRINTF((%s: non block device %d\n,
-__func__, devvp-v_type));
+DPRINTF(non block device %d, devvp-v_type);
 error = ENOTBLK;
 			} else if (bdevsw_lookup(devvp-v_rdev) == NULL) {
-DPRINTF((%s: can't find block device 0x%jx\n,
-__func__, devvp-v_rdev));
+DPRINTF(can't find block device 0x%jx,
+devvp-v_rdev);
 error = ENXIO;
 			}
 		} else {
@@ -410,10 +407,9 @@ ffs_mount(struct mount *mp, const char *
 			ump = VFSTOUFS(mp);
 			if (devvp != ump-um_devvp) {
 if (devvp-v_rdev != ump-um_devvp-v_rdev) {
-	DPRINTF((%s: wrong device 0x%jx
-	 != 0x%jx\n, __func__,
+	DPRINTF(wrong device 0x%jx != 0x%jx,
 	(uintmax_t)devvp-v_rdev,
-	(uintmax_t)ump-um_devvp-v_rdev));
+	(uintmax_t)ump-um_devvp-v_rdev);
 	error = EINVAL;
 } else {
 	vrele(devvp);
@@ -425,7 +421,7 @@ ffs_mount(struct mount *mp, const char *
 	} else {
 		if (!update) {
 			/* New mounts must have a filename for the device */
-			DPRINTF((%s: no filename for mount\n, __func__));
+			DPRINTF(no filename for mount);
 			return EINVAL;
 		} else {
 			/* Use the extant mount */
@@ -454,7 +450,7 @@ ffs_mount(struct mount *mp, const char *
 		KAUTH_REQ_SYSTEM_MOUNT_DEVICE, mp, devvp,
 		KAUTH_ARG(accessmode));
 		if (error) {
-			DPRINTF((%s: kauth %d\n, __func__, error));
+			DPRINTF(kauth returned %d, error);
 		}
 		VOP_UNLOCK(devvp);
 	}
@@ -484,12 +480,12 @@ ffs_mount(struct mount *mp, const char *
 		error = VOP_OPEN(devvp, xflags, FSCRED);
 		VOP_UNLOCK(devvp);
 		if (error) {	
-			DPRINTF((%s: VOP_OPEN %d\n, __func__, error));
+			DPRINTF(VOP_OPEN returned %d, error);
 			goto fail;
 		}
 		error = ffs_mountfs(devvp, mp, l);
 		if (error) {
-			DPRINTF((%s: ffs_mountfs %d\n, __func__, error));
+			DPRINTF(ffs_mountfs returned %d, error);
 			vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
 			(void)VOP_CLOSE(devvp, xflags, NOCRED);
 			VOP_UNLOCK(devvp);
@@ -531,7 +527,7 @@ ffs_mount(struct mount *mp, const char *
 (void) ffs_sbupdate(ump, MNT_WAIT);
 			}
 			if (error) {
-DPRINTF((%s: wapbl %d\n, __func__, error));
+DPRINTF(wapbl %d, error);
 return error;
 			}
 			UFS_WAPBL_END(mp);
@@ -541,8 +537,7 @@ ffs_mount(struct mount *mp, const 

CVS commit: src/sys/arch/sparc64/sparc64

2015-02-23 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Mon Feb 23 12:36:58 UTC 2015

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
sun4v: sparc_interupt - ensure that the trap level and globals level are the 
same when the flushw instruction is issued - othwise warnings occur when using 
the sun4v Legion simulator.


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/sys/arch/sparc64/sparc64/locore.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/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.377 src/sys/arch/sparc64/sparc64/locore.s:1.378
--- src/sys/arch/sparc64/sparc64/locore.s:1.377	Sun Oct 26 21:03:45 2014
+++ src/sys/arch/sparc64/sparc64/locore.s	Mon Feb 23 12:36:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.377 2014/10/26 21:03:45 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.378 2015/02/23 12:36:58 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -3678,12 +3678,29 @@ ENTRY_NOPROFILE(sparc_interrupt)
 	bne,pt	%icc, 1f
 	 nop
 	NORMAL_GLOBALS_SUN4V
+	! Save the normal globals
+	stx	%g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)]
+	stx	%g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)]
+	stx	%g3, [%sp + CC64FSZ + STKB + TF_G + ( 3*8)]
+	stx	%g4, [%sp + CC64FSZ + STKB + TF_G + ( 4*8)]
+	stx	%g5, [%sp + CC64FSZ + STKB + TF_G + ( 5*8)]
+	stx	%g6, [%sp + CC64FSZ + STKB + TF_G + ( 6*8)]
+	stx	%g7, [%sp + CC64FSZ + STKB + TF_G + ( 7*8)]
+	ALTERNATE_GLOBALS_SUN4V
+	/*
+	 * In the EMBEDANY memory model %g4 points to the start of the
+	 * data segment.  In our case we need to clear it before calling
+	 * any C-code.
+	 */
+	clr	%g4
+
+	flushw			! Do not remove this insn -- causes interrupt loss
+	NORMAL_GLOBALS_SUN4V
 	ba	2f
 	 nop
 1:		
 #endif
 	NORMAL_GLOBALS_SUN4U
-2:
 	! Save the normal globals
 	stx	%g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)]
 	stx	%g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)]
@@ -3692,7 +3709,7 @@ ENTRY_NOPROFILE(sparc_interrupt)
 	stx	%g5, [%sp + CC64FSZ + STKB + TF_G + ( 5*8)]
 	stx	%g6, [%sp + CC64FSZ + STKB + TF_G + ( 6*8)]
 	stx	%g7, [%sp + CC64FSZ + STKB + TF_G + ( 7*8)]
-
+	ALTERNATE_GLOBALS_SUN4U
 	/*
 	 * In the EMBEDANY memory model %g4 points to the start of the
 	 * data segment.  In our case we need to clear it before calling
@@ -3701,6 +3718,8 @@ ENTRY_NOPROFILE(sparc_interrupt)
 	clr	%g4
 
 	flushw			! Do not remove this insn -- causes interrupt loss
+	NORMAL_GLOBALS_SUN4U
+2:
 	rd	%y, %l6
 	INCR64(CPUINFO_VA+CI_NINTR)	! cnt.v_ints++ (clobbers %o0,%o1)
 	rdpr	%tt, %l5		! Find out our current IPL



CVS commit: src/sys/ufs/ext2fs

2015-02-23 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Feb 23 17:05:59 UTC 2015

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
Hum. Perhaps I missed a bit of the specification. Let's not be that
severe when checking the superblock.

Should fix ATF.


To generate a diff of this commit:
cvs rdiff -u -r1.189 -r1.190 src/sys/ufs/ext2fs/ext2fs_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/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.189 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.190
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.189	Sun Feb 22 14:55:23 2015
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Mon Feb 23 17:05:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.189 2015/02/22 14:55:23 maxv Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.190 2015/02/23 17:05:58 maxv Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.189 2015/02/22 14:55:23 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.190 2015/02/23 17:05:58 maxv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -1189,11 +1189,11 @@ ext2fs_sbfill(struct m_ext2fs *m_fs, int
 	 * Compute the fields of the superblock
 	 */
 	u32 = fs-e2fs_bcount - fs-e2fs_first_dblock; /*  0 */
-	if (u32  fs-e2fs_bpg) {
+	m_fs-e2fs_ncg = howmany(u32, fs-e2fs_bpg);
+	if (m_fs-e2fs_ncg == 0) {
 		printf(ext2fs: invalid number of cylinder groups\n);
 		return EINVAL;
 	}
-	m_fs-e2fs_ncg = howmany(u32, fs-e2fs_bpg);
 
 	m_fs-e2fs_fsbtodb = fs-e2fs_log_bsize + LOG_MINBSIZE - DEV_BSHIFT;
 	m_fs-e2fs_bsize = MINBSIZE  fs-e2fs_log_bsize;
@@ -1201,13 +1201,12 @@ ext2fs_sbfill(struct m_ext2fs *m_fs, int
 	m_fs-e2fs_qbmask = m_fs-e2fs_bsize - 1;
 	m_fs-e2fs_bmask = ~m_fs-e2fs_qbmask;
 
-	if (m_fs-e2fs_bsize  sizeof(struct ext2_gd)) {
+	if ((u32 = m_fs-e2fs_bsize / sizeof(struct ext2_gd)) == 0) {
 		/* Unlikely to happen */
 		printf(ext2fs: invalid block size\n);
 		return EINVAL;
 	}
-	m_fs-e2fs_ngdb =
-	howmany(m_fs-e2fs_ncg, m_fs-e2fs_bsize / sizeof(struct ext2_gd));
+	m_fs-e2fs_ngdb = howmany(m_fs-e2fs_ncg, u32);
 	if (m_fs-e2fs_ngdb == 0) {
 		printf(ext2fs: invalid number of group descriptor blocks\n);
 		return EINVAL;



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

2015-02-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 23 20:49:53 UTC 2015

Modified Files:
src/sys/arch/arm/include: lock.h

Log Message:
Indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/include/lock.h

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

Modified files:

Index: src/sys/arch/arm/include/lock.h
diff -u src/sys/arch/arm/include/lock.h:1.30 src/sys/arch/arm/include/lock.h:1.31
--- src/sys/arch/arm/include/lock.h:1.30	Thu Feb 19 21:44:50 2015
+++ src/sys/arch/arm/include/lock.h	Mon Feb 23 20:49:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.30 2015/02/19 21:44:50 joerg Exp $	*/
+/*	$NetBSD: lock.h,v 1.31 2015/02/23 20:49:53 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -143,9 +143,9 @@ static __inline void
 __arm_membar_producer(void)
 {
 #ifdef _ARM_ARCH_7
-		__asm __volatile(dsb);
+	__asm __volatile(dsb);
 #elif defined(_ARM_ARCH_6)
-		__asm __volatile(mcr\tp15,0,%0,c7,c10,4 :: r(0));
+	__asm __volatile(mcr\tp15,0,%0,c7,c10,4 :: r(0));
 #endif
 }
 
@@ -153,9 +153,9 @@ static __inline void
 __arm_membar_consumer(void)
 {
 #ifdef _ARM_ARCH_7
-		__asm __volatile(dmb);
+	__asm __volatile(dmb);
 #elif defined(_ARM_ARCH_6)
-		__asm __volatile(mcr\tp15,0,%0,c7,c10,5 :: r(0));
+	__asm __volatile(mcr\tp15,0,%0,c7,c10,5 :: r(0));
 #endif
 }
 



CVS commit: src/sys/netinet6

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 19:15:59 UTC 2015

Modified Files:
src/sys/netinet6: in6.c in6_ifattach.c nd6.c nd6.h nd6_nbr.c nd6_rtr.c

Log Message:
Rearange interface detachement slightly: before we free the INET6 specific
per-interface data, make sure to call nd6_purge() with it to remove
routing entries pointing to the going interface.
When we should happen to call this function again later, with the data
already gone, just return.
Fixes PR kern/49682, ok: christos.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/netinet6/in6.c
cvs rdiff -u -r1.94 -r1.95 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.61 -r1.62 src/sys/netinet6/nd6.h
cvs rdiff -u -r1.103 -r1.104 src/sys/netinet6/nd6_nbr.c
cvs rdiff -u -r1.95 -r1.96 src/sys/netinet6/nd6_rtr.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.181 src/sys/netinet6/in6.c:1.182
--- src/sys/netinet6/in6.c:1.181	Fri Feb 20 22:13:48 2015
+++ src/sys/netinet6/in6.c	Mon Feb 23 19:15:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.181 2015/02/20 22:13:48 rjs Exp $	*/
+/*	$NetBSD: in6.c,v 1.182 2015/02/23 19:15:59 martin Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.181 2015/02/20 22:13:48 rjs Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.182 2015/02/23 19:15:59 martin Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -2318,7 +2318,7 @@ in6_domifdetach(struct ifnet *ifp, void 
 {
 	struct in6_ifextra *ext = (struct in6_ifextra *)aux;
 
-	nd6_ifdetach(ext-nd_ifinfo);
+	nd6_ifdetach(ifp, ext);
 	free(ext-in6_ifstat, M_IFADDR);
 	free(ext-icmp6_ifstat, M_IFADDR);
 	scope6_ifdetach(ext-scope6_id);

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.94 src/sys/netinet6/in6_ifattach.c:1.95
--- src/sys/netinet6/in6_ifattach.c:1.94	Fri Nov 14 17:34:23 2014
+++ src/sys/netinet6/in6_ifattach.c	Mon Feb 23 19:15:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.94 2014/11/14 17:34:23 maxv Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.95 2015/02/23 19:15:59 martin Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.94 2014/11/14 17:34:23 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.95 2015/02/23 19:15:59 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -848,7 +848,7 @@ in6_ifdetach(struct ifnet *ifp)
 	ip6_mrouter_detach(ifp);
 
 	/* remove neighbor management table */
-	nd6_purge(ifp);
+	nd6_purge(ifp, NULL);
 
 	/* XXX this code is duplicated in in6_purgeif() --dyoung */
 	/* nuke any of IPv6 addresses we have */
@@ -919,7 +919,7 @@ in6_ifdetach(struct ifnet *ifp)
 	 * prefixes after removing all addresses above.
 	 * (Or can we just delay calling nd6_purge until at this point?)
 	 */
-	nd6_purge(ifp);
+	nd6_purge(ifp, NULL);
 }
 
 int

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.157 src/sys/netinet6/nd6.c:1.158
--- src/sys/netinet6/nd6.c:1.157	Tue Feb 17 15:14:28 2015
+++ src/sys/netinet6/nd6.c	Mon Feb 23 19:15:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.157 2015/02/17 15:14:28 christos Exp $	*/
+/*	$NetBSD: nd6.c,v 1.158 2015/02/23 19:15:59 martin Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.157 2015/02/17 15:14:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.158 2015/02/23 19:15:59 martin Exp $);
 
 #include bridge.h
 #include carp.h
@@ -205,10 +205,11 @@ nd6_ifattach(struct ifnet *ifp)
 }
 
 void
-nd6_ifdetach(struct nd_ifinfo *nd)
+nd6_ifdetach(struct ifnet *ifp, struct in6_ifextra *ext)
 {
 
-	free(nd, M_IP6NDP);
+	nd6_purge(ifp, ext);
+	free(ext-nd_ifinfo, M_IP6NDP);
 }
 
 void
@@ -556,7 +557,7 @@ nd6_timer(void *ignored_arg)
 	
 	TAILQ_FOREACH_SAFE(dr, nd_defrouter, dr_entry, next_dr) {
 		if (dr-expire  dr-expire  time_second) {
-			defrtrlist_del(dr);
+			defrtrlist_del(dr, NULL);
 		}
 	}
 
@@ -746,13 +747,23 @@ nd6_accepts_rtadv(const struct nd_ifinfo
  * ifp goes away.
  */
 void
-nd6_purge(struct ifnet *ifp)
+nd6_purge(struct ifnet *ifp, struct in6_ifextra *ext)
 {
 	struct llinfo_nd6 *ln, *nln;
 	struct nd_defrouter *dr, *ndr;
 	struct nd_prefix *pr, *npr;
 
 	/*
+	 * During detach, the ND info might be already removed, but
+	 * then is explitly passed as argument.
+	 * Otherwise get it from ifp-if_afdata.
+	 */
+	if (ext == NULL)
+		ext = ifp-if_afdata[AF_INET6];
+	if (ext == NULL)
+		return;
+
+	/*
 	 * Nuke default router list entries toward ifp.
 	 * We defer removal of default router list entries that is installed
 	 * in the routing 

CVS commit: src/sys

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 19:05:17 UTC 2015

Modified Files:
src/sys/arch/arm/rockchip: rockchip_emac.c
src/sys/dev/ic: dwc_gmac.c

Log Message:
Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/rockchip/rockchip_emac.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/dwc_gmac.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/rockchip/rockchip_emac.c
diff -u src/sys/arch/arm/rockchip/rockchip_emac.c:1.11 src/sys/arch/arm/rockchip/rockchip_emac.c:1.12
--- src/sys/arch/arm/rockchip/rockchip_emac.c:1.11	Sat Jan 17 15:05:24 2015
+++ src/sys/arch/arm/rockchip/rockchip_emac.c	Mon Feb 23 19:05:16 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_emac.c,v 1.11 2015/01/17 15:05:24 jmcneill Exp $ */
+/* $NetBSD: rockchip_emac.c,v 1.12 2015/02/23 19:05:16 martin Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_rkemac.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rockchip_emac.c,v 1.11 2015/01/17 15:05:24 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: rockchip_emac.c,v 1.12 2015/02/23 19:05:16 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -84,6 +84,7 @@ struct rkemac_txdata {
 	bus_dmamap_t td_map;
 	bus_dmamap_t td_active;
 	struct mbuf *td_m;
+	int td_nbufs;
 };
 
 struct rkemac_txring {
@@ -574,6 +575,10 @@ rkemac_start(struct ifnet *ifp)
 		}
 		IFQ_DEQUEUE(ifp-if_snd, m0);
 		bpf_mtap(ifp, m0);
+		if (sc-sc_txq.t_queued == RKEMAC_TX_RING_COUNT) {
+			ifp-if_flags |= IFF_OACTIVE;
+			break;
+		}
 	}
 
 	if (sc-sc_txq.t_queued != old) {
@@ -679,15 +684,14 @@ rkemac_tick(void *priv)
 static int
 rkemac_queue(struct rkemac_softc *sc, struct mbuf *m0)
 {
-	struct rkemac_txdesc *tx;
 	struct rkemac_txdata *td = NULL;
+	struct rkemac_txdesc *tx = NULL;
 	bus_dmamap_t map;
-	uint32_t info, len;
+	uint32_t info, len, padlen;
 	int error, first;
 
 	first = sc-sc_txq.t_cur;
 	map = sc-sc_txq.t_data[first].td_map;
-	info = 0;
 
 	error = bus_dmamap_load_mbuf(sc-sc_dmat, map, m0,
 	BUS_DMA_WRITE | BUS_DMA_NOWAIT);
@@ -698,8 +702,14 @@ rkemac_queue(struct rkemac_softc *sc, st
 
 	KASSERT(map-dm_nsegs  0);
 
-	const u_int nbufs = map-dm_nsegs +
-	((m0-m_pkthdr.len  ETHER_MIN_LEN) ? 1 : 0);
+	int nbufs = map-dm_nsegs;
+
+	if (m0-m_pkthdr.len  ETHER_MIN_LEN) {
+		padlen = ETHER_MIN_LEN - m0-m_pkthdr.len;
+		nbufs++;
+	} else {
+		padlen = 0;
+	}
 
 	if (sc-sc_txq.t_queued + nbufs  RKEMAC_TX_RING_COUNT) {
 		bus_dmamap_unload(sc-sc_dmat, map);
@@ -716,34 +726,34 @@ rkemac_queue(struct rkemac_softc *sc, st
 		tx-tx_info = htole32(info | len);
 		info = ~EMAC_TXDESC_FIRST;
 		info |= EMAC_TXDESC_OWN;
-		if (i == map-dm_nsegs - 1) {
-			if (m0-m_pkthdr.len  ETHER_MIN_LEN) {
-sc-sc_txq.t_queued++;
-sc-sc_txq.t_cur = (sc-sc_txq.t_cur + 1)
-% RKEMAC_TX_RING_COUNT;
-				td = sc-sc_txq.t_data[sc-sc_txq.t_cur];
-tx = sc-sc_txq.t_desc[sc-sc_txq.t_cur];
-tx-tx_ptr = htole32(sc-sc_pad_physaddr);
-len = __SHIFTIN(ETHER_MIN_LEN -
-m0-m_pkthdr.len , EMAC_TXDESC_TXLEN);
-tx-tx_info = htole32(info | len);
-			}
-			tx-tx_info |= htole32(EMAC_TXDESC_LAST);
-		}
 
 		sc-sc_txq.t_queued++;
-		sc-sc_txq.t_cur =
-		(sc-sc_txq.t_cur + 1) % RKEMAC_TX_RING_COUNT;
+		sc-sc_txq.t_cur = TX_NEXT(sc-sc_txq.t_cur);
 	}
 
-	sc-sc_txq.t_desc[first].tx_info |= htole32(EMAC_TXDESC_OWN);
+	if (padlen) {
+		td = sc-sc_txq.t_data[sc-sc_txq.t_cur];
+		tx = sc-sc_txq.t_desc[sc-sc_txq.t_cur];
+
+		tx-tx_ptr = htole32(sc-sc_pad_physaddr);
+		len = __SHIFTIN(padlen, EMAC_TXDESC_TXLEN);
+		tx-tx_info = htole32(info | len);
+
+		sc-sc_txq.t_queued++;
+		sc-sc_txq.t_cur = TX_NEXT(sc-sc_txq.t_cur);
+	}
+
+	tx-tx_info |= htole32(EMAC_TXDESC_LAST);
 
 	td-td_m = m0;
 	td-td_active = map;
+	td-td_nbufs = nbufs;
 
 	bus_dmamap_sync(sc-sc_dmat, map, 0, map-dm_mapsize,
 	BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 
+	sc-sc_txq.t_desc[first].tx_info |= htole32(EMAC_TXDESC_OWN);
+
 	return 0;
 }
 
@@ -770,8 +780,7 @@ rkemac_txintr(struct rkemac_softc *sc)
 	struct ifnet *ifp = sc-sc_ec.ec_if;
 	int i;
 
-	for (i = sc-sc_txq.t_next; sc-sc_txq.t_queued  0;
-	i = TX_NEXT(i), sc-sc_txq.t_queued--) {
+	for (i = sc-sc_txq.t_next; sc-sc_txq.t_queued  0; i = TX_NEXT(i)) {
 		struct rkemac_txdata *td = sc-sc_txq.t_data[i];
 		struct rkemac_txdesc *tx = sc-sc_txq.t_desc[i];
 
@@ -792,6 +801,8 @@ rkemac_txintr(struct rkemac_softc *sc)
 
 		m_freem(td-td_m);
 		td-td_m = NULL;
+
+		sc-sc_txq.t_queued -= td-td_nbufs;
 	}
 
 	sc-sc_txq.t_next = i;

Index: src/sys/dev/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.31 src/sys/dev/ic/dwc_gmac.c:1.32
--- src/sys/dev/ic/dwc_gmac.c:1.31	Thu Jan  8 14:44:43 2015
+++ src/sys/dev/ic/dwc_gmac.c	Mon Feb 23 19:05:17 2015
@@ -1,4 +1,4 @@
-/* 

CVS commit: src/sys/arch

2015-02-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 23 20:34:38 UTC 2015

Modified Files:
src/sys/arch/acorn32/include: vmparam.h
src/sys/arch/cats/include: vmparam.h
src/sys/arch/epoc32/include: vmparam.h
src/sys/arch/evbarm/include: vmparam.h
src/sys/arch/hpcarm/include: vmparam.h
src/sys/arch/iyonix/include: vmparam.h
src/sys/arch/netwinder/include: vmparam.h
src/sys/arch/powerpc/include/ibm4xx: vmparam.h
src/sys/arch/shark/include: vmparam.h
src/sys/arch/zaurus/include: vmparam.h

Log Message:
Use default PAGER_MAP_DEFAULT_SIZE for ARM and PowerPC, exception
acorn26. This bumps the KVA reservation from 4MB to 16MB and avoids
long hangs on my Cubietruck under IO. acorn26 is kept as it does have a
ridiculous low 32MB KVA limit.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn32/include/vmparam.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/cats/include/vmparam.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/include/vmparam.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/include/vmparam.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hpcarm/include/vmparam.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/iyonix/include/vmparam.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/netwinder/include/vmparam.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/ibm4xx/vmparam.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/shark/include/vmparam.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/zaurus/include/vmparam.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/acorn32/include/vmparam.h
diff -u src/sys/arch/acorn32/include/vmparam.h:1.25 src/sys/arch/acorn32/include/vmparam.h:1.26
--- src/sys/arch/acorn32/include/vmparam.h:1.25	Sat Feb 18 16:29:36 2012
+++ src/sys/arch/acorn32/include/vmparam.h	Mon Feb 23 20:34:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.25 2012/02/18 16:29:36 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.26 2015/02/23 20:34:37 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -47,11 +47,6 @@
 #define	KERNEL_BASE		0xf000
 
 /*
- * Override the default pager_map size, there's not enough KVA.
- */
-#define PAGER_MAP_DEFAULT_SIZE		(4 * 1024 * 1024)
-
-/*
  * Size of User Raw I/O map
  */
 

Index: src/sys/arch/cats/include/vmparam.h
diff -u src/sys/arch/cats/include/vmparam.h:1.28 src/sys/arch/cats/include/vmparam.h:1.29
--- src/sys/arch/cats/include/vmparam.h:1.28	Sat Feb 18 16:29:37 2012
+++ src/sys/arch/cats/include/vmparam.h	Mon Feb 23 20:34:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.28 2012/02/18 16:29:37 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.29 2015/02/23 20:34:37 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -47,11 +47,6 @@
 #define	KERNEL_BASE		0xf000
 
 /*
- * Override the default pager_map size, there's not enough KVA.
- */
-#define PAGER_MAP_DEFAULT_SIZE		(4 * 1024 * 1024)
-
-/*
  * Size of User Raw I/O map
  */
 

Index: src/sys/arch/epoc32/include/vmparam.h
diff -u src/sys/arch/epoc32/include/vmparam.h:1.2 src/sys/arch/epoc32/include/vmparam.h:1.3
--- src/sys/arch/epoc32/include/vmparam.h:1.2	Wed May  1 13:12:00 2013
+++ src/sys/arch/epoc32/include/vmparam.h	Mon Feb 23 20:34:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.2 2013/05/01 13:12:00 kiyohara Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.3 2015/02/23 20:34:38 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -47,11 +47,6 @@
 #define	KERNEL_BASE		0xc000
 
 /*
- * Override the default pager_map size, there's not enough KVA.
- */
-#define PAGER_MAP_DEFAULT_SIZE		(4 * 1024 * 1024)
-
-/*
  * Size of User Raw I/O map
  */
 

Index: src/sys/arch/evbarm/include/vmparam.h
diff -u src/sys/arch/evbarm/include/vmparam.h:1.28 src/sys/arch/evbarm/include/vmparam.h:1.29
--- src/sys/arch/evbarm/include/vmparam.h:1.28	Sat Feb 18 16:29:37 2012
+++ src/sys/arch/evbarm/include/vmparam.h	Mon Feb 23 20:34:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.28 2012/02/18 16:29:37 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.29 2015/02/23 20:34:38 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -51,11 +51,6 @@
 #endif
 
 /*
- * Override the default pager_map size, there's not enough KVA.
- */
-#define PAGER_MAP_DEFAULT_SIZE		(4 * 1024 * 1024)
-
-/*
  * Size of User Raw I/O map
  */
 

Index: src/sys/arch/hpcarm/include/vmparam.h
diff -u src/sys/arch/hpcarm/include/vmparam.h:1.30 src/sys/arch/hpcarm/include/vmparam.h:1.31
--- src/sys/arch/hpcarm/include/vmparam.h:1.30	Fri Feb 17 16:46:46 2012
+++ src/sys/arch/hpcarm/include/vmparam.h	Mon Feb 23 20:34:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.30 2012/02/17 16:46:46 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.31 2015/02/23 20:34:38 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of 

CVS commit: src/external/bsd/atf/dist/atf-sh

2015-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb 23 08:48:18 UTC 2015

Modified Files:
src/external/bsd/atf/dist/atf-sh: atf_check_test.sh

Log Message:
Wait 10 seconds instead of 1 before killing the helper - otherwise on slow
machines it might not have gotten around to execute the first command at
all (and since it next waits for 42 seconds, 10 seconds is safe).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/external/bsd/atf/dist/atf-sh/atf_check_test.sh

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/atf/dist/atf-sh/atf_check_test.sh
diff -u src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.1.1.5 src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.2
--- src/external/bsd/atf/dist/atf-sh/atf_check_test.sh:1.1.1.5	Sat Feb  8 19:11:32 2014
+++ src/external/bsd/atf/dist/atf-sh/atf_check_test.sh	Mon Feb 23 08:48:18 2015
@@ -174,7 +174,7 @@ flush_stdout_on_timeout_body()
 $(atf_get_srcdir)/misc_helpers -s $(atf_get_srcdir) atf_check_timeout \
 out 2err 
 pid=${!}
-sleep 1
+sleep 10
 kill ${pid}
 
 grep 'Executing command.*true' out \



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

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 08:15:19 UTC 2015

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

Log Message:
Ticket 1259.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 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.29 src/doc/CHANGES-6.0.7:1.1.2.30
--- src/doc/CHANGES-6.0.7:1.1.2.29	Sat Feb 21 13:16:05 2015
+++ src/doc/CHANGES-6.0.7	Mon Feb 23 08:15:19 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.29 2015/02/21 13:16:05 martin Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.30 2015/02/23 08:15:19 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -4328,3 +4328,44 @@ sys/netinet/ip_icmp.h1.34
 	Fix ICMP_STATINC() buffer overflows.
 	[christos, ticket #1258]
 
+external/bsd/bind/dist/CHANGES	patch
+external/bsd/bind/dist/README	patch
+external/bsd/bind/dist/srcid	patch
+external/bsd/bind/dist/version	patch
+external/bsd/bind/dist/bin/tests/system/ans.pl			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.ch04.html			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.ch06.html			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.ch07.html			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.ch08.html			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.ch09.html			patch
+external/bsd/bind/dist/doc/arm/Bv9ARM.html			patch
+external/bsd/bind/dist/doc/arm/man.arpaname.html		patch
+external/bsd/bind/dist/doc/arm/man.ddns-confgen.html		patch
+external/bsd/bind/dist/doc/arm/man.dig.html			patch
+external/bsd/bind/dist/doc/arm/man.dnssec-checkds.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-coverage.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-dsfromkey.html	patch
+external/bsd/bind/dist/doc/arm/man.dnssec-keyfromlabel.html	patch
+external/bsd/bind/dist/doc/arm/man.dnssec-keygen.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-revoke.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-settime.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-signzone.html		patch
+external/bsd/bind/dist/doc/arm/man.dnssec-verify.html		patch
+external/bsd/bind/dist/doc/arm/man.genrandom.html		patch
+external/bsd/bind/dist/doc/arm/man.host.html			patch
+external/bsd/bind/dist/doc/arm/man.isc-hmac-fixup.html		patch
+external/bsd/bind/dist/doc/arm/man.named-checkconf.html		patch
+external/bsd/bind/dist/doc/arm/man.named-checkzone.html		patch
+external/bsd/bind/dist/doc/arm/man.named-journalprint.html	patch
+external/bsd/bind/dist/doc/arm/man.named.html			patch
+external/bsd/bind/dist/doc/arm/man.nsec3hash.html		patch
+external/bsd/bind/dist/doc/arm/man.nsupdate.html		patch
+external/bsd/bind/dist/doc/arm/man.rndc-confgen.html		patch
+external/bsd/bind/dist/doc/arm/man.rndc.conf.html		patch
+external/bsd/bind/dist/doc/arm/man.rndc.html			patch
+external/bsd/bind/dist/lib/dns/apipatch
+external/bsd/bind/dist/lib/dns/zone.cpatch
+
+	Security patch for bind from ISC (to 9.9.6-P2).
+	Only the change to lib/dns/zone.c is security relevant (CVE-2015-1349).
+	[spz, ticket #1259]



CVS commit: [netbsd-5] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:33:18 UTC 2015

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

Log Message:
Ticket 1950.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.98 -r1.1.2.99 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.98 src/doc/CHANGES-5.3:1.1.2.99
--- src/doc/CHANGES-5.3:1.1.2.98	Wed Feb 11 15:42:19 2015
+++ src/doc/CHANGES-5.3	Mon Feb 23 09:33:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.98 2015/02/11 15:42:19 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.99 2015/02/23 09:33:18 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3737,3 +3737,10 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
+Pull up following revision(s) (requested by spz in ticket #1950):
+dist/bind/lib/dns/zone.c			patch
+
+	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
+	an untrusted replacement could cause named to crash with an assertion
+	failure.
+	[spz, ticket #1950]



CVS commit: [netbsd-5] src/dist/bind/lib/dns

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:32:26 UTC 2015

Modified Files:
src/dist/bind/lib/dns [netbsd-5]: zone.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1950):
dist/bind/lib/dns/zone.cpatch

Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
an untrusted replacement could cause named to crash with an assertion
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.5 src/dist/bind/lib/dns/zone.c

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

Modified files:

Index: src/dist/bind/lib/dns/zone.c
diff -u src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4 src/dist/bind/lib/dns/zone.c:1.1.1.6.4.5
--- src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4	Wed Jul 25 11:58:51 2012
+++ src/dist/bind/lib/dns/zone.c	Mon Feb 23 09:32:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.c,v 1.1.1.6.4.4 2012/07/25 11:58:51 jdc Exp $	*/
+/*	$NetBSD: zone.c,v 1.1.1.6.4.5 2015/02/23 09:32:26 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -7671,8 +7671,15 @@ keyfetch_done(isc_task_t *task, isc_even
 	 namebuf, tag);
 trustkey = ISC_TRUE;
 			}
+		} else {
+			/*
+			 * No previously known key, and the key is not
+			 * secure, so skip it.
+			 */
+			continue;
 		}
 
+
 		/* Delete old version */
 		if (deletekey || !newkey)
 			CHECK(update_one_rr(kfetch-db, ver, diff,
@@ -7717,7 +7724,7 @@ keyfetch_done(isc_task_t *task, isc_even
 			trust_key(zone, keyname, dnskey, mctx);
 		}
 
-		if (!deletekey)
+		if (secure  !deletekey)
 			set_refreshkeytimer(zone, keydata, now);
 	}
 



CVS commit: [netbsd-5-2] src/dist/bind/lib/dns

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:37:48 UTC 2015

Modified Files:
src/dist/bind/lib/dns [netbsd-5-2]: zone.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1950):
dist/bind/lib/dns/zone.cpatch

Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
an untrusted replacement could cause named to crash with an assertion
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.4.2.1 src/dist/bind/lib/dns/zone.c

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

Modified files:

Index: src/dist/bind/lib/dns/zone.c
diff -u src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4 src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4.2.1
--- src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4	Wed Jul 25 11:58:51 2012
+++ src/dist/bind/lib/dns/zone.c	Mon Feb 23 09:37:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.c,v 1.1.1.6.4.4 2012/07/25 11:58:51 jdc Exp $	*/
+/*	$NetBSD: zone.c,v 1.1.1.6.4.4.2.1 2015/02/23 09:37:48 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -7671,8 +7671,15 @@ keyfetch_done(isc_task_t *task, isc_even
 	 namebuf, tag);
 trustkey = ISC_TRUE;
 			}
+		} else {
+			/*
+			 * No previously known key, and the key is not
+			 * secure, so skip it.
+			 */
+			continue;
 		}
 
+
 		/* Delete old version */
 		if (deletekey || !newkey)
 			CHECK(update_one_rr(kfetch-db, ver, diff,
@@ -7717,7 +7724,7 @@ keyfetch_done(isc_task_t *task, isc_even
 			trust_key(zone, keyname, dnskey, mctx);
 		}
 
-		if (!deletekey)
+		if (secure  !deletekey)
 			set_refreshkeytimer(zone, keydata, now);
 	}
 



CVS commit: [netbsd-5-1] src/dist/bind/lib/dns

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:40:08 UTC 2015

Modified Files:
src/dist/bind/lib/dns [netbsd-5-1]: zone.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1950):
dist/bind/lib/dns/zone.cpatch

Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
an untrusted replacement could cause named to crash with an assertion
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.4.1.2.3 -r1.1.1.6.4.1.2.4 src/dist/bind/lib/dns/zone.c

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

Modified files:

Index: src/dist/bind/lib/dns/zone.c
diff -u src/dist/bind/lib/dns/zone.c:1.1.1.6.4.1.2.3 src/dist/bind/lib/dns/zone.c:1.1.1.6.4.1.2.4
--- src/dist/bind/lib/dns/zone.c:1.1.1.6.4.1.2.3	Wed Jul 25 12:13:12 2012
+++ src/dist/bind/lib/dns/zone.c	Mon Feb 23 09:40:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.c,v 1.1.1.6.4.1.2.3 2012/07/25 12:13:12 jdc Exp $	*/
+/*	$NetBSD: zone.c,v 1.1.1.6.4.1.2.4 2015/02/23 09:40:08 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -7671,8 +7671,15 @@ keyfetch_done(isc_task_t *task, isc_even
 	 namebuf, tag);
 trustkey = ISC_TRUE;
 			}
+		} else {
+			/*
+			 * No previously known key, and the key is not
+			 * secure, so skip it.
+			 */
+			continue;
 		}
 
+
 		/* Delete old version */
 		if (deletekey || !newkey)
 			CHECK(update_one_rr(kfetch-db, ver, diff,
@@ -7717,7 +7724,7 @@ keyfetch_done(isc_task_t *task, isc_even
 			trust_key(zone, keyname, dnskey, mctx);
 		}
 
-		if (!deletekey)
+		if (secure  !deletekey)
 			set_refreshkeytimer(zone, keydata, now);
 	}
 



CVS commit: [netbsd-5-2] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:38:29 UTC 2015

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

Log Message:
Ticket 1950.


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

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.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.16 src/doc/CHANGES-5.2.4:1.1.2.17
--- src/doc/CHANGES-5.2.4:1.1.2.16	Wed Feb 11 15:43:00 2015
+++ src/doc/CHANGES-5.2.4	Mon Feb 23 09:38:29 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.16 2015/02/11 15:43:00 martin Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.17 2015/02/23 09:38:29 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -2540,3 +2540,10 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
+Pull up following revision(s) (requested by spz in ticket #1950):
+dist/bind/lib/dns/zone.c			patch
+
+	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
+	an untrusted replacement could cause named to crash with an assertion
+	failure.
+	[spz, ticket #1950]



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

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:42:23 UTC 2015

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

Log Message:
Ticket 1950.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-5.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-5.1.6
diff -u src/doc/CHANGES-5.1.6:1.1.2.16 src/doc/CHANGES-5.1.6:1.1.2.17
--- src/doc/CHANGES-5.1.6:1.1.2.16	Wed Feb 11 15:43:38 2015
+++ src/doc/CHANGES-5.1.6	Mon Feb 23 09:42:23 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.6,v 1.1.2.16 2015/02/11 15:43:38 martin Exp $
+# $NetBSD: CHANGES-5.1.6,v 1.1.2.17 2015/02/23 09:42:23 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6
 release:
@@ -2540,3 +2540,9 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
+dist/bind/lib/dns/zone.c			patch
+
+	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
+	an untrusted replacement could cause named to crash with an assertion
+	failure.
+	[spz, ticket #1950]



CVS commit: [netbsd-5] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:43:18 UTC 2015

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

Log Message:
Remove extra line.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.99 -r1.1.2.100 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.99 src/doc/CHANGES-5.3:1.1.2.100
--- src/doc/CHANGES-5.3:1.1.2.99	Mon Feb 23 09:33:18 2015
+++ src/doc/CHANGES-5.3	Mon Feb 23 09:43:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.99 2015/02/23 09:33:18 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.100 2015/02/23 09:43:18 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3737,7 +3737,6 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
-Pull up following revision(s) (requested by spz in ticket #1950):
 dist/bind/lib/dns/zone.c			patch
 
 	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying



CVS commit: [netbsd-5-2] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:40:44 UTC 2015

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

Log Message:
Remove extra line.


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

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.4
diff -u src/doc/CHANGES-5.2.4:1.1.2.17 src/doc/CHANGES-5.2.4:1.1.2.18
--- src/doc/CHANGES-5.2.4:1.1.2.17	Mon Feb 23 09:38:29 2015
+++ src/doc/CHANGES-5.2.4	Mon Feb 23 09:40:44 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.4,v 1.1.2.17 2015/02/23 09:38:29 msaitoh Exp $
+# $NetBSD: CHANGES-5.2.4,v 1.1.2.18 2015/02/23 09:40:44 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4
 release:
@@ -2540,7 +2540,6 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
-Pull up following revision(s) (requested by spz in ticket #1950):
 dist/bind/lib/dns/zone.c			patch
 
 	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying



CVS commit: xsrc/external/mit/font-bh-lucidatypewriter/dist

2015-02-23 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Feb 24 06:46:09 UTC 2015

Removed Files:
xsrc/external/mit/font-bh-lucidatypewriter/dist: AUTHORS COPYING
ChangeLog INSTALL Makefile.am Makefile.in NEWS README aclocal.m4
autogen.sh configure configure.ac install-sh lutBS08.bdf
lutBS10.bdf lutBS12.bdf lutBS14.bdf lutBS18.bdf lutBS19.bdf
lutBS24.bdf lutRS08.bdf lutRS10.bdf lutRS12.bdf lutRS14.bdf
lutRS18.bdf lutRS19.bdf lutRS24.bdf missing mkinstalldirs

Log Message:
nuke an old and unused copy of font-bh-lucidatypewriter-75dpi-1.0.0.
a current version of this font now lives in the
font-bh-lucidatypewriter-75dpi directory now.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/font-bh-lucidatypewriter/dist/AUTHORS \
xsrc/external/mit/font-bh-lucidatypewriter/dist/COPYING \
xsrc/external/mit/font-bh-lucidatypewriter/dist/ChangeLog \
xsrc/external/mit/font-bh-lucidatypewriter/dist/INSTALL \
xsrc/external/mit/font-bh-lucidatypewriter/dist/Makefile.am \
xsrc/external/mit/font-bh-lucidatypewriter/dist/Makefile.in \
xsrc/external/mit/font-bh-lucidatypewriter/dist/NEWS \
xsrc/external/mit/font-bh-lucidatypewriter/dist/README \
xsrc/external/mit/font-bh-lucidatypewriter/dist/aclocal.m4 \
xsrc/external/mit/font-bh-lucidatypewriter/dist/autogen.sh \
xsrc/external/mit/font-bh-lucidatypewriter/dist/configure \
xsrc/external/mit/font-bh-lucidatypewriter/dist/configure.ac \
xsrc/external/mit/font-bh-lucidatypewriter/dist/install-sh \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS08.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS10.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS12.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS14.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS18.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS19.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutBS24.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS08.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS10.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS12.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS14.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS18.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS19.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/lutRS24.bdf \
xsrc/external/mit/font-bh-lucidatypewriter/dist/missing \
xsrc/external/mit/font-bh-lucidatypewriter/dist/mkinstalldirs

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



CVS commit: src/sys/dev/pci

2015-02-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Feb 24 02:26:15 UTC 2015

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

Log Message:
Revert previous change.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_iwm.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_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.12 src/sys/dev/pci/if_iwm.c:1.13
--- src/sys/dev/pci/if_iwm.c:1.12	Mon Feb 23 13:09:37 2015
+++ src/sys/dev/pci/if_iwm.c	Tue Feb 24 02:26:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwm.c,v 1.12 2015/02/23 13:09:37 nonaka Exp $	*/
+/*	$NetBSD: if_iwm.c,v 1.13 2015/02/24 02:26:15 nonaka Exp $	*/
 /*	OpenBSD: if_iwm.c,v 1.18 2015/02/11 01:12:42 brad Exp	*/
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.12 2015/02/23 13:09:37 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwm.c,v 1.13 2015/02/24 02:26:15 nonaka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -5347,12 +5347,8 @@ iwm_setrates(struct iwm_node *in)
 		if (ridx  IWM_RIDX_MAX)
 			DPRINTF((%s: WARNING: device rate for %d not found!\n,
 			DEVNAME(sc), rate));
-		else if (i  __arraycount(in-in_ridx))
-			in-in_ridx[i] = ridx;
 		else
-			DPRINTF((%s: WARNING: out of range: 
-			i(%d) = array size(%zu)\n, DEVNAME(sc),
-			i, __arraycount(in-in_ridx)));
+			in-in_ridx[i] = ridx;
 	}
 
 	/* then construct a lq_cmd based on those */



CVS commit: src

2015-02-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 23 23:21:47 UTC 2015

Modified Files:
src/distrib/evbarm/instkernel/sshramdisk: Makefile
src/sys/arch/evbarm/conf: RPI_INSTALL

Log Message:
Give LLVM a bit breathing room for the sshramdisk when building for
generic ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/evbarm/instkernel/sshramdisk/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/RPI_INSTALL

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

Modified files:

Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile
diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.7 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.8
--- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.7	Mon Feb 16 21:48:48 2015
+++ src/distrib/evbarm/instkernel/sshramdisk/Makefile	Mon Feb 23 23:21:47 2015
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.7 2015/02/16 21:48:48 skrll Exp $
+#	$NetBSD: Makefile,v 1.8 2015/02/23 23:21:47 joerg Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		sshramdisk.fs
-IMAGESIZE=	14m
+IMAGESIZE=	14848k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/evbarm/conf/RPI_INSTALL
diff -u src/sys/arch/evbarm/conf/RPI_INSTALL:1.7 src/sys/arch/evbarm/conf/RPI_INSTALL:1.8
--- src/sys/arch/evbarm/conf/RPI_INSTALL:1.7	Mon Feb 16 22:50:02 2015
+++ src/sys/arch/evbarm/conf/RPI_INSTALL	Mon Feb 23 23:21:47 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: RPI_INSTALL,v 1.7 2015/02/16 22:50:02 skrll Exp $
+#	$NetBSD: RPI_INSTALL,v 1.8 2015/02/23 23:21:47 joerg Exp $
 #
 #	RPI_INSTALL -- RPI kernel with installation-sized
 #	ramdisk
@@ -8,7 +8,7 @@ include arch/evbarm/conf/RPI
 include arch/evbarm/conf/INSTALL
 
 no options	MEMORY_DISK_ROOT_SIZE
-options 	MEMORY_DISK_ROOT_SIZE=28672
+options 	MEMORY_DISK_ROOT_SIZE=29696
 
 makeoptions	RAMDISKNAME=sshramdisk
 no makeoptions	DEBUG