CVS commit: src/usr.bin/sort

2013-01-20 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 20 10:12:59 UTC 2013

Modified Files:
src/usr.bin/sort: fields.c

Log Message:
When parsing numbers, allow a leading '+'.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/sort/fields.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/sort/fields.c
diff -u src/usr.bin/sort/fields.c:1.32 src/usr.bin/sort/fields.c:1.33
--- src/usr.bin/sort/fields.c:1.32	Sat Dec 18 23:09:48 2010
+++ src/usr.bin/sort/fields.c	Sun Jan 20 10:12:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fields.c,v 1.32 2010/12/18 23:09:48 christos Exp $	*/
+/*	$NetBSD: fields.c,v 1.33 2013/01/20 10:12:58 apb Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include sort.h
 
-__RCSID($NetBSD: fields.c,v 1.32 2010/12/18 23:09:48 christos Exp $);
+__RCSID($NetBSD: fields.c,v 1.33 2013/01/20 10:12:58 apb Exp $);
 
 #define SKIP_BLANKS(ptr) {	\
 	if (BLANK  d_mask[*(ptr)])\
@@ -275,7 +275,10 @@ number(u_char *pos, const u_char *bufend
 	if (*line == '-') {	/* set the sign */
 		negate ^= 0xff;
 		line++;
+	} else if (*line == '+') {
+		line++;
 	}
+
 	/* eat initial zeroes */
 	for (; *line == '0'  line  lineend; line++)
 		continue;



CVS commit: src/lib/libc/stdio

2013-01-20 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jan 20 10:57:19 UTC 2013

Modified Files:
src/lib/libc/stdio: printf.3

Log Message:
In newfmt() example one level of indentation is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libc/stdio/printf.3

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

Modified files:

Index: src/lib/libc/stdio/printf.3
diff -u src/lib/libc/stdio/printf.3:1.59 src/lib/libc/stdio/printf.3:1.60
--- src/lib/libc/stdio/printf.3:1.59	Sat Jan 19 15:25:58 2013
+++ src/lib/libc/stdio/printf.3	Sun Jan 20 10:57:19 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: printf.3,v 1.59 2013/01/19 15:25:58 uwe Exp $
+.\	$NetBSD: printf.3,v 1.60 2013/01/20 10:57:19 uwe Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -772,14 +772,14 @@ To allocate a 128 byte string and print 
 #include \*[Lt]stdarg.h\*[Gt]
 char *newfmt(const char *fmt, ...)
 {
-		char *p;
-		va_list ap;
-		if ((p = malloc(128)) == NULL)
-			return (NULL);
-		va_start(ap, fmt);
-		(void) vsnprintf(p, 128, fmt, ap);
-		va_end(ap);
-		return (p);
+	char *p;
+	va_list ap;
+	if ((p = malloc(128)) == NULL)
+		return (NULL);
+	va_start(ap, fmt);
+	(void) vsnprintf(p, 128, fmt, ap);
+	va_end(ap);
+	return (p);
 }
 .Ed
 .Sh ERRORS



CVS commit: src/lib/libc/stdio

2013-01-20 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jan 20 11:01:17 UTC 2013

Modified Files:
src/lib/libc/stdio: printf.3

Log Message:
Mark up occurence of printf() in text with .Fn


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/lib/libc/stdio/printf.3

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

Modified files:

Index: src/lib/libc/stdio/printf.3
diff -u src/lib/libc/stdio/printf.3:1.60 src/lib/libc/stdio/printf.3:1.61
--- src/lib/libc/stdio/printf.3:1.60	Sun Jan 20 10:57:19 2013
+++ src/lib/libc/stdio/printf.3	Sun Jan 20 11:01:17 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: printf.3,v 1.60 2013/01/20 10:57:19 uwe Exp $
+.\	$NetBSD: printf.3,v 1.61 2013/01/20 11:01:17 uwe Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -884,7 +884,9 @@ Be sure to use the proper secure idiom:
 snprintf(buffer, sizeof(buffer), %s, string);
 .Ed
 .Pp
-There is no way for printf to know the size of each argument passed.
+There is no way for
+.Fn printf
+to know the size of each argument passed.
 If you use positional arguments you must ensure that all parameters, up to the
 last positionally specified parameter, are used in the format string.
 This allows for the format string to be parsed for this information.



CVS commit: [netbsd-5] src

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:10:53 UTC 2013

Modified Files:
src/sys/dev/bluetooth [netbsd-5]: bthidev.c btmagic.c
src/usr.sbin/btdevctl [netbsd-5]: btdevctl.8

