CVS commit: src/share/man/man9

2015-12-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 11 10:05:17 UTC 2015

Modified Files:
src/share/man/man9: kmem.9

Log Message:
Whitespace nit.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/kmem.9

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

Modified files:

Index: src/share/man/man9/kmem.9
diff -u src/share/man/man9/kmem.9:1.18 src/share/man/man9/kmem.9:1.19
--- src/share/man/man9/kmem.9:1.18	Fri Dec 11 04:11:23 2015
+++ src/share/man/man9/kmem.9	Fri Dec 11 10:05:17 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kmem.9,v 1.18 2015/12/11 04:11:23 christos Exp $
+.\"	$NetBSD: kmem.9,v 1.19 2015/12/11 10:05:17 wiz Exp $
 .\"
 .\" Copyright (c)2006 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -78,7 +78,7 @@ Either of the following:
 If the allocation cannot be satisfied immediately, sleep until enough
 memory is available.
 Note that this does not mean that if
-.Dv KM_SLEEP 
+.Dv KM_SLEEP
 is specified, then the allocation cannot fail.
 Under resource stress conditions, the allocation can fail and the
 function will return



CVS commit: src/common/lib/libc/arch/arm/atomic

2015-12-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 11 12:41:10 UTC 2015

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_nand_16.S atomic_nand_32.S
atomic_nand_64.S atomic_nand_8.S sync_fetch_and_nand_8.S

Log Message:
Use gcc 4.4 and later operation for nand, i.e.
*ptr = ~(tmp & value) instead of *ptr = ~tmp & value

There was also another bug in sync_fetch_and_nand_8 which I've also fixed.

PR port-arm32/50513: Incorrect logic for atomic_nand_xx.S


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/atomic/atomic_nand_64.S
cvs rdiff -u -r1.4 -r1.5 \
src/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S

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

Modified files:

Index: src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S:1.2	Tue Mar  4 16:15:28 2014
+++ src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S	Fri Dec 11 12:41:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_nand_16.S,v 1.2 2014/03/04 16:15:28 matt Exp $	*/
+/*	$NetBSD: atomic_nand_16.S,v 1.3 2015/12/11 12:41:10 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
 ENTRY_NP(_atomic_nand_16)
 	mov	ip, r0
 1:	ldrexh	r0, [ip]		/* load old value (to be returned) */
-	mvns	r3, r0			/* complement source */
-	ands	r3, r3, r1		/* calculate new value */
+	ands	r3, r0, r1		/* calculate new value step 1 */
+	mvns	r3, r3			/* ... complement for new value */
 	strexh	r2, r3, [ip]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again */
