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

2013-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug  9 06:00:09 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: kobj_machdep.c

Log Message:
Fix addend manipulation


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm32/kobj_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/arm/arm32/kobj_machdep.c
diff -u src/sys/arch/arm/arm32/kobj_machdep.c:1.5 src/sys/arch/arm/arm32/kobj_machdep.c:1.6
--- src/sys/arch/arm/arm32/kobj_machdep.c:1.5	Thu Aug  8 06:49:09 2013
+++ src/sys/arch/arm/arm32/kobj_machdep.c	Fri Aug  9 06:00:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kobj_machdep.c,v 1.5 2013/08/08 06:49:09 matt Exp $	*/
+/*	$NetBSD: kobj_machdep.c,v 1.6 2013/08/09 06:00:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.5 2013/08/08 06:49:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.6 2013/08/09 06:00:09 matt Exp $");
 
 #define	ELFSIZE		ARCH_ELFSIZE
 
@@ -148,7 +148,7 @@ kobj_reloc(kobj_t ko, uintptr_t relocbas
 		if (addr == 0)
 			break;
 
-		addend += ((uint32_t *)addr - (uint32_t *)where);
+		addend += (uintptr_t)addr - (uintptr_t)where;
 
 		if (addend & 3) {
 			printf ("Relocation %x unaligned @ %p\n", addend, where);



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

2013-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug  9 05:57:13 UTC 2013

Added Files:
src/sys/arch/evbarm/conf: ARMADAXP_INSTALL

Log Message:
Add a INSTALL kernel for ARMADAXP


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/ARMADAXP_INSTALL

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

Added files:

Index: src/sys/arch/evbarm/conf/ARMADAXP_INSTALL
diff -u /dev/null src/sys/arch/evbarm/conf/ARMADAXP_INSTALL:1.1
--- /dev/null	Fri Aug  9 05:57:13 2013
+++ src/sys/arch/evbarm/conf/ARMADAXP_INSTALL	Fri Aug  9 05:57:13 2013
@@ -0,0 +1,10 @@
+#	$NetBSD: ARMADAXP_INSTALL,v 1.1 2013/08/09 05:57:13 matt Exp $
+#
+#	ARMADAXP_INSTALL -- ARMADAXP kernel with installation-sized
+#	ramdisk
+#
+
+include "arch/evbarm/conf/ARMADAXP"
+include "arch/evbarm/conf/INSTALL"
+
+options BOOTHOWTO=RB_SINGLE



CVS commit: src/sys/kern

2013-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug  9 05:10:14 UTC 2013

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

Log Message:
Ignore REL/RELA if they aren't against a PROGBIT section.
(this causes EXIDX sections to be ignored for ARM).


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/subr_kobj.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/subr_kobj.c
diff -u src/sys/kern/subr_kobj.c:1.45 src/sys/kern/subr_kobj.c:1.46
--- src/sys/kern/subr_kobj.c:1.45	Sun Dec 30 20:52:20 2012
+++ src/sys/kern/subr_kobj.c	Fri Aug  9 05:10:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kobj.c,v 1.45 2012/12/30 20:52:20 pooka Exp $	*/
+/*	$NetBSD: subr_kobj.c,v 1.46 2013/08/09 05:10:14 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.45 2012/12/30 20:52:20 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.46 2013/08/09 05:10:14 matt Exp $");
 
 #include "opt_modular.h"
 
@@ -257,9 +257,13 @@ kobj_load(kobj_t ko)
 			symstrindex = shdr[i].sh_link;
 			break;
 		case SHT_REL:
+			if (shdr[shdr[i].sh_info].sh_type != SHT_PROGBITS)
+continue;
 			ko->ko_nrel++;
 			break;
 		case SHT_RELA:
+			if (shdr[shdr[i].sh_info].sh_type != SHT_PROGBITS)
+continue;
 			ko->ko_nrela++;
 			break;
 		case SHT_STRTAB:
@@ -488,6 +492,8 @@ kobj_load(kobj_t ko)
 			pb++;
 			break;
 		case SHT_REL:
+			if (shdr[shdr[i].sh_info].sh_type != SHT_PROGBITS)
+break;
 			ko->ko_reltab[rl].size = shdr[i].sh_size;
 			ko->ko_reltab[rl].size -=
 			shdr[i].sh_size % sizeof(Elf_Rel);
@@ -508,6 +514,8 @@ kobj_load(kobj_t ko)
 			rl++;
 			break;
 		case SHT_RELA:
+			if (shdr[shdr[i].sh_info].sh_type != SHT_PROGBITS)
+break;
 			ko->ko_relatab[ra].size = shdr[i].sh_size;
 			ko->ko_relatab[ra].size -=
 			shdr[i].sh_size % sizeof(Elf_Rela);
@@ -532,16 +540,21 @@ kobj_load(kobj_t ko)
 		}
 	}
 	if (pb != ko->ko_nprogtab) {
-		panic("lost progbits");
+		panic("%s:%d: %s: lost progbits", __func__, __LINE__,
+		   ko->ko_name);
 	}
 	if (rl != ko->ko_nrel) {
-		panic("lost rel");
+		panic("%s:%d: %s: lost rel", __func__, __LINE__,
+		   ko->ko_name);
 	}
 	if (ra != ko->ko_nrela) {
-		panic("lost rela");
+		panic("%s:%d: %s: lost rela", __func__, __LINE__,
+		   ko->ko_name);
 	}
 	if (ko->ko_type != KT_MEMORY && mapbase != ko->ko_address + mapsize) {
-		panic("mapbase 0x%lx != address %lx + mapsize %ld (0x%lx)\n",
+		panic("%s:%d: %s: "
+		"mapbase 0x%lx != address %lx + mapsize %ld (0x%lx)\n",
+		__func__, __LINE__, ko->ko_name,
 		(long)mapbase, (long)ko->ko_address, (long)mapsize,
 		(long)ko->ko_address + mapsize);
 	}
@@ -929,7 +942,9 @@ kobj_relocate(kobj_t ko, bool local)
 		rellim = rel + ko->ko_reltab[i].nrel;
 		base = kobj_findbase(ko, ko->ko_reltab[i].sec);
 		if (base == 0) {
-			panic("lost base for e_reltab");
+			panic("%s:%d: %s: lost base for e_reltab[%d] sec %d",
+			   __func__, __LINE__, ko->ko_name, i,
+			   ko->ko_reltab[i].sec);
 		}
 		for (; rel < rellim; rel++) {
 			symidx = ELF_R_SYM(rel->r_info);
@@ -958,7 +973,9 @@ kobj_relocate(kobj_t ko, bool local)
 		relalim = rela + ko->ko_relatab[i].nrela;
 		base = kobj_findbase(ko, ko->ko_relatab[i].sec);
 		if (base == 0) {
-			panic("lost base for e_relatab");
+			panic("%s:%d: %s: lost base for e_relatab[%d] sec %d",
+			   __func__, __LINE__, ko->ko_name, i,
+			   ko->ko_relatab[i].sec);
 		}
 		for (; rela < relalim; rela++) {
 			symidx = ELF_R_SYM(rela->r_info);



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

2013-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Aug  9 04:24:19 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: Makefile.evbarm.inc

Log Message:
ldscript doesn't need -Ttext


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/Makefile.evbarm.inc

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

Modified files:

Index: src/sys/arch/evbarm/conf/Makefile.evbarm.inc
diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.26 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.27
--- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.26	Sun Aug  4 00:59:46 2013
+++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc	Fri Aug  9 04:24:19 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.evbarm.inc,v 1.26 2013/08/04 00:59:46 matt Exp $
+#	$NetBSD: Makefile.evbarm.inc,v 1.27 2013/08/09 04:24:19 matt Exp $
 
 #
 # If this is a install kernel and the ramdisk image exists in the object
@@ -23,6 +23,7 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map}
 
 .if defined(KERNEL_BASE_PHYS)
+LINKTEXT=
 KERNLDSCRIPT=	ldscript
 EXTRA_LINKFLAGS+=	-T ldscript
 
@@ -33,4 +34,6 @@ ldscript: ${THISARM}/conf/ldscript.evbar
 	-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
 	${THISARM}/conf/ldscript.evbarm > tmp && mv tmp $@
 
+.else
+LINKTEXT=	-Ttext ${LOADADDRESS}
 .endif	# KERNEL_BASE_PHYS



CVS commit: src/common/lib/libutil

2013-08-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  8 22:18:20 UTC 2013

Modified Files:
src/common/lib/libutil: snprintb.c

Log Message:
Now that all of the macros are enclosed in "do { ... } while 0" we can
remove unneded parenthesization of their invocations.

OK mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/common/lib/libutil/snprintb.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/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.13 src/common/lib/libutil/snprintb.c:1.14
--- src/common/lib/libutil/snprintb.c:1.13	Thu Aug  8 16:43:13 2013
+++ src/common/lib/libutil/snprintb.c	Thu Aug  8 22:18:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $	*/
+/*	$NetBSD: snprintb.c,v 1.14 2013/08/08 22:18:20 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #  include 
 #  if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.14 2013/08/08 22:18:20 pgoyette Exp $");
 #  endif
 
 #  include 
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: snprintb.c,v 1.13 2013
 #  include 
 # else /* ! _KERNEL */
 #  include 
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.14 2013/08/08 22:18:20 pgoyette Exp $");
 #  include 
 #  include 
 #  include 