Log Message:
Pull up following revision(s) (requested by plunky in ticket #1835):
sys/dev/bluetooth/bthidev.c: revision 1.23 via patch
sys/dev/bluetooth/bthidev.c: revision 1.24 via patch
usr.sbin/btdevctl/btdevctl.8: revision 1.8 via patch
sys/dev/bluetooth/btmagic.c: revision 1.4 via patch
sys/dev/bluetooth/btmagic.c: revision 1.5 via patch
when no link-mode is specified, explicitly set a mode of (int)0
otherwise l2cap_setmode() will fail during connection setup
for bthidev.c, this fixes a problem with Microsoft Wedge Touch
mouse (which may not be able to authenticate)
for btmagic.c, include this fix in case somebody tries that
related to PR/47286
increase some diagnostics
add a comment pointing out that the link-mode may need to be
changed manually, for devices which cannot authenticate
for PR/47286


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/dev/bluetooth/bthidev.c
cvs rdiff -u -r1.1.8.2 -r1.1.8.3 src/sys/dev/bluetooth/btmagic.c
cvs rdiff -u -r1.5 -r1.5.12.1 src/usr.sbin/btdevctl/btdevctl.8

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/bluetooth/bthidev.c
diff -u src/sys/dev/bluetooth/bthidev.c:1.16 src/sys/dev/bluetooth/bthidev.c:1.16.4.1
--- src/sys/dev/bluetooth/bthidev.c:1.16	Wed Aug  6 15:01:23 2008
+++ src/sys/dev/bluetooth/bthidev.c	Sun Jan 20 12:10:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bthidev.c,v 1.16 2008/08/06 15:01:23 plunky Exp $	*/
+/*	$NetBSD: bthidev.c,v 1.16.4.1 2013/01/20 12:10:51 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.16 2008/08/06 15:01:23 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.16.4.1 2013/01/20 12:10:51 bouyer Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -181,6 +181,7 @@ bthidev_attach(device_t parent, device_t
 	const void *desc;
 	int locs[BTHIDBUSCF_NLOCS];
 	int maxid, rep, dlen;
+	int err;
 
 	/*
 	 * Init softc
@@ -220,7 +221,8 @@ bthidev_attach(device_t parent, device_t
 
 		aprint_verbose( %s %s, BTDEVmode,
 	 prop_string_cstring_nocopy(obj));
-	}
+	} else
+		sockopt_setint(sc-sc_mode, 0);
 
 	obj = prop_dictionary_get(dict, BTHIDEVcontrolpsm);
 	if (prop_object_type(obj) == PROP_TYPE_NUMBER) {
@@ -305,8 +307,9 @@ bthidev_attach(device_t parent, device_t
 	 * start bluetooth connections
 	 */
 	mutex_enter(bt_lock);
-	if ((sc-sc_flags  BTHID_RECONNECT) == 0)
-		bthidev_listen(sc);
+	if ((sc-sc_flags  BTHID_RECONNECT) == 0
+	 (err = bthidev_listen(sc)) != 0)
+		aprint_error_dev(self, failed to listen (%d)\n, err);
 
 	if (sc-sc_flags  BTHID_CONNECTING)
 		bthidev_connect(sc);
@@ -514,8 +517,10 @@ bthidev_connect(struct bthidev_softc *sc
 	}
 
 	err = l2cap_setopt(sc-sc_ctl, sc-sc_mode);
-	if (err)
+	if (err) {
+		aprint_error_dev(sc-sc_dev, l2cap_setopt failed (%d)\n, err);
 		return err;
+	}
 
 	bdaddr_copy(sa.bt_bdaddr, sc-sc_laddr);
 	err = l2cap_bind(sc-sc_ctl, sa);
@@ -638,7 +643,7 @@ bthidev_ctl_disconnected(void *arg, int 
 	sc-sc_state = BTHID_CLOSED;
 
 	if (sc-sc_int == NULL) {
-		aprint_normal_dev(sc-sc_dev, disconnected\n);
+		aprint_normal_dev(sc-sc_dev, disconnected (%d)\n, err);
 		sc-sc_flags = ~BTHID_CONNECTING;
 
 		if (sc-sc_flags  BTHID_RECONNECT)
@@ -670,7 +675,7 @@ bthidev_int_disconnected(void *arg, int 
 	sc-sc_state = BTHID_CLOSED;
 
 	if (sc-sc_ctl == NULL) {
-		aprint_normal_dev(sc-sc_dev, disconnected\n);
+		aprint_normal_dev(sc-sc_dev, disconnected (%d)\n, err);
 		sc-sc_flags = ~BTHID_CONNECTING;
 
 		if (sc-sc_flags  BTHID_RECONNECT)

Index: src/sys/dev/bluetooth/btmagic.c
diff -u src/sys/dev/bluetooth/btmagic.c:1.1.8.2 src/sys/dev/bluetooth/btmagic.c:1.1.8.3
--- src/sys/dev/bluetooth/btmagic.c:1.1.8.2	Sun Nov 21 03:05:03 2010
+++ src/sys/dev/bluetooth/btmagic.c	Sun Jan 20 12:10:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: btmagic.c,v 1.1.8.2 2010/11/21 03:05:03 riz Exp $	*/
+/*	$NetBSD: btmagic.c,v 1.1.8.3 2013/01/20 12:10:52 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.1.8.2 2010/11/21 03:05:03 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.1.8.3 2013/01/20 12:10:52 bouyer Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -272,6 +272,7 @@ btmagic_attach(device_t parent, device_t
 	struct wsmousedev_attach_args wsma;
 	const struct sysctlnode *node;
 	prop_object_t obj;
+	int err;
 
 	/*
 	 * Init softc
@@ -306,7 +307,8 @@ btmagic_attach(device_t parent, device_t
 
 		aprint_verbose( %s %s, BTDEVmode,
 		

CVS commit: [netbsd-5] src/sys/arch/arm/arm32

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:13:28 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [netbsd-5]: cpu.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1841):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.4.1 src/sys/arch/arm/arm32/cpu.c

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

Modified files:

Index: src/sys/arch/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.71 src/sys/arch/arm/arm32/cpu.c:1.71.4.1
--- src/sys/arch/arm/arm32/cpu.c:1.71	Sat Oct 25 18:15:19 2008
+++ src/sys/arch/arm/arm32/cpu.c	Sun Jan 20 12:13:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.71.4.1 2013/01/20 12:13:28 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.71.4.1 2013/01/20 12:13:28 bouyer Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -486,7 +486,7 @@ identify_arm_cpu(struct device *dv, stru
 		if (cpuids[i].cpuid == (cpuid  CPU_ID_CPU_MASK)) {
 			cpu_class = cpuids[i].cpu_class;
 			steppingstr = cpuids[i].cpu_steppings[cpuid 
-			CPU_ID_REVISION_MASK],
+			CPU_ID_REVISION_MASK];
 			sprintf(cpu_model, %s%s%s (%s core),
 			cpuids[i].cpu_name,
 			steppingstr[0] == '*' ?  :  ,



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

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:19:07 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs viaide.c

Log Message:
Apply patch, requested by msaitoh in ticket #1842:
sys/dev/pci/pcidevs 1.969 via patch
sys/dev/pci/viaide.c1.57

Add VT8237S Integrated SATA Controller support.
PR#47452.


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.16 -r1.962.4.17 src/sys/dev/pci/pcidevs
cvs rdiff -u -r1.57.4.3 -r1.57.4.4 src/sys/dev/pci/viaide.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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.962.4.16 src/sys/dev/pci/pcidevs:1.962.4.17
--- src/sys/dev/pci/pcidevs:1.962.4.16	Sat Mar 17 19:05:38 2012
+++ src/sys/dev/pci/pcidevs	Sun Jan 20 12:19:06 2013
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.16 2012/03/17 19:05:38 bouyer Exp $
+$NetBSD: pcidevs,v 1.962.4.17 2013/01/20 12:19:06 bouyer Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4147,6 +4147,7 @@ product VIATECH VT3351_HB_4351	0x4351	VT
 product VIATECH CX700M2_IDE	0x5324	CX700M2/VX700 IDE Controller
 product VIATECH VT8237A_SATA_2	0x5337	VT8237A Integrated SATA Controller
 product VIATECH VT3351_IOAPIC	0x5351	VT3351 I/O APIC Interrupt Controller
+product VIATECH VT8237S_SATA	0x5372	VT8237S Integrated SATA Controller
 product VIATECH VT86C100A	0x6100	VT86C100A (Rhine-II) 10/100 Ethernet
 product VIATECH VT8378_IG	0x7205	VT8378 KM400 UniChrome Integrated Graphics
 product VIATECH KT880_5		0x7269	KT880 CPU to PCI Bridge

Index: src/sys/dev/pci/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.57.4.3 src/sys/dev/pci/viaide.c:1.57.4.4
--- src/sys/dev/pci/viaide.c:1.57.4.3	Sat Jan  9 01:56:51 2010
+++ src/sys/dev/pci/viaide.c	Sun Jan 20 12:19:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.57.4.3 2010/01/09 01:56:51 snj Exp $	*/
+/*	$NetBSD: viaide.c,v 1.57.4.4 2013/01/20 12:19:07 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.57.4.3 2010/01/09 01:56:51 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.57.4.4 2013/01/20 12:19:07 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -339,6 +339,11 @@ static const struct pciide_product_desc 
 	  VIA Technologies VT8237R SATA Controller,
 	  via_sata_chip_map_0,
 	},
+	{ PCI_PRODUCT_VIATECH_VT8237S_SATA,
+	  0,
+	  VIA Technologies VT8237S SATA Controller,
+	  via_sata_chip_map_7,
+	},
 	{ 0,
 	  0,
 	  NULL,



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

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:21:05 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h

Log Message:
regen for ticket #1842


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.16 -r1.963.4.17 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.16 -r1.962.4.17 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.16 src/sys/dev/pci/pcidevs.h:1.963.4.17
--- src/sys/dev/pci/pcidevs.h:1.963.4.16	Sat Mar 17 19:06:21 2012
+++ src/sys/dev/pci/pcidevs.h	Sun Jan 20 12:20:36 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.16 2012/03/17 19:06:21 bouyer Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.17 2013/01/20 12:20:36 bouyer Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.16 2012/03/17 19:05:38 bouyer Exp
+ *	NetBSD: pcidevs,v 1.962.4.17 2013/01/20 12:19:06 bouyer Exp
  */
 
 /*
@@ -4154,6 +4154,7 @@
 #define	PCI_PRODUCT_VIATECH_CX700M2_IDE	0x5324		/* CX700M2/VX700 IDE Controller */
 #define	PCI_PRODUCT_VIATECH_VT8237A_SATA_2	0x5337		/* VT8237A Integrated SATA Controller */
 #define	PCI_PRODUCT_VIATECH_VT3351_IOAPIC	0x5351		/* VT3351 I/O APIC Interrupt Controller */
+#define	PCI_PRODUCT_VIATECH_VT8237S_SATA	0x5372		/* VT8237S Integrated SATA Controller */
 #define	PCI_PRODUCT_VIATECH_VT86C100A	0x6100		/* VT86C100A (Rhine-II) 10/100 Ethernet */
 #define	PCI_PRODUCT_VIATECH_VT8378_IG	0x7205		/* VT8378 KM400 UniChrome Integrated Graphics */
 #define	PCI_PRODUCT_VIATECH_KT880_5	0x7269		/* KT880 CPU to PCI Bridge */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.16 src/sys/dev/pci/pcidevs_data.h:1.962.4.17
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.16	Sat Mar 17 19:06:21 2012
+++ src/sys/dev/pci/pcidevs_data.h	Sun Jan 20 12:20:38 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.16 2012/03/17 19:06:21 bouyer Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.17 2013/01/20 12:20:38 bouyer Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.16 2012/03/17 19:05:38 bouyer Exp
+ *	NetBSD: pcidevs,v 1.962.4.17 2013/01/20 12:19:06 bouyer Exp
  */
 
 /*
@@ -14492,6 +14492,10 @@ static const struct pci_product pci_prod
 	VT3351 I/O APIC Interrupt Controller,
 	},
 	{
+	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237S_SATA,
+	VT8237S Integrated SATA Controller,
+	},
+	{
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C100A,
 	VT86C100A (Rhine-II) 10/100 Ethernet,
 	},
@@ -15080,4 +15084,4 @@ static const struct pci_product pci_prod
 	Video Controller,
 	},
 };
-const int pci_nproducts = 3169;
+const int pci_nproducts = 3170;



CVS commit: [netbsd-5] src/doc

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:22:22 UTC 2013

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

Log Message:
tickets 1835, 1841, 1842


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 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.3 src/doc/CHANGES-5.3:1.1.2.4
--- src/doc/CHANGES-5.3:1.1.2.3	Sun Jan 13 17:58:06 2013
+++ src/doc/CHANGES-5.3	Sun Jan 20 12:22:22 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.3 2013/01/13 17:58:06 bouyer Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.4 2013/01/20 12:22:22 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -140,3 +140,28 @@ lib/librefuse/refuse.c1.96 via patch
 	This fixes PR lib/45129 by myself.
 	[tron, ticket #1836]
 
+sys/dev/bluetooth/bthidev.c			1.23, 1.24 via patch
+sys/dev/bluetooth/btmagic.c			1.4, 1.5 via patch
+usr.sbin/btdevctl/btdevctl.8			1.8 via patch
+
+	when no link-mode is specified, explicitly set a mode of (int)0
+	otherwise l2cap_setmode() will fail during connection setup
+	for bthidev.c, this fixes a problem with Microsoft Wedge Touch
+	mouse (which may not be able to authenticate)
+	for btmagic.c, include this fix in case somebody tries that
+	related to PR/47286
+	[plunky, ticket #1835]
+
+sys/arch/arm/arm32/cpu.c			1.89
+
+	print cpu model string correctly
+	[msaitoh, ticket #1841]
+
+sys/dev/pci/pcidevs			1.969 via patch
+sys/dev/pci/pcidevs.h			regen
+sys/dev/pci/pcidevs_data.h		regen
+sys/dev/pci/viaide.c			1.58
+
+	Add VT8237S Integrated SATA Controller support (PR#47452).
+	[msaitoh, ticket #1842]
+



CVS commit: src/sys/arch/luna68k/stand/boot

2013-01-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 20 13:35:43 UTC 2013

Modified Files:
src/sys/arch/luna68k/stand/boot: bmc.c bmd.c font.c if_le.c init_main.c

Log Message:
No need to include sys/systm.h in standalone sources.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/stand/boot/bmc.c \
src/sys/arch/luna68k/stand/boot/bmd.c \
src/sys/arch/luna68k/stand/boot/font.c \
src/sys/arch/luna68k/stand/boot/if_le.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/luna68k/stand/boot/init_main.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/luna68k/stand/boot/bmc.c
diff -u src/sys/arch/luna68k/stand/boot/bmc.c:1.1 src/sys/arch/luna68k/stand/boot/bmc.c:1.2
--- src/sys/arch/luna68k/stand/boot/bmc.c:1.1	Sat Jan  5 17:44:24 2013
+++ src/sys/arch/luna68k/stand/boot/bmc.c	Sun Jan 20 13:35:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bmc.c,v 1.1 2013/01/05 17:44:24 tsutsui Exp $	*/
+/*	$NetBSD: bmc.c,v 1.2 2013/01/20 13:35:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -76,7 +76,6 @@
  */
 
 #include sys/param.h
-#include sys/systm.h
 #include luna68k/stand/boot/samachdep.h
 #include luna68k/stand/boot/rcvbuf.h
 #include luna68k/stand/boot/preset.h
Index: src/sys/arch/luna68k/stand/boot/bmd.c
diff -u src/sys/arch/luna68k/stand/boot/bmd.c:1.1 src/sys/arch/luna68k/stand/boot/bmd.c:1.2
--- src/sys/arch/luna68k/stand/boot/bmd.c:1.1	Sat Jan  5 17:44:24 2013
+++ src/sys/arch/luna68k/stand/boot/bmd.c	Sun Jan 20 13:35:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bmd.c,v 1.1 2013/01/05 17:44:24 tsutsui Exp $	*/
+/*	$NetBSD: bmd.c,v 1.2 2013/01/20 13:35:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -78,7 +78,6 @@
 
 
 #include sys/param.h
-#include sys/systm.h
 #include luna68k/stand/boot/samachdep.h
 
 #define isprint(c)	( c  0x20 ? 0 : 1)
Index: src/sys/arch/luna68k/stand/boot/font.c
diff -u src/sys/arch/luna68k/stand/boot/font.c:1.1 src/sys/arch/luna68k/stand/boot/font.c:1.2
--- src/sys/arch/luna68k/stand/boot/font.c:1.1	Sat Jan  5 17:44:24 2013
+++ src/sys/arch/luna68k/stand/boot/font.c	Sun Jan 20 13:35:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: font.c,v 1.1 2013/01/05 17:44:24 tsutsui Exp $	*/
+/*	$NetBSD: font.c,v 1.2 2013/01/20 13:35:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -77,7 +77,6 @@
  */
 
 #include sys/param.h
-#include sys/systm.h
 
 u_short bmdfont[][20] = {
 	{			/* 0x00 */
Index: src/sys/arch/luna68k/stand/boot/if_le.c
diff -u src/sys/arch/luna68k/stand/boot/if_le.c:1.1 src/sys/arch/luna68k/stand/boot/if_le.c:1.2
--- src/sys/arch/luna68k/stand/boot/if_le.c:1.1	Sun Jan 13 14:10:55 2013
+++ src/sys/arch/luna68k/stand/boot/if_le.c	Sun Jan 20 13:35:43 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le.c,v 1.1 2013/01/13 14:10:55 tsutsui Exp $ */
+/* $NetBSD: if_le.c,v 1.2 2013/01/20 13:35:43 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2013 Izumi Tsutsui.  All rights reserved.
@@ -59,7 +59,6 @@
  */
 
 #include sys/param.h
-#include sys/systm.h
 
 #include machine/cpu.h
 

Index: src/sys/arch/luna68k/stand/boot/init_main.c
diff -u src/sys/arch/luna68k/stand/boot/init_main.c:1.3 src/sys/arch/luna68k/stand/boot/init_main.c:1.4
--- src/sys/arch/luna68k/stand/boot/init_main.c:1.3	Sun Jan 13 14:10:55 2013
+++ src/sys/arch/luna68k/stand/boot/init_main.c	Sun Jan 20 13:35:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.3 2013/01/13 14:10:55 tsutsui Exp $	*/
+/*	$NetBSD: init_main.c,v 1.4 2013/01/20 13:35:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -71,7 +71,6 @@
  */
 
 #include sys/param.h
-#include sys/systm.h
 #include machine/cpu.h
 #include luna68k/stand/boot/samachdep.h
 #include luna68k/stand/boot/stinger.h



CVS commit: src/sys/dev/usb

2013-01-20 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sun Jan 20 13:43:24 UTC 2013

Modified Files:
src/sys/dev/usb: uftdi.c

Log Message:
Add line to get the ftdi driver to use the serial function of the FTDI 232H.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/uftdi.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/usb/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.54 src/sys/dev/usb/uftdi.c:1.55
--- src/sys/dev/usb/uftdi.c:1.54	Fri Nov  2 02:30:15 2012
+++ src/sys/dev/usb/uftdi.c	Sun Jan 20 13:43:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdi.c,v 1.54 2012/11/02 02:30:15 jakllsch Exp $	*/
+/*	$NetBSD: uftdi.c,v 1.55 2013/01/20 13:43:24 reinoud Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.54 2012/11/02 02:30:15 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.55 2013/01/20 13:43:24 reinoud Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -125,6 +125,7 @@ static const struct usb_devno uftdi_devs
 	{ USB_VENDOR_BBELECTRONICS, USB_PRODUCT_BBELECTRONICS_USOTL4 },
 	{ USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_TWIST },
 	{ USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_SAMBA },
+	{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_232H },
 	{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_2232C },
 	{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_4232H },
 	{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_8U100AX },



CVS commit: src/share/man/man4

2013-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 20 14:03:28 UTC 2013

Modified Files:
src/share/man/man4: uftdi.4

Log Message:
Spell the company name correctly: Intrepid Control Systems


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/uftdi.4

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/man4/uftdi.4
diff -u src/share/man/man4/uftdi.4:1.17 src/share/man/man4/uftdi.4:1.18
--- src/share/man/man4/uftdi.4:1.17	Thu Oct 18 09:41:24 2012
+++ src/share/man/man4/uftdi.4	Sun Jan 20 14:03:28 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: uftdi.4,v 1.17 2012/10/18 09:41:24 msaitoh Exp $
+.\ $NetBSD: uftdi.4,v 1.18 2013/01/20 14:03:28 pgoyette Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -75,8 +75,8 @@ driver supports the following adapters:
 .It Tn GlobalScale Technogogies SheevaPlug and OpenRD
 .It Tn HP USB-Serial adapter shipped with some HP laptops
 .It Tn Inland UAS111
-.It Tn Interpid Control Systems NeoVI Blue
-.It Tn Interpid Control Systems ValueCAN
+.It Tn Intrepid Control Systems NeoVI Blue
+.It Tn Intrepid Control Systems ValueCAN
 .It Tn Matrix Orbital LK/VK/PK202-24 LCD
 .It Tn Matrix Orbital LK/VK204-24 LCD
 .It Tn Matrix Orbital MX2/MX3/MX6 Series



CVS commit: src/sys/arch/luna68k/stand/boot

2013-01-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 20 14:03:40 UTC 2013

Modified Files:
src/sys/arch/luna68k/stand/boot: bmc.c samachdep.h

Log Message:
Remove unused bmcintr() function.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/luna68k/stand/boot/bmc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/luna68k/stand/boot/samachdep.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/luna68k/stand/boot/bmc.c
diff -u src/sys/arch/luna68k/stand/boot/bmc.c:1.2 src/sys/arch/luna68k/stand/boot/bmc.c:1.3
--- src/sys/arch/luna68k/stand/boot/bmc.c:1.2	Sun Jan 20 13:35:43 2013
+++ src/sys/arch/luna68k/stand/boot/bmc.c	Sun Jan 20 14:03:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bmc.c,v 1.2 2013/01/20 13:35:43 tsutsui Exp $	*/
+/*	$NetBSD: bmc.c,v 1.3 2013/01/20 14:03:40 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -80,11 +80,6 @@
 #include luna68k/stand/boot/rcvbuf.h
 #include luna68k/stand/boot/preset.h
 
-void
-bmcintr(void)
-{
-}
-
 /*
  * Following are all routines needed for SIO to act as console
  */

Index: src/sys/arch/luna68k/stand/boot/samachdep.h
diff -u src/sys/arch/luna68k/stand/boot/samachdep.h:1.6 src/sys/arch/luna68k/stand/boot/samachdep.h:1.7
--- src/sys/arch/luna68k/stand/boot/samachdep.h:1.6	Wed Jan 16 15:46:20 2013
+++ src/sys/arch/luna68k/stand/boot/samachdep.h	Sun Jan 20 14:03:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: samachdep.h,v 1.6 2013/01/16 15:46:20 tsutsui Exp $	*/
+/*	$NetBSD: samachdep.h,v 1.7 2013/01/20 14:03:40 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -59,7 +59,6 @@ void configure(void);
 void find_devs(void);
 
 /* bmc.c */
-void bmcintr(void);
 void bmccnprobe(struct consdev *);
 void bmccninit(struct consdev *);
 int  bmccngetc(dev_t);



CVS commit: src/sys/dev/usb

2013-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 20 14:06:24 UTC 2013

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Spell company name correctly


To generate a diff of this commit:
cvs rdiff -u -r1.635 -r1.636 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.635 src/sys/dev/usb/usbdevs:1.636
--- src/sys/dev/usb/usbdevs:1.635	Mon Jan 14 18:24:05 2013
+++ src/sys/dev/usb/usbdevs	Sun Jan 20 14:06:24 2013
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.635 2013/01/14 18:24:05 christos Exp $
+$NetBSD: usbdevs,v 1.636 2013/01/20 14:06:24 pgoyette Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1747,7 +1747,7 @@ product INTEL TESTBOARD		0x9890	82930 te
 product INTERSIL PRISM_GT	0x1000	PrismGT USB 2.0 WLAN
 product INTERSIL PRISM_2X	0x3642	Prism2.x WLAN
 
-/* Interpid Control Systems products */
+/* Intrepid Control Systems products */
 product INTREPIDCS VALUECAN	0x0601	ValueCAN
 product INTREPIDCS NEOVI	0x0701	NeoVI Blue
 



CVS commit: src/sys/dev/usb

2013-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan 20 14:08:40 UTC 2013

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.628 -r1.629 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.629 -r1.630 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.628 src/sys/dev/usb/usbdevs.h:1.629
--- src/sys/dev/usb/usbdevs.h:1.628	Mon Jan 14 18:24:14 2013
+++ src/sys/dev/usb/usbdevs.h	Sun Jan 20 14:08:40 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.628 2013/01/14 18:24:14 christos Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.629 2013/01/20 14:08:40 pgoyette Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.635 2013/01/14 18:24:05 christos Exp
+ *	NetBSD: usbdevs,v 1.636 2013/01/20 14:06:24 pgoyette Exp
  */
 
 /*
@@ -1754,7 +1754,7 @@
 #define	USB_PRODUCT_INTERSIL_PRISM_GT	0x1000		/* PrismGT USB 2.0 WLAN */
 #define	USB_PRODUCT_INTERSIL_PRISM_2X	0x3642		/* Prism2.x WLAN */
 
-/* Interpid Control Systems products */
+/* Intrepid Control Systems products */
 #define	USB_PRODUCT_INTREPIDCS_VALUECAN	0x0601		/* ValueCAN */
 #define	USB_PRODUCT_INTREPIDCS_NEOVI	0x0701		/* NeoVI Blue */
 

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.629 src/sys/dev/usb/usbdevs_data.h:1.630
--- src/sys/dev/usb/usbdevs_data.h:1.629	Mon Jan 14 18:24:14 2013
+++ src/sys/dev/usb/usbdevs_data.h	Sun Jan 20 14:08:40 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.629 2013/01/14 18:24:14 christos Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.630 2013/01/20 14:08:40 pgoyette Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.635 2013/01/14 18:24:05 christos Exp
+ *	NetBSD: usbdevs,v 1.636 2013/01/20 14:06:24 pgoyette Exp
  */
 
 /*



CVS commit: src/lib/librumpclient

2013-01-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Jan 20 15:23:21 UTC 2013

Modified Files:
src/lib/librumpclient: rumpclient.h

Log Message:
Provide register_t compat on solarisa.
(would be nice to handle register_t compat internally instead, but the
interface was already exposed in a release)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/librumpclient/rumpclient.h

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

Modified files:

Index: src/lib/librumpclient/rumpclient.h
diff -u src/lib/librumpclient/rumpclient.h:1.14 src/lib/librumpclient/rumpclient.h:1.15
--- src/lib/librumpclient/rumpclient.h:1.14	Thu Jan 17 22:16:59 2013
+++ src/lib/librumpclient/rumpclient.h	Sun Jan 20 15:23:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpclient.h,v 1.14 2013/01/17 22:16:59 pooka Exp $	*/
+/*	$NetBSD: rumpclient.h,v 1.15 2013/01/20 15:23:21 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -38,6 +38,11 @@
 #endif /* !__GNUC__ */
 #endif /* !__returns_twice */
 
+#if defined(__sun__)  !defined(RUMP_REGISTER_T)
+#define RUMP_REGISTER_T long
+typedef RUMP_REGISTER_T register_t;
+#endif
+
 struct rumpclient_fork;
 
 #define rumpclient_vfork() rumpclient__dofork(vfork)



CVS commit: src/sys/rump/librump/rumpkern

2013-01-20 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 20 17:09:47 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Provide xc_send_ipi() routine in RUMP, which is required for high-priority
xcall(9) mechanism.  It is emulated using low-priority xcall(9).


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/rump/librump/rumpkern/emul.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/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.151 src/sys/rump/librump/rumpkern/emul.c:1.152
--- src/sys/rump/librump/rumpkern/emul.c:1.151	Sat Oct 27 17:18:40 2012
+++ src/sys/rump/librump/rumpkern/emul.c	Sun Jan 20 17:09:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.151 2012/10/27 17:18:40 chs Exp $	*/
+/*	$NetBSD: emul.c,v 1.152 2013/01/20 17:09:47 rmind Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.151 2012/10/27 17:18:40 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.152 2013/01/20 17:09:47 rmind Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -284,9 +284,32 @@ syscall_intern(struct proc *p)
 void
 xc_send_ipi(struct cpu_info *ci)
 {
+	const struct cpu_info *curci = curcpu();
+	CPU_INFO_ITERATOR cii;
 
-	/* I'll think about the implementation if this is ever used */
-	panic(not implemented);
+	/*
+	 * IPI are considered asynchronous, therefore no need to wait for
+	 * unicast call delivery (nor the order of calls matters).  Our LWP
+	 * needs to be bound to the CPU, since xc_unicast(9) may block.
+	 *
+	 * WARNING: These must be low-priority calls, as this routine is
+	 * used to emulate high-priority (XC_HIGHPRI) mechanism.
+	 */
+
+	if (ci) {
+		KASSERT(curci != ci);
+		(void)xc_unicast(0, (xcfunc_t)xc_ipi_handler, NULL, NULL, ci);
+		return;
+	}
+
+	curlwp-l_pflag |= LP_BOUND;
+	for (CPU_INFO_FOREACH(cii, ci)) {
+		if (curci == ci) {
+			continue;
+		}
+		(void)xc_unicast(0, (xcfunc_t)xc_ipi_handler, NULL, NULL, ci);
+	}
+	curlwp-l_pflag = ~LP_BOUND;
 }
 
 int



CVS commit: src/lib/libpthread_dbg

2013-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 20 18:18:07 UTC 2013

Modified Files:
src/lib/libpthread_dbg: pthread_dbg.c pthread_dbg_int.h

Log Message:
tsd_alloc is no more, use tsd_list, and disable the destructor walking code
since it needs work. Fixes gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libpthread_dbg/pthread_dbg.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libpthread_dbg/pthread_dbg_int.h

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

Modified files:

Index: src/lib/libpthread_dbg/pthread_dbg.c
diff -u src/lib/libpthread_dbg/pthread_dbg.c:1.40 src/lib/libpthread_dbg/pthread_dbg.c:1.41
--- src/lib/libpthread_dbg/pthread_dbg.c:1.40	Fri Mar  7 17:27:07 2008
+++ src/lib/libpthread_dbg/pthread_dbg.c	Sun Jan 20 13:18:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $	*/
+/*	$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $);
+__RCSID($NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $);
 
 #define __EXPOSE_STACK 1
 
@@ -95,13 +95,13 @@ td_open(struct td_proc_callbacks_t *cb, 
 	}
 	proc-allqaddr = addr;
 
-	val = LOOKUP(proc, pthread__tsd_alloc, addr);
+	val = LOOKUP(proc, pthread__tsd_list, addr);
 	if (val != 0) {
 		if (val == TD_ERR_NOSYM)
 			val = TD_ERR_NOLIB;
 		goto error;
 	}
-	proc-tsdallocaddr = addr;
+	proc-tsdlistaddr = addr;
 
 	val = LOOKUP(proc, pthread__tsd_destructors, addr);
 	if (val != 0) {
@@ -418,13 +418,14 @@ int
 td_tsd_iter(td_proc_t *proc,
 int (*call)(pthread_key_t, void (*)(void *), void *), void *arg)
 {
+#ifdef notyet
 	int val;
 	int i;
 	void *allocated;
 	void (*destructor)(void *);
 
 	for (i = 0; i  PTHREAD_KEYS_MAX; i++) {
-		val = READ(proc, proc-tsdallocaddr + i * sizeof(allocated),
+		val = READ(proc, proc-tsdlistaddr + i * sizeof(allocated),
 		allocated, sizeof(allocated));
 		if (val != 0)
 			return val;
@@ -441,6 +442,9 @@ td_tsd_iter(td_proc_t *proc,
 return val;
 		}
 	}
+#else
+	abort();
+#endif
 
 	return 0;
 }

Index: src/lib/libpthread_dbg/pthread_dbg_int.h
diff -u src/lib/libpthread_dbg/pthread_dbg_int.h:1.6 src/lib/libpthread_dbg/pthread_dbg_int.h:1.7
--- src/lib/libpthread_dbg/pthread_dbg_int.h:1.6	Tue Oct 16 11:06:11 2007
+++ src/lib/libpthread_dbg/pthread_dbg_int.h	Sun Jan 20 13:18:07 2013
@@ -12,7 +12,7 @@ struct td_proc_st {
 	caddr_t idleqaddr;
 	caddr_t suspqaddr;
 	caddr_t maxlwpsaddr;
-	caddr_t tsdallocaddr;
+	caddr_t tsdlistaddr;
 	caddr_t tsddestaddr;
 
 	caddr_t stacksizeaddr;



CVS commit: src/lib/libpthread_dbg

2013-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 20 18:45:19 UTC 2013

Modified Files:
src/lib/libpthread_dbg: pthread_dbg.c

Log Message:
Only the first symbol (pthread_dbg) should return NOLIB, the rest indicate
internal inconsistencies, so let the code return a more vocal error.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libpthread_dbg/pthread_dbg.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/libpthread_dbg/pthread_dbg.c
diff -u src/lib/libpthread_dbg/pthread_dbg.c:1.41 src/lib/libpthread_dbg/pthread_dbg.c:1.42
--- src/lib/libpthread_dbg/pthread_dbg.c:1.41	Sun Jan 20 13:18:07 2013
+++ src/lib/libpthread_dbg/pthread_dbg.c	Sun Jan 20 13:45:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $	*/
+/*	$NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $);
+__RCSID($NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $);
 
 #define __EXPOSE_STACK 1
 
@@ -88,27 +88,18 @@ td_open(struct td_proc_callbacks_t *cb, 
 	proc-dbgaddr = addr;
 
 	val = LOOKUP(proc, pthread__allqueue, addr);
-	if (val != 0) {
-		if (val == TD_ERR_NOSYM)
-			val = TD_ERR_NOLIB;
+	if (val != 0)
 		goto error;
-	}
 	proc-allqaddr = addr;
 
 	val = LOOKUP(proc, pthread__tsd_list, addr);
-	if (val != 0) {
-		if (val == TD_ERR_NOSYM)
-			val = TD_ERR_NOLIB;
+	if (val != 0)
 		goto error;
-	}
 	proc-tsdlistaddr = addr;
 
 	val = LOOKUP(proc, pthread__tsd_destructors, addr);
-	if (val != 0) {
-		if (val == TD_ERR_NOSYM)
-			val = TD_ERR_NOLIB;
+	if (val != 0)
 		goto error;
-	}
 	proc-tsddestaddr = addr;
 
 	val = READ(proc, proc-dbgaddr, dbg, sizeof(int));



CVS commit: src

2013-01-20 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Jan 20 18:45:57 UTC 2013

Modified Files:
src/sys/net/npf: npf_handler.c npf_mbuf.c npf_processor.c npf_rproc.c
npf_ruleset.c npf_session.c
src/usr.sbin/npf/npftest/libnpftest: npf_nbuf_test.c

Log Message:
- nbuf_ensure_contig: rework to use m_ensure_contig(9), which will not free
  the mbuf chain on failure.  Fixes some corner cases.  Improve regression
  test and sprinkle some asserts.
- npf_reassembly: clear nbuf on IPv6 reassembly failure path (partial fix).
  The problem was found and fix provided by Anthony Mallet.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_mbuf.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_processor.c
cvs rdiff -u -r1.4 -r1.5 src/sys/net/npf/npf_rproc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_ruleset.c
cvs rdiff -u -r1.19 -r1.20 src/sys/net/npf/npf_session.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c

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

Modified files:

Index: src/sys/net/npf/npf_handler.c
diff -u src/sys/net/npf/npf_handler.c:1.24 src/sys/net/npf/npf_handler.c:1.25
--- src/sys/net/npf/npf_handler.c:1.24	Mon Dec 24 19:05:43 2012
+++ src/sys/net/npf/npf_handler.c	Sun Jan 20 18:45:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.24 2012/12/24 19:05:43 rmind Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.25 2013/01/20 18:45:56 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_handler.c,v 1.24 2012/12/24 19:05:43 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_handler.c,v 1.25 2013/01/20 18:45:56 rmind Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -91,6 +91,9 @@ npf_reassembly(npf_cache_t *npc, nbuf_t 
 		 */
 		const u_int hlen = npf_cache_hlen(npc);
 		error = ip6_reass_packet(mp, hlen);
+		if (error  *mp == NULL) {
+			memset(nbuf, 0, sizeof(nbuf_t));
+		}
 #endif
 	}
 	if (error) {
@@ -249,7 +252,7 @@ out:
 
 	/* Reset mbuf pointer before returning to the caller. */
 	if ((*mp = nbuf_head_mbuf(nbuf)) == NULL) {
-		return ENOMEM;
+		return error ? error : ENOMEM;
 	}
 
 	/* Pass the packet if decided and there is no error. */

Index: src/sys/net/npf/npf_mbuf.c
diff -u src/sys/net/npf/npf_mbuf.c:1.9 src/sys/net/npf/npf_mbuf.c:1.10
--- src/sys/net/npf/npf_mbuf.c:1.9	Mon Dec 24 19:05:44 2012
+++ src/sys/net/npf/npf_mbuf.c	Sun Jan 20 18:45:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_mbuf.c,v 1.9 2012/12/24 19:05:44 rmind Exp $	*/
+/*	$NetBSD: npf_mbuf.c,v 1.10 2013/01/20 18:45:56 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_mbuf.c,v 1.9 2012/12/24 19:05:44 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_mbuf.c,v 1.10 2013/01/20 18:45:56 rmind Exp $);
 
 #include sys/param.h
 #include sys/mbuf.h
@@ -160,47 +160,53 @@ nbuf_advance(nbuf_t *nbuf, size_t len, s
 void *
 nbuf_ensure_contig(nbuf_t *nbuf, size_t len)
 {
-	struct mbuf *m = nbuf-nb_mbuf;
-	const u_int off = (uintptr_t)nbuf-nb_nptr - mtod(m, uintptr_t);
-	int tlen = off + len;
+	const struct mbuf * const n = nbuf-nb_mbuf;
+	const size_t off = (uintptr_t)nbuf-nb_nptr - mtod(n, uintptr_t);
 
-	KASSERT(off  m_length(nbuf-nb_mbuf0));
+	KASSERT(off  n-m_len);
 
-	if (__predict_false(m-m_len  tlen)) {
-		const bool head_buf = (nbuf-nb_mbuf0 == m);
-		const int target = NBUF_ENSURE_ROUNDUP(tlen);
-		const int pleft = m_length(m);
+	if (__predict_false(n-m_len  (off + len))) {
+		struct mbuf *m = nbuf-nb_mbuf0;
+		const size_t foff = nbuf_offset(nbuf);
+		const size_t plen = m_length(m);
+		const size_t mlen = m-m_len;
+		size_t target;
+		bool success;
 
 		npf_stats_inc(NPF_STAT_NBUF_NONCONTIG);
 
 		/* Attempt to round-up to NBUF_ENSURE_ALIGN bytes. */
-		if (target = pleft) {
-			tlen = target;
+		if ((target = NBUF_ENSURE_ROUNDUP(foff + len))  plen) {
+			target = foff + len;
 		}
 
 		/* Rearrange the chain to be contiguous. */
-		if ((m = m_pullup(m, tlen)) == NULL) {
-			npf_stats_inc(NPF_STAT_NBUF_CONTIG_FAIL);
-			memset(nbuf, 0, sizeof(nbuf_t));
-			return NULL;
+		KASSERT((m-m_flags  M_PKTHDR) != 0);
+		success = m_ensure_contig(m, target);
+		KASSERT(m != NULL);
+
+		/* If no change in the chain: return what we have. */
+		if (m == nbuf-nb_mbuf0  m-m_len == mlen) {
+			return success ? nbuf-nb_nptr : NULL;
 		}
 
 		/*
-		 * If the buffer was re-allocated, indicate that references
-		 * to the data would need reset.  Also, it was the head
-		 * buffer - update our record.
+		 * The mbuf chain was re-arranged.  Update the pointers
+		 * accordingly and indicate that the references to the data
+		 * might need a reset.
 		 */
-		if (nbuf-nb_mbuf != m) {
-			nbuf-nb_flags |= NBUF_DATAREF_RESET;
-		}
-		if 

CVS commit: src/sys/dev/usb

2013-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 20 20:21:58 UTC 2013

Modified Files:
src/sys/dev/usb: if_urtwn.c if_urtwnreg.h if_urtwnvar.h

Log Message:
more (and less) locking fixes


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/if_urtwnreg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_urtwnvar.h

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.11 src/sys/dev/usb/if_urtwn.c:1.12
--- src/sys/dev/usb/if_urtwn.c:1.11	Fri Jan 18 08:45:51 2013
+++ src/sys/dev/usb/if_urtwn.c	Sun Jan 20 15:21:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.11 2013/01/18 13:45:51 jmcneill Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.12 2013/01/20 20:21:57 christos Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.11 2013/01/18 13:45:51 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.12 2013/01/20 20:21:57 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -74,6 +74,12 @@ __KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v
 #include dev/usb/if_urtwnvar.h
 #include dev/usb/if_urtwn_data.h
 
+/*
+ * The sc_write_mtx locking is to prevent sequences of writes from
+ * being intermingled with each other.  I don't know if this is really
+ * needed.  I have added it just to be on the safe side.
+ */
+
 #ifdef URTWN_DEBUG
 #define	DBG_INIT	__BIT(0)
 #define	DBG_FN		__BIT(1)
@@ -168,17 +174,31 @@ static void	urtwn_do_async(struct urtwn_
 static void	urtwn_wait_async(struct urtwn_softc *);
 static int	urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *,
 		int);
+static void	urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t);
+static void	urtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t);
+static void	urtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t);
+static int	urtwn_write_region(struct urtwn_softc *, uint16_t, uint8_t *,
+		int);
 static int	urtwn_read_region_1(struct urtwn_softc *, uint16_t, uint8_t *,
 		int);
+static uint8_t	urtwn_read_1(struct urtwn_softc *, uint16_t);
+static uint16_t	urtwn_read_2(struct urtwn_softc *, uint16_t);
+static uint32_t	urtwn_read_4(struct urtwn_softc *, uint16_t);
 static int	urtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int);
+static void	urtwn_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t);
 static uint32_t	urtwn_rf_read(struct urtwn_softc *, int, uint8_t);
 static int	urtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t);
 static uint8_t	urtwn_efuse_read_1(struct urtwn_softc *, uint16_t);
 static void	urtwn_efuse_read(struct urtwn_softc *);
 static int	urtwn_read_chipid(struct urtwn_softc *);
+#ifdef URTWN_DEBUG
+static void	urtwn_dump_rom(struct urtwn_softc *, struct r92c_rom *);
+#endif
 static void	urtwn_read_rom(struct urtwn_softc *);
 static int	urtwn_media_change(struct ifnet *);
 static int	urtwn_ra_init(struct urtwn_softc *);
+static int	urtwn_get_nettype(struct urtwn_softc *);
+static void	urtwn_set_nettype0_msr(struct urtwn_softc *, uint8_t);
 static void	urtwn_tsf_sync_enable(struct urtwn_softc *);
 static void	urtwn_set_led(struct urtwn_softc *, int, int);
 static void	urtwn_calib_to(void *);
@@ -195,7 +215,7 @@ static void	urtwn_rx_frame(struct urtwn_
 static void	urtwn_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status);
 static void	urtwn_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status);
 static int	urtwn_tx(struct urtwn_softc *, struct mbuf *,
-		struct ieee80211_node *);
+		struct ieee80211_node *, struct urtwn_tx_data *);
 static void	urtwn_start(struct ifnet *);
 static void	urtwn_watchdog(struct ifnet *);
 static int	urtwn_ioctl(struct ifnet *, u_long, void *);
