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

2018-12-14 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Fri Dec 14 09:21:32 UTC 2018

Modified Files:
src/sys/arch/sparc64/conf: GENERIC

Log Message:
Remove comment about removed lmc*.


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/sparc64/conf/GENERIC

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

Modified files:

Index: src/sys/arch/sparc64/conf/GENERIC
diff -u src/sys/arch/sparc64/conf/GENERIC:1.211 src/sys/arch/sparc64/conf/GENERIC:1.212
--- src/sys/arch/sparc64/conf/GENERIC:1.211	Wed Dec 12 06:29:37 2018
+++ src/sys/arch/sparc64/conf/GENERIC	Fri Dec 14 09:21:32 2018
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.211 2018/12/12 06:29:37 maxv Exp $
+# $NetBSD: GENERIC,v 1.212 2018/12/14 09:21:32 nakayama Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/sparc64/conf/std.sparc64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.211 $"
+#ident		"GENERIC-$Revision: 1.212 $"
 
 maxusers	64
 
@@ -511,7 +511,6 @@ gsip*	at pci? dev ? function ?	# Nationa
 ixg*	at pci? dev ? function ?	# Intel 8259x 10 gigabit
 # XXX lacks bus_dmamap_sync()
 #le*	at pci? dev ? function ?	# PCnet-PCI Ethernet
-# XXX uses vtophys()
 mskc*	at pci? dev ? function ?	# Marvell Yukon 2 Gigabit Ethernet
 msk*	at mskc?			# Marvell Yukon 2 Gigabit Ethernet
 ne*	at pci? dev ? function ?	# NE2000-compatible Ethernet UT



CVS commit: src/sys/dev/pci

2018-12-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec 14 09:47:40 UTC 2018

Modified Files:
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
- Fix availability detection of WoL on some chips. This change has no effect
other than dmesg because WM_F_WOL is currently not used to change the behavior:
  - For ICH/PCH, check the capability not from NVM but from the WUC register.
Check the value before clearing the register.
  - 82580 and newer have per-port NVM block, so read the area correctly.
Note that 82580, I350 and I354 may have PCI function 2 and 3.
  - Some devices can't detect WoL capability neither from NVM nor from WUC.
Use PCI device ID and the function number.
- Print the WUS (WakeUp Status) register bits when resume.


To generate a diff of this commit:
cvs rdiff -u -r1.603 -r1.604 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/pci/if_wmreg.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.603 src/sys/dev/pci/if_wm.c:1.604
--- src/sys/dev/pci/if_wm.c:1.603	Wed Dec 12 08:49:33 2018
+++ src/sys/dev/pci/if_wm.c	Fri Dec 14 09:47:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.603 2018/12/12 08:49:33 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.604 2018/12/14 09:47:40 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.603 2018/12/12 08:49:33 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.604 2018/12/14 09:47:40 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2379,6 +2379,22 @@ alloc_retry:
 	 */
 	wm_gmii_setup_phytype(sc, 0, 0);
 
+	/* check for WM_F_WOL on some chips before wm_reset() */
+	switch (sc->sc_type) {
+	case WM_T_ICH8:
+	case WM_T_ICH9:
+	case WM_T_ICH10:
+	case WM_T_PCH:
+	case WM_T_PCH2:
+	case WM_T_PCH_LPT:
+	case WM_T_PCH_SPT:
+	case WM_T_PCH_CNP:
+		apme_mask = WUC_APME;
+		eeprom_data = CSR_READ(sc, WMREG_WUC);
+		break;
+	default:
+		break;
+	}
 	/* Reset the chip to a known state. */
 	wm_reset(sc);
 
@@ -2480,16 +2496,22 @@ alloc_retry:
 	case WM_T_82574:
 	case WM_T_82583:
 	case WM_T_80003:
-	default:
+	case WM_T_82575:
+	case WM_T_82576:
 		apme_mask = NVM_CFG3_APME;
 		wm_nvm_read(sc, (sc->sc_funcid == 1) ? NVM_OFF_CFG3_PORTB
 		: NVM_OFF_CFG3_PORTA, 1, &eeprom_data);
 		break;
-	case WM_T_82575:
-	case WM_T_82576:
 	case WM_T_82580:
 	case WM_T_I350:
-	case WM_T_I354: /* XXX ok? */
+	case WM_T_I354:
+	case WM_T_I210:
+	case WM_T_I211:
+		apme_mask = NVM_CFG3_APME;
+		wm_nvm_read(sc,
+		NVM_OFF_LAN_FUNC_82580(sc->sc_funcid) + NVM_OFF_CFG3_PORTA,
+		1, &eeprom_data);
+		break;
 	case WM_T_ICH8:
 	case WM_T_ICH9:
 	case WM_T_ICH10:
@@ -2498,9 +2520,12 @@ alloc_retry:
 	case WM_T_PCH_LPT:
 	case WM_T_PCH_SPT:
 	case WM_T_PCH_CNP:
-		/* XXX The funcid should be checked on some devices */
-		apme_mask = WUC_APME;
-		eeprom_data = CSR_READ(sc, WMREG_WUC);
+		/* Already checked before wm_reset () */
+		apme_mask = eeprom_data = 0;
+		break;
+	default: /* XXX 82540 */
+		apme_mask = NVM_CFG3_APME;
+		wm_nvm_read(sc, NVM_OFF_CFG3_PORTA, 1, &eeprom_data);
 		break;
 	}
 
@@ -2508,6 +2533,42 @@ alloc_retry:
 	if ((eeprom_data & apme_mask) != 0)
 		sc->sc_flags |= WM_F_WOL;
 