@@ -151,9 +151,9 @@ snprintb_m(char *buf, size_t buflen, con
 #define	PUTCHR(c) do {			\
 			if (l_max > 0 && (size_t)l_len >= (l_max - 1)) {\
 BACKUP;	\
-if (restart == 0) {			\
+if (restart == 0)			\
 	STORE(c);			\
-} else	\
+else	\
 	sep = '<';			\
 			} else {	\
 STORE(c);\
@@ -217,12 +217,10 @@ snprintb_m(char *buf, size_t buflen, con
 	sep = ',';
 if (ch == 'F')	/* just extract */
 	break;
-if (restart == 0) {
+if (restart == 0)
 	PUTS(bitfmt);
-}
-if (restart == 0) {
+if (restart == 0)
 	PUTCHR('=');
-}
 if (restart == 0) {
 	f_len = snprintf(bp, buflen - t_len,
 			 sbase, field);
@@ -232,10 +230,8 @@ snprintb_m(char *buf, size_t buflen, con
 	l_len += f_len;
 	if ((size_t)t_len < buflen)
 		bp += f_len;
-	if (l_max > 0 &&
-	(size_t)l_len > l_max) {
+	if (l_max > 0 && (size_t)l_len > l_max)
 		PUTCHR('#');
-	}
 }
 break;
 			case '=':
@@ -248,9 +244,8 @@ snprintb_m(char *buf, size_t buflen, con
  */
 if ((int)field != bit)
 	goto skip;
-if (ch == '=') {
+if (ch == '=')
 	PUTCHR('=');
-}
 PUTS(bitfmt);
 break;
 			default:



CVS commit: [netbsd-6] src/doc

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:59:43 UTC 2013

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

Log Message:
926


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

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.29 src/doc/CHANGES-6.2:1.1.2.30
--- src/doc/CHANGES-6.2:1.1.2.29	Mon Aug  5 10:09:53 2013
+++ src/doc/CHANGES-6.2	Thu Aug  8 21:59:43 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.29 2013/08/05 10:09:53 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.30 2013/08/08 21:59:43 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -468,3 +468,9 @@ sys/dev/pci/pci_subr.c		1.92-1.102, 1.10
 	Fix bug in comment.
 	[msaitoh, ticket #928]
 
+sys/netinet6/nd6_rtr.c1.86
+
+	Avoid crash destroying tap0 after deleting its link-local address.
+	PR/47576.
+	[msaitoh, ticket #926]
+



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

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:58:55 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6]: nd6_rtr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #926):
sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.82.4.2 -r1.82.4.3 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/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.4.2 src/sys/netinet6/nd6_rtr.c:1.82.4.3
--- src/sys/netinet6/nd6_rtr.c:1.82.4.2	Fri Jul 12 11:18:15 2013
+++ src/sys/netinet6/nd6_rtr.c	Thu Aug  8 21:58:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $");
 
 #include 
 #include 
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext->nprefixes--;
-	if (ext->nprefixes < 0) {
-		log(LOG_WARNING, "prelist_remove: negative count on %s\n",
-		pr->ndpr_ifp->if_xname);
+	if (ext) {
+		ext->nprefixes--;
+		if (ext->nprefixes < 0) {
+			log(LOG_WARNING, "prelist_remove: negative count on "
+			"%s\n", pr->ndpr_ifp->if_xname);
+		}
 	}
 	splx(s);
 



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

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:58:22 UTC 2013

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

Log Message:
926


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-6.1.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-6.1.1
diff -u src/doc/CHANGES-6.1.1:1.1.2.17 src/doc/CHANGES-6.1.1:1.1.2.18
--- src/doc/CHANGES-6.1.1:1.1.2.17	Thu Aug  8 03:20:17 2013
+++ src/doc/CHANGES-6.1.1	Thu Aug  8 21:58:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.1,v 1.1.2.17 2013/08/08 03:20:17 msaitoh Exp $
+# $NetBSD: CHANGES-6.1.1,v 1.1.2.18 2013/08/08 21:58:21 snj Exp $
 
 A complete list of changes from the NetBSD 6.1 release to the NetBSD 6.1.1
 release:
@@ -180,3 +180,10 @@ doc/CHANGES-6.1	patch
 	Remove the note about ticket #652 (bge) because the change wasn't
 	added. 	Fixes PR#48069 for netbsd-6-1 branch.
 	[msaitoh]
+
+sys/netinet6/nd6_rtr.c1.86
+
+Avoid crash destroying tap0 after deleting its link-local address.
+PR/47576.
+[msaitoh, ticket #926]
+



CVS commit: [netbsd-6-1] src/sys/netinet6

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:57:40 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6-1]: nd6_rtr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #926):
sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.82.10.2 -r1.82.10.3 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/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.10.2 src/sys/netinet6/nd6_rtr.c:1.82.10.3
--- src/sys/netinet6/nd6_rtr.c:1.82.10.2	Fri Jul 12 11:18:57 2013
+++ src/sys/netinet6/nd6_rtr.c	Thu Aug  8 21:57:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.10.2 2013/07/12 11:18:57 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.10.3 2013/08/08 21:57:40 snj Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.10.2 2013/07/12 11:18:57 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.10.3 2013/08/08 21:57:40 snj Exp $");
 
 #include 
 #include 
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext->nprefixes--;
-	if (ext->nprefixes < 0) {
-		log(LOG_WARNING, "prelist_remove: negative count on %s\n",
-		pr->ndpr_ifp->if_xname);
+	if (ext) {
+		ext->nprefixes--;
+		if (ext->nprefixes < 0) {
+			log(LOG_WARNING, "prelist_remove: negative count on "
+			"%s\n", pr->ndpr_ifp->if_xname);
+		}
 	}
 	splx(s);
 



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

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:56:59 UTC 2013

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

Log Message:
926


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.0.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-6.0.3
diff -u src/doc/CHANGES-6.0.3:1.1.2.16 src/doc/CHANGES-6.0.3:1.1.2.17
--- src/doc/CHANGES-6.0.3:1.1.2.16	Fri Aug  2 20:23:11 2013
+++ src/doc/CHANGES-6.0.3	Thu Aug  8 21:56:59 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.3,v 1.1.2.16 2013/08/02 20:23:11 martin Exp $
+# $NetBSD: CHANGES-6.0.3,v 1.1.2.17 2013/08/08 21:56:59 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.2 release to the NetBSD 6.0.3
 release:
@@ -168,3 +168,10 @@ sys/kern/uipc_socket.c1.216
 	Fix an inversion in checking for authorization to drop TCP connections
 	found (and the obvious fix suggested) by Sander Bos.
 	[spz, ticket #927]
+
+sys/netinet6/nd6_rtr.c1.86
+
+	Avoid crash destroying tap0 after deleting its link-local address.
+	PR/47576.
+	[msaitoh, ticket #926]
+



CVS commit: [netbsd-6-0] src/sys/netinet6

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:55:19 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6-0]: nd6_rtr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #926):
sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.82.8.2 -r1.82.8.3 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/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.8.2 src/sys/netinet6/nd6_rtr.c:1.82.8.3
--- src/sys/netinet6/nd6_rtr.c:1.82.8.2	Fri Jul 12 11:18:32 2013
+++ src/sys/netinet6/nd6_rtr.c	Thu Aug  8 21:55:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.8.2 2013/07/12 11:18:32 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.8.3 2013/08/08 21:55:19 snj Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.8.2 2013/07/12 11:18:32 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.82.8.3 2013/08/08 21:55:19 snj Exp $");
 
 #include 
 #include 
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext->nprefixes--;
-	if (ext->nprefixes < 0) {
-		log(LOG_WARNING, "prelist_remove: negative count on %s\n",
-		pr->ndpr_ifp->if_xname);
+	if (ext) {
+		ext->nprefixes--;
+		if (ext->nprefixes < 0) {
+			log(LOG_WARNING, "prelist_remove: negative count on "
+			"%s\n", pr->ndpr_ifp->if_xname);
+		}
 	}
 	splx(s);
 



CVS commit: src/doc

2013-08-08 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Aug  8 21:27:50 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Note the new xsh(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1843 -r1.1844 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1843 src/doc/CHANGES:1.1844
--- src/doc/CHANGES:1.1843	Thu Aug  8 21:09:49 2013
+++ src/doc/CHANGES	Thu Aug  8 21:27:50 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1843 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1844 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -275,3 +275,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	makefs(8): Added UDF support for makefs(8). It allows for the creation
 		of images for both read-only, rewritable or recordable media.
 		[reinoud 20130805]
+	xsh(4): Add driver for Individual Computers X-Surf 100 network interface
+		card. [rkujawa 20130808]



CVS commit: src/sys/arch/amiga

2013-08-08 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Aug  8 21:23:52 UTC 2013

Modified Files:
src/sys/arch/amiga/conf: files.amiga
Added Files:
src/sys/arch/amiga/dev: if_ne_xsh.c xsh.c xshvar.h

Log Message:
Add preliminary support for Individual Computers new X-Surf 100 network card.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/arch/amiga/conf/files.amiga
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/if_ne_xsh.c \
src/sys/arch/amiga/dev/xsh.c src/sys/arch/amiga/dev/xshvar.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/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.170 src/sys/arch/amiga/conf/files.amiga:1.171
--- src/sys/arch/amiga/conf/files.amiga:1.170	Sat Apr 27 22:27:33 2013
+++ src/sys/arch/amiga/conf/files.amiga	Thu Aug  8 21:23:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.170 2013/04/27 22:27:33 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.171 2013/08/08 21:23:51 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -235,6 +235,15 @@ file	arch/amiga/dev/if_ne_xsurf.c	ne_xsu
 attach	wdc at xsurfbus with wdc_xsurf
 file	arch/amiga/dev/wdc_xsurf.c	wdc_xsurf & xsurf
 
+define	xshbus {}
+
+device	xsh: xshbus
+attach	xsh at zbus
+file	arch/amiga/dev/xsh.c		xsh needs-flag
+
+attach	ne at xshbus with ne_xsh: dp8390nic
+file	arch/amiga/dev/if_ne_xsh.c	ne_xsh needs-flag
+
 # Hydra ethernet card
 device	ed: ifnet, ether, arp
 attach	ed at zbus with ed_zbus: dp8390nic

Added files:

Index: src/sys/arch/amiga/dev/if_ne_xsh.c
diff -u /dev/null src/sys/arch/amiga/dev/if_ne_xsh.c:1.1
--- /dev/null	Thu Aug  8 21:23:52 2013
+++ src/sys/arch/amiga/dev/if_ne_xsh.c	Thu Aug  8 21:23:52 2013
@@ -0,0 +1,141 @@
+/*	$NetBSD: if_ne_xsh.c,v 1.1 2013/08/08 21:23:52 rkujawa Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Radoslaw Kujawa.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+/*
+ * X-Surf 100 driver, ne(4) attachment. 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+int	ne_xsh_match(device_t, cfdata_t , void *);
+void	ne_xsh_attach(device_t, device_t, void *);
+
+struct ne_xsh_softc {
+	struct ne2000_softc	sc_ne2000;
+	struct bus_space_tag	sc_bst;
+	struct isr		sc_isr;
+};
+
+CFATTACH_DECL_NEW(ne_xsh, sizeof(struct ne_xsh_softc),
+ne_xsh_match, ne_xsh_attach, NULL, NULL);
+
+int
+ne_xsh_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct xshbus_attach_args *xap = aux;
+
+	if (strcmp(xap->xaa_name, "ne_xsh") != 0)
+		return 0;
+
+	return 1;
+}
+
+void
+ne_xsh_attach(device_t parent, device_t self, void *aux)
+{
+	struct ne_xsh_softc *zsc = device_private(self);
+	struct ne2000_softc *nsc = &zsc->sc_ne2000;
+	struct dp8390_softc *dsc = &nsc->sc_dp8390;
+
+	struct xshbus_attach_args *xap = aux;
+
+	bus_space_tag_t nict = &zsc->sc_bst;
+	bus_space_tag_t asict = nict;
+	bus_space_handle_t nich;
+	bus_space_handle_t asich;
+
+	dsc->sc_dev = self;
+
+	zsc->sc_bst.base = xap->xaa_base;
+	zsc->sc_bst.absm = &amiga_bus_stride_4;
+
+	aprint_normal("\n");
+
+	/* Map i/o space. */
+	if (bus_space_map(nict, NE2000_NIC_OFFSET, NE2000_NPORTS, 0, &nich)) {
+		aprint_error_dev(self, "can't map nic i/o space\n");
+		return;
+	}
+
+	if (bus_space_subregion(nict, nich, NE2000_ASIC_

CVS commit: src/doc

2013-08-08 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Aug  8 21:09:49 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
resort entry about ipsec kernel option change so it's chronologically
fitting


To generate a diff of this commit:
cvs rdiff -u -r1.1842 -r1.1843 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1842 src/doc/CHANGES:1.1843
--- src/doc/CHANGES:1.1842	Thu Aug  8 20:00:20 2013
+++ src/doc/CHANGES	Thu Aug  8 21:09:49 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1842 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1843 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -249,6 +249,8 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	wm(4): Add support for I217 and I218 [msaitoh 20130602]
 	X11: Updated all Xorg packages that could be, for Xorg SA 2003-05-23,
 		and general.  [mrg 20130605]
+	ipsec(4): FAST_IPSEC is now named IPSEC, old IPSEC is gone.
+		[christos 20130605]
 	kernel: Add driver soekrisgpio for Soekris net6501 
 		Ported by kardel@ from a patch for OpenBSD. [kardel 20130609]
 	cgfourteen: both kernel and Xorg driver now support hardware
@@ -273,5 +275,3 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	makefs(8): Added UDF support for makefs(8). It allows for the creation
 		of images for both read-only, rewritable or recordable media.
 		[reinoud 20130805]
-	ipsec(4): FAST_IPSEC is now named IPSEC, old IPSEC is gone.
-		[christos 20130605]



CVS commit: src

2013-08-08 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Aug  8 20:00:20 UTC 2013

Modified Files:
src: UPDATING
src/doc: CHANGES

Log Message:
add hints about FAST_IPSEC no longer being around


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/UPDATING
cvs rdiff -u -r1.1841 -r1.1842 src/doc/CHANGES

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.246 src/UPDATING:1.247
--- src/UPDATING:1.246	Wed Jun  5 21:59:59 2013
+++ src/UPDATING	Thu Aug  8 20:00:20 2013
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.246 2013/06/05 21:59:59 martin Exp $
+$NetBSD: UPDATING,v 1.247 2013/08/08 20:00:20 spz Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -17,6 +17,10 @@ Recent changes:
 ^^^
 
 20130605:
+	The kernel option FAST_IPSEC no longer exists, it's been renamed
+	to IPSEC (and the older IPSEC version removed).
+
+20130605:
 	Previous freetype installations eroneously installed private
 	header files. If you are building against a non-empty $DESTDIR,
 	please remove ${DESTDIR}//usr/X11R7/include/freetype2/freetype/.

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1841 src/doc/CHANGES:1.1842
--- src/doc/CHANGES:1.1841	Mon Aug  5 18:47:58 2013
+++ src/doc/CHANGES	Thu Aug  8 20:00:20 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1841 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1842 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -273,3 +273,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	makefs(8): Added UDF support for makefs(8). It allows for the creation
 		of images for both read-only, rewritable or recordable media.
 		[reinoud 20130805]
+	ipsec(4): FAST_IPSEC is now named IPSEC, old IPSEC is gone.
+		[christos 20130605]



CVS commit: src/sys/dev/ic

2013-08-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Aug  8 17:38:56 UTC 2013

Modified Files:
src/sys/dev/ic: siisata.c

Log Message:
Fix reverted condition. Fix panic reported by Patrick Welche on
current-users with an ATAPI device connected to siisata.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/siisata.c

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

Modified files:

Index: src/sys/dev/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.26 src/sys/dev/ic/siisata.c:1.27
--- src/sys/dev/ic/siisata.c:1.26	Sat Jun 22 05:41:25 2013
+++ src/sys/dev/ic/siisata.c	Thu Aug  8 17:38:56 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.26 2013/06/22 05:41:25 matt Exp $ */
+/* $NetBSD: siisata.c,v 1.27 2013/08/08 17:38:56 bouyer Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.26 2013/06/22 05:41:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.27 2013/08/08 17:38:56 bouyer Exp $");
 
 #include 
 #include 
@@ -1417,7 +1417,7 @@ siisata_atapi_probe_device(struct atapib
 		return;
 
 	/* if no ATAPI device detected at attach time, skip */
-	if (drvp->drive_type == ATA_DRIVET_ATAPI) {
+	if (drvp->drive_type != ATA_DRIVET_ATAPI) {
 		SIISATA_DEBUG_PRINT(("%s: drive %d "
 		"not present\n", __func__, target), DEBUG_PROBE);
 		return;



CVS commit: src/common/lib/libutil

2013-08-08 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Aug  8 16:43:13 UTC 2013

Modified Files:
src/common/lib/libutil: snprintb.c

Log Message:
Get the correct inttypes.h header, so this can build on !NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/common/lib/libutil/snprintb.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/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.12 src/common/lib/libutil/snprintb.c:1.13
--- src/common/lib/libutil/snprintb.c:1.12	Thu Aug  8 04:32:43 2013
+++ src/common/lib/libutil/snprintb.c	Thu Aug  8 16:43:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: snprintb.c,v 1.12 2013/08/08 04:32:43 mrg Exp $	*/
+/*	$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,17 +41,17 @@
 
 #  include 
 #  if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: snprintb.c,v 1.12 2013/08/08 04:32:43 mrg Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $");
 #  endif
 
 #  include 
-#  include 
+#  include 
 #  include 
 #  include 
 #  include 
 # else /* ! _KERNEL */
 #  include 
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.12 2013/08/08 04:32:43 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.13 2013/08/08 16:43:13 agc Exp $");
 #  include 
 #  include 
 #  include 



CVS commit: src

2013-08-08 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug  8 13:21:38 UTC 2013

Modified Files:
src/distrib/arc/ramdisk: Makefile
src/sys/arch/arc/conf: RAMDISK

Log Message:
Bump RAMDISK size so that the contents fits again.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/arc/ramdisk/Makefile
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arc/conf/RAMDISK

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

Modified files:

Index: src/distrib/arc/ramdisk/Makefile
diff -u src/distrib/arc/ramdisk/Makefile:1.21 src/distrib/arc/ramdisk/Makefile:1.22
--- src/distrib/arc/ramdisk/Makefile:1.21	Thu Feb 11 09:06:47 2010
+++ src/distrib/arc/ramdisk/Makefile	Thu Aug  8 13:21:38 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.21 2010/02/11 09:06:47 roy Exp $
+#	$NetBSD: Makefile,v 1.22 2013/08/08 13:21:38 he Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2560k
+IMAGESIZE=	2660k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1

Index: src/sys/arch/arc/conf/RAMDISK
diff -u src/sys/arch/arc/conf/RAMDISK:1.80 src/sys/arch/arc/conf/RAMDISK:1.81
--- src/sys/arch/arc/conf/RAMDISK:1.80	Sat Mar 10 21:51:49 2012
+++ src/sys/arch/arc/conf/RAMDISK	Thu Aug  8 13:21:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: RAMDISK,v 1.80 2012/03/10 21:51:49 joerg Exp $
+#	$NetBSD: RAMDISK,v 1.81 2013/08/08 13:21:38 he Exp $
 #
 #	memory disk based configuration file for MIPS R4x00 ARC Systems
 #
@@ -9,7 +9,7 @@ include		"arch/arc/conf/GENERIC"
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=5120	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=5420	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 makeoptions	COPTS="-Os -mmemcpy"	# generates smaller code than -O2, -O1



CVS commit: src/sys/dev/pci

2013-08-08 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Thu Aug  8 07:06:13 UTC 2013

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

Log Message:
Allow 8 luns instead of 1. This enables access to the changer device on
a Dell PV-124T:
ch0 at scsibus0 target 9 lun 1:  changer removable
ch0: 16 slots, 1 drive, 1 picker, 0 portals


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/mpii.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/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.1 src/sys/dev/pci/mpii.c:1.2
--- src/sys/dev/pci/mpii.c:1.1	Thu Apr 19 17:50:51 2012
+++ src/sys/dev/pci/mpii.c	Thu Aug  8 07:06:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.1 2012/04/19 17:50:51 bouyer Exp $ */
+/* $NetBSD: mpii.c,v 1.2 2013/08/08 07:06:13 kardel Exp $ */
 /*	OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov 
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.1 2012/04/19 17:50:51 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.2 2013/08/08 07:06:13 kardel Exp $");
 
 #include "bio.h"
 
@@ -2296,7 +2296,7 @@ mpii_attach(device_t parent, device_t se
 	chan->chan_bustype = &scsi_sas_bustype;
 	chan->chan_channel = 0;
 	chan->chan_flags = 0;
-	chan->chan_nluns = 1;
+	chan->chan_nluns = 8;
 	chan->chan_ntargets = sc->sc_max_devices;
 	chan->chan_id = -1;