@@ -254,13 +274,16 @@ urtwn_attach(device_t parent, device_t s
 	aprint_naive(\n);
 	aprint_normal(\n);
 
+	DPRINTFN(DBG_FN, (%s: %s\n, device_xname(sc-sc_dev), __func__));
+
 	devinfop = usbd_devinfo_alloc(sc-sc_udev, 0);
 	aprint_normal_dev(self, %s\n, devinfop);
 	usbd_devinfo_free(devinfop);
 
 	mutex_init(sc-sc_task_mtx, MUTEX_DEFAULT, IPL_NET);
-	mutex_init(sc-sc_tx_mtx, MUTEX_DEFAULT, IPL_NET);
+	mutex_init(sc-sc_tx_mtx, MUTEX_DEFAULT, IPL_NONE);
 	mutex_init(sc-sc_fwcmd_mtx, MUTEX_DEFAULT, IPL_NONE);
+	mutex_init(sc-sc_write_mtx, MUTEX_DEFAULT, IPL_NONE);
 
 	usb_init_task(sc-sc_task, urtwn_task, sc);
 
@@ -412,10 +435,6 @@ urtwn_detach(device_t self, int flags)
 		ieee80211_ifdetach(sc-sc_ic);
 		if_detach(ifp);
 
-		/* Free Tx/Rx buffers. */
-		urtwn_free_tx_list(sc);
-		urtwn_free_rx_list(sc);
-	
 		/* Abort and close Tx/Rx pipes. */
 		urtwn_close_pipes(sc);
 	}