+	/*
+	 * We have the eeprom settings, now apply the special cases
+	 * where the eeprom may be wrong or the board won't support
+	 * wake on lan on a particular port
+	 */
+	switch (sc->sc_pcidevid) {
+	case PCI_PRODUCT_INTEL_82546GB_PCIE:
+		sc->sc_flags &= ~WM_F_WOL;
+		break;
+	case PCI_PRODUCT_INTEL_82546EB_FIBER:
+	case PCI_PRODUCT_INTEL_82546GB_FIBER:
+		/* Wake events only supported on port A for dual fiber
+		 * regardless of eeprom setting */
+		if (sc->sc_funcid == 1)
+			sc->sc_flags &= ~WM_F_WOL;
+		break;
+	case PCI_PRODUCT_INTEL_82546GB_QUAD_COPPER_KSP3:
+		/* if quad port adapter, disable WoL on all but port A */
+		if (sc->sc_funcid != 0)
+			sc->sc_flags &= ~WM_F_WOL;
+		break;
+	case PCI_PRODUCT_INTEL_82571EB_FIBER:
+		/* Wake events only supported on port A for dual fiber
+		 * regardless of eeprom setting */
+		if (sc->sc_funcid == 1)
+			sc->sc_flags &= ~WM_F_WOL;
+		break;
+	case PCI_PRODUCT_INTEL_82571EB_QUAD_COPPER:
+	case PCI_PRODUCT_INTEL_82571EB_QUAD_FIBER:
+	case PCI_PRODUCT_INTEL_82571GB_QUAD_COPPER:
+		/* if quad port adapter, disable WoL on all but port A */
+		if (sc->sc_funcid != 0)
+			sc->sc_flags &= ~WM_F_WOL;
+		break;
+	}
+
 	if ((sc->sc_type == WM_T_82575) || (sc->sc_type == WM_T_82576)) {
 		/* Check NVM for autonegotiation */
 		if (wm_nvm_read(sc, NVM_OFF_COMPAT, 1, &nvmword) == 0) {
@@ -2977,6 +3038,11 @@ wm_resume(device_t self, const pmf_qual_
 {
 	struct wm_softc *sc = device_private(self);
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
+	char buf[256];
+
+	snprintb(buf, sizeof(buf), WUS_FLAGS, CSR_READ(sc, WMREG_WUS));
+	d

CVS commit: [netbsd-7] src/sys

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:04:26 UTC 2018

Modified Files:
src/sys/compat/linux/common [netbsd-7]: linux_misc_notalpha.c
src/sys/kern [netbsd-7]: kern_time.c

Log Message:
Additionally pull up following revision(s) (requested by maxv in ticket #1660):

sys/compat/linux/common/linux_misc_notalpha.c: revision 1.110
sys/kern/kern_time.c: revision 1.193

Improve my kern_time.c::rev1.192, systematically clear the buffers we get
from 'ptimer_pool' to prevent more leaks.


To generate a diff of this commit:
cvs rdiff -u -r1.108.34.1 -r1.108.34.2 \
src/sys/compat/linux/common/linux_misc_notalpha.c
cvs rdiff -u -r1.179.8.2 -r1.179.8.3 src/sys/kern/kern_time.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_misc_notalpha.c
diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1 src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.2
--- src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1	Sat Jan 17 12:10:54 2015
+++ src/sys/compat/linux/common/linux_misc_notalpha.c	Fri Dec 14 12:04:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $	*/
+/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.2 2018/12/14 12:04:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.2 2018/12/14 12:04:26 martin Exp $");
 
 /*
  * Note that we must NOT include "opt_compat_linux32.h" here,
@@ -161,6 +161,7 @@ linux_sys_alarm(struct lwp *l, const str
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		ptp = spare;

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.179.8.2 src/sys/kern/kern_time.c:1.179.8.3
--- src/sys/kern/kern_time.c:1.179.8.2	Thu Nov 29 08:56:45 2018
+++ src/sys/kern/kern_time.c	Fri Dec 14 12:04:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.179.8.2 2018/11/29 08:56:45 martin Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.2 2018/11/29 08:56:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $");
 
 #include 
 #include 
@@ -1126,6 +1126,7 @@ dosetitimer(struct proc *p, int which, s
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		pt = spare;



CVS commit: [netbsd-7] src/doc

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:06:12 UTC 2018

Modified Files:
src/doc [netbsd-7]: CHANGES-7.3

Log Message:
Annotate ticket #1660 for additional pullups


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-7.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-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.24 src/doc/CHANGES-7.3:1.1.2.25
--- src/doc/CHANGES-7.3:1.1.2.24	Wed Dec 12 11:35:59 2018
+++ src/doc/CHANGES-7.3	Fri Dec 14 12:06:12 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.24 2018/12/12 11:35:59 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.25 2018/12/14 12:06:12 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -304,7 +304,8 @@ libexec/httpd/main.c1.22
 	Fix -X option parsing and miscelaneous cleanup.
 	[mrg, ticket #1659]
 
-sys/kern/kern_time.c1.192
+sys/compat/linux/common/linux_misc_notalpha.c	1.110
+sys/kern/kern_time.c1.192,1.193
 
 	Fix kernel info leak.
 	[maxv, ticket #1660]



CVS commit: [netbsd-7-1] src/sys

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:06:43 UTC 2018

Modified Files:
src/sys/compat/linux/common [netbsd-7-1]: linux_misc_notalpha.c
src/sys/kern [netbsd-7-1]: kern_time.c

Log Message:
Additionally pull up following revision(s) (requested by maxv in ticket #1660):

sys/compat/linux/common/linux_misc_notalpha.c: revision 1.110
sys/kern/kern_time.c: revision 1.193

Improve my kern_time.c::rev1.192, systematically clear the buffers we get
from 'ptimer_pool' to prevent more leaks.


To generate a diff of this commit:
cvs rdiff -u -r1.108.34.1 -r1.108.34.1.6.1 \
src/sys/compat/linux/common/linux_misc_notalpha.c
cvs rdiff -u -r1.179.8.1.4.1 -r1.179.8.1.4.2 src/sys/kern/kern_time.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_misc_notalpha.c
diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1 src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1.6.1
--- src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1	Sat Jan 17 12:10:54 2015
+++ src/sys/compat/linux/common/linux_misc_notalpha.c	Fri Dec 14 12:06:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $	*/
+/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.1.6.1 2018/12/14 12:06:43 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.1.6.1 2018/12/14 12:06:43 martin Exp $");
 
 /*
  * Note that we must NOT include "opt_compat_linux32.h" here,
@@ -161,6 +161,7 @@ linux_sys_alarm(struct lwp *l, const str
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		ptp = spare;

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.179.8.1.4.1 src/sys/kern/kern_time.c:1.179.8.1.4.2
--- src/sys/kern/kern_time.c:1.179.8.1.4.1	Thu Nov 29 08:59:26 2018
+++ src/sys/kern/kern_time.c	Fri Dec 14 12:06:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.179.8.1.4.1 2018/11/29 08:59:26 martin Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.179.8.1.4.2 2018/12/14 12:06:43 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.1.4.1 2018/11/29 08:59:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.1.4.2 2018/12/14 12:06:43 martin Exp $");
 
 #include 
 #include 
@@ -1126,6 +1126,7 @@ dosetitimer(struct proc *p, int which, s
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		pt = spare;



CVS commit: [netbsd-7-0] src/sys

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:07:54 UTC 2018

Modified Files:
src/sys/compat/linux/common [netbsd-7-0]: linux_misc_notalpha.c
src/sys/kern [netbsd-7-0]: kern_time.c

Log Message:
Additionally pull up following revision(s) (requested by maxv in ticket #1660):

sys/compat/linux/common/linux_misc_notalpha.c: revision 1.110
sys/kern/kern_time.c: revision 1.193

Improve my kern_time.c::rev1.192, systematically clear the buffers we get
from 'ptimer_pool' to prevent more leaks.


To generate a diff of this commit:
cvs rdiff -u -r1.108.34.1 -r1.108.34.1.2.1 \
src/sys/compat/linux/common/linux_misc_notalpha.c
cvs rdiff -u -r1.179.12.2 -r1.179.12.3 src/sys/kern/kern_time.c

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

Modified files:

Index: src/sys/compat/linux/common/linux_misc_notalpha.c
diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1 src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1.2.1
--- src/sys/compat/linux/common/linux_misc_notalpha.c:1.108.34.1	Sat Jan 17 12:10:54 2015
+++ src/sys/compat/linux/common/linux_misc_notalpha.c	Fri Dec 14 12:07:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $	*/
+/*	$NetBSD: linux_misc_notalpha.c,v 1.108.34.1.2.1 2018/12/14 12:07:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.1 2015/01/17 12:10:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.108.34.1.2.1 2018/12/14 12:07:54 martin Exp $");
 
 /*
  * Note that we must NOT include "opt_compat_linux32.h" here,
@@ -161,6 +161,7 @@ linux_sys_alarm(struct lwp *l, const str
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		ptp = spare;

Index: src/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.179.12.2 src/sys/kern/kern_time.c:1.179.12.3
--- src/sys/kern/kern_time.c:1.179.12.2	Thu Nov 29 09:00:14 2018
+++ src/sys/kern/kern_time.c	Fri Dec 14 12:07:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.179.12.2 2018/11/29 09:00:14 martin Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.179.12.3 2018/12/14 12:07:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.12.2 2018/11/29 09:00:14 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.12.3 2018/12/14 12:07:54 martin Exp $");
 
 #include 
 #include 
@@ -1126,6 +1126,7 @@ dosetitimer(struct proc *p, int which, s
 		if (spare == NULL) {
 			mutex_spin_exit(&timer_lock);
 			spare = pool_get(&ptimer_pool, PR_WAITOK);
+			memset(spare, 0, sizeof(*spare));
 			goto retry;
 		}
 		pt = spare;



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

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:07:22 UTC 2018

Modified Files:
src/doc [netbsd-7-1]: CHANGES-7.1.3

Log Message:
Annotate ticket #1660 for additional pullups


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.1.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-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.28 src/doc/CHANGES-7.1.3:1.1.2.29
--- src/doc/CHANGES-7.1.3:1.1.2.28	Wed Dec 12 11:37:15 2018
+++ src/doc/CHANGES-7.1.3	Fri Dec 14 12:07:22 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.28 2018/12/12 11:37:15 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.29 2018/12/14 12:07:22 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -296,7 +296,8 @@ libexec/httpd/main.c1.22
 	Fix -X option parsing and miscelaneous cleanup.
 	[mrg, ticket #1659]
 
-sys/kern/kern_time.c1.192
+sys/compat/linux/common/linux_misc_notalpha.c	1.110
+sys/kern/kern_time.c1.192,1.193
 
 	Fix kernel info leak.
 	[maxv, ticket #1660]



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

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:08:43 UTC 2018

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Annotate ticket #1660 for additional pullups


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-7.0.3

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

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.121 src/doc/CHANGES-7.0.3:1.1.2.122
--- src/doc/CHANGES-7.0.3:1.1.2.121	Wed Dec 12 11:38:09 2018
+++ src/doc/CHANGES-7.0.3	Fri Dec 14 12:08:43 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.121 2018/12/12 11:38:09 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.122 2018/12/14 12:08:43 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5604,7 +5604,8 @@ libexec/httpd/main.c1.22
 	Fix -X option parsing and miscelaneous cleanup.
 	[mrg, ticket #1659]
 
-sys/kern/kern_time.c1.192
+sys/compat/linux/common/linux_misc_notalpha.c	1.110
+sys/kern/kern_time.c1.192,1.193
 
 	Fix kernel info leak.
 	[maxv, ticket #1660]



CVS commit: [netbsd-8] src/external/bsd/file/lib

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:14:08 UTC 2018

Modified Files:
src/external/bsd/file/lib [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1136):

external/bsd/file/lib/Makefile: revision 1.11

Use DPSRCS for magic.h. OK'd by Christos.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.4.1 src/external/bsd/file/lib/Makefile

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

Modified files:

Index: src/external/bsd/file/lib/Makefile
diff -u src/external/bsd/file/lib/Makefile:1.8 src/external/bsd/file/lib/Makefile:1.8.4.1
--- src/external/bsd/file/lib/Makefile:1.8	Fri Feb 10 18:11:18 2017
+++ src/external/bsd/file/lib/Makefile	Fri Dec 14 12:14:08 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2017/02/10 18:11:18 christos Exp $
+#	$NetBSD: Makefile,v 1.8.4.1 2018/12/14 12:14:08 martin Exp $
 #
 
 USE_FORT?= yes	# data driven bugs?
@@ -20,6 +20,7 @@ CPPFLAGS+=-I.
 SRCS=		magic.c apprentice.c softmagic.c ascmagic.c compress.c	\
 		is_tar.c readelf.c print.c fsmagic.c apptype.c funcs.c \
 		cdf.c readcdf.c cdf_time.c encoding.c der.c
+DPSRCS=		magic.h
 MAN=		libmagic.3
 MLINKS+=	libmagic.3 magic_open.3 \
 		libmagic.3 magic_close.3 \
@@ -41,5 +42,3 @@ magic.h:magic.h.in
 CLEANFILES+=	magic.h
 
 .include 
-
-${ALLOBJS}:	magic.h



CVS commit: [netbsd-8] src/doc

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:15:17 UTC 2018

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

Log Message:
Ticket #1136


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.75 -r1.1.2.76 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.75 src/doc/CHANGES-8.1:1.1.2.76
--- src/doc/CHANGES-8.1:1.1.2.75	Wed Dec 12 11:34:11 2018
+++ src/doc/CHANGES-8.1	Fri Dec 14 12:15:17 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.75 2018/12/12 11:34:11 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.76 2018/12/14 12:15:17 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -2047,3 +2047,8 @@ sys/kern/sys_sig.c1.47
 	Fix kernel info leak, 4 bytes of padding in struct _ksiginfo.
 	[maxv, ticket #1134]
 
+external/bsd/file/lib/Makefile			1.11
+
+	Fix a parallel build race.
+	[msaitoh, ticket #1136]
+



CVS commit: src/sys/net

2018-12-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 14 12:27:22 UTC 2018

Modified Files:
src/sys/net: if_bridge.c

Log Message:
Need  for ip6_statinc() prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/net/if_bridge.c

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

Modified files:

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.161 src/sys/net/if_bridge.c:1.162
--- src/sys/net/if_bridge.c:1.161	Wed Dec 12 01:46:47 2018
+++ src/sys/net/if_bridge.c	Fri Dec 14 12:27:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.161 2018/12/12 01:46:47 rin Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.162 2018/12/14 12:27:22 martin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.161 2018/12/12 01:46:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.162 2018/12/14 12:27:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -124,6 +124,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_bridge.c,
 
 #include 
 #include 
+#include 
 #include 	/* XXX */
 #endif /* BRIDGE_IPF */
 



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

2018-12-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 14 12:29:22 UTC 2018

Modified Files:
src/sys/arch/arm/nvidia: tegra210_car.c tegra210_carreg.h
tegra210_xusbpad.c tegra_ahcisata.c tegra_ahcisatareg.h tegra_var.h

Log Message:
Support SATA on TEGRA210

Thanks to jmcneill for help with this.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/nvidia/tegra210_car.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nvidia/tegra210_carreg.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra210_xusbpad.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/nvidia/tegra_ahcisata.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_ahcisatareg.h
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/nvidia/tegra_var.h

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

Modified files:

Index: src/sys/arch/arm/nvidia/tegra210_car.c
diff -u src/sys/arch/arm/nvidia/tegra210_car.c:1.22 src/sys/arch/arm/nvidia/tegra210_car.c:1.23
--- src/sys/arch/arm/nvidia/tegra210_car.c:1.22	Wed Dec 12 09:55:34 2018
+++ src/sys/arch/arm/nvidia/tegra210_car.c	Fri Dec 14 12:29:22 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra210_car.c,v 1.22 2018/12/12 09:55:34 skrll Exp $ */
+/* $NetBSD: tegra210_car.c,v 1.23 2018/12/14 12:29:22 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.22 2018/12/12 09:55:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.23 2018/12/14 12:29:22 skrll Exp $");
 
 #include 
 #include 
@@ -457,6 +457,9 @@ static const char *mux_hda_p[] =
 	{ "PLL_P", "PLL_C2", "PLL_C", "PLL_C4_OUT0",
 	  NULL, "PLL_C4_OUT1", "CLK_M", "PLL_C4_OUT2" };
 
+static const char *mux_sata_p[] =
+	{ "PLL_P", NULL, "PLL_C", NULL, NULL, NULL, "CLK_M" };
+
 static struct tegra_clk tegra210_car_clocks[] = {
 	CLK_FIXED("CLK_M", TEGRA210_REF_FREQ),
 
@@ -536,6 +539,13 @@ static struct tegra_clk tegra210_car_clo
 		CAR_CLKSRC_HDA_REG, CAR_CLKSRC_HDA_SRC,
 		mux_hda_p),
 
+	CLK_MUX("MUX_SATA_OOB",
+		CAR_CLKSRC_SATA_OOB_REG	, CAR_CLKSRC_SATA_OOB_SRC,
+		mux_sata_p),
+	CLK_MUX("MUX_SATA",
+		CAR_CLKSRC_SATA_REG, CAR_CLKSRC_SATA_SRC,
+		mux_sata_p),
+
 	CLK_DIV("DIV_UARTA", "MUX_UARTA",
 		CAR_CLKSRC_UARTA_REG, CAR_CLKSRC_UART_DIV),
 	CLK_DIV("DIV_UARTB", "MUX_UARTB",
@@ -595,6 +605,11 @@ static struct tegra_clk tegra210_car_clo
 	CLK_DIV("DIV_HDA", "MUX_HDA",
 		CAR_CLKSRC_HDA_REG, CAR_CLKSRC_HDA_DIV),
 
+	CLK_DIV("DIV_SATA_OOB", "MUX_SATA_OOB",
+		CAR_CLKSRC_SATA_OOB_REG, CAR_CLKSRC_SATA_OOB_DIV),
+	CLK_DIV("DIV_SATA", "MUX_SATA",
+		CAR_CLKSRC_SATA_REG, CAR_CLKSRC_SATA_DIV),
+
 	CLK_GATE_SIMPLE("PLL_U_OUT1", "DIV_PLL_U_OUT1",
 		 CAR_PLLU_OUTA_REG, CAR_PLLU_OUTA_OUT1_CLKEN),
 	CLK_GATE_SIMPLE("PLL_U_OUT2", "DIV_PLL_U_OUT2",
@@ -636,6 +651,9 @@ static struct tegra_clk tegra210_car_clo
 	CLK_GATE_W("HDA2HDMI", "CLK_M", CAR_DEV_W_HDA2HDMICODEC),
 	CLK_GATE_V("HDA2CODEC_2X", "DIV_HDA2CODEC_2X", CAR_DEV_V_HDA2CODEC_2X),
 	CLK_GATE_V("HDA", "DIV_HDA", CAR_DEV_V_HDA),
+
+	CLK_GATE_V("SATA_OOB", "DIV_SATA_OOB", CAR_DEV_V_SATA_OOB),
+	CLK_GATE_V("SATA", "DIV_SATA", CAR_DEV_V_SATA),
 };
 
 struct tegra210_init_parent {
@@ -661,6 +679,8 @@ struct tegra210_init_parent {
 	{ "CML1",		NULL, 0, 0 },
 	{ "AFI",		NULL, 0, 1 },
 	{ "PCIE",		NULL, 0, 1 },
+	{ "SATA",		"PLL_P", 10400, 0 },
+	{ "SATA_OOB",		"PLL_P", 20400, 0 },
 };
 
 struct tegra210_car_rst {
@@ -1681,3 +1701,35 @@ tegra210_car_xusbio_enable_hw_seq(void)
 	tegra_reg_set_clear(bst, bsh, CAR_XUSBIO_PLL_CFG0_REG,
 	CAR_XUSBIO_PLL_CFG0_SEQ_ENABLE, 0);
 }
+
+void
+tegra210_car_sata_enable_hw_control(void)
+{
+	device_t dev = device_find_by_driver_unit("tegra210car", 0);
+	KASSERT(dev != NULL);
+	struct tegra210_car_softc * const sc = device_private(dev);
+	bus_space_tag_t bst = sc->sc_bst;
+	bus_space_handle_t bsh = sc->sc_bsh;
+
+	tegra_reg_set_clear(bst, bsh, CAR_SATA_PLL_CFG0_REG,
+	0,
+	CAR_SATA_PLL_CFG0_PADPLL_RESET_SWCTL);
+	tegra_reg_set_clear(bst, bsh, CAR_SATA_PLL_CFG0_REG,
+	CAR_SATA_PLL_CFG0_SEQ_PADPLL_SLEEP_IDDQ |
+	CAR_SATA_PLL_CFG0_PADPLL_USE_LOCKDET,
+	0);
+}
+
+void
+tegra210_car_sata_enable_hw_seq(void)
+{
+	device_t dev = device_find_by_driver_unit("tegra210car", 0);
+	KASSERT(dev != NULL);
+	struct tegra210_car_softc * const sc = device_private(dev);
+	bus_space_tag_t bst = sc->sc_bst;
+	bus_space_handle_t bsh = sc->sc_bsh;
+
+	tegra_reg_set_clear(bst, bsh, CAR_SATA_PLL_CFG0_REG,
+	CAR_SATA_PLL_CFG0_SEQ_ENABLE, 0);
+}
+

Index: src/sys/arch/arm/nvidia/tegra210_carreg.h
diff -u src/sys/arch/arm/nvidia/tegra210_carreg.h:1.8 src/sys/arch/arm/nvidia/tegra210_carreg.h:1.9
--- src/sys/arch/arm/nvidia/tegra210_carreg.h:1.8	Mon Sep 25 08:55:07 2017
+++ src/sys/arch/arm/nvidia/tegra210_carreg.h	Fri Dec 14 12:29:22 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra210_carreg.h,v 1.8 2017/09/25 08:55:07 jmcneill Exp $ */
+/* $NetBSD: tegra210_carreg.h,v 1.

CVS commit: src/sys/dev/usb

2018-12-14 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Dec 14 13:56:59 UTC 2018

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

Log Message:
add D-Link LTE products


To generate a diff of this commit:
cvs rdiff -u -r1.763 -r1.764 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.763 src/sys/dev/usb/usbdevs:1.764
--- src/sys/dev/usb/usbdevs:1.763	Thu Dec 13 16:20:20 2018
+++ src/sys/dev/usb/usbdevs	Fri Dec 14 13:56:59 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.763 2018/12/13 16:20:20 fox Exp $
+$NetBSD: usbdevs,v 1.764 2018/12/14 13:56:59 tnn Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1417,6 +1417,12 @@ product DLINK DSB650TX_PNA	0x4003	1/10/1
 product DLINK DSB650TX3		0x400b	10/100 ethernet adapter
 product DLINK DSB650TX2		0x4102	10/100 ethernet adapter
 product DLINK DSB650		0xabc1	10/100 ethernet adapter
+product DLINK DWM157_CD		0xa707	DWM-157 CD-ROM Mode
+product DLINK DWM157		0x7d02  DWM-157 LTE
+product DLINK DWM222_CD		0xab00	DWM-222 CD-ROM Mode
+product DLINK DWM222		0x7e35  DWM-222 LTE
+product DLINK DWR510_CD		0xa805	DWR-510 CD-ROM Mode
+product DLINK DWR510		0x7e12  DWR-510 LTE
 
 /* D-Link(2) products */
 product DLINK2 RTL8192SU_1	0x3300	RTL8192SU



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

2018-12-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 14 18:17:36 UTC 2018

Modified Files:
src/sys/arch/arm/nvidia: tegra_xusb.c

Log Message:
Provide TEGRA210 supplies.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_xusb.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/nvidia/tegra_xusb.c
diff -u src/sys/arch/arm/nvidia/tegra_xusb.c:1.15 src/sys/arch/arm/nvidia/tegra_xusb.c:1.16
--- src/sys/arch/arm/nvidia/tegra_xusb.c:1.15	Mon Jul 16 23:11:47 2018
+++ src/sys/arch/arm/nvidia/tegra_xusb.c	Fri Dec 14 18:17:36 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_xusb.c,v 1.15 2018/07/16 23:11:47 christos Exp $ */
+/* $NetBSD: tegra_xusb.c,v 1.16 2018/12/14 18:17:36 skrll Exp $ */
 
 /*
  * Copyright (c) 2016 Jonathan A. Kollasch
@@ -30,7 +30,7 @@
 #include "opt_tegra.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.15 2018/07/16 23:11:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.16 2018/12/14 18:17:36 skrll Exp $");
 
 #include 
 #include 
@@ -88,9 +88,50 @@ enum xusb_type {
 	XUSB_T210
 };
 
+struct tegra_xhci_data {
+	enum xusb_type		txd_type;
+	const char * const *	txd_supplies;
+	size_t			txd_nsupplies;
+	bool			txd_scale_ss_clock;
+};
+
+const char *tegra124_xhci_supplies[] = {
+	"dvddio-pex-supply",
+	"hvddio-pex-supply",
+	"avdd-usb-supply",
+	"avdd-pll-utmip-supply",
+	"avdd-pll-uerefe-supply",
+	"dvdd-usb-ss-pll-supply",
+	"hvdd-usb-ss-pll-e-supply"
+};
+
+struct tegra_xhci_data tegra124_xhci_data = {
+	.txd_type = XUSB_T124,
+	.txd_supplies = tegra124_xhci_supplies,
+	.txd_nsupplies = __arraycount(tegra124_xhci_supplies),
+	.txd_scale_ss_clock = true,
+};
+
+const char *tegra210_xhci_supplies[] = {
+	"dvddio-pex",
+	"hvddio-pex",
+	"avdd-usb",
+	"avdd-pll-utmip",
+	"avdd-pll-uerefe",
+	"dvdd-pex-pll",
+	"hvdd-pex-pll-e",
+};
+
+struct tegra_xhci_data tegra210_xhci_data = {
+	.txd_type = XUSB_T210,
+	.txd_supplies = tegra210_xhci_supplies,
+	.txd_nsupplies = __arraycount(tegra210_xhci_supplies),
+	.txd_scale_ss_clock = false,
+};
+
 static const struct of_compat_data compat_data[] = {
-	{ "nvidia,tegra124-xusb",		XUSB_T124 },
-	{ "nvidia,tegra210-xusb",		XUSB_T210 },
+	{ "nvidia,tegra124-xusb", (uintptr_t)&tegra124_xhci_data },
+	{ "nvidia,tegra210-xusb", (uintptr_t)&tegra210_xhci_data },
 	{ NULL }
 };
 
@@ -112,15 +153,14 @@ struct tegra_xusb_softc {
 	void			*sc_ih_mbox;
 	struct fw_dma		sc_fw_dma;
 	struct clk		*sc_clk_ss_src;
-	enum xusb_type		sc_type;
 
-	bool			sc_scale_ss_clock;
+	struct tegra_xhci_data	*sc_txd;
 };
 
 static uint32_t	csb_read_4(struct tegra_xusb_softc * const, bus_size_t);
 static void	csb_write_4(struct tegra_xusb_softc * const, bus_size_t,
 uint32_t);
-	
+
 static void	tegra_xusb_init(struct tegra_xusb_softc * const);
 static int	tegra_xusb_open_fw(struct tegra_xusb_softc * const);
 static int	tegra_xusb_load_fw(struct tegra_xusb_softc * const, void *,
@@ -173,16 +213,9 @@ tegra_xusb_attach(device_t parent, devic
 	sc->sc_bus.ub_dmatag = faa->faa_dmat;
 	sc->sc_quirks = XHCI_DEFERRED_START;
 	psc->sc_phandle = faa->faa_phandle;
-	psc->sc_type = of_search_compatible(faa->faa_phandle, compat_data)->data;
 
-	switch (psc->sc_type) {
-	case XUSB_T124:
-		psc->sc_scale_ss_clock = true;
-		break;
-	default:
-		psc->sc_scale_ss_clock = false;
-		break;
-	}
+	uintptr_t data = of_search_compatible(faa->faa_phandle, compat_data)->data;
+	psc->sc_txd = (struct tegra_xhci_data *)data;
 
 	if (fdtbus_get_reg_byname(faa->faa_phandle, "hcd", &addr, &size) != 0) {
 		aprint_error(": couldn't get registers\n");
@@ -305,7 +338,7 @@ tegra_xusb_attach(device_t parent, devic
 	tegra_xusb_attach_check(sc, psc->sc_clk_ss_src == NULL,
 		"failed to get xusb_ss_src clock");
 
-	if (psc->sc_scale_ss_clock) {
+	if (psc->sc_txd->txd_scale_ss_clock) {
 		rate = clk_get_rate(psc->sc_clk_ss_src);
 		DPRINTF(sc->sc_dev, "xusb_ss_src rate %u\n", rate);
 		error = clk_set_rate(psc->sc_clk_ss_src, 200);
@@ -357,11 +390,11 @@ tegra_xusb_attach(device_t parent, devic
 	tegra_xusb_init(psc);
 
 #if defined(TEGRA124_XUSB_BIN_STATIC)
-	if (psc->sc_type == XUSB_T124)
+	if (psc->sc_txd->txd_type == XUSB_T124)
 		wait_for_root = false;
 #endif
 #if defined(TEGRA210_XUSB_BIN_STATIC)
-	if (psc->sc_type == XUSB_T210)
+	if (psc->sc_txd->txd_type == XUSB_T210)
 		wait_for_root = false;
 #endif
 
@@ -502,7 +535,7 @@ tegra_xusb_intr_mbox(void *v)
 		break;
 	case 4:
 	case 5:
-		if (psc->sc_scale_ss_clock) {
+		if (psc->sc_txd->txd_scale_ss_clock) {
 			DPRINTF(sc->sc_dev, "SSPI_CLOCK %u\n", data * 1000);
 			rate = clk_get_rate(psc->sc_clk_ss_src);
 			DPRINTF(sc->sc_dev, "rate of psc->sc_clk_ss_src %u\n",
@@ -517,7 +550,7 @@ tegra_xusb_intr_mbox(void *v)
 msg = __SHIFTIN(128, MAILBOX_DATA_TYPE) |
   __SHIFTIN(rate / 1000, MAILBOX_DATA_DATA);
 			} else
-clk_fail:	
+clk_fail:
 msg = __SHIFTIN(129, MAIL

CVS commit: src/sys/dev/ic

2018-12-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 14 20:44:37 UTC 2018

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

Log Message:
always use correct function to free our copy of the microcode


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

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

Modified files:

Index: src/sys/dev/ic/malo.c
diff -u src/sys/dev/ic/malo.c:1.13 src/sys/dev/ic/malo.c:1.14
--- src/sys/dev/ic/malo.c:1.13	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/malo.c	Fri Dec 14 20:44:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: malo.c,v 1.13 2018/09/03 16:29:31 riastradh Exp $ */
+/*	$NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $ */
 /*	$OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.13 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $");
 
 #include 
 #include 
@@ -1727,6 +1727,8 @@ malo_load_bootimg(struct malo_softc *sc)
 	bus_space_write_region_1(sc->sc_mem1_bt, sc->sc_mem1_bh, 0xbf00,
 	ucode, size);
 
+	firmware_free(ucode, size);
+
 	/*
 	 * we loaded the firmware into card memory now tell the CPU
 	 * to fetch the code and execute it. The memory mapped via the
@@ -1743,10 +1745,8 @@ malo_load_bootimg(struct malo_softc *sc)
 	}
 	if (i == 10) {
 		aprint_error_dev(sc->sc_dev, "timeout at boot firmware load!\n");
-		free(ucode, M_DEVBUF);
 		return (ETIMEDOUT);
 	}
-	firmware_free(ucode, size);
 
 	/* tell the card we're done and... */
 	malo_mem_write2(sc, 0xbef8, 0x001);



CVS commit: src/sys/dev/ic

2018-12-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 14 21:23:44 UTC 2018

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

Log Message:
use callout_destroy in malo_detach, not callout_stop


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/malo.c

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

Modified files:

Index: src/sys/dev/ic/malo.c
diff -u src/sys/dev/ic/malo.c:1.14 src/sys/dev/ic/malo.c:1.15
--- src/sys/dev/ic/malo.c:1.14	Fri Dec 14 20:44:36 2018
+++ src/sys/dev/ic/malo.c	Fri Dec 14 21:23:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $ */
+/*	$NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $ */
 /*	$OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $");
 
 #include 
 #include 
@@ -470,10 +470,9 @@ malo_detach(void *arg)
 	struct ieee80211com *ic = &sc->sc_ic;
 	struct ifnet *ifp = &sc->sc_if;
 
-	/* remove channel scanning timer */
-	callout_stop(&sc->sc_scan_to);
-
 	malo_stop(ifp, 1);
+	/* remove channel scanning timer */
+	callout_destroy(&sc->sc_scan_to);
 	ieee80211_ifdetach(ic);
 	if_detach(ifp);
 	malo_free_cmd(sc);



CVS commit: src/sys/dev/cardbus

2018-12-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 14 21:27:03 UTC 2018

Modified Files:
src/sys/dev/cardbus: if_ral_cardbus.c

Log Message:
fix whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/cardbus/if_ral_cardbus.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/cardbus/if_ral_cardbus.c
diff -u src/sys/dev/cardbus/if_ral_cardbus.c:1.24 src/sys/dev/cardbus/if_ral_cardbus.c:1.25
--- src/sys/dev/cardbus/if_ral_cardbus.c:1.24	Thu Jul 14 10:19:06 2016
+++ src/sys/dev/cardbus/if_ral_cardbus.c	Fri Dec 14 21:27:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ral_cardbus.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $	*/
+/*	$NetBSD: if_ral_cardbus.c,v 1.25 2018/12/14 21:27:03 jakllsch Exp $	*/
 /*	$OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $  */
 
 /*-
@@ -22,7 +22,7 @@
  * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.24 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.25 2018/12/14 21:27:03 jakllsch Exp $");
 
 
 #include 
@@ -106,10 +106,10 @@ void	ral_cardbus_setup(struct ral_cardbu
 int
 ral_cardbus_match(device_t parent, cfdata_t cfdata, void *aux)
 {
-struct cardbus_attach_args *ca = aux;
+	struct cardbus_attach_args *ca = aux;
 
-if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_RALINK) {
-switch (PCI_PRODUCT(ca->ca_id)) {
+	if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_RALINK) {
+		switch (PCI_PRODUCT(ca->ca_id)) {
 		case PCI_PRODUCT_RALINK_RT2560:
 		case PCI_PRODUCT_RALINK_RT2561:
 		case PCI_PRODUCT_RALINK_RT2561S:
@@ -117,10 +117,10 @@ ral_cardbus_match(device_t parent, cfdat
 			return 1;
 		default:
 			return 0;
-}
-}
+		}
+	}
 
-return 0;
+	return 0;
 }
 
 void



CVS commit: src/sys/dev/cardbus

2018-12-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 14 21:49:22 UTC 2018

Modified Files:
src/sys/dev/cardbus: files.cardbus
Added Files:
src/sys/dev/cardbus: if_malo_cardbus.c

Log Message:
add cardbus attachment for malo(4), from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/cardbus/files.cardbus
cvs rdiff -u -r0 -r1.1 src/sys/dev/cardbus/if_malo_cardbus.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/cardbus/files.cardbus
diff -u src/sys/dev/cardbus/files.cardbus:1.38 src/sys/dev/cardbus/files.cardbus:1.39
--- src/sys/dev/cardbus/files.cardbus:1.38	Sat Mar 30 02:38:59 2013
+++ src/sys/dev/cardbus/files.cardbus	Fri Dec 14 21:49:22 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.cardbus,v 1.38 2013/03/30 02:38:59 christos Exp $
+#	$NetBSD: files.cardbus,v 1.39 2018/12/14 21:49:22 jakllsch Exp $
 #
 # files.cardbus
 #
@@ -155,3 +155,9 @@ file	dev/cardbus/siisata_cardbus.c	siisa
 #
 attach	sdhc at cardbus with sdhc_cardbus
 file	dev/cardbus/sdhc_cardbus.c	sdhc_cardbus
+
+#
+# Marvel Libertas Open
+#
+attach	malo at cardbus with malo_cardbus
+file	dev/cardbus/if_malo_cardbus.c		malo_cardbus

Added files:

Index: src/sys/dev/cardbus/if_malo_cardbus.c
diff -u /dev/null src/sys/dev/cardbus/if_malo_cardbus.c:1.1
--- /dev/null	Fri Dec 14 21:49:22 2018
+++ src/sys/dev/cardbus/if_malo_cardbus.c	Fri Dec 14 21:49:22 2018
@@ -0,0 +1,231 @@
+/*	$NetBSD: if_malo_cardbus.c,v 1.1 2018/12/14 21:49:22 jakllsch Exp $ */
+/*	$OpenBSD: if_malo_cardbus.c,v 1.12 2013/12/06 21:03:02 deraadt Exp $ */
+
+/*
+ * Copyright (c) 2006 Claudio Jeker 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: if_malo_cardbus.c,v 1.1 2018/12/14 21:49:22 jakllsch Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+struct malo_cardbus_softc {
+	struct malo_softc	sc_malo;
+
+	/* cardbus specific goo */
+	cardbus_devfunc_t	sc_ct;
+	pcitag_t		sc_tag;
+	void			*sc_ih;
+	bus_size_t		sc_mapsize1;
+	bus_size_t		sc_mapsize2;
+	pcireg_t		sc_bar1_val;
+	pcireg_t		sc_bar2_val;
+};
+
+int	malo_cardbus_match(device_t, cfdata_t, void *);
+void	malo_cardbus_attach(device_t, device_t, void *);
+int	malo_cardbus_detach(device_t, int);
+
+CFATTACH_DECL_NEW(malo_cardbus, sizeof (struct malo_cardbus_softc),
+malo_cardbus_match, malo_cardbus_attach, malo_cardbus_detach, NULL);
+
+void	malo_cardbus_setup(struct malo_cardbus_softc *csc);
+int	malo_cardbus_enable(struct malo_softc *sc);
+void	malo_cardbus_disable(struct malo_softc *sc);
+
+int
+malo_cardbus_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct cardbus_attach_args *ca = aux;
+
+	if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_MARVELL) {
+		switch (PCI_PRODUCT(ca->ca_id)) {
+			case PCI_PRODUCT_MARVELL_88W8310:
+			case PCI_PRODUCT_MARVELL_88W8335_1:
+			case PCI_PRODUCT_MARVELL_88W8335_2:
+return 1;
+			default:
+return 0;
+		}
+	}
+
+	return 0;
+}
+
+void
+malo_cardbus_attach(struct device *parent, struct device *self, void *aux)
+{
+	struct malo_cardbus_softc *csc = device_private(self);
+	struct malo_softc *sc = &csc->sc_malo;
+	struct cardbus_attach_args *ca = aux;
+	cardbus_devfunc_t ct = ca->ca_ct;
+	char devinfo[256];
+	bus_addr_t base;
+	int error;
+
+	pci_devinfo(ca->ca_id, ca->ca_class, 0, devinfo, sizeof(devinfo));
+	aprint_normal(": %s\n", devinfo);
+
+	sc->sc_dev = self;
+	sc->sc_dmat = ca->ca_dmat;
+	csc->sc_ct = ct;
+	csc->sc_tag = ca->ca_tag;
+
+	/* power management hooks */
+	sc->sc_enable = malo_cardbus_enable;
+	sc->sc_disable = malo_cardbus_disable;
+
+	/* map control/status registers */
+	error = Cardbus_mapreg_map(ct, PCI_BAR0,
+	PCI_MAPREG_TYPE_MEM, 0, &sc->sc_mem1_bt, &sc->sc_mem1_bh,
+	&base, &csc->sc_mapsize1);
+	if (error != 0) {
+		aprint_error(": can't map mem1 space\n");
+		return;
+	}
+	csc->sc_bar1_val = base | PCI_MAPREG_TYPE_MEM;
+
+	error = Cardbus_mapreg_map(ct, PCI_BAR1,
+	PCI_MAPREG_TYPE_MEM, 0, &sc->sc_mem2_bt, &sc->sc_mem2_bh,
+	&base, &csc->sc_mapsize2);
+	if (error != 0) {
+		aprint_error(": can't map mem2 

CVS commit: src/sys/arch

2018-12-14 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Dec 14 22:00:26 UTC 2018

Modified Files:
src/sys/arch/amd64/conf: ALL GENERIC
src/sys/arch/i386/conf: ALL GENERIC

Log Message:
add cardbus malo(4) to x86 GENERIC and ALL kernels


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.512 -r1.513 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.459 -r1.460 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1197 -r1.1198 src/sys/arch/i386/conf/GENERIC

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/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.110 src/sys/arch/amd64/conf/ALL:1.111
--- src/sys/arch/amd64/conf/ALL:1.110	Wed Dec 12 06:29:36 2018
+++ src/sys/arch/amd64/conf/ALL	Fri Dec 14 22:00:26 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.110 2018/12/12 06:29:36 maxv Exp $
+# $NetBSD: ALL,v 1.111 2018/12/14 22:00:26 jakllsch Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.110 $"
+#ident		"ALL-$Revision: 1.111 $"
 
 maxusers	64		# estimated number of users
 
@@ -1061,6 +1061,7 @@ athn*	at cardbus? function ?	# Atheros A
 atw*	at cardbus? function ?	# ADMtek ADM8211 (802.11)
 ex*	at cardbus? function ?	# 3Com 3c575TX
 fxp*	at cardbus? function ?	# Intel i8255x
+malo*	at cardbus? function ?	# Marvell Libertas Wireless
 ral*	at cardbus? function ?	# Ralink Technology RT25x0 802.11a/b/g
 re*	at cardbus? function ?	# Realtek 8139C+/8169/8169S/8110S
 rtk*	at cardbus? function ?	# Realtek 8129/8139

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.512 src/sys/arch/amd64/conf/GENERIC:1.513
--- src/sys/arch/amd64/conf/GENERIC:1.512	Wed Dec 12 06:29:36 2018
+++ src/sys/arch/amd64/conf/GENERIC	Fri Dec 14 22:00:26 2018
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.512 2018/12/12 06:29:36 maxv Exp $
+# $NetBSD: GENERIC,v 1.513 2018/12/14 22:00:26 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.512 $"
+#ident		"GENERIC-$Revision: 1.513 $"
 
 maxusers	64		# estimated number of users
 
@@ -856,6 +856,7 @@ athn*	at cardbus? function ?	# Atheros A
 atw*	at cardbus? function ?	# ADMtek ADM8211 (802.11)
 ex*	at cardbus? function ?	# 3Com 3C575TX
 fxp*	at cardbus? function ?	# Intel i8255x
+malo*	at cardbus? function ?	# Marvell Libertas Wireless
 ral*	at cardbus? function ?	# Ralink Technology RT25x0 802.11a/b/g
 re*	at cardbus? function ?	# Realtek 8139C+/8169/8169S/8110S
 rtk*	at cardbus? function ?	# Realtek 8129/8139

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.459 src/sys/arch/i386/conf/ALL:1.460
--- src/sys/arch/i386/conf/ALL:1.459	Wed Dec 12 06:29:37 2018
+++ src/sys/arch/i386/conf/ALL	Fri Dec 14 22:00:26 2018
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.459 2018/12/12 06:29:37 maxv Exp $
+# $NetBSD: ALL,v 1.460 2018/12/14 22:00:26 jakllsch Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.459 $"
+#ident		"ALL-$Revision: 1.460 $"
 
 maxusers	64		# estimated number of users
 
@@ -1165,6 +1165,7 @@ atw*	at cardbus? function ?	# ADMtek ADM
 bwi*	at cardbus? function ?	# Broadcom BCM43xx wireless
 ex*	at cardbus? function ?	# 3Com 3c575TX
 fxp*	at cardbus? function ?	# Intel i8255x
+malo*	at cardbus? function ?	# Marvell Libertas Wireless
 ral*	at cardbus? function ?	# Ralink Technology RT25x0 802.11a/b/g
 re*	at cardbus? function ?	# Realtek 8139C+/8169/8169S/8110S
 rtk*	at cardbus? function ?	# Realtek 8129/8139

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1197 src/sys/arch/i386/conf/GENERIC:1.1198
--- src/sys/arch/i386/conf/GENERIC:1.1197	Wed Dec 12 06:29:37 2018
+++ src/sys/arch/i386/conf/GENERIC	Fri Dec 14 22:00:26 2018
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1197 2018/12/12 06:29:37 maxv Exp $
+# $NetBSD: GENERIC,v 1.1198 2018/12/14 22:00:26 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.1197 $"
+#ident		"GENERIC-$Revision: 1.1198 $"
 
 maxusers	64		# estimated number of users
 
@@ -1097,6 +1097,7 @@ atw*	at cardbus? function ?	# ADMtek ADM
 bwi*	at cardbus? function ?	# Broadcom BCM43xx wireless
 ex*	at cardbus? function ?	# 3Com 3c575TX
 fxp*	at cardbus? function ?	# Intel i8255x
+malo*	at cardbus? function ?	# Marvell Libertas W

CVS commit: src/sys/dev/i2c

2018-12-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec 14 22:05:36 UTC 2018

Modified Files:
src/sys/dev/i2c: ds1307.c files.i2c

Log Message:
add options DSRTC_YEAR_START_2K for machines which use 2000 and not 1970
as base to count years from, like Iyonix.
While there apply the offset when writing to the clock as well.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/i2c/ds1307.c
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/i2c/files.i2c

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/i2c/ds1307.c
diff -u src/sys/dev/i2c/ds1307.c:1.29 src/sys/dev/i2c/ds1307.c:1.30
--- src/sys/dev/i2c/ds1307.c:1.29	Tue Jun 26 06:03:57 2018
+++ src/sys/dev/i2c/ds1307.c	Fri Dec 14 22:05:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ds1307.c,v 1.29 2018/06/26 06:03:57 thorpej Exp $	*/
+/*	$NetBSD: ds1307.c,v 1.30 2018/12/14 22:05:36 macallan Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.29 2018/06/26 06:03:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.30 2018/12/14 22:05:36 macallan Exp $");
 
 #include 
 #include 
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1
 #include 
 
 #include "ioconf.h"
+#include "opt_dsrtc.h"
 
 struct dsrtc_model {
 	const i2c_addr_t *dm_valid_addrs;
@@ -316,6 +317,7 @@ dsrtc_attach(device_t parent, device_t s
 	sc->sc_dev = self;
 	sc->sc_open = 0;
 	sc->sc_todr.cookie = sc;
+	
 	if (dm->dm_flags & DSRTC_FLAG_BCD) {
 		sc->sc_todr.todr_gettime_ymdhms = dsrtc_gettime_ymdhms;
 		sc->sc_todr.todr_settime_ymdhms = dsrtc_settime_ymdhms;
@@ -325,6 +327,10 @@ dsrtc_attach(device_t parent, device_t s
 	}
 	sc->sc_todr.todr_setwen = NULL;
 
+#ifdef DSRTC_YEAR_START_2K
+	sc->sc_model.dm_flags |= DSRTC_FLAG_YEAR_START_2K;
+#endif
+
 	todr_attach(&sc->sc_todr);
 	if ((sc->sc_model.dm_flags & DSRTC_FLAG_TEMP) != 0) {
 		int error;
@@ -571,7 +577,7 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 {
 	struct dsrtc_model * const dm = &sc->sc_model;
 	uint8_t bcd[DS_RTC_SIZE], cmdbuf[2];
-	int error;
+	int error, offset;
 
 	KASSERT(DS_RTC_SIZE >= dm->dm_rtc_size);
 
@@ -585,8 +591,15 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 	bcd[DS_DATE] = bintobcd(dt->dt_day);
 	bcd[DS_DAY] = bintobcd(dt->dt_wday);
 	bcd[DS_MONTH] = bintobcd(dt->dt_mon);
-	bcd[DS_YEAR] = bintobcd((dt->dt_year - POSIX_BASE_YEAR) % 100);
-	if (dt->dt_year - POSIX_BASE_YEAR >= 100)
+	
+	if (sc->sc_model.dm_flags & DSRTC_FLAG_YEAR_START_2K) {
+		offset = 2000;
+	} else {
+		offset = POSIX_BASE_YEAR;
+	}
+
+	bcd[DS_YEAR] = bintobcd((dt->dt_year - offset) % 100);
+	if (dt->dt_year - offset >= 100)
 		bcd[DS_MONTH] |= DS_MONTH_CENTURY;
 
 	if ((error = iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) != 0) {

Index: src/sys/dev/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.96 src/sys/dev/i2c/files.i2c:1.97
--- src/sys/dev/i2c/files.i2c:1.96	Sun Sep  2 01:16:58 2018
+++ src/sys/dev/i2c/files.i2c	Fri Dec 14 22:05:36 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.96 2018/09/02 01:16:58 jmcneill Exp $
+#	$NetBSD: files.i2c,v 1.97 2018/12/14 22:05:36 macallan Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -123,6 +123,7 @@ file	dev/i2c/lm87.clmenv
 device	dsrtc: sysmon_envsys
 attach	dsrtc at iic
 file	dev/i2c/ds1307.c			dsrtc
+defflag opt_dsrtc.hDSRTC_YEAR_START_2K
 
 # Xicor X1226 Real Time Clock
 device	xrtc



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

2018-12-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec 14 23:01:53 UTC 2018

Modified Files:
src/sys/arch/iyonix/conf: GENERIC

Log Message:
Make this config resemble an Iyonix as they actually shipped:
- add more onboard and standard devices ( dsrtc, ehci, etc. )
- remove lots of unused and commented out drivers
- add some useful filesystems like procfs etc.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/iyonix/conf/GENERIC

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/iyonix/conf/GENERIC
diff -u src/sys/arch/iyonix/conf/GENERIC:1.104 src/sys/arch/iyonix/conf/GENERIC:1.105
--- src/sys/arch/iyonix/conf/GENERIC:1.104	Wed Dec 12 06:29:37 2018
+++ src/sys/arch/iyonix/conf/GENERIC	Fri Dec 14 23:01:53 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.104 2018/12/12 06:29:37 maxv Exp $
+#	$NetBSD: GENERIC,v 1.105 2018/12/14 23:01:53 macallan Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	"arch/iyonix/conf/std.iyonix"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.104 $"
+#ident 		"GENERIC-$Revision: 1.105 $"
 
 maxusers	32		# estimated number of users
 
@@ -83,7 +83,7 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	DDB_KEYCODE=0x40
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
-makeoptions	DEBUG="-g"	# compile full symbol table
+#makeoptions	DEBUG="-g"	# compile full symbol table
 makeoptions	COPY_SYMTAB=1
 #options 	PMAP_DEBUG	# Enable pmap_debug_level code
 #options 	VERBOSE_INIT_ARM # verbose bootstraping messages
@@ -94,7 +94,7 @@ makeoptions	COPY_SYMTAB=1
 
 # Compatibility options
 
-include 	"conf/compat_netbsd50.config"
+include 	"conf/compat_netbsd70.config"
 options 	COMPAT_NETBSD32	# allow running arm (e.g. non-earm) binaries
 
 # File systems
@@ -107,16 +107,16 @@ file-system 	NFS		# Network File System 
 file-system 	CD9660		# ISO 9660 + Rock Ridge file system
 file-system 	MSDOSFS		# MS-DOS file system
 #file-system 	FDESC		# /dev/fd
-#file-system 	KERNFS		# /kern
+file-system 	KERNFS		# /kern
 #file-system 	NULLFS		# loopback file system
 #file-system 	OVERLAY		# overlay file system
-#file-system 	PROCFS		# /proc
+file-system 	PROCFS		# /proc
 #file-system 	UMAPFS		# NULLFS + uid and gid remapping
 #file-system 	UNION		# union file system
 #file-system	CODA		# Coda File System; also needs vcoda (below)
 #file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
-#file-system	PTYFS		# /dev/ptm support
-#file-system	TMPFS		# Efficient memory file-system
+file-system	PTYFS		# /dev/ptm support
+file-system	TMPFS		# Efficient memory file-system
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
 #file-system	HFS		# experimental - Apple HFS+ (read-only)
 file-system FILECORE# Acorn filecore file system
@@ -138,7 +138,7 @@ options 	FFS_NO_SNAPSHOT	# No FFS snapsh
 # Networking options
 #options 	GATEWAY		# packet forwarding
 options 	INET		# IP + ICMP + TCP + UDP
-#options 	INET6		# IPV6
+options 	INET6		# IPV6
 #options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MROUTING	# IP multicast routing
@@ -165,10 +165,17 @@ options 	INET		# IP + ICMP + TCP + UDP
 
 options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
 
+#options 	DKWEDGE_AUTODISCOVER
+#options 	DKWEDGE_METHOD_BSDLABEL
+#options 	DKWEDGE_METHOD_MBR
+
+options 	INSECURE
+
 # Kernel root file system and dump configuration.
 config		netbsd	root on ? type ?
-#config		netbsd	root on sd0a type ffs
-#config		netbsd	root on ? type nfs
+#config		netbsd	root on wd1a type ffs
+#config		netbsd	root on wm0 type nfs
+#config		netbsd	root on "wedge:system/a" type ffs
 
 #
 # Device configuration
@@ -191,6 +198,10 @@ pci0at iopxs? bus ? 
 # The curious can see their RAM timings.
 spdmem* at iic1 addr 0x56
 
+# onboard RTC. RISC OS starts counting years at 2000
+dsrtc0 	at iic0 addr 0x68
+options 	DSRTC_YEAR_START_2K
+
 # PCI bridges
 ppb*	at pci? dev ? function ?	# PCI-PCI bridges
 pci*	at ppb? bus ?
@@ -202,142 +213,42 @@ pci*	at ppb? bus ?
 # VGA
 #vga*at pci? dev ? function ?
 genfb*		at pci? dev ? function ?
+#options 	GENFB_PCI_DEBUG
+#gffb*		at pci? dev ? function ?
+
+# these exist but aren't configured by RISC OS
+#alipm*		at pci?
+#iic*		at alipm?
 
 # Display
 wsdisplay0  at wsemuldisplaydev? console 1
 wsdisplay*  at wsemuldisplaydev?
 
-options 	WSEMUL_VT100			# VT100 / VT220 emulation
-options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
-
-# CardBus bridge support
-#cbb*		at pci? dev ? function ?
-#cardslot*	at cbb?
-
-# CardBus bus support
-#cardbus*	at cardslot?
-#pcmcia* 	at cardslot?
-
-# Serial Devices
-
-# PCI serial interfaces
-#com*	at puc? port ?			# 16x50s on "universal" comm boards
-#cy*	at pci? dev ? function ?	# Cyclades Cyclom-Y serial bo

CVS commit: src/etc/etc.iyonix

2018-12-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec 14 23:03:29 UTC 2018

Modified Files:
src/etc/etc.iyonix: MAKEDEV.conf

Log Message:
make iic* and more pci* nodes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/etc/etc.iyonix/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.iyonix/MAKEDEV.conf
diff -u src/etc/etc.iyonix/MAKEDEV.conf:1.4 src/etc/etc.iyonix/MAKEDEV.conf:1.5
--- src/etc/etc.iyonix/MAKEDEV.conf:1.4	Sun Sep 23 09:20:59 2018
+++ src/etc/etc.iyonix/MAKEDEV.conf	Fri Dec 14 23:03:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.4 2018/09/23 09:20:59 maxv Exp $
+# $NetBSD: MAKEDEV.conf,v 1.5 2018/12/14 23:03:29 macallan Exp $
 
 all_md)
 	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@@ -10,7 +10,8 @@ all_md)
 	makedev scsibus0 scsibus1 scsibus2 scsibus3
 	makedev	sysmon
 	makedev dmoverio
-	makedev pci0
+	makedev pci0 pci1 pci2 pci3
+	makedev iic0 iic1 iic2
 	makedev kttcp
 	makedev cfs
 	;;



CVS commit: src/usr.bin/telnet

2018-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 14 23:40:17 UTC 2018

Modified Files:
src/usr.bin/telnet: authenc.c commands.c externs.h main.c network.c
ring.c telnet.c utilities.c

Log Message:
minor cleanup:
- more const
- prevent overflow of the argument vector
- change a lot of unsigned to signed to eliminate casts


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/telnet/authenc.c
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/telnet/commands.c
cvs rdiff -u -r1.43 -r1.44 src/usr.bin/telnet/externs.h
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/telnet/main.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/telnet/network.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/telnet/ring.c
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/telnet/telnet.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/telnet/utilities.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/telnet/authenc.c
diff -u src/usr.bin/telnet/authenc.c:1.13 src/usr.bin/telnet/authenc.c:1.14
--- src/usr.bin/telnet/authenc.c:1.13	Mon Jan  9 11:08:55 2012
+++ src/usr.bin/telnet/authenc.c	Fri Dec 14 18:40:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: authenc.c,v 1.13 2012/01/09 16:08:55 christos Exp $	*/
+/*	$NetBSD: authenc.c,v 1.14 2018/12/14 23:40:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)authenc.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: authenc.c,v 1.13 2012/01/09 16:08:55 christos Exp $");
+__RCSID("$NetBSD: authenc.c,v 1.14 2018/12/14 23:40:17 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -54,13 +54,15 @@ __RCSID("$NetBSD: authenc.c,v 1.13 2012/
 int
 telnet_net_write(unsigned char *str, int len)
 {
-	if (NETROOM() > len) {
-		ring_supply_data(&netoring, str, len);
-		if (str[0] == IAC && str[1] == SE)
-			printsub('>', &str[2], len-2);
-		return(len);
+	if (NETROOM() <= len)
+		return 0;
+	ring_supply_data(&netoring, str, len);
+	if (str[0] == IAC && str[1] == SE) {
+		if (len < 2)
+			return 0;
+		printsub('>', &str[2], len - 2);
 	}
-	return(0);
+	return len;
 }
 
 void
@@ -77,13 +79,13 @@ net_encrypt(void)
 int
 telnet_spin(void)
 {
-	return(-1);
+	return -1;
 }
 
 char *
 telnet_getenv(char *val)
 {
-	return((char *)env_getvalue((unsigned char *)val));
+	return env_getvalue(val);
 }
 
 char *
@@ -93,15 +95,18 @@ telnet_gets(char *prmpt, char *result, i
 	int om = globalmode;
 	char *res;
 
+	if (length < 0)
+		abort();
+
 	TerminalNewMode(-1);
 	if (echo) {
 		printf("%s", prmpt);
 		res = fgets(result, length, stdin);
 	} else if ((res = getpass(prmpt)) != NULL) {
-		strlcpy(result, res, length);
+		strlcpy(result, res, (size_t)length);
 		res = result;
 	}
 	TerminalNewMode(om);
-	return(res);
+	return res;
 }
 #endif	/* defined(AUTHENTICATION) || defined(ENCRYPTION) */

Index: src/usr.bin/telnet/commands.c
diff -u src/usr.bin/telnet/commands.c:1.72 src/usr.bin/telnet/commands.c:1.73
--- src/usr.bin/telnet/commands.c:1.72	Fri Dec 14 01:08:18 2018
+++ src/usr.bin/telnet/commands.c	Fri Dec 14 18:40:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: commands.c,v 1.72 2018/12/14 06:08:18 maya Exp $	*/
+/*	$NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $	*/
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)commands.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: commands.c,v 1.72 2018/12/14 06:08:18 maya Exp $");
+__RCSID("$NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -81,6 +81,7 @@ __RCSID("$NetBSD: commands.c,v 1.72 2018
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -122,15 +123,15 @@ static int margc;
 static char *margv[20];
 
 static void makeargv(void);
-static int special(char *);
+static int special(const char *);
 static const char *control(cc_t);
 static int sendcmd(int, char **);
-static int send_esc(char *);
-static int send_docmd(char *);
-static int send_dontcmd(char *);
-static int send_willcmd(char *);
-static int send_wontcmd(char *);
-static int send_help(char *);
+static int send_esc(const char *);
+static int send_docmd(const char *);
+static int send_dontcmd(const char *);
+static int send_willcmd(const char *);
+static int send_wontcmd(const char *);
+static int send_help(const char *);
 static int lclchars(int);
 static int togdebug(int);
 static int togcrlf(int);
@@ -140,7 +141,7 @@ static int togxbinary(int);
 static int togglehelp(int);
 static void settogglehelp(int);
 static int toggle(int, char *[]);
-static struct setlist *getset(char *);
+static struct setlist *getset(const char *);
 static int setcmd(int, char *[]);
 static int unsetcmd(int, char *[]);
 static int dokludgemode(int);
@@ -153,33 +154,45 @@ static int setescape(int, char *[]);
 static int togcrmod(int, char *[]);
 static int bye(int, char *[]);
 static void slc_help(int);
-static struct slclist *getslc(char *);
+static stru

CVS commit: src/lib/libtelnet

2018-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 14 23:42:40 UTC 2018

Modified Files:
src/lib/libtelnet: auth-proto.h auth.c genget.c misc.h

Log Message:
more const


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libtelnet/auth-proto.h
cvs rdiff -u -r1.21 -r1.22 src/lib/libtelnet/auth.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libtelnet/genget.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libtelnet/misc.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/libtelnet/auth-proto.h
diff -u src/lib/libtelnet/auth-proto.h:1.15 src/lib/libtelnet/auth-proto.h:1.16
--- src/lib/libtelnet/auth-proto.h:1.15	Mon Mar 20 16:23:47 2006
+++ src/lib/libtelnet/auth-proto.h	Fri Dec 14 18:42:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth-proto.h,v 1.15 2006/03/20 21:23:47 christos Exp $	*/
+/*	$NetBSD: auth-proto.h,v 1.16 2018/12/14 23:42:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -68,12 +68,12 @@ void auth_reply(unsigned char *, int);
 void auth_disable_name(char *);
 void auth_gen_printsub(unsigned char *, int, unsigned char *, int);
 
-int getauthmask(char *, int *);
-int auth_enable(char *);
-int auth_disable(char *);
-int auth_onoff(char *, int);
+int getauthmask(const char *, int *);
+int auth_enable(const char *);
+int auth_disable(const char *);
+int auth_onoff(const char *, int);
 int auth_togdebug(int);
-int auth_status(char *);
+int auth_status(const char *);
 void auth_name(unsigned char *, int);
 int auth_sendname(unsigned char *, int);
 void auth_finished(Authenticator *, int);

Index: src/lib/libtelnet/auth.c
diff -u src/lib/libtelnet/auth.c:1.21 src/lib/libtelnet/auth.c:1.22
--- src/lib/libtelnet/auth.c:1.21	Wed Mar 21 01:33:27 2012
+++ src/lib/libtelnet/auth.c	Fri Dec 14 18:42:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $	*/
+/*	$NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)auth.c	8.3 (Berkeley) 5/30/95"
 #else
-__RCSID("$NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -216,7 +216,7 @@ auth_disable_name(char *name)
 }
 
 int
-getauthmask(char *type, int *maskp)
+getauthmask(const char *type, int *maskp)
 {
 	register int x;
 
@@ -235,19 +235,19 @@ getauthmask(char *type, int *maskp)
 }
 
 int
-auth_enable(char *type)
+auth_enable(const char *type)
 {
 	return(auth_onoff(type, 1));
 }
 
 int
-auth_disable(char *type)
+auth_disable(const char *type)
 {
 	return(auth_onoff(type, 0));
 }
 
 int
-auth_onoff(char *type, int on)
+auth_onoff(const char *type, int on)
 {
 	int i, mask = -1;
 	Authenticator *ap;
@@ -289,7 +289,7 @@ auth_togdebug(int on)
 }
 
 int
-auth_status(char *s)
+auth_status(const char *s)
 {
 	Authenticator *ap;
 	int i, mask;

Index: src/lib/libtelnet/genget.c
diff -u src/lib/libtelnet/genget.c:1.13 src/lib/libtelnet/genget.c:1.14
--- src/lib/libtelnet/genget.c:1.13	Wed Mar 21 01:33:27 2012
+++ src/lib/libtelnet/genget.c	Fri Dec 14 18:42:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $	*/
+/*	$NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)genget.c	8.2 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,9 +50,9 @@ __RCSID("$NetBSD: genget.c,v 1.13 2012/0
  * the length of *s1 is returned.
  */
 int
-isprefix(char *s1, const char *s2)
+isprefix(const char *s1, const char *s2)
 {
-	char *os1;
+	const char *os1;
 	char c1, c2;
 
 	if (*s1 == '\0')
@@ -72,7 +72,7 @@ isprefix(char *s1, const char *s2)
 static char *ambiguous;		/* special return value for command routines */
 
 char **
-genget( char	*name,		/* name to match */
+genget(const char *name,		/* name to match */
 	char	**table,	/* name entry in table */
 	int	stlen)
 {

Index: src/lib/libtelnet/misc.h
diff -u src/lib/libtelnet/misc.h:1.9 src/lib/libtelnet/misc.h:1.10
--- src/lib/libtelnet/misc.h:1.9	Mon Jan  9 10:25:34 2012
+++ src/lib/libtelnet/misc.h	Fri Dec 14 18:42:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: misc.h,v 1.9 2012/01/09 15:25:34 christos Exp $	*/
+/*	$NetBSD: misc.h,v 1.10 2018/12/14 23:42:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,8 +38,8 @@ extern const char *RemoteHostName;
 extern int ConnectedCount;
 extern int ReservedPort;
 
-int isprefix(char *, const char *);
-char **genget(char *, char **, int);
+int isprefix(const char *, const char *);
+char **genget(const char *, char **, int);
 int Ambiguous(void *);
 __END_DECLS
 



CVS commit: src/libexec/httpd/testsuite

2018-12-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Dec 14 23:57:22 UTC 2018

Modified Files:
src/libexec/httpd/testsuite: Makefile test-bigfile test-simple

Log Message:
Don't pass ${HOST} to test scripts.
htnl_cmp compares against the output of `hostname`.

This makes the tests pass on my machine.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/testsuite/Makefile
cvs rdiff -u -r1.5 -r1.6 src/libexec/httpd/testsuite/test-bigfile \
src/libexec/httpd/testsuite/test-simple

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

Modified files:

Index: src/libexec/httpd/testsuite/Makefile
diff -u src/libexec/httpd/testsuite/Makefile:1.11 src/libexec/httpd/testsuite/Makefile:1.12
--- src/libexec/httpd/testsuite/Makefile:1.11	Wed Nov 21 09:37:02 2018
+++ src/libexec/httpd/testsuite/Makefile	Fri Dec 14 23:57:22 2018
@@ -9,7 +9,6 @@ BOZOHTTPD?=	../debug/bozohttpd-debug
 WGET?=		wget
 DATA?=		$(.CURDIR)/data 
 VERBOSE?=	yes
-HOST?=		test.eterna
 
 .if ${VERBOSE} != "yes"
 SILENT=		@
@@ -28,17 +27,17 @@ check: check-simple check-cgi check-bigf
 
 check-simple:
 .for a in $(SIMPLETESTS)
-	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
+	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
 .endfor
 
 check-cgi:
 .for a in $(CGITESTS)
-	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
+	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
 .endfor
 
 check-bigfile:
 .for a in $(BIGFILETESTS)
-	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
+	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
 .endfor
 
 .include 

Index: src/libexec/httpd/testsuite/test-bigfile
diff -u src/libexec/httpd/testsuite/test-bigfile:1.5 src/libexec/httpd/testsuite/test-bigfile:1.6
--- src/libexec/httpd/testsuite/test-bigfile:1.5	Wed Nov 21 09:37:02 2018
+++ src/libexec/httpd/testsuite/test-bigfile	Fri Dec 14 23:57:22 2018
@@ -1,12 +1,11 @@
 #! /bin/sh
-# $NetBSD: test-bigfile,v 1.5 2018/11/21 09:37:02 mrg Exp $
+# $NetBSD: test-bigfile,v 1.6 2018/12/14 23:57:22 maya Exp $
 
 test="$1"; shift	# partial4000 or partial8000
 bozohttpd="$1"; shift
 wget="$1"; shift
 datadir="$1"; shift
 verbose="$1"; shift
-host="$1"; shift
 
 tmperr="tmp.$test.err"
 
Index: src/libexec/httpd/testsuite/test-simple
diff -u src/libexec/httpd/testsuite/test-simple:1.5 src/libexec/httpd/testsuite/test-simple:1.6
--- src/libexec/httpd/testsuite/test-simple:1.5	Wed Nov 21 09:37:02 2018
+++ src/libexec/httpd/testsuite/test-simple	Fri Dec 14 23:57:22 2018
@@ -1,12 +1,11 @@
 #! /bin/sh
-# $NetBSD: test-simple,v 1.5 2018/11/21 09:37:02 mrg Exp $
+# $NetBSD: test-simple,v 1.6 2018/12/14 23:57:22 maya Exp $
 
 test="$1"; shift
 bozohttpd="$1"; shift
 datadir="$1"; shift
 curdir="$1"; shift
 verbose="$1"; shift
-host="$1"; shift
 
 in="$curdir/$test.in"
 out="$curdir/$test.out"
@@ -21,7 +20,7 @@ fi
 
 bozotestport=1
 
-${bozohttpd} "$@" "${datadir}" "${host}" < "$in" > "$tmpout"
+${bozohttpd} "$@" "${datadir}" < "$in" > "$tmpout"
 if "$curdir/html_cmp" cmp "$out" "$tmpout"; then
 	exit 0
 else



CVS commit: src/libexec/httpd

2018-12-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Dec 15 01:02:34 UTC 2018

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
Check against BOZO_HEADERS_MAX_SIZE in a way that isn't prone to overflow.
Note that this isn't reachable in practice as big requests time out.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.101 src/libexec/httpd/bozohttpd.c:1.102
--- src/libexec/httpd/bozohttpd.c:1.101	Tue Dec  4 02:52:42 2018
+++ src/libexec/httpd/bozohttpd.c	Sat Dec 15 01:02:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.101 2018/12/04 02:52:42 mrg Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.102 2018/12/15 01:02:34 maya Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -585,12 +585,14 @@ process_method(bozo_httpreq_t *request, 
 static int
 bozo_got_header_length(bozo_httpreq_t *request, size_t len)
 {
+
+	if (len > BOZO_HEADERS_MAX_SIZE - request->hr_header_bytes)
+		return bozo_http_error(request->hr_httpd, 413, request,
+			"too many headers");
+
 	request->hr_header_bytes += len;
-	if (request->hr_header_bytes < BOZO_HEADERS_MAX_SIZE)
-		return 0;
 
-	return bozo_http_error(request->hr_httpd, 413, request,
-		"too many headers");
+	return 0;
 }
 
 /*



CVS commit: src/etc/etc.aarch64

2018-12-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Dec 15 01:02:58 UTC 2018

Modified Files:
src/etc/etc.aarch64: MAKEDEV.conf

Log Message:
add tprof


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/etc/etc.aarch64/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.aarch64/MAKEDEV.conf
diff -u src/etc/etc.aarch64/MAKEDEV.conf:1.6 src/etc/etc.aarch64/MAKEDEV.conf:1.7
--- src/etc/etc.aarch64/MAKEDEV.conf:1.6	Sat Oct  6 10:00:32 2018
+++ src/etc/etc.aarch64/MAKEDEV.conf	Sat Dec 15 01:02:58 2018
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.6 2018/10/06 10:00:32 jmcneill Exp $
+# $NetBSD: MAKEDEV.conf,v 1.7 2018/12/15 01:02:58 jmcneill Exp $
 
 all_md)
 	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@@ -13,6 +13,7 @@ all_md)
 	makedev	sysmon
 	makedev dmoverio
 	makedev pci0 pci1 pci2 pci3
+	makedev tprof
 	makedev kttcp
 	makedev cfs
 	makedev audio speaker



CVS commit: src/libexec/httpd

2018-12-14 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Dec 15 02:03:24 UTC 2018

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
strings.h for strcasecmp (on linux)


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.102 src/libexec/httpd/bozohttpd.c:1.103
--- src/libexec/httpd/bozohttpd.c:1.102	Sat Dec 15 01:02:34 2018
+++ src/libexec/httpd/bozohttpd.c	Sat Dec 15 02:03:24 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.102 2018/12/15 01:02:34 maya Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.103 2018/12/15 02:03:24 maya Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -141,6 +141,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/dev/pci

2018-12-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 15 05:38:45 UTC 2018

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

Log Message:
 Clearing PCI_PMCSR_PME_STS(W1C) bit is required to stop asserting PME#.
This change would prevent unexpected rebooting from shutdown -p or
unexpected resuming from suspend.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/pci/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/dev/pci/pci.c
diff -u src/sys/dev/pci/pci.c:1.153 src/sys/dev/pci/pci.c:1.154
--- src/sys/dev/pci/pci.c:1.153	Sat Dec  1 01:23:24 2018
+++ src/sys/dev/pci/pci.c	Sat Dec 15 05:38:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.153 2018/12/01 01:23:24 msaitoh Exp $	*/
+/*	$NetBSD: pci.c,v 1.154 2018/12/15 05:38:45 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.153 2018/12/01 01:23:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.154 2018/12/15 05:38:45 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1221,16 +1221,36 @@ pci_child_suspend(device_t dv, const pmf
 	return true;
 }
 
+static void
+pci_pme_check_and_clear(device_t dv, pci_chipset_tag_t pc, pcitag_t tag,
+int off)
+{
+	pcireg_t pmcsr;
+
+	pmcsr = pci_conf_read(pc, tag, off + PCI_PMCSR);
+
+	if (pmcsr & PCI_PMCSR_PME_STS) {
+		/* Clear W1C bit */
+		pmcsr |= PCI_PMCSR_PME_STS;
+		pci_conf_write(pc, tag, off + PCI_PMCSR, pmcsr);
+		aprint_verbose_dev(dv, "Clear PME# now\n");
+	}
+}
+
 static bool
 pci_child_resume(device_t dv, const pmf_qual_t *qual)
 {
 	struct pci_child_power *priv = device_pmf_bus_private(dv);
 
-	if (priv->p_has_pm &&
-	pci_set_powerstate_int(priv->p_pc, priv->p_tag,
-	PCI_PMCSR_STATE_D0, priv->p_pm_offset, priv->p_pm_cap)) {
-		aprint_error_dev(dv, "unsupported state, continuing.\n");
-		return false;
+	if (priv->p_has_pm) {
+		if (pci_set_powerstate_int(priv->p_pc, priv->p_tag,
+		PCI_PMCSR_STATE_D0, priv->p_pm_offset, priv->p_pm_cap)) {
+			aprint_error_dev(dv,
+			"unsupported state, continuing.\n");
+			return false;
+		}
+		pci_pme_check_and_clear(dv, priv->p_pc, priv->p_tag,
+		priv->p_pm_offset);
 	}
 
 	pci_conf_restore(priv->p_pc, priv->p_tag, &priv->p_pciconf);
@@ -1286,6 +1306,7 @@ pci_child_register(device_t child)
 		priv->p_has_pm = true;
 		priv->p_pm_offset = off;
 		priv->p_pm_cap = reg;
+		pci_pme_check_and_clear(child, priv->p_pc, priv->p_tag, off);
 	} else {
 		priv->p_has_pm = false;
 		priv->p_pm_offset = -1;



CVS commit: src/sys/dev/pci

2018-12-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 15 05:40:10 UTC 2018

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

Log Message:
 Print and clear the wakeup status only when the WUS register != 0.


To generate a diff of this commit:
cvs rdiff -u -r1.604 -r1.605 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.604 src/sys/dev/pci/if_wm.c:1.605
--- src/sys/dev/pci/if_wm.c:1.604	Fri Dec 14 09:47:40 2018
+++ src/sys/dev/pci/if_wm.c	Sat Dec 15 05:40:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.604 2018/12/14 09:47:40 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.605 2018/12/15 05:40:10 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.604 2018/12/14 09:47:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.605 2018/12/15 05:40:10 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3038,11 +3038,15 @@ wm_resume(device_t self, const pmf_qual_
 {
 	struct wm_softc *sc = device_private(self);
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
+	pcireg_t reg;
 	char buf[256];
 
-	snprintb(buf, sizeof(buf), WUS_FLAGS, CSR_READ(sc, WMREG_WUS));
-	device_printf(sc->sc_dev, "wakeup status %s\n", buf);
-	CSR_WRITE(sc, WMREG_WUS, 0x); /* W1C */
+	reg = CSR_READ(sc, WMREG_WUS);
+	if (reg != 0) {
+		snprintb(buf, sizeof(buf), WUS_FLAGS, reg);
+		device_printf(sc->sc_dev, "wakeup status %s\n", buf);
+		CSR_WRITE(sc, WMREG_WUS, 0x); /* W1C */
+	}
 
 	if (sc->sc_type >= WM_T_PCH2)
 		wm_resume_workarounds_pchlan(sc);



CVS commit: src/sys/net

2018-12-14 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Dec 15 07:29:44 UTC 2018

Modified Files:
src/sys/net: ether_sw_offload.c

Log Message:
Replace panic with rate-limited LOG_ERR message when we encounter
invalid ether frame with non-zero csum flags.

Requested by thorpej.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/net/ether_sw_offload.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/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.4 src/sys/net/ether_sw_offload.c:1.5
--- src/sys/net/ether_sw_offload.c:1.4	Thu Dec 13 20:54:50 2018
+++ src/sys/net/ether_sw_offload.c	Sat Dec 15 07:29:44 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.5 2018/12/15 07:29:44 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,11 +34,13 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.5 2018/12/15 07:29:44 rin Exp $");
 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -57,6 +59,15 @@ __KERNEL_RCSID(0, "$NetBSD: ether_sw_off
 #endif
 
 /*
+ * Limit error messages at most once per 10 seconds.
+ */
+static const struct timeval eso_err_interval = {
+	.tv_sec = 10,
+	.tv_usec = 0,
+};
+static struct timeval eso_err_lasttime;
+
+/*
  * Handle TX offload in software. For TSO, split the packet into
  * chanks with payloads of size MSS. For chekcsum offload, update
  * required checksum fields. The results are more than one packet
@@ -68,6 +79,7 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 {
 	struct ether_header *ep;
 	int flags, ehlen;
+	uint16_t type;
 #ifdef INET6
 	bool v6;
 #else
@@ -90,7 +102,7 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 			return NULL;
 	}
 	ep = mtod(m, struct ether_header *);
-	switch (ntohs(ep->ether_type)) {
+	switch (type = ntohs(ep->ether_type)) {
 	case ETHERTYPE_IP:
 	case ETHERTYPE_IPV6:
 		ehlen = ETHER_HDR_LEN;
@@ -99,7 +111,11 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 		ehlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
 		break;
 	default:
-		panic("%s: unexpected frame type", __func__);
+		if (ratecheck(&eso_err_lasttime, &eso_err_interval))
+			log(LOG_ERR, "%s: %s: dropping invalid frame "
+			"type 0x%04hx csum_flags 0x%08x\n",
+			__func__, ifp->if_xname, type, flags);
+		goto quit;
 	}
 	KASSERT(m->m_pkthdr.len >= ehlen);
 



CVS commit: src/sys/net

2018-12-14 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Dec 15 07:38:58 UTC 2018

Modified Files:
src/sys/net: ether_sw_offload.c if_bridge.c

Log Message:
Improve wording in comments: replace "chain" with "queue" for
sequence of mbuf's connected by m_nextpkt, in order to avoid
confusion with those connected by m_next.

No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/ether_sw_offload.c
cvs rdiff -u -r1.162 -r1.163 src/sys/net/if_bridge.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/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.5 src/sys/net/ether_sw_offload.c:1.6
--- src/sys/net/ether_sw_offload.c:1.5	Sat Dec 15 07:29:44 2018
+++ src/sys/net/ether_sw_offload.c	Sat Dec 15 07:38:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.5 2018/12/15 07:29:44 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.6 2018/12/15 07:38:58 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.5 2018/12/15 07:29:44 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.6 2018/12/15 07:38:58 rin Exp $");
 
 #include 
 #include 
@@ -71,7 +71,7 @@ static struct timeval eso_err_lasttime;
  * Handle TX offload in software. For TSO, split the packet into
  * chanks with payloads of size MSS. For chekcsum offload, update
  * required checksum fields. The results are more than one packet
- * in general. Return a mbuf chain consists of them.
+ * in general. Return a mbuf queue consists of them.
  */
 
 struct mbuf *

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.162 src/sys/net/if_bridge.c:1.163
--- src/sys/net/if_bridge.c:1.162	Fri Dec 14 12:27:22 2018
+++ src/sys/net/if_bridge.c	Sat Dec 15 07:38:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.162 2018/12/14 12:27:22 martin Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.163 2018/12/15 07:38:58 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.162 2018/12/14 12:27:22 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.163 2018/12/15 07:38:58 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -1566,7 +1566,7 @@ bridge_output(struct ifnet *ifp, struct 
 		/*
 		 * Handle TX offload in software. For TSO, a packet is
 		 * split into multiple chunks. Thus, the return value of
-		 * ether_sw_offload_tx() is mbuf chain consists of them.
+		 * ether_sw_offload_tx() is mbuf queue consists of them.
 		 */
 		m = ether_sw_offload_tx(ifp, m);
 		if (m == NULL)