CVS commit: src/sys/arch

2018-11-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov  8 06:49:09 UTC 2018

Modified Files:
src/sys/arch/arm/s3c2xx0: s3c2800_pci.c
src/sys/arch/evbarm/ifpga: ifpga_pci.c

Log Message:
Fix build after recent arm32_pci_chipset change


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/ifpga/ifpga_pci.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/s3c2xx0/s3c2800_pci.c
diff -u src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.23 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.24
--- src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.23	Wed Apr 19 12:34:14 2017
+++ src/sys/arch/arm/s3c2xx0/s3c2800_pci.c	Thu Nov  8 06:49:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: s3c2800_pci.c,v 1.23 2017/04/19 12:34:14 jmcneill Exp $	*/
+/*	$NetBSD: s3c2800_pci.c,v 1.24 2018/11/08 06:49:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002 Fujitsu Component Limited
@@ -100,7 +100,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.23 2017/04/19 12:34:14 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.24 2018/11/08 06:49:09 skrll Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -202,6 +202,7 @@ struct arm32_pci_chipset sspci_chipset =
 	s3c2800_pci_bus_maxdevs,
 	s3c2800_pci_make_tag,
 	s3c2800_pci_decompose_tag,
+	NULL,
 	s3c2800_pci_conf_read,
 	s3c2800_pci_conf_write,
 	NULL,		/* intr_v */

Index: src/sys/arch/evbarm/ifpga/ifpga_pci.c
diff -u src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.22 src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.23
--- src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.22	Fri Nov  2 13:46:24 2018
+++ src/sys/arch/evbarm/ifpga/ifpga_pci.c	Thu Nov  8 06:49:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifpga_pci.c,v 1.22 2018/11/02 13:46:24 maya Exp $	*/
+/*	$NetBSD: ifpga_pci.c,v 1.23 2018/11/08 06:49:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -64,7 +64,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.22 2018/11/02 13:46:24 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.23 2018/11/08 06:49:09 skrll Exp $");
 
 #include 
 #include 
@@ -107,6 +107,7 @@ struct arm32_pci_chipset ifpga_pci_chips
 	ifpga_pci_bus_maxdevs,
 	ifpga_pci_make_tag,
 	ifpga_pci_decompose_tag,
+	NULL,
 	ifpga_pci_conf_read,
 	ifpga_pci_conf_write,
 	NULL,	/* intr_v */



CVS commit: src/sys/dev/pci

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 06:44:50 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
"s/ are are / are /" in comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1350 -r1.1351 src/sys/dev/pci/pcidevs

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.1350 src/sys/dev/pci/pcidevs:1.1351
--- src/sys/dev/pci/pcidevs:1.1350	Thu Nov  8 04:04:42 2018
+++ src/sys/dev/pci/pcidevs	Thu Nov  8 06:44:50 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1350 2018/11/08 04:04:42 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1351 2018/11/08 06:44:50 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -7028,7 +7028,7 @@ product SCHNEIDERKOCH	SKNET_FDDI	0x4000	
 product SCHNEIDERKOCH	SKNET_GE	0x4300	SK-NET GE
 product SCHNEIDERKOCH	SK9821v2	0x4320	SK-9821 v2.0
 product SCHNEIDERKOCH	SK_9DX1		0x4400	SK-NET SK-9DX1 Gigabit Ethernet
-/* These next two are are really subsystem IDs */
+/* These next two are really subsystem IDs */
 product SCHNEIDERKOCH	SK_9D21		0x4421	SK-9D21 1000BASE-T
 product SCHNEIDERKOCH	SK_9D41		0x4441	SK-9D41 1000BASE-X
 



CVS commit: src

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 06:43:52 UTC 2018

Modified Files:
src/lib/libc/gen: pwcache.c
src/sys/arch/sgimips/sgimips: arcemu.c
src/sys/dev/ic: ds1687reg.h
src/sys/netinet: tcp_input.c

Log Message:
"s/ an an / an /" in comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gen/pwcache.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sgimips/sgimips/arcemu.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/ds1687reg.h
cvs rdiff -u -r1.412 -r1.413 src/sys/netinet/tcp_input.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/libc/gen/pwcache.c
diff -u src/lib/libc/gen/pwcache.c:1.31 src/lib/libc/gen/pwcache.c:1.32
--- src/lib/libc/gen/pwcache.c:1.31	Tue Mar 23 20:28:59 2010
+++ src/lib/libc/gen/pwcache.c	Thu Nov  8 06:43:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $	*/
+/*	$NetBSD: pwcache.c,v 1.32 2018/11/08 06:43:52 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -74,7 +74,7 @@
 #if 0
 static char sccsid[] = "@(#)cache.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $");
+__RCSID("$NetBSD: pwcache.c,v 1.32 2018/11/08 06:43:52 msaitoh Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -166,7 +166,7 @@ st_hash(const char *name, size_t len, in
 
 /*
  * uidtb_start
- *	creates an an empty uidtb
+ *	creates an empty uidtb
  * Return:
  *	0 if ok, -1 otherwise
  */
@@ -187,7 +187,7 @@ uidtb_start(void)
 
 /*
  * gidtb_start
- *	creates an an empty gidtb
+ *	creates an empty gidtb
  * Return:
  *	0 if ok, -1 otherwise
  */
@@ -208,7 +208,7 @@ gidtb_start(void)
 
 /*
  * usrtb_start
- *	creates an an empty usrtb
+ *	creates an empty usrtb
  * Return:
  *	0 if ok, -1 otherwise
  */
@@ -229,7 +229,7 @@ usrtb_start(void)
 
 /*
  * grptb_start
- *	creates an an empty grptb
+ *	creates an empty grptb
  * Return:
  *	0 if ok, -1 otherwise
  */

Index: src/sys/arch/sgimips/sgimips/arcemu.c
diff -u src/sys/arch/sgimips/sgimips/arcemu.c:1.23 src/sys/arch/sgimips/sgimips/arcemu.c:1.24
--- src/sys/arch/sgimips/sgimips/arcemu.c:1.23	Thu Feb  8 09:05:18 2018
+++ src/sys/arch/sgimips/sgimips/arcemu.c	Thu Nov  8 06:43:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcemu.c,v 1.23 2018/02/08 09:05:18 dholland Exp $	*/
+/*	$NetBSD: arcemu.c,v 1.24 2018/11/08 06:43:52 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2004 Steve Rumble 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.23 2018/02/08 09:05:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.24 2018/11/08 06:43:52 msaitoh Exp $");
 
 #ifndef _LP64
 
@@ -507,7 +507,7 @@ arcemu_ip6_GetMemoryDescriptor(void *mem
 	if (memcfg & 0x10) {
 		pages *= 4096;
 
-#if 0 // may cause an an exception and bring us down in flames; disable until tested
+#if 0 // may cause an exception and bring us down in flames; disable until tested
 		/* check for aliasing and adjust page count if necessary */
 		volatile uint8_t *tp1, *tp2;
 		uint8_t tmp;