@@ -426,6 +445,8 @@ urtwn_detach(device_t self, int flags)
 
 	callout_destroy(sc-sc_scan_to);
 	callout_destroy(sc-sc_calib_to);
+
+	mutex_destroy(sc-sc_write_mtx);
 	

CVS commit: src/usr.bin/sort

2013-01-20 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 20 21:02:11 UTC 2013

Modified Files:
src/usr.bin/sort: sort.1

Log Message:
As from today, numeric fields may begin with an optional
plus or minus sign, not only an optional minus sign.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/sort/sort.1

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/sort/sort.1
diff -u src/usr.bin/sort/sort.1:1.32 src/usr.bin/sort/sort.1:1.33
--- src/usr.bin/sort/sort.1:1.32	Sat Dec 18 23:36:23 2010
+++ src/usr.bin/sort/sort.1	Sun Jan 20 21:02:11 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: sort.1,v 1.32 2010/12/18 23:36:23 wiz Exp $
+.\	$NetBSD: sort.1,v 1.33 2013/01/20 21:02:11 apb Exp $
 .\
 .\ Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -59,7 +59,7 @@
 .\
 .\ @(#)sort.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd December 18, 2010
+.Dd January 20, 2013
 .Dt SORT 1
 .Os
 .Sh NAME
@@ -159,7 +159,7 @@ Ignore all non-printable characters.
 Sort by the string length of the field, not by the field itself.
 .It Fl n
 An initial numeric string, consisting of optional blank space, optional
-minus sign, and zero or more digits (including decimal point)
+plus or minus sign, and zero or more digits (including decimal point)
 .\ with
 .\ optional radix character and thousands
 .\ separator



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

2013-01-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Jan 20 22:32:59 UTC 2013

Modified Files:
src/sys/arch/arm/omap: if_cpsw.c

Log Message:
purge the transmit queue in cpsw_stop()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/if_cpsw.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/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.1 src/sys/arch/arm/omap/if_cpsw.c:1.2
--- src/sys/arch/arm/omap/if_cpsw.c:1.1	Thu Jan  3 21:13:26 2013
+++ src/sys/arch/arm/omap/if_cpsw.c	Sun Jan 20 22:32:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.1 2013/01/03 21:13:26 jakllsch Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.2 2013/01/20 22:32:59 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.1 2013/01/03 21:13:26 jakllsch Exp $);
+__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.2 2013/01/20 22:32:59 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -958,6 +958,13 @@ cpsw_stop(struct ifnet *ifp, int disable
 	cpsw_write_4(sc, CPSW_CPDMA_SOFT_RESET, 1);
 	while(cpsw_read_4(sc, CPSW_CPDMA_SOFT_RESET)  1);
 
+	/* Release any queued transmit buffers. */
+	for (i = 0; i  CPSW_NTXDESCS; i++) {
+		bus_dmamap_unload(sc-sc_bdt, rdp-tx_dm[i]);
+		m_freem(rdp-tx_mb[i]);
+		rdp-tx_mb[i] = NULL;
+	}
+
 	ifp-if_flags = ~(IFF_RUNNING|IFF_OACTIVE);
 	ifp-if_timer = 0;
 



CVS commit: src/sys/dev/usb

2013-01-20 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 20 23:13:44 UTC 2013

Modified Files:
src/sys/dev/usb: if_urtwn.c

Log Message:
use ic_curchan not ic_ibss_chan


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/if_urtwn.c

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.12 src/sys/dev/usb/if_urtwn.c:1.13
--- src/sys/dev/usb/if_urtwn.c:1.12	Sun Jan 20 20:21:57 2013
+++ src/sys/dev/usb/if_urtwn.c	Sun Jan 20 23:13:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.12 2013/01/20 20:21:57 christos Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.13 2013/01/20 23:13:43 jmcneill Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.12 2013/01/20 20:21:57 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.13 2013/01/20 23:13:43 jmcneill Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -1687,7 +1687,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 
 		if (ic-ic_opmode == IEEE80211_M_MONITOR) {
 			/* Back to 20MHz mode */
-			urtwn_set_chan(sc, ic-ic_ibss_chan,
+			urtwn_set_chan(sc, ic-ic_curchan,
 			IEEE80211_HTINFO_2NDCHAN_NONE);
 
 			/* Enable Rx of data frames. */
@@ -1991,8 +1991,8 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
 			tap-wr_rate = 0x80 | (rate - 12);
 		}
 		tap-wr_dbm_antsignal = rssi;
-		tap-wr_chan_freq = htole16(ic-ic_ibss_chan-ic_freq);
-		tap-wr_chan_flags = htole16(ic-ic_ibss_chan-ic_flags);
+		tap-wr_chan_freq = htole16(ic-ic_curchan-ic_freq);
+		tap-wr_chan_flags = htole16(ic-ic_curchan-ic_flags);
 
 		bpf_mtap2(sc-sc_drvbpf, tap, sc-sc_rxtap_len, m);
 	}
@@ -2464,7 +2464,7 @@ urtwn_ioctl(struct ifnet *ifp, u_long cm
 			if ((ifp-if_flags  (IFF_UP | IFF_RUNNING)) ==
 			(IFF_UP | IFF_RUNNING)) {
 mutex_enter(sc-sc_write_mtx);
-urtwn_set_chan(sc, ic-ic_ibss_chan,
+urtwn_set_chan(sc, ic-ic_curchan,
 IEEE80211_HTINFO_2NDCHAN_NONE);
 mutex_exit(sc-sc_write_mtx);
 			}
@@ -3787,8 +3787,8 @@ urtwn_init(struct ifnet *ifp)
 	urtwn_write_1(sc, 0x15, 0xe9);
 
 	/* Set default channel. */
-	ic-ic_bss-ni_chan = ic-ic_ibss_chan;
-	urtwn_set_chan(sc, ic-ic_ibss_chan, IEEE80211_HTINFO_2NDCHAN_NONE);
+	ic-ic_bss-ni_chan = ic-ic_curchan;
+	urtwn_set_chan(sc, ic-ic_curchan, IEEE80211_HTINFO_2NDCHAN_NONE);
 
 	/* Queue Rx xfers. */
 	for (i = 0; i  URTWN_RX_LIST_COUNT; i++) {



CVS commit: src/external/cddl/osnet/usr.bin/ctfconvert

2013-01-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 20 23:51:40 UTC 2013

Modified Files:
src/external/cddl/osnet/usr.bin/ctfconvert: ctfconvert.1

Log Message:
Put optional args before non-optional ones.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1

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

Modified files:

Index: src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1
diff -u src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1:1.2 src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1:1.3
--- src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1:1.2	Sat Jan 19 01:22:12 2013
+++ src/external/cddl/osnet/usr.bin/ctfconvert/ctfconvert.1	Sun Jan 20 23:51:40 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: ctfconvert.1,v 1.2 2013/01/19 01:22:12 wiz Exp $
+.\ $NetBSD: ctfconvert.1,v 1.3 2013/01/20 23:51:40 wiz Exp $
 .\
 .\ Copyright (c) 2010 The FreeBSD Foundation
 .\ All rights reserved.
@@ -38,9 +38,9 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl gis
+.Op Fl o Ar outfile
 .Fl L Ar labelenv
 .Fl l Ar label
-.Op Fl o Ar outfile
 .Ar object_file
 .Sh DESCRIPTION
 The



CVS commit: src/usr.bin/calendar/calendars

2013-01-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Jan 20 23:52:43 UTC 2013

Modified Files:
src/usr.bin/calendar/calendars: calendar.holiday

Log Message:
We only need to be told once about Lee-Jackson Day in Virginia today.
Remove a duplicate for Memorial Day in Michigan while we're here.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/calendar/calendars/calendar.holiday

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/calendar/calendars/calendar.holiday
diff -u src/usr.bin/calendar/calendars/calendar.holiday:1.20 src/usr.bin/calendar/calendars/calendar.holiday:1.21
--- src/usr.bin/calendar/calendars/calendar.holiday:1.20	Sat May  5 01:29:56 2012
+++ src/usr.bin/calendar/calendars/calendar.holiday	Sun Jan 20 23:52:43 2013
@@ -28,7 +28,6 @@
 01/21*	Lee-Jackson Day in Virginia (3rd Monday)
 01/21*	Robert E. Lee's Birthday in Alabama  Mississippi (3rd Monday)
 01/21	Our Lady of Altagracia in Dominican Republic
-01/21*	Lee-Jackson Day in Virginia (3rd Monday)
 01/23	Feast of St. Ildefonsus
 01/23	National Handwriting Day
 01/24	Economic Liberation Day in Togo
@@ -165,7 +164,6 @@
 05/18	Flag Day in Haiti
 05/18	Prayer Day in Denmark
 05/19	Youth and Sports Day in Turkey
-05/20*	Memorial Day in Michigan (3rd Monday)
 05/20	Mecklenburg Independence Day in North Carolina
 05/20	National Day in Cameroon
 05/20*	Memorial Day in Michigan (3rd Monday)



CVS commit: src/sys/dev/usb

2013-01-20 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 21 00:02:11 UTC 2013

Modified Files:
src/sys/dev/usb: if_urtwn.c

Log Message:
ic-ic_bss-ni_chan - ic-ic_curchan


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/if_urtwn.c

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.13 src/sys/dev/usb/if_urtwn.c:1.14
--- src/sys/dev/usb/if_urtwn.c:1.13	Sun Jan 20 23:13:43 2013
+++ src/sys/dev/usb/if_urtwn.c	Mon Jan 21 00:02:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.13 2013/01/20 23:13:43 jmcneill Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.14 2013/01/21 00:02:11 jmcneill Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.13 2013/01/20 23:13:43 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.14 2013/01/21 00:02:11 jmcneill Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -1570,7 +1570,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc
 		  R92C_BCN_CTRL_DIS_TSF_UDT0);
 
 		/* Back to 20MHz mode */
-		urtwn_set_chan(sc, ic-ic_bss-ni_chan,
+		urtwn_set_chan(sc, ic-ic_curchan,
 		IEEE80211_HTINFO_2NDCHAN_NONE);
 
 		if (ic-ic_opmode == IEEE80211_M_IBSS ||
@@ -2153,8 +2153,8 @@ urtwn_tx(struct urtwn_softc *sc, struct 
 		struct urtwn_tx_radiotap_header *tap = sc-sc_txtap;
 
 		tap-wt_flags = 0;
-		tap-wt_chan_freq = htole16(ic-ic_bss-ni_chan-ic_freq);
-		tap-wt_chan_flags = htole16(ic-ic_bss-ni_chan-ic_flags);
+		tap-wt_chan_freq = htole16(ic-ic_curchan-ic_freq);
+		tap-wt_chan_flags = htole16(ic-ic_curchan-ic_flags);
 		if (wh-i_fc[1]  IEEE80211_FC1_WEP)
 			tap-wt_flags |= IEEE80211_RADIOTAP_F_WEP;
 
@@ -3787,7 +3787,6 @@ urtwn_init(struct ifnet *ifp)
 	urtwn_write_1(sc, 0x15, 0xe9);
 
 	/* Set default channel. */
-	ic-ic_bss-ni_chan = ic-ic_curchan;
 	urtwn_set_chan(sc, ic-ic_curchan, IEEE80211_HTINFO_2NDCHAN_NONE);
 
 	/* Queue Rx xfers. */



CVS commit: src/usr.bin/grep

2013-01-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jan 21 03:24:43 UTC 2013

Modified Files:
src/usr.bin/grep: util.c

Log Message:
Fix memory leak in  file_matching().


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/grep/util.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/grep/util.c
diff -u src/usr.bin/grep/util.c:1.16 src/usr.bin/grep/util.c:1.17
--- src/usr.bin/grep/util.c:1.16	Sun May  6 22:32:05 2012
+++ src/usr.bin/grep/util.c	Mon Jan 21 03:24:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.16 2012/05/06 22:32:05 joerg Exp $	*/
+/*	$NetBSD: util.c,v 1.17 2013/01/21 03:24:43 msaitoh Exp $	*/
 /*	$FreeBSD: head/usr.bin/grep/util.c 211496 2010-08-19 09:28:59Z des $	*/
 /*	$OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $	*/
 
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: util.c,v 1.16 2012/05/06 22:32:05 joerg Exp $);
+__RCSID($NetBSD: util.c,v 1.17 2013/01/21 03:24:43 msaitoh Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -74,9 +74,10 @@ file_matching(const char *fname)
 	for (i = 0; i  fpatterns; ++i) {
 		if (fnmatch(fpattern[i].pat, fname, 0) == 0 ||
 		fnmatch(fpattern[i].pat, fname_base, 0) == 0) {
-			if (fpattern[i].mode == EXCL_PAT)
+			if (fpattern[i].mode == EXCL_PAT) {
+free(fname_copy);
 return (false);
-			else
+			} else
 ret = true;
 		}
 	}



CVS commit: src/sys/dev/usb

2013-01-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 21 07:37:06 UTC 2013

Modified Files:
src/sys/dev/usb: dwc_otg.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/dwc_otg.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/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.28 src/sys/dev/usb/dwc_otg.c:1.29
--- src/sys/dev/usb/dwc_otg.c:1.28	Sat Jan 19 14:33:51 2013
+++ src/sys/dev/usb/dwc_otg.c	Mon Jan 21 07:37:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.28 2013/01/19 14:33:51 skrll Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.29 2013/01/21 07:37:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.28 2013/01/19 14:33:51 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.29 2013/01/21 07:37:06 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1182,10 +1182,10 @@ dwc_otg_root_intr_transfer(usbd_xfer_han
 	err = usb_insert_transfer(xfer);
 	mutex_exit(sc-sc_lock);
 	if (err)
-		return (err);
+		return err;
 
 	/* Pipe isn't running, start first */
-	return (dwc_otg_root_intr_start(SIMPLEQ_FIRST(xfer-pipe-queue)));
+	return dwc_otg_root_intr_start(SIMPLEQ_FIRST(xfer-pipe-queue));
 }
 
 Static usbd_status
@@ -1197,14 +1197,14 @@ dwc_otg_root_intr_start(usbd_xfer_handle
 	DPRINTF(\n);
 
 	if (sc-sc_dying)
-		return (USBD_IOERROR);
+		return USBD_IOERROR;
 
 	mutex_enter(sc-sc_lock);
 	KASSERT(sc-sc_intrxfer == NULL);
 	sc-sc_intrxfer = xfer;
 	mutex_exit(sc-sc_lock);
 
-	return (USBD_IN_PROGRESS);
+	return USBD_IN_PROGRESS;
 }
 
 /* Abort a root interrupt request. */
@@ -1262,10 +1262,10 @@ dwc_otg_device_ctrl_transfer(usbd_xfer_h
 	err = usb_insert_transfer(xfer);
 	mutex_exit(sc-sc_lock);
 	if (err)
-		return (err);
+		return err;
 
 	/* Pipe isn't running, start first */
-	return (dwc_otg_device_ctrl_start(SIMPLEQ_FIRST(xfer-pipe-queue)));
+	return dwc_otg_device_ctrl_start(SIMPLEQ_FIRST(xfer-pipe-queue));
 }
 
 Static usbd_status
@@ -1346,7 +1346,7 @@ dwc_otg_device_bulk_transfer(usbd_xfer_h
 		return err;
 
 	/* Pipe isn't running, start first */
-	return (dwc_otg_device_bulk_start(SIMPLEQ_FIRST(xfer-pipe-queue)));
+	return dwc_otg_device_bulk_start(SIMPLEQ_FIRST(xfer-pipe-queue));
 }
 
 Static usbd_status
@@ -1423,7 +1423,7 @@ dwc_otg_device_intr_transfer(usbd_xfer_h
 		return err;
 
 	/* Pipe isn't running, start first */
-	return (dwc_otg_device_intr_start(SIMPLEQ_FIRST(xfer-pipe-queue)));
+	return dwc_otg_device_intr_start(SIMPLEQ_FIRST(xfer-pipe-queue));
 }
 
 Static usbd_status
@@ -1517,7 +1517,7 @@ dwc_otg_device_isoc_transfer(usbd_xfer_h
 		return err;
 
 	/* Pipe isn't running, start first */
-	return (dwc_otg_device_isoc_start(SIMPLEQ_FIRST(xfer-pipe-queue)));
+	return dwc_otg_device_isoc_start(SIMPLEQ_FIRST(xfer-pipe-queue));
 }
 
 #if 0
@@ -2192,11 +2192,11 @@ dwc_otg_host_channel_wait(struct dwc_otg
 
 	if (sc-sc_chan_state[x].wait_sof == 0) {
 		dwc_otg_clear_hcint(sc, x);
-		return (1);	/* done */
+		return 1;	/* done */
 	}
 
 	if (x == 0)
-		return (0);	/* wait */
+		return 0;	/* wait */
 
 	/* find new disabled channel */
 	for (x = 1; x != sc-sc_host_ch_max; x++) {
@@ -2234,9 +2234,9 @@ dwc_otg_host_channel_wait(struct dwc_otg
 		/* set channel */
 		td-channel = x;
 
-		return (1);	/* new channel allocated */
+		return 1;	/* new channel allocated */
 	}
-	return (0);	/* wait */
+	return 0;	/* wait */
 }
 
 static uint8_t
@@ -2249,7 +2249,7 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 	DPRINTFN(9, \n);
 
 	if (td-channel  DWC_OTG_MAX_CHANNELS) {
-		return (0);		/* already allocated */
+		return 0;		/* already allocated */
 	}
 
 	/* get pointer to softc */
@@ -2284,9 +2284,9 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 		/* set channel */
 		td-channel = x;
 
-		return (0);	/* allocated */
+		return 0;	/* allocated */
 	}
-	return (1);	/* busy */
+	return 1;	/* busy */
 }
 
 static void
@@ -2351,7 +2351,7 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 	uint32_t hcchar;
 
 	if (dwc_otg_host_channel_alloc(td))
-		return (1);		/* busy */
+		return 1;		/* busy */
 
 	/* get pointer to softc */
 	sc = DWC_OTG_TD2SC(td);
@@ -2369,12 +2369,12 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 		DPRINTF(CH=%d STALL\n, td-channel);
 		td-error_stall = 1;
 		td-error_any = 1;
-		return (0);		/* complete */
+		return 0;		/* complete */
 	} else if (hcint  HCINT_ERRORS) {
 		td-errcnt++;
 		if (td-hcsplt != 0 || td-errcnt = 3) {
 			td-error_any = 1;
-			return (0);		/* complete */
+			return 0;		/* complete */
 		}
 	}
 
@@ -2405,7 +2405,7 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 			td-offset += td-tx_bytes;
 			td-remainder -= td-tx_bytes;
 			td-toggle = 1;
-			return (0);	/* complete */
+			return 0;	/* complete */
 		}
 		break;
 	case DWC_CHAN_ST_WAIT_S_ANE:
@@ -2439,7 +2439,7 @@ 

CVS commit: src/sys/dev/usb

2013-01-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 21 07:39:59 UTC 2013

Modified Files:
src/sys/dev/usb: dwc_otg.c

Log Message:
Don't panic when trying to do isoc transfer, just return an error.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/dwc_otg.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/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.29 src/sys/dev/usb/dwc_otg.c:1.30
--- src/sys/dev/usb/dwc_otg.c:1.29	Mon Jan 21 07:37:06 2013
+++ src/sys/dev/usb/dwc_otg.c	Mon Jan 21 07:39:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.29 2013/01/21 07:37:06 skrll Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.30 2013/01/21 07:39:59 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.29 2013/01/21 07:37:06 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.30 2013/01/21 07:39:59 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1507,12 +1507,13 @@ dwc_otg_device_isoc_transfer(usbd_xfer_h
 	usbd_status err;
 
 	DPRINTF(\n);
-	panic(not yet\n);
 
 	/* Insert last in queue. */
 	mutex_enter(sc-sc_lock);
 	err = usb_insert_transfer(xfer);
 	mutex_exit(sc-sc_lock);
+
+	err = USBD_IOERROR;
 	if (err)
 		return err;