@@ -57,8 +57,8 @@ STRONG_ALIAS(_atomic_nand_ushort,_atomic
 ENTRY_NP(_atomic_nand_16_nv)
 	mov	ip, r0			/* need r0 for return value */
 1:	ldrexh	r0, [ip]		/* load old value */
-	mvns	r0, r0			/* complement source */
-	ands	r0, r0, r1		/* calculate new value (return value) */
+	ands	r0, r0, r1		/* calculate new value step 1 */
+	mvns	r0, r0			/* ... complement for new value */
 	strexh	r2, r0, [ip]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again? */
Index: src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S:1.2	Tue Mar  4 16:15:28 2014
+++ src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S	Fri Dec 11 12:41:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_nand_32.S,v 1.2 2014/03/04 16:15:28 matt Exp $	*/
+/*	$NetBSD: atomic_nand_32.S,v 1.3 2015/12/11 12:41:10 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
 ENTRY_NP(_atomic_nand_32)
 	mov	ip, r0
 1:	ldrex	r0, [ip]		/* load old value (to be returned) */
-	mvns	r3, r0			/* complement source */
-	ands	r3, r3, r1		/* calculate new value */
+	ands	r3, r0, r1		/* calculate new value step 1 */
+	mvns	r3, r3			/* ... complement for new value */
 	strex	r2, r3, [ip]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again */
@@ -59,8 +59,8 @@ STRONG_ALIAS(_atomic_nand_ulong,_atomic_
 ENTRY_NP(_atomic_nand_32_nv)
 	mov	ip, r0			/* need r0 for return value */
 1:	ldrex	r0, [ip]		/* load old value */
-	mvns	r0, r0			/* complement source */
-	ands	r0, r0, r1		/* calculate new value (return value) */
+	ands	r0, r0, r1		/* calculate new value step 1 */
+	mvns	r0, r0			/* ... complement for new value */
 	strex	r2, r0, [ip]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again? */
Index: src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S:1.3
--- src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S:1.2	Tue Mar  4 16:15:28 2014
+++ src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S	Fri Dec 11 12:41:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_nand_8.S,v 1.2 2014/03/04 16:15:28 matt Exp $	*/
+/*	$NetBSD: atomic_nand_8.S,v 1.3 2015/12/11 12:41:10 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
 ENTRY_NP(_atomic_nand_8)
 	mov	ip, r0
 1:	ldrexb	r0, [ip]		/* load old value (to be returned) */
-	mvns	r3, r0			/* complement source */
-	ands	r3, r3, r1		/* calculate new value */
+	ands	r3, r0, r1		/* calculate new value step 1 */
+	mvns	r3, r3			/* ... complement for new value */
 	strexb	r2, r3, [ip]		/* try to store */
 	cmp	r2, #0			/*   succeed? */
 	bne	1b			/* no, try again */
@@ -57,8 +57,8 @@ STRONG_ALIAS(_atomic_nand_uchar,_atomic_
 

CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2

2015-12-11 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Fri Dec 11 15:33:47 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2: dri2.c

Log Message:
Fix some uninitialized variable warnings with clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2.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/xorg-server/dist/hw/xfree86/dri2/dri2.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2.c:1.1.1.7 xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2.c:1.1.1.7	Mon Jun  3 07:34:24 2013
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2.c	Fri Dec 11 15:33:47 2015
@@ -201,7 +201,7 @@ typedef struct DRI2DrawableRefRec {
 static DRI2DrawableRefPtr
 DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id)
 {
-DRI2DrawableRefPtr ref;
+DRI2DrawableRefPtr ref = NULL;
 
 list_for_each_entry(ref, >reference_list, link) {
 	if (ref->id == id)
@@ -267,7 +267,7 @@ static int DRI2DrawableGone(pointer p, X
 {
 DRI2DrawablePtr pPriv = p;
 DRI2ScreenPtr   ds = pPriv->dri2_screen;
-DRI2DrawableRefPtr ref, next;
+DRI2DrawableRefPtr ref = NULL, next;
 WindowPtr pWin;
 PixmapPtr pPixmap;
 DrawablePtr pDraw;
@@ -534,7 +534,7 @@ static void
 DRI2InvalidateDrawable(DrawablePtr pDraw)
 {
 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
-DRI2DrawableRefPtr ref;
+DRI2DrawableRefPtr ref = NULL;
 
 if (!pPriv)
 return;



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

2015-12-11 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Fri Dec 11 15:37:44 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-ati/dist/src: radeon_dri2.c

Log Message:
Initialize a variable, for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 \
xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.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-ati/dist/src/radeon_dri2.c
diff -u xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:1.1.1.8 xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:1.2
--- xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:1.1.1.8	Sun Sep 23 19:49:02 2012
+++ xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c	Fri Dec 11 15:37:44 2015
@@ -590,7 +590,7 @@ static void
 radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata)
 {
 DRI2ClientEventsPtr pClientEventsPriv;
-DRI2FrameEventPtr ref;
+DRI2FrameEventPtr ref = NULL;
 NewClientInfoRec *clientinfo = calldata;
 ClientPtr pClient = clientinfo->client;
 pClientEventsPriv = GetDRI2ClientEvents(pClient);



CVS commit: src/lib/libform

2015-12-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Dec 11 21:22:57 UTC 2015

Modified Files:
src/lib/libform: field.c

Log Message:
Counting from 0 to n-1 can go wrong badly, if n is unsigned and zero and
the counter variable is not of a type larger than n. Fixes PR 50490.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libform/field.c

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

Modified files:

Index: src/lib/libform/field.c
diff -u src/lib/libform/field.c:1.29 src/lib/libform/field.c:1.30
--- src/lib/libform/field.c:1.29	Mon Sep  7 15:50:49 2015
+++ src/lib/libform/field.c	Fri Dec 11 21:22:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: field.c,v 1.29 2015/09/07 15:50:49 joerg Exp $	*/
+/*	$NetBSD: field.c,v 1.30 2015/12/11 21:22:57 joerg Exp $	*/
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
  * (bl...@baea.com.au, brett_l...@yahoo.com.au)
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: field.c,v 1.29 2015/09/07 15:50:49 joerg Exp $");
+__RCSID("$NetBSD: field.c,v 1.30 2015/12/11 21:22:57 joerg Exp $");
 
 #include 
 #include 
@@ -900,7 +900,7 @@ int
 free_field(FIELD *field)
 {
 	FIELD *flink;
-	int i;
+	unsigned int i;
 	_formi_tab_t *ts, *nts;
 	
 	if (field == NULL)
@@ -913,7 +913,7 @@ free_field(FIELD *field)
 		  /* no it is not - release the buffers */
 		free(field->buffers);
 		  /* free the tab structures */
-		for (i = 0; i < field->row_count - 1; i++) {
+		for (i = 0; i + 1 < field->row_count; i++) {
 			if (field->alines[i].tabs != NULL) {
 ts = field->alines[i].tabs;
 while (ts != NULL) {



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

2015-12-11 Thread Marty Fouts
Module Name:src
Committed By:   marty
Date:   Sat Dec 12 00:42:42 UTC 2015

Removed Files:
src/sys/arch/evbarm/odroid: genassym.cf odroid_machdep.c odroid_start.S
platform.h

Log Message:
Remove ev that's no longer valid

development of the odroid boards has moved to evbarm/exynos and this
directory is now out of date with respect to new development.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/odroid/genassym.cf
cvs rdiff -u -r1.42 -r0 src/sys/arch/evbarm/odroid/odroid_machdep.c
cvs rdiff -u -r1.21 -r0 src/sys/arch/evbarm/odroid/odroid_start.S
cvs rdiff -u -r1.5 -r0 src/sys/arch/evbarm/odroid/platform.h

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



CVS commit: src/usr.bin/ftp

2015-12-11 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Fri Dec 11 08:37:32 UTC 2015

Modified Files:
src/usr.bin/ftp: fetch.c ftp.c

Log Message:
Use the proper format "[IPv6 address]:port" when reporting connection
attempts to IPv6 endpoints.


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.164 -r1.165 src/usr.bin/ftp/ftp.c

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

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.207 src/usr.bin/ftp/fetch.c:1.208
--- src/usr.bin/ftp/fetch.c:1.207	Sat Sep 12 19:38:42 2015
+++ src/usr.bin/ftp/fetch.c	Fri Dec 11 08:37:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp $	*/
+/*	$NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $");
 #endif /* not lint */
 
 /*
@@ -763,8 +763,13 @@ fetch_url(const char *url, const char *p
 			}
 
 			if (verbose && res0->ai_next) {
-fprintf(ttyout, "Trying %s:%s ...\n",
-hname, sname);
+if(res->ai_family == AF_INET6) {
+	fprintf(ttyout, "Trying [%s]:%s ...\n",
+	hname, sname);
+} else {
+	fprintf(ttyout, "Trying %s:%s ...\n",
+	hname, sname);
+}
 			}
 
 			s = socket(res->ai_family, SOCK_STREAM,

Index: src/usr.bin/ftp/ftp.c
diff -u src/usr.bin/ftp/ftp.c:1.164 src/usr.bin/ftp/ftp.c:1.165
--- src/usr.bin/ftp/ftp.c:1.164	Wed Jul  4 06:09:37 2012
+++ src/usr.bin/ftp/ftp.c	Fri Dec 11 08:37:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp $	*/
+/*	$NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c	8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -200,7 +200,13 @@ hookup(const char *host, const char *por
 		}
 		if (verbose && res0->ai_next) {
 /* if we have multiple possibilities */
-			fprintf(ttyout, "Trying %s:%s ...\n", hname, sname);
+			if(res->ai_family == AF_INET6) {
+fprintf(ttyout, "Trying [%s]:%s ...\n", hname,
+sname);
+			} else {
+fprintf(ttyout, "Trying %s:%s ...\n", hname,
+sname);
+			}
 		}
 		s = socket(res->ai_family, SOCK_STREAM, res->ai_protocol);
 		if (s < 0) {



CVS commit: src/sys/arch/sparc/sparc

2015-12-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec 11 19:47:52 UTC 2015

Modified Files:
src/sys/arch/sparc/sparc: pmap.c

Log Message:
|| -> &&
>From PR50534


To generate a diff of this commit:
cvs rdiff -u -r1.359 -r1.360 src/sys/arch/sparc/sparc/pmap.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/sparc/sparc/pmap.c
diff -u src/sys/arch/sparc/sparc/pmap.c:1.359 src/sys/arch/sparc/sparc/pmap.c:1.360
--- src/sys/arch/sparc/sparc/pmap.c:1.359	Sun Oct  4 08:18:49 2015
+++ src/sys/arch/sparc/sparc/pmap.c	Fri Dec 11 19:47:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.359 2015/10/04 08:18:49 joerg Exp $ */
+/*	$NetBSD: pmap.c,v 1.360 2015/12/11 19:47:52 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.359 2015/10/04 08:18:49 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.360 2015/12/11 19:47:52 macallan Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -4265,7 +4265,7 @@ pmap_quiet_check(struct pmap *pm)
 			continue;
 		if (CPU_HAS_SUNMMU) {
 			int ctx;
-			if (mmu_has_hole && (vr >= 32 || vr < (256 - 32)))
+			if (mmu_has_hole && (vr >= 32 && vr < (256 - 32)))
 continue;
 			ctx = getcontext4();
 			setcontext4(pm->pm_ctxnum);



CVS commit: src/sys

2015-12-11 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Dec 11 07:59:14 UTC 2015

Modified Files:
src/sys/net: if_gif.c if_gif.h
src/sys/netinet: in_gif.c
src/sys/netinet6: in6_gif.c

Log Message:
PR kern/50522: gif(4) ioctl causes panic while someone is using the gif(4) 
interface.

It is required to wait other CPU's softint completion before disestablishing
the softint handler.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/net/if_gif.c
cvs rdiff -u -r1.19 -r1.20 src/sys/net/if_gif.h
cvs rdiff -u -r1.65 -r1.66 src/sys/netinet/in_gif.c
cvs rdiff -u -r1.62 -r1.63 src/sys/netinet6/in6_gif.c

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

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.101 src/sys/net/if_gif.c:1.102
--- src/sys/net/if_gif.c:1.101	Fri Dec 11 04:29:24 2015
+++ src/sys/net/if_gif.c	Fri Dec 11 07:59:14 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.101 2015/12/11 04:29:24 knakahara Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.102 2015/12/11 07:59:14 knakahara Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.101 2015/12/11 04:29:24 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.102 2015/12/11 07:59:14 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -146,6 +147,10 @@ void
 gifattach0(struct gif_softc *sc)
 {
 
+	sc->gif_si_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
+	KASSERT(sc->gif_si_lock != NULL);
+	cv_init(>gif_si_cv, "if_gif_cv");
+	sc->gif_si_refs = 0;
 	sc->encap_cookie4 = sc->encap_cookie6 = NULL;
 
 	sc->gif_if.if_addrlen = 0;
@@ -174,6 +179,8 @@ gif_clone_destroy(struct ifnet *ifp)
 	if_detach(ifp);
 	rtcache_free(>gif_ro);
 
+	cv_destroy(>gif_si_cv);
+	mutex_obj_free(sc->gif_si_lock);
 	kmem_free(sc, sizeof(struct gif_softc));
 
 	return (0);
@@ -295,7 +302,8 @@ gif_output(struct ifnet *ifp, struct mbu
 
 	m->m_flags &= ~(M_BCAST|M_MCAST);
 	if (!(ifp->if_flags & IFF_UP) ||
-	sc->gif_psrc == NULL || sc->gif_pdst == NULL) {
+	sc->gif_psrc == NULL || sc->gif_pdst == NULL ||
+	sc->gif_si == NULL) {
 		m_freem(m);
 		error = ENETDOWN;
 		goto end;
@@ -321,9 +329,11 @@ gif_output(struct ifnet *ifp, struct mbu
 		splx(s);
 		goto end;
 	}
-	splx(s);
 
+	/* softint_schedule() must be called with kpreempt_disabled() */
 	softint_schedule(sc->gif_si);
+	splx(s);
+
 	error = 0;
 
   end:
@@ -346,6 +356,24 @@ gifintr(void *arg)
 	sc = arg;
 	ifp = >gif_if;
 
+	atomic_inc_uint(>gif_si_refs);
+
+	/*
+	 * pattern (a) (see also gif_set_tunnel())
+	 * other CPUs does {set,delete}_tunnel after curcpu have done
+	 * softint_schedule().
+	 */
+	if (sc->gif_pdst == NULL || sc->gif_psrc == NULL) {
+		IFQ_PURGE(>if_snd);
+
+		if (atomic_dec_uint_nv(>gif_si_refs) == 0) {
+			mutex_enter(sc->gif_si_lock);
+			cv_broadcast(>gif_si_cv);
+			mutex_exit(sc->gif_si_lock);
+		}
+		return;
+	}
+
 	/* output processing */
 	while (1) {
 		s = splnet();
@@ -397,6 +425,16 @@ gifintr(void *arg)
 			ifp->if_obytes += len;
 		}
 	}
+
+	/*
+	 * pattern (b) (see also gif_set_tunnel())
+	 * other CPUs begin {set,delete}_tunnel while curcpu si doing gifintr.
+	 */
+	if (atomic_dec_uint_nv(>gif_si_refs) == 0) {
+		mutex_enter(sc->gif_si_lock);
+		cv_broadcast(>gif_si_cv);
+		mutex_exit(sc->gif_si_lock);
+	}
 }
 
 void
@@ -744,6 +782,7 @@ gif_set_tunnel(struct ifnet *ifp, struct
 	struct gif_softc *sc2;
 	struct sockaddr *osrc, *odst;
 	struct sockaddr *nsrc, *ndst;
+	void *osi;
 	int s;
 	int error;
 
@@ -777,8 +816,38 @@ gif_set_tunnel(struct ifnet *ifp, struct
 
 	/* Firstly, clear old configurations. */
 	if (sc->gif_si) {
-		softint_disestablish(sc->gif_si);
+		osrc = sc->gif_psrc;
+		odst = sc->gif_pdst;
+		osi = sc->gif_si;
+		sc->gif_psrc = NULL;
+		sc->gif_pdst = NULL;
 		sc->gif_si = NULL;
+
+		/*
+		 * At this point, gif_output() does not softint_schedule()
+		 * any more. However, there are below 2 fears of other CPUs.
+		 * (a) gif_output() has done softint_schedule(),and softint
+		 * (gifintr()) is waiting for execution
+		 * (b) gifintr() is already running
+		 * see also gifintr()
+		 */
+
+		/*
+		 * To avoid the above fears, wait for gifintr() completion of
+		 * all CPUs here.
+		 */
+		mutex_enter(sc->gif_si_lock);
+		while (sc->gif_si_refs > 0) {
+			aprint_debug("%s: cv_wait on gif_softc\n", __func__);
+			cv_wait(>gif_si_cv, sc->gif_si_lock);
+		}
+		mutex_exit(sc->gif_si_lock);
+
+		softint_disestablish(osi);
+		sc->gif_psrc = osrc;
+		sc->gif_pdst = odst;
+		osrc = NULL;
+		odst = NULL;
 	}
 	/* XXX we can detach from both, but be polite just in case */
 	if (sc->gif_psrc)
@@ -845,13 +914,31 @@ void
 gif_delete_tunnel(struct ifnet *ifp)
 {
 	struct gif_softc *sc = 

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

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:04:20 UTC 2015

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

Log Message:
PR 50516 bad switch statement.
Adding some comments.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/lib/dosfile.c

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

Modified files:

Index: src/sys/arch/i386/stand/lib/dosfile.c
diff -u src/sys/arch/i386/stand/lib/dosfile.c:1.16 src/sys/arch/i386/stand/lib/dosfile.c:1.17
--- src/sys/arch/i386/stand/lib/dosfile.c:1.16	Sun Oct 20 21:06:37 2013
+++ src/sys/arch/i386/stand/lib/dosfile.c	Fri Dec 11 08:04:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dosfile.c,v 1.16 2013/10/20 21:06:37 christos Exp $	 */
+/*	$NetBSD: dosfile.c,v 1.17 2015/12/11 08:04:20 mlelstv Exp $	 */
 
 /*
  * Copyright (c) 1996
@@ -56,18 +56,22 @@ dos2errno(void)
 	int err;
 
 	switch (doserrno) {
-	case 1:
-	case 4:
-	case 12:
+	case 1: /* invalid function number */
+	case 4: /* too many open files */
+	case 12: /* invalid access mode */
 	default:
 		err = EIO;
-	case 2:
-	case 3:
+		break;
+	case 2: /* file not found */
+	case 3: /* path not found */
 		err = ENOENT;
-	case 5:
+		break;
+	case 5: /* access denied */
 		err = EPERM;
-	case 6:
+		break;
+	case 6: /* invalid handle */
 		err = EINVAL;
+		break;
 	}
 	return err;
 }



CVS commit: src/sys/compat/sunos

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:10:28 UTC 2015

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c

Log Message:
PR 50518 bad switch


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/compat/sunos/sunos_ioctl.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/compat/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.64 src/sys/compat/sunos/sunos_ioctl.c:1.65
--- src/sys/compat/sunos/sunos_ioctl.c:1.64	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Fri Dec 11 08:10:28 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.64 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.64 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $");
 
 #include 
 #include 
@@ -817,9 +817,9 @@ sunos_sys_ioctl(struct lwp *l, const str
 	{
 		int tmp = 0;
 		switch ((int)(u_long)SCARG(uap, data)) {
-		case SUNOS_S_FLUSHR:	tmp = FREAD;
-		case SUNOS_S_FLUSHW:	tmp = FWRITE;
-		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE;
+		case SUNOS_S_FLUSHR:	tmp = FREAD; break;
+		case SUNOS_S_FLUSHW:	tmp = FWRITE; break;
+		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE; break;
 		}
 error = (*ctl)(fp, TIOCFLUSH, );
 		break;



CVS commit: src/sys/compat/sunos32

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:10:43 UTC 2015

Modified Files:
src/sys/compat/sunos32: sunos32_ioctl.c

Log Message:
PR 50517 bad switch


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/compat/sunos32/sunos32_ioctl.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/compat/sunos32/sunos32_ioctl.c
diff -u src/sys/compat/sunos32/sunos32_ioctl.c:1.33 src/sys/compat/sunos32/sunos32_ioctl.c:1.34
--- src/sys/compat/sunos32/sunos32_ioctl.c:1.33	Tue Dec  8 20:36:14 2015
+++ src/sys/compat/sunos32/sunos32_ioctl.c	Fri Dec 11 08:10:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_ioctl.c,v 1.33 2015/12/08 20:36:14 christos Exp $	*/
+/*	$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $	*/
 /* from: NetBSD: sunos_ioctl.c,v 1.35 2001/02/03 22:20:02 mrg Exp 	*/
 
 /*
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.33 2015/12/08 20:36:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd32.h"
@@ -846,9 +846,9 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	{
 		int tmp = 0;
 		switch ((intptr_t)SCARG_P32(uap, data)) {
-		case SUNOS_S_FLUSHR:	tmp = FREAD;
-		case SUNOS_S_FLUSHW:	tmp = FWRITE;
-		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE;
+		case SUNOS_S_FLUSHR:	tmp = FREAD; break;
+		case SUNOS_S_FLUSHW:	tmp = FWRITE; break;
+		case SUNOS_S_FLUSHRW:	tmp = FREAD|FWRITE; break;
 		}
 return sunos32_do_ioctl(SCARG(_ua, fd), TIOCFLUSH, , l);
 	}



CVS commit: src/sys/compat/sunos

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:19:07 UTC 2015

Modified Files:
src/sys/compat/sunos: sunos_ioctl.c

Log Message:
d_secpercyl is gone and we use the value from disklabel anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/compat/sunos/sunos_ioctl.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/compat/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.65 src/sys/compat/sunos/sunos_ioctl.c:1.66
--- src/sys/compat/sunos/sunos_ioctl.c:1.65	Fri Dec 11 08:10:28 2015
+++ src/sys/compat/sunos/sunos_ioctl.c	Fri Dec 11 08:19:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.65 2015/12/11 08:10:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $");
 
 #include 
 #include 
@@ -880,10 +880,6 @@ sunos_sys_ioctl(struct lwp *l, const str
 		if (error)
 			break;
 
-		if (pi.disklab->d_secpercyl == 0) {
-			error = ERANGE;	/* XXX */
-			break;
-		}
 		if (pi.pi_offset % label.d_secpercyl != 0) {
 			error = ERANGE;	/* XXX */
 			break;



CVS commit: src/sys/arch/sparc/sparc

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:08:01 UTC 2015

Modified Files:
src/sys/arch/sparc/sparc: trap.c

Log Message:
PR 50516 bad switch case


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/sparc/sparc/trap.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/sparc/sparc/trap.c
diff -u src/sys/arch/sparc/sparc/trap.c:1.193 src/sys/arch/sparc/sparc/trap.c:1.194
--- src/sys/arch/sparc/sparc/trap.c:1.193	Sun Oct  4 08:19:40 2015
+++ src/sys/arch/sparc/sparc/trap.c	Fri Dec 11 08:08:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.193 2015/10/04 08:19:40 joerg Exp $ */
+/*	$NetBSD: trap.c,v 1.194 2015/12/11 08:08:01 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.193 2015/10/04 08:19:40 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.194 2015/12/11 08:08:01 mlelstv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_svr4.h"
@@ -1254,9 +1254,11 @@ kfault:
 		case EINVAL:
 			ksi.ksi_signo = SIGBUS;
 			ksi.ksi_code = BUS_ADRERR;
+			break;
 		case EACCES:
 			ksi.ksi_signo = SIGSEGV;
 			ksi.ksi_code = SEGV_ACCERR;
+			break;
 		default:
 			ksi.ksi_signo = SIGSEGV;
 			ksi.ksi_code = SEGV_MAPERR;



CVS commit: src/sys/compat/svr4_32

2015-12-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Dec 11 08:12:18 UTC 2015

Modified Files:
src/sys/compat/svr4_32: svr4_32_termios.c

Log Message:
PR 50519 missing breaks in switch


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/compat/svr4_32/svr4_32_termios.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/compat/svr4_32/svr4_32_termios.c
diff -u src/sys/compat/svr4_32/svr4_32_termios.c:1.17 src/sys/compat/svr4_32/svr4_32_termios.c:1.18
--- src/sys/compat/svr4_32/svr4_32_termios.c:1.17	Mon Apr 28 20:23:46 2008
+++ src/sys/compat/svr4_32/svr4_32_termios.c	Fri Dec 11 08:12:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: svr4_32_termios.c,v 1.17 2008/04/28 20:23:46 martin Exp $	 */
+/*	$NetBSD: svr4_32_termios.c,v 1.18 2015/12/11 08:12:18 mlelstv Exp $	 */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_termios.c,v 1.17 2008/04/28 20:23:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_termios.c,v 1.18 2015/12/11 08:12:18 mlelstv Exp $");
 
 #include 
 #include 
@@ -183,7 +183,7 @@ bsd_to_svr4_32_speed(u_long sp, u_long m
 {
 	switch (sp) {
 #undef getval
-#define getval(a,b)	case __CONCAT(a,b):	sp = __CONCAT3(SVR4_,a,b)
+#define getval(a,b)	case __CONCAT(a,b): sp = __CONCAT3(SVR4_,a,b); break
 	getval(B,0);
 	getval(B,50);
 	getval(B,75);



CVS commit: othersrc/usr.bin/tnftp/src

2015-12-11 Thread Matthias Scheler
Module Name:othersrc
Committed By:   tron
Date:   Fri Dec 11 08:47:53 UTC 2015

Modified Files:
othersrc/usr.bin/tnftp/src: fetch.c ftp.c

Log Message:
Use the proper format "[IPv6 address]:port" when reporting connection
attempts to IPv6 endpoints.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 othersrc/usr.bin/tnftp/src/fetch.c
cvs rdiff -u -r1.19 -r1.20 othersrc/usr.bin/tnftp/src/ftp.c

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

Modified files:

Index: othersrc/usr.bin/tnftp/src/fetch.c
diff -u othersrc/usr.bin/tnftp/src/fetch.c:1.21 othersrc/usr.bin/tnftp/src/fetch.c:1.22
--- othersrc/usr.bin/tnftp/src/fetch.c:1.21	Sun Oct  4 04:53:26 2015
+++ othersrc/usr.bin/tnftp/src/fetch.c	Fri Dec 11 08:47:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.21 2015/10/04 04:53:26 lukem Exp $	*/
+/*	$NetBSD: fetch.c,v 1.22 2015/12/11 08:47:52 tron Exp $	*/
 /*	from	NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp	*/
 
 /*-
@@ -770,8 +770,13 @@ fetch_url(const char *url, const char *p
 			}
 
 			if (verbose && res0->ai_next) {
-fprintf(ttyout, "Trying %s:%s ...\n",
-hname, sname);
+if(res->ai_family == AF_INET6) {
+	fprintf(ttyout, "Trying [%s]:%s ...\n",
+	hname, sname);
+} else {
+	fprintf(ttyout, "Trying %s:%s ...\n",
+	hname, sname);
+}
 			}
 
 			s = socket(res->ai_family, SOCK_STREAM,

Index: othersrc/usr.bin/tnftp/src/ftp.c
diff -u othersrc/usr.bin/tnftp/src/ftp.c:1.19 othersrc/usr.bin/tnftp/src/ftp.c:1.20
--- othersrc/usr.bin/tnftp/src/ftp.c:1.19	Sun May  5 11:17:31 2013
+++ othersrc/usr.bin/tnftp/src/ftp.c	Fri Dec 11 08:47:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.19 2013/05/05 11:17:31 lukem Exp $	*/
+/*	$NetBSD: ftp.c,v 1.20 2015/12/11 08:47:52 tron Exp $	*/
 /*	from	NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp	*/
 
 /*-
@@ -208,7 +208,13 @@ hookup(const char *host, const char *por
 		}
 		if (verbose && res0->ai_next) {
 /* if we have multiple possibilities */
-			fprintf(ttyout, "Trying %s:%s ...\n", hname, sname);
+			if(res->ai_family == AF_INET6) {
+fprintf(ttyout, "Trying [%s]:%s ...\n", hname,
+sname);
+			} else {
+fprintf(ttyout, "Trying %s:%s ...\n", hname,
+sname);
+			}
 		}
 		s = socket(res->ai_family, SOCK_STREAM, res->ai_protocol);
 		if (s < 0) {



CVS commit: src/usr.bin/sdpquery

2015-12-11 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Dec 11 21:05:18 UTC 2015

Modified Files:
src/usr.bin/sdpquery: print.c

Log Message:
update several profiles, bringing up to date decoding of all the
Bluetooth 1.1->4.2 Service Discovery specifications I could find,
namely:

Wireless Access Protocol
Multi-Profile Specification
Calendar, Tasks & Notes
Message Access Profile
Message Notification Service
Global Navigation Satellite System
Health Device Profile
File Transfer Protocol
3D Display
General Access Profile
Generic Attribute Server

all documentation is on bluetooth.org, under

https://www.bluetooth.org/en-us/specification


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/sdpquery/print.c

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

Modified files:

Index: src/usr.bin/sdpquery/print.c
diff -u src/usr.bin/sdpquery/print.c:1.21 src/usr.bin/sdpquery/print.c:1.22
--- src/usr.bin/sdpquery/print.c:1.21	Mon Mar 16 19:10:48 2015
+++ src/usr.bin/sdpquery/print.c	Fri Dec 11 21:05:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $	*/
+/*	$NetBSD: print.c,v 1.22 2015/12/11 21:05:18 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.22 2015/12/11 21:05:18 plunky Exp $");
 
 #include 
 #include 
@@ -103,6 +103,9 @@ static void print_asink_features(sdp_dat
 static void print_avrcp_features(sdp_data_t *);
 static void print_supported_data_stores(sdp_data_t *);
 static void print_supported_formats(sdp_data_t *);
+static void print_wap_addr(sdp_data_t *);
+static void print_wap_gateway(sdp_data_t *);
+static void print_wap_type(sdp_data_t *);
 static void print_hid_version(sdp_data_t *);
 static void print_hid_device_subclass(sdp_data_t *);
 static void print_hid_descriptor_list(sdp_data_t *);
@@ -114,15 +117,22 @@ static void print_hfag_features(sdp_data
 static void print_net_access_type(sdp_data_t *);
 static void print_pnp_source(sdp_data_t *);
 static void print_mas_types(sdp_data_t *);
-static void print_supported_repositories(sdp_data_t *);
+static void print_map_features(sdp_data_t *);
+static void print_pse_repositories(sdp_data_t *);
+static void print_pse_features(sdp_data_t *);
+static void print_hdp_features(sdp_data_t *);
+static void print_hdp_specification(sdp_data_t *);
+static void print_mcap_procedures(sdp_data_t *);
 static void print_character_repertoires(sdp_data_t *);
 static void print_bip_capabilities(sdp_data_t *);
 static void print_bip_features(sdp_data_t *);
 static void print_bip_functions(sdp_data_t *);
 static void print_bip_capacity(sdp_data_t *);
 static void print_1284id(sdp_data_t *);
+static void print_ctn_features(sdp_data_t *);
 
 static void print_rfcomm(sdp_data_t *);
+static void print_att(sdp_data_t *);
 static void print_bnep(sdp_data_t *);
 static void print_avctp(sdp_data_t *);
 static void print_avdtp(sdp_data_t *);
@@ -135,6 +145,7 @@ attr_t protocol_list[] = {
 	{ 0x0004, "TCP",NULL },
 	{ 0x0005, "TCS_BIN",NULL },
 	{ 0x0006, "TCS_AT",NULL },
+	{ 0x0007, "ATT",print_att },
 	{ 0x0008, "OBEX",NULL },
 	{ 0x0009, "IP",	NULL },
 	{ 0x000a, "FTP",NULL },
@@ -216,9 +227,14 @@ attr_t irmc_sync_attrs[] = { /* IrMC Syn
 };
 
 attr_t opush_attrs[] = { /* Object Push */
+	{ 0x0200, "GeopL2capPSM",			print_uint16x },
 	{ 0x0303, "SupportedFormatsList",		print_supported_formats },
 };
 
+attr_t ft_attrs[] = { /* File Transfer */
+	{ 0x0200, "GeopL2capPSM",			print_uint16x },
+};
+
 attr_t hset_attrs[] = {	/* Headset */
 	{ 0x0302, "RemoteAudioVolumeControl",		print_bool },
 };
@@ -230,11 +246,20 @@ attr_t fax_attrs[] = {	/* Fax */
 	{ 0x0305, "AudioFeedbackSupport",		print_bool },
 };
 
+attr_t wap_attrs[] = {	/* WAP Bearer */
+	{ 0x0306, "NetworkAddress",			print_wap_addr },
+	{ 0x0307, "WAPGateway",print_wap_gateway },
+	{ 0x0308, "HomePageURL",			print_url },
+	{ 0x0309, "WAPStackType",			print_wap_type },
+};
+
 attr_t panu_attrs[] = {	/* Personal Area Networking User */
+	{ 0x0200, "IpSubnet",print_string },
 	{ 0x030a, "SecurityDescription",		print_security_description },
 };
 
 attr_t nap_attrs[] = {	/* Network Access Point */
+	{ 0x0200, "IpSubnet",print_string },
 	{ 0x030a, "SecurityDescription",		print_security_description },
 	{ 0x030b, "NetAccessType",			print_net_access_type },
 	{ 0x030c, "MaxNetAccessRate",			print_uint32d },
@@ -243,6 +268,7 @@ attr_t nap_attrs[] = {	/* Network Access
 };
 
 attr_t gn_attrs[] = {	/* Group Network */
+	{ 0x0200, "IpSubnet",print_string },
 	{ 0x030a, "SecurityDescription",		print_security_description },
 	{ 0x030d, "IPv4Subnet",print_string },
 	{ 0x030e, "IPv6Subnet",print_string },
@@ -270,6 +296,7 @@ attr_t bp_attrs[] = {	/*