Index: src/sys/dev/ic/ds1687reg.h
diff -u src/sys/dev/ic/ds1687reg.h:1.10 src/sys/dev/ic/ds1687reg.h:1.11
--- src/sys/dev/ic/ds1687reg.h:1.10	Sun May  4 12:50:38 2008
+++ src/sys/dev/ic/ds1687reg.h	Thu Nov  8 06:43:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ds1687reg.h,v 1.10 2008/05/04 12:50:38 martin Exp $ 	*/
+/*	$NetBSD: ds1687reg.h,v 1.11 2018/11/08 06:43:52 msaitoh Exp $ 	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  * The DS1686 contains 14 basic clock-related registers and 50 bytes of
  * user RAM laid out for compatibility with the register layout of the
  * DS1287/MC14818 chips.  It also includes an extended mode which allows
- * access to these same basic registers as well an an extended register
+ * access to these same basic registers as well an extended register
  * set and NVRAM area; this extended register set includes a century
  * register for Y2k compliant date storage.
  *

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.412 src/sys/netinet/tcp_input.c:1.413
--- src/sys/netinet/tcp_input.c:1.412	Fri Sep 14 05:09:51 2018
+++ src/sys/netinet/tcp_input.c	Thu Nov  8 06:43:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.412 2018/09/14 05:09:51 maxv Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.413 2018/11/08 06:43:52 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.412 2018/09/14 05:09:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.413 2018/11/08 06:43:52 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1817,7 +1817,7 @@ after_listen:
 		 * ts_rtt is increased by 1 to denote a valid sample,
 		 * with 0 indicating an invalid measurement.  This
 		 * extra 1 must be removed when ts_rtt is u

CVS commit: src

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 06:34:40 UTC 2018

Modified Files:
src/lib/libform: internals.c
src/sbin/fsck_ffs: dir.c
src/sys/dev/pci: twereg.h
src/sys/netinet: sctputil.c

Log Message:
"s/ are are / are /" in comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libform/internals.c
cvs rdiff -u -r1.58 -r1.59 src/sbin/fsck_ffs/dir.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/twereg.h
cvs rdiff -u -r1.13 -r1.14 src/sys/netinet/sctputil.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/internals.c
diff -u src/lib/libform/internals.c:1.38 src/lib/libform/internals.c:1.39
--- src/lib/libform/internals.c:1.38	Wed Mar  9 19:47:13 2016
+++ src/lib/libform/internals.c	Thu Nov  8 06:34:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: internals.c,v 1.38 2016/03/09 19:47:13 christos Exp $	*/
+/*	$NetBSD: internals.c,v 1.39 2018/11/08 06:34:40 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: internals.c,v 1.38 2016/03/09 19:47:13 christos Exp $");
+__RCSID("$NetBSD: internals.c,v 1.39 2018/11/08 06:34:40 msaitoh Exp $");
 
 #include 
 #include 
@@ -1845,7 +1845,7 @@ _formi_add_char(FIELD *field, unsigned i
 	if (pos >= row->length) {
 		  /* make sure the string is terminated if we are at the
 		   * end of the string, the terminator would be missing
-		   * if we are are at the end of the field.
+		   * if we are at the end of the field.
 		   */
 		row->string[pos + 1] = '\0';
 	}

Index: src/sbin/fsck_ffs/dir.c
diff -u src/sbin/fsck_ffs/dir.c:1.58 src/sbin/fsck_ffs/dir.c:1.59
--- src/sbin/fsck_ffs/dir.c:1.58	Wed Feb  8 16:11:40 2017
+++ src/sbin/fsck_ffs/dir.c	Thu Nov  8 06:34:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.58 2017/02/08 16:11:40 rin Exp $	*/
+/*	$NetBSD: dir.c,v 1.59 2018/11/08 06:34:40 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dir.c	8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: dir.c,v 1.58 2017/02/08 16:11:40 rin Exp $");
+__RCSID("$NetBSD: dir.c,v 1.59 2018/11/08 06:34:40 msaitoh Exp $");
 #endif
 #endif /* not lint */
 
@@ -172,7 +172,7 @@ dirscan(struct inodesc *idesc)
 	}
 
 	/*
-	 * If we are are swapping byte order in directory entries, just swap
+	 * If we are swapping byte order in directory entries, just swap
 	 * this block and return.
 	 */
 	if (do_dirswap) {

Index: src/sys/dev/pci/twereg.h
diff -u src/sys/dev/pci/twereg.h:1.15 src/sys/dev/pci/twereg.h:1.16
--- src/sys/dev/pci/twereg.h:1.15	Mon Sep  8 23:36:54 2008
+++ src/sys/dev/pci/twereg.h	Thu Nov  8 06:34:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: twereg.h,v 1.15 2008/09/08 23:36:54 gmcgarry Exp $	*/
+/*	$NetBSD: twereg.h,v 1.16 2018/11/08 06:34:40 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -190,7 +190,7 @@ struct twe_param {
  * From 3ware's documentation:
  *
  *   All parameters maintained by the controller are grouped into related
- *   tables.  Tables are are accessed indirectly via get and set parameter
+ *   tables.  Tables are accessed indirectly via get and set parameter
  *   commands.  To access a specific parameter in a table, the table ID and
  *   parameter index are used to uniquely identify a parameter.  Table
  *   0x is the directory table and provides a list of the table IDs and

Index: src/sys/netinet/sctputil.c
diff -u src/sys/netinet/sctputil.c:1.13 src/sys/netinet/sctputil.c:1.14
--- src/sys/netinet/sctputil.c:1.13	Mon Sep  3 16:29:36 2018
+++ src/sys/netinet/sctputil.c	Thu Nov  8 06:34:40 2018
@@ -1,5 +1,5 @@
 /*	$KAME: sctputil.c,v 1.39 2005/06/16 20:54:06 jinmei Exp $	*/
-/*	$NetBSD: sctputil.c,v 1.13 2018/09/03 16:29:36 riastradh Exp $	*/
+/*	$NetBSD: sctputil.c,v 1.14 2018/11/08 06:34:40 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sctputil.c,v 1.13 2018/09/03 16:29:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctputil.c,v 1.14 2018/11/08 06:34:40 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2027,7 +2027,7 @@ sctp_notify_assoc_change(u_int32_t event
 	printf("notify: %d\n", event);
 #endif
 	/*
-	 * First if we are are going down dump everything we
+	 * First if we are going down dump everything we
 	 * can to the socket rcv queue.
 	 */
 	if ((event == SCTP_SHUTDOWN_COMP) || (event == SCTP_COMM_LOST)) {



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

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 06:23:48 UTC 2018

Modified Files:
src/sys/arch/i386/i386: multiboot.c

Log Message:
"s/ is is / is /" in comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/i386/i386/multiboot.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/i386/multiboot.c
diff -u src/sys/arch/i386/i386/multiboot.c:1.23 src/sys/arch/i386/i386/multiboot.c:1.24
--- src/sys/arch/i386/i386/multiboot.c:1.23	Mon May 30 17:45:26 2016
+++ src/sys/arch/i386/i386/multiboot.c	Thu Nov  8 06:23:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: multiboot.c,v 1.23 2016/05/30 17:45:26 dholland Exp $	*/
+/*	$NetBSD: multiboot.c,v 1.24 2018/11/08 06:23:48 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.23 2016/05/30 17:45:26 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.24 2018/11/08 06:23:48 msaitoh Exp $");
 
 #include "opt_multiboot.h"
 
@@ -519,7 +519,7 @@ setup_bootpath(struct multiboot_info *mi
  * Sets up the console bootinfo structure if the user gave a 'console'
  * argument on the boot command line.  The Multiboot information
  * structure gives no hint about this, so the only way to know where the
- * console is is to let the user specify it.
+ * console is to let the user specify it.
  *
  * If there wasn't any 'console' argument, this does not generate any
  * bootinfo entry, falling back to the kernel's default console.



CVS commit: src/sys

2018-11-07 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov  8 04:30:38 UTC 2018

Modified Files:
src/sys/kern: uipc_usrreq.c
src/sys/netipsec: keysock.c

Log Message:
Don't call soroverflow when we return the error to the sender.

Thanks to thorpej@ for a sanity check.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.65 -r1.66 src/sys/netipsec/keysock.c

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

Modified files:

Index: src/sys/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.186 src/sys/kern/uipc_usrreq.c:1.187
--- src/sys/kern/uipc_usrreq.c:1.186	Fri May 11 09:43:59 2018
+++ src/sys/kern/uipc_usrreq.c	Thu Nov  8 04:30:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.186 2018/05/11 09:43:59 roy Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.187 2018/11/08 04:30:37 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.186 2018/05/11 09:43:59 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.187 2018/11/08 04:30:37 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -345,11 +345,13 @@ unp_output(struct mbuf *m, struct mbuf *
 		unp_dispose(control);
 		m_freem(control);
 		m_freem(m);
-		soroverflow(so2);
-		return (ENOBUFS);
+		/* Don't call soroverflow because we're returning this
+		 * error directly to the sender. */
+		so2->so_rcv.sb_overflowed++;
+		return ENOBUFS;
 	} else {
 		sorwakeup(so2);
-		return (0);
+		return 0;
 	}
 }
 

Index: src/sys/netipsec/keysock.c
diff -u src/sys/netipsec/keysock.c:1.65 src/sys/netipsec/keysock.c:1.66
--- src/sys/netipsec/keysock.c:1.65	Thu Apr 26 19:50:09 2018
+++ src/sys/netipsec/keysock.c	Thu Nov  8 04:30:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: keysock.c,v 1.65 2018/04/26 19:50:09 maxv Exp $	*/
+/*	$NetBSD: keysock.c,v 1.66 2018/11/08 04:30:38 roy Exp $	*/
 /*	$FreeBSD: keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.65 2018/04/26 19:50:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.66 2018/11/08 04:30:38 roy Exp $");
 
 /* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */
 
@@ -207,7 +207,9 @@ key_sendup0(
 		__func__);
 		PFKEY_STATINC(PFKEY_STAT_IN_NOMEM);
 		m_freem(m);
-		soroverflow(rp->rcb_socket);
+		/* Don't call soroverflow because we're returning this
+		 * error directly to the sender. */
+		rp->rcb_socket->so_rcv.sb_overflowed++;
 		error = ENOBUFS;
 	} else {
 		sorwakeup(rp->rcb_socket);



CVS commit: src/sys/dev/pci

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 04:05:11 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
 Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1340 -r1.1341 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1339 -r1.1340 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.1340 src/sys/dev/pci/pcidevs.h:1.1341
--- src/sys/dev/pci/pcidevs.h:1.1340	Tue Oct 16 00:08:51 2018
+++ src/sys/dev/pci/pcidevs.h	Thu Nov  8 04:05:10 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1340 2018/10/16 00:08:51 jmcneill Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1341 2018/11/08 04:05:10 msaitoh Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1349 2018/10/16 00:07:08 jmcneill Exp
+ *	NetBSD: pcidevs,v 1.1350 2018/11/08 04:04:42 msaitoh Exp
  */
 
 /*
@@ -5054,6 +5054,8 @@
 #define	PCI_PRODUCT_INTEL_100SERIES_LP_I2C_1	0x9d61		/* 100 Series I2C 1 */
 #define	PCI_PRODUCT_INTEL_100SERIES_LP_I2C_2	0x9d62		/* 100 Series I2C 2 */
 #define	PCI_PRODUCT_INTEL_100SERIES_LP_I2C_3	0x9d63		/* 100 Series I2C 3 */
+#define	PCI_PRODUCT_INTEL_100SERIES_LP_I2C_4	0x9d64		/* 100 Series I2C 4 */
+#define	PCI_PRODUCT_INTEL_100SERIES_LP_I2C_5	0x9d65		/* 100 Series I2C 5 */
 #define	PCI_PRODUCT_INTEL_100SERIES_LP_UART_2	0x9d66		/* 100 Series UART 2 */
 #define	PCI_PRODUCT_INTEL_100SERIES_LP_HDA	0x9d70		/* 100 Series HD Audio */
 #define	PCI_PRODUCT_INTEL_2HS_U_HDA	0x9d71		/* 200 Series HD Audio */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1339 src/sys/dev/pci/pcidevs_data.h:1.1340
--- src/sys/dev/pci/pcidevs_data.h:1.1339	Tue Oct 16 00:08:51 2018
+++ src/sys/dev/pci/pcidevs_data.h	Thu Nov  8 04:05:11 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1339 2018/10/16 00:08:51 jmcneill Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1340 2018/11/08 04:05:11 msaitoh Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1349 2018/10/16 00:07:08 jmcneill Exp
+ *	NetBSD: pcidevs,v 1.1350 2018/11/08 04:04:42 msaitoh Exp
  */
 
 /*
@@ -8824,6 +8824,10 @@ static const uint16_t pci_products[] = {
 	6043, 6377, 18823, 6312, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_LP_I2C_3, 
 	6043, 6377, 18823, 6323, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_LP_I2C_4, 
+	6043, 6377, 18823, 6687, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_LP_I2C_5, 
+	6043, 6377, 18823, 7985, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_LP_UART_2, 
 	6043, 6377, 11517, 6312, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_LP_HDA, 
@@ -13993,7 +13997,7 @@ static const char pci_words[] = { "." 
 	"3c905B-T4\0" /* 1 refs @ 6010 */
 	"3c905B-COMBO\0" /* 1 refs @ 6020 */
 	"3c905B-FX\0" /* 1 refs @ 6033 */
-	"100\0" /* 97 refs @ 6043 */
+	"100\0" /* 99 refs @ 6043 */
 	"3c905C-TX\0" /* 1 refs @ 6047 */
 	"w/\0" /* 48 refs @ 6057 */
 	"mngmt\0" /* 2 refs @ 6060 */
@@ -14036,7 +14040,7 @@ static const char pci_words[] = { "." 
 	"RAID\0" /* 52 refs @ 6351 */
 	"Controller\0" /* 972 refs @ 6356 */
 	"7000/8000\0" /* 1 refs @ 6367 */
-	"Series\0" /* 350 refs @ 6377 */
+	"Series\0" /* 352 refs @ 6377 */
 	"9000\0" /* 5 refs @ 6384 */
 	"9550\0" /* 1 refs @ 6389 */
 	"9650\0" /* 1 refs @ 6394 */
@@ -14079,7 +14083,7 @@ static const char pci_words[] = { "." 
 	"serial\0" /* 13 refs @ 6662 */
 	"PCI-1604\0" /* 1 refs @ 6669 */
 	"PCI-1610\0" /* 1 refs @ 6678 */
-	"4\0" /* 34 refs @ 6687 */
+	"4\0" /* 35 refs @ 6687 */
 	"port\0" /* 19 refs @ 6689 */
 	"PCI-1612\0" /* 1 refs @ 6694 */
 	"PCI-1620\0" /* 2 refs @ 6703 */
@@ -14249,7 +14253,7 @@ static const char pci_words[] = { "." 
 	"Function\0" /* 37 refs @ 7972 */
 	"0\0" /* 86 refs @ 7981 */
 	"1\0" /* 95 refs @ 7983 */
-	"5\0" /* 15 refs @ 7985 */
+	"5\0" /* 16 refs @ 7985 */
 	"Root\0" /* 156 refs @ 7987 */
 	"Complex\0" /* 7 refs @ 7992 */
 	"Port\0" /* 295 refs @ 8000 */
@@ -15786,7 +15790,7 @@ static const char pci_words[] = { "." 
 	"AC\0" /* 15 refs @ 18810 */
 	"7260\0" /* 2 refs @ 18813 */
 	"3160\0" /* 2 refs @ 18818 */
-	"I2C\0" /* 46 refs @ 18823 */
+	"I2C\0" /* 48 refs @ 18823 */
 	"GPIO\0" /* 4 refs @ 18827 */
 	"SPI\0" /* 17 refs @ 18832 */
 	"HS-UART\0" /* 1 refs @ 18836 */



CVS commit: src/sys/dev/pci

2018-11-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov  8 04:04:42 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add two otehr I2C devices of Intel.


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/sys/dev/pci/pcidevs

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.1349 src/sys/dev/pci/pcidevs:1.1350
--- src/sys/dev/pci/pcidevs:1.1349	Tue Oct 16 00:07:08 2018
+++ src/sys/dev/pci/pcidevs	Thu Nov  8 04:04:42 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1349 2018/10/16 00:07:08 jmcneill Exp $
+$NetBSD: pcidevs,v 1.1350 2018/11/08 04:04:42 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -5047,6 +5047,8 @@ product INTEL 100SERIES_LP_I2C_0 0x9d60	
 product INTEL 100SERIES_LP_I2C_1 0x9d61	100 Series I2C 1
 product INTEL 100SERIES_LP_I2C_2 0x9d62	100 Series I2C 2
 product INTEL 100SERIES_LP_I2C_3 0x9d63	100 Series I2C 3
+product INTEL 100SERIES_LP_I2C_4 0x9d64	100 Series I2C 4
+product INTEL 100SERIES_LP_I2C_5 0x9d65	100 Series I2C 5
 product INTEL 100SERIES_LP_UART_2 0x9d66 100 Series UART 2
 product INTEL 100SERIES_LP_HDA	0x9d70	100 Series HD Audio
 product INTEL 2HS_U_HDA		0x9d71	200 Series HD Audio



CVS commit: src/external/gpl3/binutils/dist/bfd

2018-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  8 02:30:06 UTC 2018

Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd

Log Message:
delete i386 aout vec which has been removed


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/external/gpl3/binutils/dist/bfd/config.bfd

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

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/config.bfd
diff -u src/external/gpl3/binutils/dist/bfd/config.bfd:1.26 src/external/gpl3/binutils/dist/bfd/config.bfd:1.27
--- src/external/gpl3/binutils/dist/bfd/config.bfd:1.26	Tue Nov  6 20:13:51 2018
+++ src/external/gpl3/binutils/dist/bfd/config.bfd	Wed Nov  7 21:30:06 2018
@@ -620,7 +620,7 @@ case "${targ}" in
 ;;
   i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
 targ_defvec=i386_elf32_vec
-targ_selvecs="i386_aout_nbsd_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec"
+targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_pei_vec"
 targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec x86_64_pei_vec"
 ;;
   i[3-7]86-*-netbsdpe*)



CVS commit: src/external/gpl3/binutils

2018-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  8 02:30:15 UTC 2018

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/i386: bfd.h bfd_stdint.h
bfdver.h config.h defs.mk
src/external/gpl3/binutils/lib/libiberty/arch/i386: config.h
src/external/gpl3/binutils/lib/libopcodes/arch/i386: config.h
src/external/gpl3/binutils/usr.bin/common/arch/i386: config.h defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/i386: config.h
src/external/gpl3/binutils/usr.bin/gas/arch/x86_64: defs.mk
src/external/gpl3/binutils/usr.bin/gprof/arch/i386: defs.mk gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/i386: config.h defs.mk
ldemul-list.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/lib/libbfd/arch/i386/config.h \
src/external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libiberty/arch/i386/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/lib/libopcodes/arch/i386/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/i386/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/gas/arch/i386/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/binutils/usr.bin/gprof/arch/i386/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/ld/arch/i386/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/ld/arch/i386/defs.mk
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/binutils/usr.bin/ld/arch/i386/ldemul-list.h

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

Modified files:

Index: src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h:1.8 src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h:1.9
--- src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h:1.8	Sun Apr 15 16:06:04 2018
+++ src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h	Wed Nov  7 21:30:14 2018
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp  */
+/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
@@ -45,6 +45,7 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
+#include "diagnostics.h"
 #include 
 #include 
 
@@ -102,6 +103,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t;
 typedef BFD_HOST_U_64_BIT bfd_uint64_t;
 #endif
 
+#ifdef HAVE_INTTYPES_H
+# include 
+#else
+# if BFD_HOST_64BIT_LONG
+#  define BFD_PRI64 "l"
+# elif defined (__MSVCRT__)
+#  define BFD_PRI64 "I64"
+# else
+#  define BFD_PRI64 "ll"
+# endif
+# undef PRId64
+# define PRId64 BFD_PRI64 "d"
+# undef PRIu64
+# define PRIu64 BFD_PRI64 "u"
+# undef PRIx64
+# define PRIx64 BFD_PRI64 "x"
+#endif
+
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
 #endif
@@ -574,6 +593,8 @@ void bfd_putb64 (bfd_uint64_t, void *);
 void bfd_putl64 (bfd_uint64_t, void *);
 void bfd_putb32 (bfd_vma, void *);
 void bfd_putl32 (bfd_vma, void *);
+void bfd_putb24 (bfd_vma, void *);
+void bfd_putl24 (bfd_vma, void *);
 void bfd_putb16 (bfd_vma, void *);
 void bfd_putl16 (bfd_vma, void *);
 
@@ -601,8 +622,6 @@ extern bfd_boolean _bfd_handle_already_l
 
 /* Externally visible ECOFF routines.  */
 
-extern bfd_vma bfd_ecoff_get_gp_value
-  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
   (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
@@ -771,8 +790,6 @@ extern bfd_boolean bfd_sunos_size_dynami
 
 extern bfd_boolean bfd_i386linux_size_dynamic_sections
   (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_m68klinux_size_dynamic_sections
-  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sparclinux_size_dynamic_sections
   (bfd *, struct bfd_link_info *);
 
@@ -841,9 +858,6 @@ union internal_auxent;
 extern bfd_boolean bfd_coff_set_symbol_class
   (bfd *, struct bfd_symbol *, unsigned int);
 
-extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
-  (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-
 /* ARM VFP11 erra

CVS commit: src/sys/dev/usb

2018-11-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov  8 02:11:54 UTC 2018

Modified Files:
src/sys/dev/usb: usb_quirks.c usb_quirks.h usbdi_util.c usbdi_util.h

Log Message:
Workaround PN533 USB descriptor corruption

During normal operation, the PN533 chip may corrupt its USB configuration,
interface and endpoint descriptors. The device descriptor remains unaffected.

Since the descriptors are documented to be immutable, we can work around
the problem by providing hard-coded descriptors instead of pulling them
from the device.

Userland implementation such as NFC tools' libnfc use the same approach,
but this kernel quirk is still necessary so that the device can be
attached on reboot, after its USB descriptors got corrupted.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/usb_quirks.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/usb_quirks.h
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/usb/usbdi_util.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/usbdi_util.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/usb_quirks.c
diff -u src/sys/dev/usb/usb_quirks.c:1.87 src/sys/dev/usb/usb_quirks.c:1.88
--- src/sys/dev/usb/usb_quirks.c:1.87	Tue Jul 24 08:15:57 2018
+++ src/sys/dev/usb/usb_quirks.c	Thu Nov  8 02:11:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_quirks.c,v 1.87 2018/07/24 08:15:57 msaitoh Exp $	*/
+/*	$NetBSD: usb_quirks.c,v 1.88 2018/11/08 02:11:54 manu Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.87 2018/07/24 08:15:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.88 2018/11/08 02:11:54 manu Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -43,13 +43,137 @@ __KERNEL_RCSID(0, "$NetBSD: usb_quirks.c
 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 
 #ifdef USB_DEBUG
 extern int usbdebug;
 #endif
 
+#define DPRINTF(FMT,A,B,C,D)USBHIST_LOG(usbdebug,FMT,A,B,C,D)
+
 #define ANY 0x
+#define _USETW(w) { (w) & 0x00ff, ((w) & 0xff00) >> 8 }
+
+/*
+ * NXP PN533 NFC chip descriptors
+ */
+static const usb_endpoint_descriptor_t desc_ep_pn533_in = {
+	/* bLength */		sizeof(desc_ep_pn533_in),
+	/* bDescriptorType */	UDESC_ENDPOINT,
+	/* bEndpointAddress */	UE_DIR_IN | 0x04,
+	/* bmAttributes */	UE_BULK,
+	/* wMaxPacketSize */	_USETW(0x0040),
+	/* bInterval */		0x04, /* 255ms */
+};
+
+static const usb_endpoint_descriptor_t desc_ep_pn533_out = {
+	/* bLength */		sizeof(desc_ep_pn533_in),
+	/* bDescriptorType */	UDESC_ENDPOINT,
+	/* bEndpointAddress */	UE_DIR_OUT | 0x04,
+	/* bmAttributes */	UE_BULK,
+	/* wMaxPacketSize */	_USETW(0x0040),
+	/* bInterval */		0x04, /* 255ms */
+};
+
+static const usb_interface_descriptor_t desc_iface_pn533 = {
+	/* bLength */		sizeof(desc_iface_pn533),
+	/* bDescriptorType */	 UDESC_INTERFACE,
+	/* bInterfaceNumber */	 0,
+	/* bAlternateSetting */	 0,
+	/* bNumEndpoints */	 2,
+	/* bInterfaceClass */	 0xff,
+	/* bInterfaceSubClass */ 0xff,
+	/* bInterfaceProtocol */ 0xff,
+	/* iInterface */	 0,
+};
+
+static const usb_config_descriptor_t desc_conf_pn533 = {
+	/* bLength */		 sizeof(desc_conf_pn533),
+	/* bDescriptorType */	 UDESC_CONFIG,
+	/* wTotalLength	 */	 _USETW(sizeof(desc_conf_pn533) +
+	sizeof(desc_iface_pn533) +
+	sizeof(desc_ep_pn533_in) +
+	sizeof(desc_ep_pn533_out)
+ ),
+	/* bNumInterfac	*/	 1,
+	/* bConfigurationValue */1,
+	/* iConfiguration */	 0,
+	/* bmAttributes	*/	 UC_ATTR_MBO,
+	/* bMaxPower */		 0x32, /* 100mA */
+};
+
+static const usb_descriptor_t *desc_pn533[] = {
+	(const usb_descriptor_t *)&desc_conf_pn533,
+	(const usb_descriptor_t *)&desc_iface_pn533,
+	(const usb_descriptor_t *)&desc_ep_pn533_out,
+	(const usb_descriptor_t *)&desc_ep_pn533_in,
+	NULL
+};
+
+
+usbd_status
+usbd_get_desc_fake(struct usbd_device *dev, int type, int index,
+		   int len, void *desc)
+{
+	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+#ifdef USB_DEBUG
+	const usb_device_descriptor_t *dd = usbd_get_device_descriptor(dev);
+#endif
+	const usb_descriptor_t *ub;
+	int i = 0;
+	int j = 0;
+	usbd_status err = USBD_INVAL;
+
+	if (dev->ud_quirks == NULL || dev->ud_quirks->desc == NULL) {
+		DPRINTF("%04x/%04x: no fake descriptors",
+		UGETW(dd->idVendor), UGETW(dd->idProduct), 0, 0);
+		goto out;
+	}
+
+	for (j = 0; dev->ud_quirks->desc[j]; j++) {
+		ub = dev->ud_quirks->desc[j];
+		if (ub->bDescriptorType == type && i++ == index)
+			break;
+	}
+
+	if (dev->ud_quirks->desc[j] == NULL) {
+		DPRINTF("%04x/%04x: no fake descriptor type = %d, len = %d",
+		   UGETW(dd->idVendor), UGETW(dd->idProduct), type, len);
+		goto out;
+	}
+
+	do {
+		ub = dev->ud_quirks->desc[j];
+
+		if (ub->bLength > len) {
+			DPRINTF("%04x/%04x: short buf len = %d, bLength = %d",
+			UGETW(dd->idVendor), UGETW(dd->idProduct),
+			type, ub->bLength)

CVS commit: src/tools/binutils

2018-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  8 02:08:35 UTC 2018

Modified Files:
src/tools/binutils: mknative-binutils

Log Message:
need global replace


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/binutils/mknative-binutils

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

Modified files:

Index: src/tools/binutils/mknative-binutils
diff -u src/tools/binutils/mknative-binutils:1.10 src/tools/binutils/mknative-binutils:1.11
--- src/tools/binutils/mknative-binutils:1.10	Tue Nov  6 20:14:19 2018
+++ src/tools/binutils/mknative-binutils	Wed Nov  7 21:08:35 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-binutils,v 1.10 2018/11/07 01:14:19 christos Exp $
+#	$NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/binutils
@@ -96,7 +96,7 @@ get_binutils () {
 DEFS INCLUDES as_new_OBJECTS as_new_LDADD | 
 	sed	-e s/G_as_new_OBJECTS/G_OBJS/ \
 		-e s/G_as_new_LDADD=/G_OBJS+=/ \
-		-e s@config/@@ \
+		-e s@config/@@g \
 		-e 's/\.\..*a//' |
 	write_mk external/gpl3/binutils/usr.bin/gas/arch/$MACHINE_ARCH/defs.mk
 



CVS commit: src/sys/dev/usb

2018-11-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov  8 02:03:37 UTC 2018

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.752 -r1.753 src/sys/dev/usb/usbdevs.h \
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.752 src/sys/dev/usb/usbdevs.h:1.753
--- src/sys/dev/usb/usbdevs.h:1.752	Wed Oct  3 10:00:29 2018
+++ src/sys/dev/usb/usbdevs.h	Thu Nov  8 02:03:37 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.752 2018/10/03 10:00:29 martin Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.753 2018/11/08 02:03:37 manu Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.759 2018/10/03 09:59:34 martin Exp
+ *	NetBSD: usbdevs,v 1.760 2018/11/08 02:01:28 manu Exp
  */
 
 /*-
@@ -2645,6 +2645,7 @@
 
 /* Philips Semiconductor products */
 #define	USB_PRODUCT_PHILIPSSEMI_HUB1122	0x1122		/* hub */
+#define	USB_PRODUCT_PHILIPSSEMT_PN533	0x2533		/* NFC PN533 */
 
 /* P.I. Engineering products */
 #define	USB_PRODUCT_PIENGINEERING_PS2USB	0x020b		/* PS2 to Mac USB Adapter */
@@ -2987,6 +2988,8 @@
 #define	USB_PRODUCT_SHUTTLE_CDRW	0x0101		/* CD-RW Device */
 #define	USB_PRODUCT_SHUTTLE_ORCA	0x0325		/* eUSB ORCA Quad Reader */
 #define	USB_PRODUCT_SHUTTLE_SCM	0x1010		/* SCM Micro */
+#define	USB_PRODUCT_SHUTTLE_SCL3711	0x5591		/* SCM Micro SCL3711-NFC&RW */
+#define	USB_PRODUCT_SHUTTLE_SCL3712	0x5594		/* SCM Micro SCL3712-NFC&RW */
 
 /* Siemens products */
 #define	USB_PRODUCT_SIEMENS_SPEEDSTREAM	0x1001		/* SpeedStream USB */
Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.752 src/sys/dev/usb/usbdevs_data.h:1.753
--- src/sys/dev/usb/usbdevs_data.h:1.752	Wed Oct  3 10:00:29 2018
+++ src/sys/dev/usb/usbdevs_data.h	Thu Nov  8 02:03:37 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.752 2018/10/03 10:00:29 martin Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.753 2018/11/08 02:03:37 manu Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.759 2018/10/03 09:59:34 martin Exp
+ *	NetBSD: usbdevs,v 1.760 2018/11/08 02:01:28 manu Exp
  */
 
 /*-
@@ -3550,88 +3550,90 @@ static const uint16_t usb_products[] = {
 	5064, 0,
 	USB_VENDOR_PHILIPSSEMI, USB_PRODUCT_PHILIPSSEMI_HUB1122, 
 	6980, 0,
+	USB_VENDOR_PHILIPSSEMT, USB_PRODUCT_PHILIPSSEMT_PN533, 
+	15884, 15888, 0,
 	USB_VENDOR_PIENGINEERING, USB_PRODUCT_PIENGINEERING_PS2USB, 
 	8126, 5651, 9700, 4871, 4885, 0,
 	USB_VENDOR_PIENGINEERING, USB_PRODUCT_PIENGINEERING_XKEYS58, 
-	15884, 15890, 5854, 15903, 15907, 0,
+	15894, 15900, 5854, 15913, 15917, 0,
 	USB_VENDOR_PIENGINEERING, USB_PRODUCT_PIENGINEERING_XKEYS, 
-	15884, 15890, 5854, 0,
+	15894, 15900, 5854, 0,
 	USB_VENDOR_PILOTECH, USB_PRODUCT_PILOTECH_CRW600, 
-	15913, 14761, 10438, 0,
+	15923, 14761, 10438, 0,
 	USB_VENDOR_PINNACLE, USB_PRODUCT_PINNACLE_PCTV800E, 
-	15921, 15926, 0,
+	15931, 15936, 0,
 	USB_VENDOR_PINNACLE, USB_PRODUCT_PINNACLE_PCTVDVBTFLASH, 
-	4575, 15921, 6785, 11487, 0,
+	4575, 15931, 6785, 11487, 0,
 	USB_VENDOR_PINNACLE, USB_PRODUCT_PINNACLE_PCTV72E, 
-	4575, 15921, 15931, 0,
+	4575, 15931, 15941, 0,
 	USB_VENDOR_PINNACLE, USB_PRODUCT_PINNACLE_PCTV73E, 
-	4575, 15921, 15935, 0,
+	4575, 15931, 15945, 0,
 	USB_VENDOR_PLANEX, USB_PRODUCT_PLANEX_GW_US11H, 
-	15939, 5278, 0,
+	15949, 5278, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RTL8188CUS, 
 	7344, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GW_US11S, 
-	15948, 5278, 0,
+	15958, 5278, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RTL8188CU_3, 
 	5205, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSFANG300, 
-	15957, 0,
+	15967, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GXS, 
-	15970, 0,
+	15980, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GW_US300, 
-	15981, 0,
+	15991, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54HP, 
-	15990, 0,
-	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS, 
 	16000, 0,
+	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS, 
+	16010, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070, 
 	5071, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSNANO, 
-	16014, 0,
-	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRO300, 
 	16024, 0,
+	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRO300, 
+	16034, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RTL8188CU_1, 
-	16038, 0,
+	16048, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RTL8192CU, 
-	16049, 0,
+	16059, 0,
 	USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RTL8188CU_4, 
 	 

CVS commit: src/sys/dev/usb

2018-11-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov  8 02:01:28 UTC 2018

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

Log Message:
Add PN533 based NFC devices


To generate a diff of this commit:
cvs rdiff -u -r1.759 -r1.760 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.759 src/sys/dev/usb/usbdevs:1.760
--- src/sys/dev/usb/usbdevs:1.759	Wed Oct  3 09:59:34 2018
+++ src/sys/dev/usb/usbdevs	Thu Nov  8 02:01:28 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.759 2018/10/03 09:59:34 martin Exp $
+$NetBSD: usbdevs,v 1.760 2018/11/08 02:01:28 manu Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2638,6 +2638,7 @@ product PHILIPS RT2870		0x200f	RT2870
 
 /* Philips Semiconductor products */
 product PHILIPSSEMI HUB1122	0x1122	hub
+product PHILIPSSEMT PN533	0x2533	NFC PN533
 
 /* P.I. Engineering products */
 product PIENGINEERING PS2USB	0x020b	PS2 to Mac USB Adapter
@@ -2980,6 +2981,8 @@ product SHUTTLE EUSCSI_C	0x000c	eUSCSI B
 product SHUTTLE CDRW		0x0101	CD-RW Device
 product SHUTTLE ORCA		0x0325	eUSB ORCA Quad Reader
 product SHUTTLE SCM		0x1010	SCM Micro
+product SHUTTLE SCL3711		0x5591	SCM Micro SCL3711-NFC&RW
+product SHUTTLE SCL3712		0x5594	SCM Micro SCL3712-NFC&RW
 
 /* Siemens products */
 product SIEMENS SPEEDSTREAM	0x1001	SpeedStream USB



CVS commit: src/sys/dev/usb

2018-11-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov  8 01:59:53 UTC 2018

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

Log Message:
Enfore USB timeout on ugen(4) write operations


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/usb/ugen.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/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.140 src/sys/dev/usb/ugen.c:1.141
--- src/sys/dev/usb/ugen.c:1.140	Mon Sep  3 16:29:34 2018
+++ src/sys/dev/usb/ugen.c	Thu Nov  8 01:59:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.140 2018/09/03 16:29:34 riastradh Exp $	*/
+/*	$NetBSD: ugen.c,v 1.141 2018/11/08 01:59:53 manu Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.140 2018/09/03 16:29:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.141 2018/11/08 01:59:53 manu Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1456,6 +1456,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int
 	uint8_t conf, alt;
 	int cdesclen;
 	int error;
+	int dir;
 
 	DPRINTFN(5, ("ugenioctl: cmd=%08lx\n", cmd));
 	if (sc->sc_dying)
@@ -1478,14 +1479,13 @@ ugen_do_ioctl(struct ugen_softc *sc, int
 			sce->state &= ~UGEN_SHORT_OK;
 		return 0;
 	case USB_SET_TIMEOUT:
-		sce = &sc->sc_endpoints[endpt][IN];
-		if (sce == NULL
-		/* XXX this shouldn't happen, but the distinction between
-		   input and output pipes isn't clear enough.
-		   || sce->pipeh == NULL */
-			)
-			return EINVAL;
-		sce->timeout = *(int *)addr;
+		for (dir = OUT; dir <= IN; dir++) {
+			sce = &sc->sc_endpoints[endpt][dir];
+			if (sce == NULL)
+return EINVAL;
+
+			sce->timeout = *(int *)addr;
+		}
 		return 0;
 	case USB_SET_BULK_RA:
 		if (endpt == USB_CONTROL_ENDPOINT)



CVS commit: src/sys/arch/atari/stand/tostools/libtos

2018-11-07 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Nov  7 22:51:47 UTC 2018

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: libtos.h

Log Message:
Don't provide these definitions on netbsd as before, but without relying
on int8_t being a macro.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/tostools/libtos/libtos.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/atari/stand/tostools/libtos/libtos.h
diff -u src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.6 src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.7
--- src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.6	Sun Jul 17 20:54:37 2011
+++ src/sys/arch/atari/stand/tostools/libtos/libtos.h	Wed Nov  7 22:51:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: libtos.h,v 1.6 2011/07/17 20:54:37 joerg Exp $	*/
+/*	$NetBSD: libtos.h,v 1.7 2018/11/07 22:51:47 maya Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -58,14 +58,14 @@
 #define	VA_LIST	va_list
 #endif
 
-#ifndef int8_t
+#ifndef __NetBSD__
 /*
  * My TOS/MiNT installation does not define these (Leo 09/10/2001).
  */
 typedef	unsigned char	u_int8_t;
 typedef	unsigned short	u_int16_t;
 typedef	unsigned long	u_int32_t;
-#endif /* int8_t */
+#endif /* __NetBSD__ */
 
 struct kparamb;
 struct osdsc;



CVS commit: src/lib/libc/arch

2018-11-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Nov  7 22:21:42 UTC 2018

Modified Files:
src/lib/libc/arch/alpha/gen: fabs.S
src/lib/libc/arch/hppa/gen: fabs.c
src/lib/libc/arch/m68k/gen: fabs.S
src/lib/libc/arch/mips/gen: fabs.S
src/lib/libc/arch/powerpc/gen: fabs_ieee754.S
src/lib/libc/arch/sparc/gen: fabs.S
src/lib/libc/arch/vax/gen: fabs.S

Log Message:
On ports without __HAVE_LONG_DOUBLE, make fabsl alias fabs.

For some reason, fabs lives in libc, not in libm, and our tests now
detect when fabs or fabsl is missing from libm.  For those ports that
sometimes have long double and sometimes don't, make it conditional.

Still missing: fabs _and_ fabsl on ia64.  Need help from an itanium
wizard!  Other portmasters: Please take a look and see if I missed
any ports that might have long double where this alias will not work.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/alpha/gen/fabs.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/gen/fabs.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/m68k/gen/fabs.S
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/mips/gen/fabs.S
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/powerpc/gen/fabs_ieee754.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/sparc/gen/fabs.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/vax/gen/fabs.S

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/arch/alpha/gen/fabs.S
diff -u src/lib/libc/arch/alpha/gen/fabs.S:1.3 src/lib/libc/arch/alpha/gen/fabs.S:1.4
--- src/lib/libc/arch/alpha/gen/fabs.S:1.3	Wed Jun 14 06:49:02 2000
+++ src/lib/libc/arch/alpha/gen/fabs.S	Wed Nov  7 22:21:42 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fabs.S,v 1.3 2000/06/14 06:49:02 cgd Exp $ */
+/* $NetBSD: fabs.S,v 1.4 2018/11/07 22:21:42 riastradh Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -29,6 +29,8 @@
 
 #include 
 
+STRONG_ALIAS(fabsl, fabs)
+
 LEAF(fabs, 1)
 	cpys	fzero, fa0, fv0
 	RET

Index: src/lib/libc/arch/hppa/gen/fabs.c
diff -u src/lib/libc/arch/hppa/gen/fabs.c:1.4 src/lib/libc/arch/hppa/gen/fabs.c:1.5
--- src/lib/libc/arch/hppa/gen/fabs.c:1.4	Sat Dec 24 21:42:32 2005
+++ src/lib/libc/arch/hppa/gen/fabs.c	Wed Nov  7 22:21:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fabs.c,v 1.4 2005/12/24 21:42:32 perry Exp $	*/
+/*	$NetBSD: fabs.c,v 1.5 2018/11/07 22:21:42 riastradh Exp $	*/
 
 /*	$OpenBSD: fabs.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -6,8 +6,14 @@
  * Written by Miodrag Vallat.  Public domain
  */
 
+#include 
+
 #include 
 
+#ifndef __HAVE_LONG_DOUBLE
+__strong_alias(fasbl, fabs)
+#endif
+
 double
 fabs(double val)
 {

Index: src/lib/libc/arch/m68k/gen/fabs.S
diff -u src/lib/libc/arch/m68k/gen/fabs.S:1.11 src/lib/libc/arch/m68k/gen/fabs.S:1.12
--- src/lib/libc/arch/m68k/gen/fabs.S:1.11	Wed Jul 17 06:43:32 2013
+++ src/lib/libc/arch/m68k/gen/fabs.S	Wed Nov  7 22:21:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fabs.S,v 1.11 2013/07/17 06:43:32 matt Exp $	*/
+/*	$NetBSD: fabs.S,v 1.12 2018/11/07 22:21:42 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,8 +30,13 @@
  */
 
 #include 
+#include 
 
-RCSID("$NetBSD: fabs.S,v 1.11 2013/07/17 06:43:32 matt Exp $")
+RCSID("$NetBSD: fabs.S,v 1.12 2018/11/07 22:21:42 riastradh Exp $")
+
+#ifndef __HAVE_LONG_DOUBLE
+STRONG_ALIAS(fabsl, fabs)
+#endif
 
 ENTRY(fabs)
 #if defined(__SVR4_ABI__) && defined(__HAVE_FPU__)

Index: src/lib/libc/arch/mips/gen/fabs.S
diff -u src/lib/libc/arch/mips/gen/fabs.S:1.8 src/lib/libc/arch/mips/gen/fabs.S:1.9
--- src/lib/libc/arch/mips/gen/fabs.S:1.8	Mon Dec 14 01:07:42 2009
+++ src/lib/libc/arch/mips/gen/fabs.S	Wed Nov  7 22:21:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fabs.S,v 1.8 2009/12/14 01:07:42 matt Exp $	*/
+/*	$NetBSD: fabs.S,v 1.9 2018/11/07 22:21:42 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -33,18 +33,23 @@
  */
 
 #include 
+#include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
 #if 0
 	RCSID("from: @(#)fabs.s	8.1 (Berkeley) 2/16/94")
 #else
-	RCSID("$NetBSD: fabs.S,v 1.8 2009/12/14 01:07:42 matt Exp $")
+	RCSID("$NetBSD: fabs.S,v 1.9 2018/11/07 22:21:42 riastradh Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 
 	.set	noreorder
 
+#ifndef __HAVE_LONG_DOUBLE
+STRONG_ALIAS(fabsl, fabs)
+#endif
+
 /*
  * fabs(x)
  *	double x;

Index: src/lib/libc/arch/powerpc/gen/fabs_ieee754.S
diff -u src/lib/libc/arch/powerpc/gen/fabs_ieee754.S:1.1 src/lib/libc/arch/powerpc/gen/fabs_ieee754.S:1.2
--- src/lib/libc/arch/powerpc/gen/fabs_ieee754.S:1.1	Tue Jan 28 13:47:04 2014
+++ src/lib/libc/arch/powerpc/gen/fabs_ieee754.S	Wed Nov  7 22:21:42 2018
@@ -1,11 +1,13 @@
-/*	$NetBSD: fabs_ieee754.S,v 1.1 2014/01/28 13:47:04 macallan Exp $	*/
+/*	$NetBSD: fabs_ieee754.S,v 1.2 2018/11/07 22:21:42 riastradh Exp $	*/
 
 #include 
 
 #if defined(LIBC_SCCS)
-__RCSID("$NetBSD: fabs_ieee754.S,v 1.1 2014/01/28 13:47:04 macallan Exp $")
+__RCSID("$NetBSD: fabs_

CVS commit: src/usr.sbin/sysinst

2018-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  7 21:59:30 UTC 2018

Modified Files:
src/usr.sbin/sysinst: disks.c

Log Message:
Fix CD_NAMES against concrete instances comparision - if CD_NAMES
entries have a wildcard, strip device instance number off from both
comparands.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/disks.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.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.18 src/usr.sbin/sysinst/disks.c:1.19
--- src/usr.sbin/sysinst/disks.c:1.18	Wed Nov  7 21:20:23 2018
+++ src/usr.sbin/sysinst/disks.c	Wed Nov  7 21:59:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.18 2018/11/07 21:20:23 martin Exp $ */
+/*	$NetBSD: disks.c,v 1.19 2018/11/07 21:59:30 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -509,17 +509,28 @@ static bool
 is_cdrom_device(const char *dev)
 {
 	static const char *cdrom_devices[] = { CD_NAMES, 0 };
-	char pat[SSTRSIZE], *star;
+	char pat[SSTRSIZE], comp[SSTRSIZE], *star, *p;
 	const char **dev_pat;
 
+	/* trim device number off */
+	strcpy(comp, dev);
+	for (p = comp + strlen(comp) - 1; p != comp; p--)
+		if (!isdigit((unsigned char)*p))
+			break;
+	if (p != comp)
+		p[1] = 0;
+
 	for (dev_pat = cdrom_devices; *dev_pat; dev_pat++) {
 		strcpy(pat, *dev_pat);
 		star = strchr(pat, '*');
-		if (star)
+		if (star) {
 			*star = 0;
-
-		if (strcmp(dev, pat) == 0)
-			return true;
+			if (strcmp(comp, pat) == 0)
+return true;
+		} else {
+			if (strcmp(dev, pat) == 0)
+return true;
+		}
 	}
 
 	return false;



CVS commit: src/usr.sbin/sysinst

2018-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  7 21:20:23 UTC 2018

Modified Files:
src/usr.sbin/sysinst: defs.h disks.c main.c util.c
src/usr.sbin/sysinst/arch/emips: md.h
src/usr.sbin/sysinst/arch/i386: md.h
src/usr.sbin/sysinst/arch/vax: md.h

Log Message:
Unify handling of CDROM device names.
Skip CDs when looking for install targets (we do not support installing
onto a blueray with UDF).

Fix search for the default CDROM device and the CD we booted from
for ports with nonstandard CDROM device names.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/main.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sysinst/util.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/emips/md.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/i386/md.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/vax/md.h

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.20 src/usr.sbin/sysinst/defs.h:1.21
--- src/usr.sbin/sysinst/defs.h:1.20	Sat Oct  6 18:45:37 2018
+++ src/usr.sbin/sysinst/defs.h	Wed Nov  7 21:20:23 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.20 2018/10/06 18:45:37 martin Exp $	*/
+/*	$NetBSD: defs.h,v 1.21 2018/11/07 21:20:23 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -179,7 +179,7 @@ enum {
 		   (p)->pi_fstype == FS_BSDFFS)
 
 /* standard cd0 device */
-#define CD_NAMES "cd0a"
+#define CD_NAMES "cd*"
 
 /* Types */
 
@@ -473,7 +473,7 @@ int	md_update(void);
 void	toplevel(void);
 
 /* from disks.c */
-const char *get_default_cdrom(void);
+bool	get_default_cdrom(char *, size_t);
 int	find_disks(const char *);
 struct menudesc;
 void	fmt_fspart(struct menudesc *, int, void *);

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.17 src/usr.sbin/sysinst/disks.c:1.18
--- src/usr.sbin/sysinst/disks.c:1.17	Mon Nov  5 19:45:56 2018
+++ src/usr.sbin/sysinst/disks.c	Wed Nov  7 21:20:23 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.17 2018/11/05 19:45:56 martin Exp $ */
+/*	$NetBSD: disks.c,v 1.18 2018/11/07 21:20:23 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -355,10 +355,10 @@ done:
  * returns the first entry in hw.disknames matching a cdrom_device, or
  * first entry on error or no match
  */
-const char *
-get_default_cdrom(void)
+bool
+get_default_cdrom(char *cd, size_t max_len)
 {
-	static const char *cdrom_devices[] = { CD_NAMES, 0};
+	static const char *cdrom_devices[] = { CD_NAMES, 0 };
 	static const char mib_name[] = "hw.disknames";
 	size_t len;
 	char *disknames;
@@ -502,8 +502,40 @@ is_ffs_wedge(const char *dev)
 	return res;
 }
 
+/*
+ * Does this device match an entry in our default CDROM device list?
+ */
+static bool
+is_cdrom_device(const char *dev)
+{
+	static const char *cdrom_devices[] = { CD_NAMES, 0 };
+	char pat[SSTRSIZE], *star;
+	const char **dev_pat;
+
+	for (dev_pat = cdrom_devices; *dev_pat; dev_pat++) {
+		strcpy(pat, *dev_pat);
+		star = strchr(pat, '*');
+		if (star)
+			*star = 0;
+
+		if (strcmp(dev, pat) == 0)
+			return true;
+	}
+
+	return false;
+}
+
+/*
+ * Multi-purpose helper function:
+ * iterate all known disks, either
+ *  - skip all CD devices
+ *  - recognize the first available CD device and set its name
+ * When doing non-CDs, optionally skip non-partionable devices
+ * (i.e. wedges).
+ */
 static int
-get_disks(struct disk_desc *dd, bool with_non_partitionable)
+get_disks(struct disk_desc *dd, bool with_non_partitionable,
+	char *cd_dev, size_t max_len)
 {
 	static const int mib[] = { CTL_HW, HW_DISKNAMES };
 	static const unsigned int miblen = __arraycount(mib);
@@ -528,6 +560,18 @@ get_disks(struct disk_desc *dd, bool wit
 	}
 
 	for (xd = strtok(disk_names, " "); xd != NULL; xd = strtok(NULL, " ")) {
+		/* is this a CD device? */
+		if (is_cdrom_device(xd)) {
+			if (cd_dev && max_len) {
+/* return first found CD device name */
+strlcpy(cd_dev, xd, max_len);
+return 1;
+			} else {
+/* skip this device */
+continue;
+			}
+		}
+
 		strlcpy(dd->dd_name, xd, sizeof dd->dd_name - 2);
 		dd->dd_no_mbr = false;
 		dd->dd_no_part = false;
@@ -600,7 +644,7 @@ find_disks(const char *doingwhat)
 	pm_devs_t *pm_i, *pm_last = NULL;
 
 	/* Find disks. */
-	numdisks = get_disks(disks, partman_go <= 0);
+	numdisks = get_disks(disks, partman_go <= 0, NULL, 0);
 
 	/* need a redraw here, kernel messages hose everything */
 	touchwin(stdscr);
@@ -1187,12 +1231,15 @@ done_with_disks:
 #endif
 	}
 
+	if (cdrom_dev[0] == 0)
+		get_default_cdrom(cdrom_dev, sizeof(cdrom_dev));
+
 	/* Add /kern, /proc and /dev/pts to fstab and make mountpoint. */
 	scripting_fprintf(f, "kernfs\t\t/kern\tkernfs\trw\n");
 	scripting_fprintf(f, "ptyfs\

CVS commit: src/sys/dev/ata

2018-11-07 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Nov  7 17:05:54 UTC 2018

Modified Files:
src/sys/dev/ata: ata_subr.c

Log Message:
don't touch the queue structure in ata_queue_active() if atabus is already
detached from the channel

fixes panic on null pointer derefence during shutdown reported privately
by Launey Thomas


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ata/ata_subr.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/ata/ata_subr.c
diff -u src/sys/dev/ata/ata_subr.c:1.7 src/sys/dev/ata/ata_subr.c:1.8
--- src/sys/dev/ata/ata_subr.c:1.7	Mon Oct 22 20:13:47 2018
+++ src/sys/dev/ata/ata_subr.c	Wed Nov  7 17:05:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_subr.c,v 1.7 2018/10/22 20:13:47 jdolecek Exp $	*/
+/*	$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.7 2018/10/22 20:13:47 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -364,6 +364,9 @@ ata_queue_active(struct ata_channel *chp
 {
 	struct ata_queue *chq = chp->ch_queue;
 
+	if (chp->ch_flags & ATACH_DETACHED)
+		return 0;
+
 	return chq->active_xfers_used;
 }
 



CVS commit: src/sys/kern

2018-11-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov  7 09:59:12 UTC 2018

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

Log Message:
Don't defer errors from sendmmsg().  This matches the linux manpage.

Defer errors from recvmmsg() through so_rerror and
tests and return a deferred error on entry.

Ok: christos@


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.197 src/sys/kern/uipc_syscalls.c:1.198
--- src/sys/kern/uipc_syscalls.c:1.197	Mon Sep  3 16:29:35 2018
+++ src/sys/kern/uipc_syscalls.c	Wed Nov  7 09:59:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.197 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.198 2018/11/07 09:59:12 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.197 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.198 2018/11/07 09:59:12 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -806,14 +806,11 @@ sys_sendmmsg(struct lwp *l, const struct
 	}
 
 	*retval = dg;
-	if (error)
-		so->so_error = error;
 
 	fd_putfile(s);
 
 	/*
-	 * If we succeeded at least once, return 0, hopefully so->so_error
-	 * will catch it next time.
+	 * If we succeeded at least once, return 0.
 	 */
 	if (dg)
 		return 0;
@@ -1052,6 +1049,16 @@ sys_recvmmsg(struct lwp *l, const struct
 	if ((error = fd_getsock(s, &so)) != 0)
 		return error;
 
+	/*
+	 * If so->so_rerror holds a deferred error return it now.
+	 */
+	if (so->so_rerror) {
+		error = so->so_rerror;
+		so->so_rerror = 0;
+		fd_putfile(s);
+		return error;
+	}
+
 	vlen = SCARG(uap, vlen);
 	if (vlen > 1024)
 		vlen = 1024;
@@ -1116,13 +1123,14 @@ sys_recvmmsg(struct lwp *l, const struct
 		m_free(from);
 
 	*retval = dg;
+
 	if (error)
-		so->so_error = error;
+		so->so_rerror = error;
 
 	fd_putfile(s);
 
 	/*
-	 * If we succeeded at least once, return 0, hopefully so->so_error
+	 * If we succeeded at least once, return 0, hopefully so->so_rerror
 	 * will catch it next time.
 	 */
 	if (dg)



CVS commit: src/sys/kern

2018-11-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov  7 09:58:19 UTC 2018

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

Log Message:
Update getsockopt(SO_ERROR) to behave like soreceive() and
return and clear so->so_rerror if so->so_error is zero.

Ok: christos@


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/kern/uipc_socket.c

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

Modified files:

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.266 src/sys/kern/uipc_socket.c:1.267
--- src/sys/kern/uipc_socket.c:1.266	Sun Nov  4 16:30:29 2018
+++ src/sys/kern/uipc_socket.c	Wed Nov  7 09:58:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.266 2018/11/04 16:30:29 christos Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.267 2018/11/07 09:58:19 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.266 2018/11/04 16:30:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.267 2018/11/07 09:58:19 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1974,6 +1974,10 @@ sogetopt1(struct socket *so, struct sock
 		break;
 
 	case SO_ERROR:
+		if (so->so_error == 0) {
+			so->so_error = so->so_rerror;
+			so->so_rerror = 0;
+		}
 		error = sockopt_setint(sopt, so->so_error);
 		so->so_error = 0;
 		break;



CVS commit: [netbsd-8] src/doc

2018-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  7 09:13:44 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Ticket #1083


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-8.1

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

Modified files:

Index: src/doc/CHANGES-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.49 src/doc/CHANGES-8.1:1.1.2.50
--- src/doc/CHANGES-8.1:1.1.2.49	Tue Nov  6 14:48:37 2018
+++ src/doc/CHANGES-8.1	Wed Nov  7 09:13:44 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.49 2018/11/06 14:48:37 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.50 2018/11/07 09:13:44 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1612,3 +1612,9 @@ sys/fs/puffs/puffs_vnops.c			1.213
 	Fix use after RECLAIM in PUFFS filesystems.
 	[manu, ticket #1082]
 
+external/gpl2/groff/dist/configure		1.2
+
+	Test for other variants to declare exit(3) to fix
+	the cross-compile from FreeBSD.
+	[sevan, ticket #1083]
+



CVS commit: [netbsd-8] src/external/gpl2/groff/dist

2018-11-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  7 09:12:28 UTC 2018

Modified Files:
src/external/gpl2/groff/dist [netbsd-8]: configure

Log Message:
Pull up following revision(s) (requested by sevan in ticket #1083):

external/gpl2/groff/dist/configure: revision 1.2

Test for other exit cases.

It might be worth regenerating configure with modern autoconf.
Reviewed by 

Closes PR toolchain/53314


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 src/external/gpl2/groff/dist/configure

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

Modified files:

Index: src/external/gpl2/groff/dist/configure
diff -u src/external/gpl2/groff/dist/configure:1.1.1.1 src/external/gpl2/groff/dist/configure:1.1.1.1.8.1
--- src/external/gpl2/groff/dist/configure:1.1.1.1	Wed Jan 13 18:41:45 2016
+++ src/external/gpl2/groff/dist/configure	Wed Nov  7 09:12:28 2018
@@ -2511,6 +2511,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
+   'extern "C" [[noreturn]] void exit (int);' \
+   'extern "C" _Noreturn void exit (int);' \
'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
@@ -2977,6 +2979,8 @@ for ac_declaration in \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
+   'extern "C" [[noreturn]] void exit (int);' \
+   'extern "C" _Noreturn void exit (int);' \
'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF