Re: CVS commit: src/sys/dev

2019-08-09 Thread Yorick Hardy
Dear Ryo,

On 2019-07-26, Ryo ONODERA wrote:
> Hi,
> 
> O.k.
> I will commit your fix later.
> 
> Thank you.

Thanks! I can commit again, and I commited this change.
Please let me know if I broke anything!

(src/sys/dev/usb/ums.c v1.94)

> Yorick Hardy  writes:
> 
> > Dear Ryo,
> >
> > On 2019-07-25, Ryo ONODERA wrote:
> >> Hi,
> >> 
> >> Yorick Hardy  writes:
> >> 
> >> > Dear Ryo,
> >> >
> >> > On 2019-07-09, Ryo ONODERA wrote:
> >> >> Module Name:src
> >> >> Committed By:   ryoon
> >> >> Date:   Tue Jul  9 12:52:51 UTC 2019
> >> >> 
> >> >> Modified Files:
> >> >> src/sys/dev/hid: hidms.c hidms.h
> >> >> src/sys/dev/i2c: ims.c
> >> >> 
> >> >> Log Message:
> >> >> Add tpcalib, touch panel calibration to ims(4)
> >> >> 
> >> >> Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.
> >> >> 
> >> >> 
> >> >> To generate a diff of this commit:
> >> >> cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
> >> >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
> >> >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c
> >> >> 
> >> >> Please note that diffs are not public domain; they are subject to the
> >> >> copyright notices on the relevant files.
> >> >
> >> > I think this change has the side effect that ums(4) devices which
> >> > report absolute coordinates seem to stop "moving" because
> >> > tcpalib_init is never called for these devices.
> >> >
> >> > Is the patch below okay? Or, should hidms call tcpalib_init?
> >> > (I tested the patch with an ACECAD digimemo.)
> >> 
> >> Sorry for breakage.
> >> It looks good to me.
> >> And I feel tpcalib_init should be called from ums.c like your patch.
> >> Could you commit it?
> >
> > I am very sorry, but I retired my commit privilege because I was
> > contributing very little to NetBSD. Otherwise I would be happy to do so!
> >
> >> Thank you.
> >> 
> >> > -- 
> >> > Kind regards,
> >> >
> >> > Yorick Hardy
> >> >
> >> > Index: sys/dev/usb/ums.c
> >> > ===
> >> > RCS file: /cvsroot/src/sys/dev/usb/ums.c,v
> >> > retrieving revision 1.93
> >> > diff -u -r1.93 ums.c
> >> > --- sys/dev/usb/ums.c5 May 2019 03:17:54 -   1.93
> >> > +++ sys/dev/usb/ums.c24 Jul 2019 21:29:35 -
> >> > @@ -192,6 +192,7 @@
> >> >  }
> >> >  }
> >> >  
> >> > +tpcalib_init(&sc->sc_ms.sc_tpcalib);
> >> >  hidms_attach(self, &sc->sc_ms, &ums_accessops);
> >> >  }
> >> >  
> >> 
> >> -- 
> >> Ryo ONODERA // r...@tetera.org
> >> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

-- 
Kind regards,

Yorick Hardy


CVS commit: src/sys/dev/usb

2019-08-09 Thread Yorick Hardy
Module Name:src
Committed By:   yhardy
Date:   Sat Aug 10 06:30:26 UTC 2019

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

Log Message:
Initialize tcpalib for ums devices.

In r1.3 of src/sys/dev/hid/hidms.c, tpcalib is used for any hidms
device reporting absolute coordinates. So ums devices reporting
absolute coordinates also need to initialize tcpalib - do it for
all ums devices. An uninitialized tcpalib stops a mouse with
absolute coordinates from "moving".

OK: ryoon@


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/ums.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/ums.c
diff -u src/sys/dev/usb/ums.c:1.93 src/sys/dev/usb/ums.c:1.94
--- src/sys/dev/usb/ums.c:1.93	Sun May  5 03:17:54 2019
+++ src/sys/dev/usb/ums.c	Sat Aug 10 06:30:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ums.c,v 1.93 2019/05/05 03:17:54 mrg Exp $	*/
+/*	$NetBSD: ums.c,v 1.94 2019/08/10 06:30:26 yhardy Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.93 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.94 2019/08/10 06:30:26 yhardy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -192,6 +192,7 @@ ums_attach(device_t parent, device_t sel
 		}
 	}
 
+	tpcalib_init(&sc->sc_ms.sc_tpcalib);
 	hidms_attach(self, &sc->sc_ms, &ums_accessops);
 }
 



CVS commit: src/sys/dev/usb

2019-08-09 Thread Yorick Hardy
Module Name:src
Committed By:   yhardy
Date:   Sat Aug 10 06:30:26 UTC 2019

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

Log Message:
Initialize tcpalib for ums devices.

In r1.3 of src/sys/dev/hid/hidms.c, tpcalib is used for any hidms
device reporting absolute coordinates. So ums devices reporting
absolute coordinates also need to initialize tcpalib - do it for
all ums devices. An uninitialized tcpalib stops a mouse with
absolute coordinates from "moving".

OK: ryoon@


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/ums.c

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



CVS commit: [netbsd-9] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 10 06:19:48 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tcikets #40 and #41


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 10 06:19:48 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tcikets #40 and #41


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-9.0

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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.12 src/doc/CHANGES-9.0:1.1.2.13
--- src/doc/CHANGES-9.0:1.1.2.12	Fri Aug  9 16:16:26 2019
+++ src/doc/CHANGES-9.0	Sat Aug 10 06:19:48 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.12 2019/08/09 16:16:26 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.13 2019/08/10 06:19:48 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -411,3 +411,1204 @@ sys/dev/usb/if_aue.c1.156
 	Fix panic when setting multicast addresses.
 	[msaitoh, ticket #39]
 
+sys/external/bsd/ipf/netinet/fil.c		1.30
+
+	PR/54443: ipf mistakenly regards UDP packet with checksum field
+	0x as bad.
+	[christos, ticket #40]
+
+external/bsd/openldap/dist/include/openldap.h   up to 1.1.1.1
+external/bsd/openldap/dist/servers/slapd/back-sock/extended.c up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8444/its8444 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8444/slapd-provider1.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8444/slapd-provider2.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8444/slapd-provider3.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8444/slapd-provider4.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8616/its8616 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8616/slapd-provider.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8663/its8663 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8663/slapd-provider.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/accounting.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/administrative.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/its8667 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/janitorial.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/root.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8667/slapd.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8752/its8752 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8752/slapd.conf up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8752/slapd.conf.mmr up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/db.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/its8800 up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/slapd-provider1.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/slapd-provider2.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/slapd-provider3.ldif up to 1.1.1.1
+external/bsd/openldap/dist/tests/data/regressions/its8800/slapd-provider4.ldif up to 1.1.1.1
+external/bsd/openldap/dist/doc/man/man5/slapd-ldbm.5 delete
+external/bsd/openldap/dist/tests/scripts/test058-syncrepl-asymmetric delete
+external/bsd/openldap/dist/ANNOUNCEMENT up to 1.1.1.7
+external/bsd/openldap/dist/CHANGES  up to 1.1.1.8
+external/bsd/openldap/dist/COPYRIGHTup to 1.1.1.8
+external/bsd/openldap/dist/INSTALL  up to 1.1.1.7
+external/bsd/openldap/dist/Makefile.in  up to 1.1.1.7
+external/bsd/openldap/dist/README   up to 1.1.1.7
+external/bsd/openldap/dist/configureup to 1.1.1.7
+external/bsd/openldap/dist/configure.in up to 1.1.1.7
+external/bsd/openldap/dist/build/dir.mk up to 1.1.1.7
+external/bsd/openldap/dist/build/info.mkup to 1.1.1.7
+external/bsd/openldap/dist/build/lib-shared.mk  up to 1.1.1.7
+external/bsd/openldap/dist/build/lib-static.mk  up to 1.1.1.7
+external/bsd/openldap/dist/build/lib.mk up to 1.1.1.7
+external/bsd/openldap/dist/build/ltmain.sh  up to 1.1.1.7
+external/bsd/openldap/dist/build/man.mk up to 1.1.1.7
+external/bsd/openldap/dist/build/missingup to 1.1.1.7
+external/bsd/openldap/dist/build/mkdep  up to 1.1.1.7
+external/bsd/openldap/dist/build/mkdep.aix  up to 1.1.1.7
+external/bsd/openldap/dist/build/mkrelease  up to 1.1.1.7
+external/bsd/openldap/dist/build/mkvers.bat up to 1.1.1.7
+external/bsd/openldap/dist/build/mkversion  up to 1.8
+external/bsd/openldap/dist/build/mod.mk up to 1.1.1.7
+external/bsd/openldap/dist/build/openldap.m4up to 1.1.1.7
+external/bsd/openldap/dis

CVS commit: src/doc

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 03:38:36 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
My work for rasops(9) was finished (hopefully).

I will send pull-up request for netbsd-9, if there are no new failures
reported within few days.


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

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



CVS commit: src/doc

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 03:38:36 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
My work for rasops(9) was finished (hopefully).

I will send pull-up request for netbsd-9, if there are no new failures
reported within few days.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2565 src/doc/CHANGES:1.2566
--- src/doc/CHANGES:1.2565	Thu Aug  8 13:52:14 2019
+++ src/doc/CHANGES	Sat Aug 10 03:38:36 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2565 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2566 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -25,4 +25,9 @@
 
 Changes from NetBSD 9.0 to NetBSD 10.0:
 openldap: Import 2.4.48. [christos 20180808]
-
+rasops(9): Major improvements for rasops(9) routines. General putchar functions
+	added to color depths 2 and 4. Width-optimized putchar functions added
+	to depth 32. Anti-aliasing supported for depths 2 and 24. Shadow
+	framebuffer supported for all color depths. A lot of bug fixes, both
+	major or minor. Dedup more than 20% of lines, or 50% of characters.
+	[rin 20190810]



CVS commit: src/sys/dev/usb

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 02:32:27 UTC 2019

Modified Files:
src/sys/dev/usb: if_udavreg.h

Log Message:
add a blank line after rcsid(s)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/if_udavreg.h

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

Modified files:

Index: src/sys/dev/usb/if_udavreg.h
diff -u src/sys/dev/usb/if_udavreg.h:1.15 src/sys/dev/usb/if_udavreg.h:1.16
--- src/sys/dev/usb/if_udavreg.h:1.15	Wed Aug  7 19:21:48 2019
+++ src/sys/dev/usb/if_udavreg.h	Sat Aug 10 02:32:27 2019
@@ -1,5 +1,6 @@
-/*	$NetBSD: if_udavreg.h,v 1.15 2019/08/07 19:21:48 skrll Exp $	*/
+/*	$NetBSD: if_udavreg.h,v 1.16 2019/08/10 02:32:27 mrg Exp $	*/
 /*	$nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $	*/
+
 /*
  * Copyright (c) 2003
  * Shingo WATANABE .  All rights reserved.



CVS commit: src/sys/dev/usb

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 02:32:27 UTC 2019

Modified Files:
src/sys/dev/usb: if_udavreg.h

Log Message:
add a blank line after rcsid(s)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/if_udavreg.h

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



CVS commit: src/sys

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 02:17:36 UTC 2019

Modified Files:
src/sys/dev/usb: if_axe.c if_axen.c if_cdce.c if_smsc.c if_udav.c
if_ure.c if_urndis.c usbnet.c usbnet.h
src/sys/sys: param.h

Log Message:
reduce the scope of struct usbnet:
- move a large number of members internal to usbnet.c's new
  "struct usbnet_private".
- provide accessors for a few of these
- move struct usbnet_cdata into usbnet.c as well, but move
  bufsz, list count, and xfer flags back out into struct usbnet,
  and have them set as part of the setup efore usbnet_attach()
- split the intr pipe parts into their own structure
- move all the main usbnet*lock* code into usbnet.c too

usbnet_attach() goes down to 2 args, and the inputs needed are
now the full contents of 'struct usbnet' besides the driver
owned 'un_flags' and usbnet owned 'un_pri'.

welcome netbsd 9.99.6.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/usb/if_cdce.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_smsc.c
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_udav.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/if_ure.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_urndis.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/usbnet.h
cvs rdiff -u -r1.604 -r1.605 src/sys/sys/param.h

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

Modified files:

Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.108 src/sys/dev/usb/if_axe.c:1.109
--- src/sys/dev/usb/if_axe.c:1.108	Fri Aug  9 02:52:59 2019
+++ src/sys/dev/usb/if_axe.c	Sat Aug 10 02:17:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axe.c,v 1.108 2019/08/09 02:52:59 mrg Exp $	*/
+/*	$NetBSD: if_axe.c,v 1.109 2019/08/10 02:17:36 mrg Exp $	*/
 /*	$OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
 
 /*
@@ -87,7 +87,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.108 2019/08/09 02:52:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.109 2019/08/10 02:17:36 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -385,7 +385,7 @@ axe_mii_statchg_cb(struct ifnet *ifp)
 		return;
 
 	val = 0;
-	un->un_link = false;
+	usbnet_set_link(un, false);
 	if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) {
 		val |= AXE_MEDIA_FULL_DUPLEX;
 		if (AXE_IS_178_FAMILY(un)) {
@@ -404,14 +404,14 @@ axe_mii_statchg_cb(struct ifnet *ifp)
 		switch (IFM_SUBTYPE(mii->mii_media_active)) {
 		case IFM_1000_T:
 			val |= AXE_178_MEDIA_GMII | AXE_178_MEDIA_ENCK;
-			un->un_link = true;
+			usbnet_set_link(un, true);
 			break;
 		case IFM_100_TX:
 			val |= AXE_178_MEDIA_100TX;
-			un->un_link = true;
+			usbnet_set_link(un, true);
 			break;
 		case IFM_10_T:
-			un->un_link = true;
+			usbnet_set_link(un, true);
 			break;
 		}
 	}
@@ -886,6 +886,10 @@ axe_attach(device_t parent, device_t sel
 	un->un_udev = dev;
 	un->un_sc = sc;
 	un->un_ops = &axe_ops;
+	un->un_rx_xfer_flags = USBD_SHORT_XFER_OK;
+	un->un_tx_xfer_flags = USBD_FORCE_SHORT_XFER;
+	un->un_rx_list_cnt = AXE_RX_LIST_CNT;
+	un->un_tx_list_cnt = AXE_TX_LIST_CNT;
 
 	err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1);
 	if (err) {
@@ -910,6 +914,7 @@ axe_attach(device_t parent, device_t sel
 		AXE_178_MAX_BUFSZ : AXE_178_MIN_BUFSZ;
 	else
 		bufsz = AXE_172_BUFSZ;
+	un->un_rx_bufsz = un->un_tx_bufsz = bufsz;
 
 	un->un_ed[USBNET_ENDPT_RX] = 0;
 	un->un_ed[USBNET_ENDPT_TX] = 0;
@@ -937,8 +942,7 @@ axe_attach(device_t parent, device_t sel
 	}
 
 	/* Set these up now for axe_cmd().  */
-	usbnet_attach(un, "axedet", AXE_RX_LIST_CNT, AXE_TX_LIST_CNT,
-		  USBD_SHORT_XFER_OK, USBD_FORCE_SHORT_XFER, bufsz, bufsz);
+	usbnet_attach(un, "axedet");
 
 	/* We need the PHYID for init dance in some cases */
 	usbnet_lock_mii(un);

Index: src/sys/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.58 src/sys/dev/usb/if_axen.c:1.59
--- src/sys/dev/usb/if_axen.c:1.58	Fri Aug  9 02:52:59 2019
+++ src/sys/dev/usb/if_axen.c	Sat Aug 10 02:17:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.58 2019/08/09 02:52:59 mrg Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.59 2019/08/10 02:17:36 mrg Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.58 2019/08/09 02:52:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.59 2019/08/10 02:17:36 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -169,16 +169,16 @@ axen_mii_statchg(struct ifnet *ifp)
 	if (usbnet_isdying(un))
 		return;
 
-	un->un_link = false;
+	usbnet_set_link(un, false);
 	if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) ==
 	(IFM_ACTIVE | IFM_AVALID)) {
 		switch (IFM_SUBTYPE(mii->mii_media_active)) {
 		case IFM_10_T:
 		case IFM_100_TX:
-			un->un_link = true;
+			usbne

CVS commit: src/sys

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 02:17:36 UTC 2019

Modified Files:
src/sys/dev/usb: if_axe.c if_axen.c if_cdce.c if_smsc.c if_udav.c
if_ure.c if_urndis.c usbnet.c usbnet.h
src/sys/sys: param.h

Log Message:
reduce the scope of struct usbnet:
- move a large number of members internal to usbnet.c's new
  "struct usbnet_private".
- provide accessors for a few of these
- move struct usbnet_cdata into usbnet.c as well, but move
  bufsz, list count, and xfer flags back out into struct usbnet,
  and have them set as part of the setup efore usbnet_attach()
- split the intr pipe parts into their own structure
- move all the main usbnet*lock* code into usbnet.c too

usbnet_attach() goes down to 2 args, and the inputs needed are
now the full contents of 'struct usbnet' besides the driver
owned 'un_flags' and usbnet owned 'un_pri'.

welcome netbsd 9.99.6.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/usb/if_cdce.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/usb/if_smsc.c
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_udav.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/if_ure.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_urndis.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/usbnet.h
cvs rdiff -u -r1.604 -r1.605 src/sys/sys/param.h

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



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 01:24:17 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops1-4_putchar.h rasops1.c
rasops15.c rasops1_putchar_width.h rasops2.c rasops24.c rasops32.c
rasops4.c rasops8.c rasops_bitops.h rasops_masks.c rasops_masks.h
rasops_putchar.h rasops_putchar_width.h

Log Message:
Misc style clean up's.
- Introduce and use proper macros.
- Use not ambiguous variable names.
- Unify similar functions as possible as I can.
- G/C unused headers.
- Use #include  instead of "foo.h"
No particular functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/rasops/rasops.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/rasops/rasops1-4_putchar.h
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops1_putchar_width.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/rasops/rasops32.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops_bitops.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/rasops/rasops_masks.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/rasops/rasops_masks.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/rasops/rasops_putchar_width.h

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



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 01:24:17 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h rasops1-4_putchar.h rasops1.c
rasops15.c rasops1_putchar_width.h rasops2.c rasops24.c rasops32.c
rasops4.c rasops8.c rasops_bitops.h rasops_masks.c rasops_masks.h
rasops_putchar.h rasops_putchar_width.h

Log Message:
Misc style clean up's.
- Introduce and use proper macros.
- Use not ambiguous variable names.
- Unify similar functions as possible as I can.
- G/C unused headers.
- Use #include  instead of "foo.h"
No particular functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/rasops/rasops.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/rasops/rasops1-4_putchar.h
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/rasops/rasops1_putchar_width.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/rasops/rasops32.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops_bitops.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/rasops/rasops_masks.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/rasops/rasops_masks.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.121 src/sys/dev/rasops/rasops.c:1.122
--- src/sys/dev/rasops/rasops.c:1.121	Sat Aug 10 01:20:47 2019
+++ src/sys/dev/rasops/rasops.c	Sat Aug 10 01:24:17 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.121 2019/08/10 01:20:47 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.122 2019/08/10 01:24:17 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,20 +30,17 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.121 2019/08/10 01:20:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.122 2019/08/10 01:24:17 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
 #include "opt_wsmsgattrs.h"
-#endif
-
 #include "rasops_glue.h"
+#endif
 
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 
@@ -202,6 +199,10 @@ static int	rasops_allocattr_color(void *
 static int	rasops_allocattr_mono(void *, int, int, int, long *);
 static void	rasops_do_cursor(struct rasops_info *);
 static void	rasops_init_devcmap(struct rasops_info *);
+static void	rasops_make_box_chars_8(struct rasops_info *);
+static void	rasops_make_box_chars_16(struct rasops_info *);
+static void	rasops_make_box_chars_32(struct rasops_info *);
+static void	rasops_make_box_chars_alpha(struct rasops_info *);
 
 #if NRASOPS_ROTATION > 0
 static void	rasops_rotate_font(int *, int);
@@ -233,11 +234,6 @@ struct rotatedfont {
 };
 #endif	/* NRASOPS_ROTATION > 0 */
 
-void	rasops_make_box_chars_8(struct rasops_info *);
-void	rasops_make_box_chars_16(struct rasops_info *);
-void	rasops_make_box_chars_32(struct rasops_info *);
-void	rasops_make_box_chars_alpha(struct rasops_info *);
-
 /*
  * Initialize a 'rasops_info' descriptor.
  */
@@ -623,6 +619,7 @@ rasops_allocattr_color(void *cookie, int
 	fg &= 7;
 	bg &= 7;
 #endif
+
 	if ((flg & WSATTR_BLINK) != 0)
 		return EINVAL;
 
@@ -691,8 +688,8 @@ static void
 rasops_copyrows(void *cookie, int src, int dst, int num)
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
+	int stride;
 	uint8_t *sp, *dp, *hp;
-	int n, stride;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -720,12 +717,10 @@ rasops_copyrows(void *cookie, int src, i
 		return;
 #endif
 
-	num *= ri->ri_font->fontheight;
-	n = ri->ri_emustride;
-	stride = ri->ri_stride;
-
 	src *= ri->ri_yscale;
 	dst *= ri->ri_yscale;
+	num *= ri->ri_font->fontheight;
+	stride = ri->ri_stride;
 
 	if (src < dst) {
 		/* backward copy */
@@ -740,12 +735,12 @@ rasops_copyrows(void *cookie, int src, i
 		hp = ri->ri_hwbits + dst;
 
 	while (num--) {
-		memcpy(dp, sp, n);
-		sp += stride;
+		memcpy(dp, sp, ri->ri_emustride);
 		if (ri->ri_hwbits) {
-			memcpy(hp, dp, n);
+			memcpy(hp, dp, ri->ri_emustride);
 			hp += stride;
 		}
+		sp += stride;
 		dp += stride;
 	}
 }
@@ -760,8 +755,8 @@ static void
 rasops_copycols(void *cookie, int row, int src, int dst, int num)
 {
 	struct rasops_info *ri = (struct rasops_info *)cookie;
-	uint8_t *sp, *dp, *hp;
 	int height;
+	uint8_t *sp, *dp, *hp;
 
 	hp = NULL;	/* XXX GCC */
 
@@ -793,9 +788,9 @@ rasops_copycols(void *cookie, int row, i
 		return;
 #endif
 
-	num *= ri->ri_xscale;
-	row *= ri->ri_yscale;
 	height = ri->ri_font->fontheight;
+	row *= ri->ri_yscale;
+	num *= ri->ri_xscal

CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 01:20:47 UTC 2019

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

Log Message:
Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.
No functional changes since this is not in use (4-bpp is monochrome).


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.120 src/sys/dev/rasops/rasops.c:1.121
--- src/sys/dev/rasops/rasops.c:1.120	Fri Aug  9 12:05:51 2019
+++ src/sys/dev/rasops/rasops.c	Sat Aug 10 01:20:47 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.120 2019/08/09 12:05:51 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.121 2019/08/10 01:20:47 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.120 2019/08/09 12:05:51 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.121 2019/08/10 01:20:47 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -876,18 +876,18 @@ rasops_init_devcmap(struct rasops_info *
 		ri->ri_devcmap[15] = -1;
 		return;
 
-#ifdef RASOPS_APPLE_PALETTE
 	case 4:
 		for (i = 0; i < 16; i++) {
+#ifdef RASOPS_APPLE_PALETTE
 			c = apple4_devcmap[i];
+#else
+			c = i;
+#endif
 			ri->ri_devcmap[i] =
 			(c <<  0) | (c <<  4) | (c <<  8) | (c << 12) |
 			(c << 16) | (c << 20) | (c << 24) | (c << 28);
 		}
 		return;
-#else
-	/* XXXRO What should we do here? */
-#endif
 
 	case 8:
 		if ((ri->ri_flg & RI_8BIT_IS_RGB) == 0) {



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 10 01:20:47 UTC 2019

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

Log Message:
Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.
No functional changes since this is not in use (4-bpp is monochrome).


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/rasops/rasops.c

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



CVS commit: src/sys/uvm

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 01:06:45 UTC 2019

Modified Files:
src/sys/uvm: uvm_map.c

Log Message:
KASSERT -> KASSERTMSG so we actually display the overflowed values.


To generate a diff of this commit:
cvs rdiff -u -r1.363 -r1.364 src/sys/uvm/uvm_map.c

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



CVS commit: src/sys/uvm

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 01:06:45 UTC 2019

Modified Files:
src/sys/uvm: uvm_map.c

Log Message:
KASSERT -> KASSERTMSG so we actually display the overflowed values.


To generate a diff of this commit:
cvs rdiff -u -r1.363 -r1.364 src/sys/uvm/uvm_map.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/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.363 src/sys/uvm/uvm_map.c:1.364
--- src/sys/uvm/uvm_map.c:1.363	Thu Aug  1 02:28:55 2019
+++ src/sys/uvm/uvm_map.c	Sat Aug 10 01:06:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.363 2019/08/01 02:28:55 riastradh Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.364 2019/08/10 01:06:45 mrg Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.363 2019/08/01 02:28:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.364 2019/08/10 01:06:45 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -4730,7 +4730,9 @@ uvm_unmap1(struct vm_map *map, vaddr_t s
 	struct vm_map_entry *dead_entries;
 	UVMHIST_FUNC("uvm_unmap"); UVMHIST_CALLED(maphist);
 
-	KASSERT(start < end);
+	KASSERTMSG(start < end,
+	"%s: map %p: start %#jx < end %#jx", __func__, map,
+	(uintmax_t)start, (uintmax_t)end);
 	UVMHIST_LOG(maphist, "  (map=%#jx, start=%#jx, end=%#jx)",
 	(uintptr_t)map, start, end, 0);
 	if (map == kernel_map) {



CVS commit: src/sys/net

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 01:04:05 UTC 2019

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

Log Message:
rename _ifmedia_ioctl() to ifmedia_ioctl_locked().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/net/if_media.c

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



CVS commit: src/sys/net

2019-08-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Aug 10 01:04:05 UTC 2019

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

Log Message:
rename _ifmedia_ioctl() to ifmedia_ioctl_locked().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/net/if_media.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_media.c
diff -u src/sys/net/if_media.c:1.46 src/sys/net/if_media.c:1.47
--- src/sys/net/if_media.c:1.46	Tue May 21 09:18:37 2019
+++ src/sys/net/if_media.c	Sat Aug 10 01:04:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_media.c,v 1.46 2019/05/21 09:18:37 msaitoh Exp $	*/
+/*	$NetBSD: if_media.c,v 1.47 2019/08/10 01:04:05 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.46 2019/05/21 09:18:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.47 2019/08/10 01:04:05 mrg Exp $");
 
 #include 
 #include 
@@ -91,7 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_media.c,v
 
 static void	ifmedia_status(struct ifmedia *, struct ifnet *,
 struct ifmediareq *);
-static int	_ifmedia_ioctl(struct ifnet *, struct ifreq *,
+static int	ifmedia_ioctl_locked(struct ifnet *, struct ifreq *,
 struct ifmedia *, u_long);
 
 /*
@@ -243,7 +243,7 @@ ifmedia_set(struct ifmedia *ifm, int tar
  * Device-independent media ioctl support function.
  */
 static int
-_ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
+ifmedia_ioctl_locked(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
 u_long cmd)
 {
 	struct ifmedia_entry *match;
@@ -369,10 +369,10 @@ ifmedia_ioctl(struct ifnet *ifp, struct 
 
 	/*
 	 * If if_is_mpsafe(ifp), KERNEL_LOCK isn't held here,
-	 * but _ifmedia_ioctl isn't MP-safe yet, so we must hold the lock.
+	 * but ifmedia_ioctl_locked isn't MP-safe yet, so we must hold the lock.
 	 */
 	KERNEL_LOCK_IF_IFP_MPSAFE(ifp);
-	e = _ifmedia_ioctl(ifp, ifr, ifm, cmd);
+	e = ifmedia_ioctl_locked(ifp, ifr, ifm, cmd);
 	KERNEL_UNLOCK_IF_IFP_MPSAFE(ifp);
 	return e;
 }



re: CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal

2019-08-09 Thread matthew green
"Christos Zoulas" writes:
> Module Name:  src
> Committed By: christos
> Date: Fri Aug  9 08:10:39 UTC 2019
> 
> Modified Files:
>   src/external/bsd/jemalloc/include/jemalloc/internal:
>   jemalloc_internal_defs.h
> 
> Log Message:
> PR/54307: Rin Okuyama: Lots of jemalloc assertions in latest -current

hi christos :-)


can you try not to copy bug descriptions are change descriptions?
this commit log doesn't tell me what was actually changed.

thanks.


.mrg.


CVS commit: [netbsd-7] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:25:47 UTC 2019

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

Log Message:
Ticket #1701


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.56 -r1.1.2.57 src/doc/CHANGES-7.3

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



CVS commit: [netbsd-7] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:25:47 UTC 2019

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

Log Message:
Ticket #1701


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.56 -r1.1.2.57 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.56 src/doc/CHANGES-7.3:1.1.2.57
--- src/doc/CHANGES-7.3:1.1.2.56	Sat Jun 15 16:00:20 2019
+++ src/doc/CHANGES-7.3	Fri Aug  9 19:25:47 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.56 2019/06/15 16:00:20 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.57 2019/08/09 19:25:47 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -614,3 +614,9 @@ libexec/httpd/testsuite/test-simple		1.6
 	Avoid an assertion failure when using cgihandler (-C option).
 	[mrg, ticket #1699]
 
+sys/external/bsd/ipf/netinet/fil.c		1.30
+
+	PR/54443: ipf mistakenly regards UDP packet with checksum field
+	0x as bad.
+	[christos, ticket #1701]
+



CVS commit: [netbsd-7] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:24:22 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-7]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1701):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/external/bsd/ipf/netinet/fil.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/external/bsd/ipf/netinet/fil.c
diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.15.2.3 src/sys/external/bsd/ipf/netinet/fil.c:1.15.2.4
--- src/sys/external/bsd/ipf/netinet/fil.c:1.15.2.3	Thu Jun 29 12:24:10 2017
+++ src/sys/external/bsd/ipf/netinet/fil.c	Fri Aug  9 19:24:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.15.2.3 2017/06/29 12:24:10 sborrill Exp $	*/
+/*	$NetBSD: fil.c,v 1.15.2.4 2019/08/09 19:24:22 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.15.2.3 2017/06/29 12:24:10 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.15.2.4 2019/08/09 19:24:22 martin Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -6474,8 +6474,11 @@ ipf_checkl4sum(fr_info_t *fin)
 		/*NOTREACHED*/
 	}
 
-	if (csump != NULL)
+	if (csump != NULL) {
 		hdrsum = *csump;
+		if (fin->fin_p == IPPROTO_UDP && hdrsum == 0x)
+			hdrsum = 0x;
+	}
 
 	if (dosum) {
 		sum = fr_cksum(fin, fin->fin_ip, fin->fin_p, fin->fin_dp);



CVS commit: [netbsd-7] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:24:22 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-7]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1701):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/external/bsd/ipf/netinet/fil.c

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



CVS commit: [netbsd-8] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:22:51 UTC 2019

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

Log Message:
Ticket #1331


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:22:51 UTC 2019

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

Log Message:
Ticket #1331


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.21 src/doc/CHANGES-8.2:1.1.2.22
--- src/doc/CHANGES-8.2:1.1.2.21	Wed Aug  7 08:22:41 2019
+++ src/doc/CHANGES-8.2	Fri Aug  9 19:22:51 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.21 2019/08/07 08:22:41 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.22 2019/08/09 19:22:51 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -539,3 +539,9 @@ sys/kern/uipc_socket2.c1.134
 	Fix kernel heap info leaks in sys_recvmsg().
 	[maxv, ticket #1330]
 
+sys/external/bsd/ipf/netinet/fil.c		1.30
+
+	PR/54443: ipf mistakenly regards UDP packet with checksum field
+	0x as bad.
+	[christos, ticket #1331]
+



CVS commit: [netbsd-8] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:21:05 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-8]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1331):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.20.4.2 -r1.20.4.3 src/sys/external/bsd/ipf/netinet/fil.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/external/bsd/ipf/netinet/fil.c
diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.20.4.2 src/sys/external/bsd/ipf/netinet/fil.c:1.20.4.3
--- src/sys/external/bsd/ipf/netinet/fil.c:1.20.4.2	Wed Dec 26 13:18:53 2018
+++ src/sys/external/bsd/ipf/netinet/fil.c	Fri Aug  9 19:21:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.20.4.2 2018/12/26 13:18:53 martin Exp $	*/
+/*	$NetBSD: fil.c,v 1.20.4.3 2019/08/09 19:21:04 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.20.4.2 2018/12/26 13:18:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.20.4.3 2019/08/09 19:21:04 martin Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -6527,8 +6527,11 @@ ipf_checkl4sum(fr_info_t *fin)
 		/*NOTREACHED*/
 	}
 
-	if (csump != NULL)
+	if (csump != NULL) {
 		hdrsum = *csump;
+		if (fin->fin_p == IPPROTO_UDP && hdrsum == 0x)
+			hdrsum = 0x;
+	}
 
 	if (dosum) {
 		sum = fr_cksum(fin, fin->fin_ip, fin->fin_p, fin->fin_dp);



CVS commit: [netbsd-8] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:21:05 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-8]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1331):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.20.4.2 -r1.20.4.3 src/sys/external/bsd/ipf/netinet/fil.c

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



CVS commit: [netbsd-9] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:18:47 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-9]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #40):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/external/bsd/ipf/netinet/fil.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/external/bsd/ipf/netinet/fil.c
diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.29 src/sys/external/bsd/ipf/netinet/fil.c:1.29.2.1
--- src/sys/external/bsd/ipf/netinet/fil.c:1.29	Fri Jun 28 23:25:12 2019
+++ src/sys/external/bsd/ipf/netinet/fil.c	Fri Aug  9 19:18:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.29 2019/06/28 23:25:12 christos Exp $	*/
+/*	$NetBSD: fil.c,v 1.29.2.1 2019/08/09 19:18:47 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -141,7 +141,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.29 2019/06/28 23:25:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.29.2.1 2019/08/09 19:18:47 martin Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -6536,8 +6536,11 @@ ipf_checkl4sum(fr_info_t *fin)
 		/*NOTREACHED*/
 	}
 
-	if (csump != NULL)
+	if (csump != NULL) {
 		hdrsum = *csump;
+		if (fin->fin_p == IPPROTO_UDP && hdrsum == 0x)
+			hdrsum = 0x;
+	}
 
 	if (dosum) {
 		sum = fr_cksum(fin, fin->fin_ip, fin->fin_p, fin->fin_dp);



CVS commit: [netbsd-9] src/sys/external/bsd/ipf/netinet

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 19:18:47 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-9]: fil.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #40):

sys/external/bsd/ipf/netinet/fil.c: revision 1.30

PR/54443: Edgar Fu�: ipf mistakenly regards UDP packet with checksum field
0x as bad


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/external/bsd/ipf/netinet/fil.c

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



CVS commit: src/sys/dev/wsfb

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 17:22:02 UTC 2019

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
Fix bug introduced in rev. 1.69:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69

is_bgr should be initialized to false. Otherwise, color becomes strange
for depths 24 and 32 unless backend explicitly set "is_bgr" property.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.69 src/sys/dev/wsfb/genfb.c:1.70
--- src/sys/dev/wsfb/genfb.c:1.69	Wed Aug  7 13:23:12 2019
+++ src/sys/dev/wsfb/genfb.c	Fri Aug  9 17:22:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.69 2019/08/07 13:23:12 rin Exp $ */
+/*	$NetBSD: genfb.c,v 1.70 2019/08/09 17:22:02 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.69 2019/08/07 13:23:12 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.70 2019/08/09 17:22:02 rin Exp $");
 
 #include 
 #include 
@@ -569,6 +569,7 @@ genfb_init_screen(void *cookie, struct v
 	case 24:
 		ri->ri_flg |= RI_ENABLE_ALPHA;
 
+		is_bgr = false;
 		prop_dictionary_get_bool(device_properties(sc->sc_dev),
 		"is_bgr", &is_bgr);
 		if (is_bgr) {



CVS commit: src/sys/dev/wsfb

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 17:22:02 UTC 2019

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
Fix bug introduced in rev. 1.69:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69

is_bgr should be initialized to false. Otherwise, color becomes strange
for depths 24 and 32 unless backend explicitly set "is_bgr" property.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/wsfb/genfb.c

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



CVS commit: [netbsd-9] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:16:26 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #32 - #39


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-9.0

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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.11 src/doc/CHANGES-9.0:1.1.2.12
--- src/doc/CHANGES-9.0:1.1.2.11	Thu Aug  8 11:52:58 2019
+++ src/doc/CHANGES-9.0	Fri Aug  9 16:16:26 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.11 2019/08/08 11:52:58 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.12 2019/08/09 16:16:26 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -356,3 +356,58 @@ etc/mtree/NetBSD.dist.base			1.201
 	/etc/namedb: sync user and group with etc/mtree/special.
 	[nakayama, ticket #31]
 
+	Do not try to fsck partitions we are never going to mount.
+	Found by Andreas Gustafsson's baremetal test bed.
+	[martin, ticket #32]
+
+	Do not even consider to fsck partitions where we do not know the file
+	system type. Add v7fs support.
+	[martin, ticket #33]
+
+sbin/reboot/reboot.c1.41
+
+	reboot(8): fix argument order for logwtmpx(3) call.
+	[roy, ticket #34]
+
+sys/arch/amd64/conf/ALL1.121
+sys/arch/amd64/conf/GENERIC			1.534
+sys/arch/amd64/conf/XEN3_DOM0			1.168
+sys/arch/i386/conf/GENERIC			1.1210
+sys/arch/i386/conf/XEN3PAE_DOM0			1.14
+
+	xhci(4) is considered stable enough. So, remove misleading comments.
+	[rin, ticket #35]
+
+sys/dev/pci/if_et.c1.25,1.26
+sys/dev/pci/if_etreg.h1.2,1.3
+
+	Make et(4) work:
+	- Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags
+	  controllable.  
+	- Enabling TX/RX in et_init() will always fail when cable is not
+	  plugged in. If this happens, we delay TX/RX enablement until link is
+	  up.
+	- Modify flow control stuff a little. It still doesn't work.
+	- Avoid undefined behavior when reset the chip.
+	[msaitoh, ticket #36]
+
+doc/3RDPARTY	1.1641
+sys/arch/amd64/conf/GENERIC			1.532
+sys/dev/pci/if_ena.c1.16
+
+	If the memory space's BAR and the MSI-X table is on the same BAR,
+	reserve the space. Almost the same as nvme_pci.c and xhci_pci.c.
+	Add ena(4).
+	[msaitoh, ticket #37]
+
+sys/dev/acpi/acpi_ec.c1.76,1.77
+
+	Fix a bug that acpiec_space_handler() doesn't access more than 64bit
+	correctly.
+	[msaitoh, ticket #38]
+
+sys/dev/usb/if_aue.c1.156
+
+	Fix panic when setting multicast addresses.
+	[msaitoh, ticket #39]
+



CVS commit: [netbsd-9] src/doc

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:16:26 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #32 - #39


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/dev/usb

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:15:06 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-9]: if_aue.c

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

sys/dev/usb/if_aue.c: revision 1.156

Fix panic when setting multicast addresses. Write the hash table outside of
ETHER_LOC()/ETHER_UNLOCK().


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/dev/usb/if_aue.c

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

Modified files:

Index: src/sys/dev/usb/if_aue.c
diff -u src/sys/dev/usb/if_aue.c:1.154 src/sys/dev/usb/if_aue.c:1.154.2.1
--- src/sys/dev/usb/if_aue.c:1.154	Tue May 28 07:41:50 2019
+++ src/sys/dev/usb/if_aue.c	Fri Aug  9 16:15:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aue.c,v 1.154 2019/05/28 07:41:50 msaitoh Exp $	*/
+/*	$NetBSD: if_aue.c,v 1.154.2.1 2019/08/09 16:15:06 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.154 2019/05/28 07:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.154.2.1 2019/08/09 16:15:06 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -587,6 +587,7 @@ aue_setmulti(struct aue_softc *sc)
 	struct ether_multi	*enm;
 	struct ether_multistep	step;
 	uint32_t		h = 0, i;
+	uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 
 	DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
@@ -601,10 +602,6 @@ allmulti:
 
 	AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI);
 
-	/* first, zot all the existing hash bits */
-	for (i = 0; i < 8; i++)
-		aue_csr_write_1(sc, AUE_MAR0 + i, 0);
-
 	/* now program new ones */
 	ETHER_LOCK(ec);
 	ETHER_FIRST_MULTI(step, ec, enm);
@@ -616,11 +613,15 @@ allmulti:
 		}
 
 		h = aue_crc(enm->enm_addrlo);
-		AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0x7));
+		hashtbl[h >> 3] |= 1 << (h & 0x7);
 		ETHER_NEXT_MULTI(step, enm);
 	}
 	ETHER_UNLOCK(ec);
 
+	/* write the hashtable */
+	for (i = 0; i < 8; i++)
+		aue_csr_write_1(sc, AUE_MAR0 + i, hashtbl[i]);
+
 	ifp->if_flags &= ~IFF_ALLMULTI;
 }
 



CVS commit: [netbsd-9] src/sys/dev/usb

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:15:06 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-9]: if_aue.c

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

sys/dev/usb/if_aue.c: revision 1.156

Fix panic when setting multicast addresses. Write the hash table outside of
ETHER_LOC()/ETHER_UNLOCK().


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/dev/usb/if_aue.c

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



CVS commit: [netbsd-9] src/sys/dev/acpi

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:13:36 UTC 2019

Modified Files:
src/sys/dev/acpi [netbsd-9]: acpi_ec.c

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

sys/dev/acpi/acpi_ec.c: revision 1.76
sys/dev/acpi/acpi_ec.c: revision 1.77

- Fix a bug that acpiec_space_handler() doesn't access more than 64bit
  correctly. Found by kUBSan on Thinkpad X220. acpiec0 accessed 128bits from
  address 0xa0. The error message was:
UBSan: Undefined Behavior in ../../../../dev/acpi/acpi_ec.c:672:32, 
shift exponent 64 is too large for 64-bit type 'long unsigned int'

- KNF.

- Make the case that width < 8 behave as the same as before. Pointed out by
  Joerg.

- Change "switch" to "if" for simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.20.1 src/sys/dev/acpi/acpi_ec.c

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



CVS commit: [netbsd-9] src/sys/dev/acpi

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:13:36 UTC 2019

Modified Files:
src/sys/dev/acpi [netbsd-9]: acpi_ec.c

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

sys/dev/acpi/acpi_ec.c: revision 1.76
sys/dev/acpi/acpi_ec.c: revision 1.77

- Fix a bug that acpiec_space_handler() doesn't access more than 64bit
  correctly. Found by kUBSan on Thinkpad X220. acpiec0 accessed 128bits from
  address 0xa0. The error message was:
UBSan: Undefined Behavior in ../../../../dev/acpi/acpi_ec.c:672:32, 
shift exponent 64 is too large for 64-bit type 'long unsigned int'

- KNF.

- Make the case that width < 8 behave as the same as before. Pointed out by
  Joerg.

- Change "switch" to "if" for simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.20.1 src/sys/dev/acpi/acpi_ec.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/acpi/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.75 src/sys/dev/acpi/acpi_ec.c:1.75.20.1
--- src/sys/dev/acpi/acpi_ec.c:1.75	Sat Mar 11 08:26:23 2017
+++ src/sys/dev/acpi/acpi_ec.c	Fri Aug  9 16:13:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.75 2017/03/11 08:26:23 tsutsui Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.75.20.1 2019/08/09 16:13:35 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger .
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75 2017/03/11 08:26:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75.20.1 2019/08/09 16:13:35 martin Exp $");
 
 #include 
 #include 
@@ -404,6 +404,7 @@ post_data_map:
 static bool
 acpiec_suspend(device_t dv, const pmf_qual_t *qual)
 {
+
 	acpiec_cold = true;
 
 	return true;
@@ -412,6 +413,7 @@ acpiec_suspend(device_t dv, const pmf_qu
 static bool
 acpiec_resume(device_t dv, const pmf_qual_t *qual)
 {
+
 	acpiec_cold = false;
 
 	return true;
@@ -454,9 +456,10 @@ acpiec_parse_gpe_package(device_t self, 
 		ACPI_FREE(p);
 		return false;
 	}
-	
+
 	if (p->Package.Count != 2) {
-		aprint_error_dev(self, "_GPE package does not contain 2 elements\n");
+		aprint_error_dev(self,
+		"_GPE package does not contain 2 elements\n");
 		ACPI_FREE(p);
 		return false;
 	}
@@ -511,6 +514,7 @@ static ACPI_STATUS
 acpiec_space_setup(ACPI_HANDLE region, uint32_t func, void *arg,
 void **region_arg)
 {
+
 	if (func == ACPI_REGION_DEACTIVATE)
 		*region_arg = NULL;
 	else
@@ -528,9 +532,11 @@ acpiec_lock(device_t dv)
 	mutex_enter(&sc->sc_access_mtx);
 
 	if (sc->sc_need_global_lock) {
-		rv = AcpiAcquireGlobalLock(EC_LOCK_TIMEOUT, &sc->sc_global_lock);
+		rv = AcpiAcquireGlobalLock(EC_LOCK_TIMEOUT,
+		&sc->sc_global_lock);
 		if (rv != AE_OK) {
-			aprint_error_dev(dv, "failed to acquire global lock: %s\n",
+			aprint_error_dev(dv,
+			"failed to acquire global lock: %s\n",
 			AcpiFormatException(rv));
 			return;
 		}
@@ -546,7 +552,8 @@ acpiec_unlock(device_t dv)
 	if (sc->sc_need_global_lock) {
 		rv = AcpiReleaseGlobalLock(sc->sc_global_lock);
 		if (rv != AE_OK) {
-			aprint_error_dev(dv, "failed to release global lock: %s\n",
+			aprint_error_dev(dv,
+			"failed to release global lock: %s\n",
 			AcpiFormatException(rv));
 		}
 	}
@@ -587,7 +594,8 @@ acpiec_read(device_t dv, uint8_t addr, u
 	} else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
 		mutex_exit(&sc->sc_mtx);
 		acpiec_unlock(dv);
-		aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
+		aprint_error_dev(dv,
+		"command takes over %d sec...\n", EC_CMD_TIMEOUT);
 		return AE_ERROR;
 	}
 
@@ -634,7 +642,8 @@ acpiec_write(device_t dv, uint8_t addr, 
 	} else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
 		mutex_exit(&sc->sc_mtx);
 		acpiec_unlock(dv);
-		aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
+		aprint_error_dev(dv,
+		"command takes over %d sec...\n", EC_CMD_TIMEOUT);
 		return AE_ERROR;
 	}
 
@@ -648,42 +657,36 @@ static ACPI_STATUS
 acpiec_space_handler(uint32_t func, ACPI_PHYSICAL_ADDRESS paddr,
 uint32_t width, ACPI_INTEGER *value, void *arg, void *region_arg)
 {
-	device_t dv;
+	device_t dv = arg;
 	ACPI_STATUS rv;
-	uint8_t addr, reg;
-	unsigned int i;
+	uint8_t addr;
+	uint8_t *reg;
 
+	if ((func != ACPI_READ) && (func != ACPI_WRITE)) {
+		aprint_error("%s: invalid Address Space function called: %x\n",
+		device_xname(dv), (unsigned int)func);
+		return AE_BAD_PARAMETER;
+	}
 	if (paddr > 0xff || width % 8 != 0 || value == NULL || arg == NULL ||
 	paddr + width / 8 > 0x100)
 		return AE_BAD_PARAMETER;
 
 	addr = paddr;
-	dv = arg;
+	reg = (uint8_t *)value;
 
 	rv = AE_OK;
 
-	switch (func) {
-	case ACPI_READ:
+	if (func == ACPI_READ)
 		*value = 0;
-		for (i = 0; i < width; i += 8, ++addr) {
-			rv = acpiec_read(dv, addr, ®);
-			if (rv != AE_OK)
-break;
-			*value |= (ACPI_INTEGER)re

CVS commit: [netbsd-9] src

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:06:39 UTC 2019

Modified Files:
src/doc [netbsd-9]: 3RDPARTY
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/dev/pci [netbsd-9]: if_ena.c

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

doc/3RDPARTY: revision 1.1641
sys/dev/pci/if_ena.c: revision 1.16
sys/arch/amd64/conf/GENERIC: revision 1.532

If the memory space's BAR and the MSI-X table is on the same BAR,
reserve the space. Almost the same as nvme_pci.c and xhci_pci.c.
Tested by ryoon@.

Add ena(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1640 -r1.1640.2.1 src/doc/3RDPARTY
cvs rdiff -u -r1.531.2.1 -r1.531.2.2 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/dev/pci/if_ena.c

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



CVS commit: [netbsd-9] src

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:06:39 UTC 2019

Modified Files:
src/doc [netbsd-9]: 3RDPARTY
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/dev/pci [netbsd-9]: if_ena.c

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

doc/3RDPARTY: revision 1.1641
sys/dev/pci/if_ena.c: revision 1.16
sys/arch/amd64/conf/GENERIC: revision 1.532

If the memory space's BAR and the MSI-X table is on the same BAR,
reserve the space. Almost the same as nvme_pci.c and xhci_pci.c.
Tested by ryoon@.

Add ena(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1640 -r1.1640.2.1 src/doc/3RDPARTY
cvs rdiff -u -r1.531.2.1 -r1.531.2.2 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/dev/pci/if_ena.c

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1640 src/doc/3RDPARTY:1.1640.2.1
--- src/doc/3RDPARTY:1.1640	Tue Jul 30 14:57:06 2019
+++ src/doc/3RDPARTY	Fri Aug  9 16:06:39 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1640 2019/07/30 14:57:06 joerg Exp $
+#	$NetBSD: 3RDPARTY,v 1.1640.2.1 2019/08/09 16:06:39 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -2109,6 +2109,7 @@ Notes:
 Use groff2netbsd from external/gpl2/groff/groff2netbsd to prepare the
 distribution for import.
 Update MDATE in src/external/gpl2/groff/Makefile.inc.
+
 Package:	gmake
 Version:	3.81 (Last GPlv2+ version)
 Current Vers:	4.2
@@ -2174,3 +2175,15 @@ License:	BSD-like (4-clause)
 Location:	usr.bin/indent
 Notes:
 Tests are stored in tests/usr.bin/indent.
+
+Package:	ena
+Version:	0.8.1
+Current Vers:	2.0.0
+Maintainer:	Amazon.com
+Archive Site:	https://github.com/amzn/amzn-drivers/tree/master/kernel/fbsd/ena
+Home Page:	https://github.com/amzn/amzn-drivers/
+Mailing List:	none
+Responsible:
+License:	BSD-like (2 and 3-clause)
+Location:	sys/external/bsd/ena-com
+Notes:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.531.2.1 src/sys/arch/amd64/conf/GENERIC:1.531.2.2
--- src/sys/arch/amd64/conf/GENERIC:1.531.2.1	Fri Aug  9 15:59:52 2019
+++ src/sys/arch/amd64/conf/GENERIC	Fri Aug  9 16:06:39 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.531.2.1 2019/08/09 15:59:52 martin Exp $
+# $NetBSD: GENERIC,v 1.531.2.2 2019/08/09 16:06:39 martin 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.531.2.1 $"
+#ident		"GENERIC-$Revision: 1.531.2.2 $"
 
 maxusers	64		# estimated number of users
 
@@ -771,6 +771,7 @@ bnx*	at pci? dev ? function ?	# Broadcom
 bwi*	at pci? dev ? function ?	# Broadcom BCM43xx wireless
 bwfm*	at pci? dev ? function ?	# Broadcom FullMAC
 dge*	at pci? dev ? function ?	# Intel 82597 10GbE LR
+ena*	at pci? dev ? function ?	# Amazon.com Elastic Network Adapter
 ep*	at pci? dev ? function ?	# 3Com 3c59x
 epic*	at pci? dev ? function ?	# SMC EPIC/100 Ethernet
 esh*	at pci? dev ? function ?	# Essential HIPPI card

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.15 src/sys/dev/pci/if_ena.c:1.15.2.1
--- src/sys/dev/pci/if_ena.c:1.15	Wed May 29 10:07:29 2019
+++ src/sys/dev/pci/if_ena.c	Fri Aug  9 16:06:39 2019
@@ -31,7 +31,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.15 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.15.2.1 2019/08/09 16:06:39 martin Exp $");
 
 #include 
 #include 
@@ -273,15 +273,57 @@ static int
 ena_allocate_pci_resources(struct pci_attach_args *pa,
 struct ena_adapter *adapter)
 {
-	bus_size_t size;
+	pcireg_t memtype, reg;
+	bus_addr_t memaddr;
+	bus_size_t mapsize;
+	int flags, error;
+	int msixoff;
+
+	memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, ENA_REG_BAR);
+	if (PCI_MAPREG_TYPE(memtype) != PCI_MAPREG_TYPE_MEM) {
+		aprint_error_dev(adapter->pdev, "invalid type (type=0x%x)\n",
+		memtype);
+		return ENXIO;
+	}
+	reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+	if (((reg & PCI_COMMAND_MASTER_ENABLE) == 0) ||
+	((reg & PCI_COMMAND_MEM_ENABLE) == 0)) {
+		/*
+		 * Enable address decoding for memory range in case BIOS or
+		 * UEFI didn't set it.
+		 */
+		reg |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE;
+	pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+		reg);
+	}
 
-	/*
-	 * Map control/status registers.
-	*/
-	pcireg_t memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, ENA_REG_BAR);
-	if (pci_mapreg_map(pa, ENA_REG_BAR, memtype, 0, &adapter->sc_btag,
-	&adapter->sc_bhandle, NULL, &size)) {
-		aprint_error(": can't map mem space\n");
+	adapter->sc_btag = pa-

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

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:03:13 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_et.c if_etreg.h

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

sys/dev/pci/if_et.c: revision 1.25
sys/dev/pci/if_et.c: revision 1.26
sys/dev/pci/if_etreg.h: revision 1.2
sys/dev/pci/if_etreg.h: revision 1.3

Avoid undefined behavior when reset the chip. found by kUBSan.

 Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable.

Make et(4) work:
- Enabling TX/RX in et_init() will always fail when cable is not plugged in,
  if this happens, we delay TX/RX enablement until link is up. From FreeBSD.
- Modify flow control stuff a little (from FrerBSD). It still doesn't work.
- KNF. Part of OpenBSD 1.12.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/dev/pci/if_et.c
cvs rdiff -u -r1.1 -r1.1.68.1 src/sys/dev/pci/if_etreg.h

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



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

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 16:03:13 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_et.c if_etreg.h

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

sys/dev/pci/if_et.c: revision 1.25
sys/dev/pci/if_et.c: revision 1.26
sys/dev/pci/if_etreg.h: revision 1.2
sys/dev/pci/if_etreg.h: revision 1.3

Avoid undefined behavior when reset the chip. found by kUBSan.

 Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable.

Make et(4) work:
- Enabling TX/RX in et_init() will always fail when cable is not plugged in,
  if this happens, we delay TX/RX enablement until link is up. From FreeBSD.
- Modify flow control stuff a little (from FrerBSD). It still doesn't work.
- KNF. Part of OpenBSD 1.12.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/dev/pci/if_et.c
cvs rdiff -u -r1.1 -r1.1.68.1 src/sys/dev/pci/if_etreg.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_et.c
diff -u src/sys/dev/pci/if_et.c:1.24 src/sys/dev/pci/if_et.c:1.24.2.1
--- src/sys/dev/pci/if_et.c:1.24	Tue May 28 07:41:49 2019
+++ src/sys/dev/pci/if_et.c	Fri Aug  9 16:03:13 2019
@@ -1,5 +1,5 @@
-/*	$NetBSD: if_et.c,v 1.24 2019/05/28 07:41:49 msaitoh Exp $	*/
-/*	$OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $	*/
+/*	$NetBSD: if_et.c,v 1.24.2.1 2019/08/09 16:03:13 martin Exp $	*/
+/*	$OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $	*/
 /*
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
  *
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.24 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.24.2.1 2019/08/09 16:03:13 martin Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -83,17 +83,19 @@ __KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.
 
 int	et_match(device_t, cfdata_t, void *);
 void	et_attach(device_t, device_t, void *);
-int	et_detach(device_t, int flags);
+int	et_detach(device_t, int);
 int	et_shutdown(device_t);
 
 int	et_miibus_readreg(device_t, int, int, uint16_t *);
 int	et_miibus_writereg(device_t, int, int, uint16_t);
 void	et_miibus_statchg(struct ifnet *);
 
-int	et_init(struct ifnet *ifp);
+int	et_init(struct ifnet *);
 int	et_ioctl(struct ifnet *, u_long, void *);
 void	et_start(struct ifnet *);
 void	et_watchdog(struct ifnet *);
+static int	et_ifmedia_upd(struct ifnet *);
+static void	et_ifmedia_sts(struct ifnet *, struct ifmediareq *);
 
 int	et_intr(void *);
 void	et_enable_intrs(struct et_softc *, uint32_t);
@@ -131,7 +133,6 @@ int	et_start_rxdma(struct et_softc *);
 int	et_start_txdma(struct et_softc *);
 int	et_stop_rxdma(struct et_softc *);
 int	et_stop_txdma(struct et_softc *);
-int	et_enable_txrx(struct et_softc *);
 void	et_reset(struct et_softc *);
 int	et_bus_config(struct et_softc *);
 void	et_get_eaddr(struct et_softc *, uint8_t[]);
@@ -190,6 +191,7 @@ et_attach(device_t parent, device_t self
 	const char *intrstr;
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 	struct mii_data * const mii = &sc->sc_miibus;
+	uint32_t pmcfg;
 	pcireg_t memtype;
 	int error;
 	char intrbuf[PCI_INTRSTR_LEN];
@@ -234,6 +236,9 @@ et_attach(device_t parent, device_t self
 	sc->sc_pct = pa->pa_pc;
 	sc->sc_pcitag = pa->pa_tag;
 
+	if (pa->pa_id == PCI_PRODUCT_LUCENT_ET1301)
+		sc->sc_flags |= ET_FLAG_FASTETHER;
+
 	error = et_bus_config(sc);
 	if (error)
 		goto fail;
@@ -243,8 +248,11 @@ et_attach(device_t parent, device_t self
 	aprint_normal_dev(self, "Ethernet address %s\n",
 	ether_sprintf(sc->sc_enaddr));
 
-	CSR_WRITE_4(sc, ET_PM,
-		ET_PM_SYSCLK_GATE | ET_PM_TXCLK_GATE | ET_PM_RXCLK_GATE);
+	/* Take PHY out of COMA and enable clocks. */
+	pmcfg = ET_PM_SYSCLK_GATE | ET_PM_TXCLK_GATE | ET_PM_RXCLK_GATE;
+	if ((sc->sc_flags & ET_FLAG_FASTETHER) == 0)
+		pmcfg |= EM_PM_GIGEPHY_ENB;
+	CSR_WRITE_4(sc, ET_PM, pmcfg);
 
 	et_reset(sc);
 
@@ -273,8 +281,7 @@ et_attach(device_t parent, device_t self
 	mii->mii_statchg = et_miibus_statchg;
 
 	sc->sc_ethercom.ec_mii = mii;
-	ifmedia_init(&mii->mii_media, 0, ether_mediachange,
-	ether_mediastatus);
+	ifmedia_init(&mii->mii_media, 0, et_ifmedia_upd, et_ifmedia_sts);
 	mii_attach(self, mii, 0x, MII_PHY_ANY, MII_OFFSET_ANY, 0);
 	if (LIST_FIRST(&mii->mii_phys) == NULL) {
 		aprint_error_dev(self, "no PHY found!\n");
@@ -450,31 +457,117 @@ et_miibus_statchg(struct ifnet *ifp)
 {
 	struct et_softc *sc = ifp->if_softc;
 	struct mii_data *mii = &sc->sc_miibus;
-	uint32_t cfg2, ctrl;
+	uint32_t cfg1, cfg2, ctrl;
+	int i;
+
+	sc->sc_flags &= ~ET_FLAG_LINK;
+	if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) ==
+	(IFM_ACTIVE | IFM_AVALID)) {
+		switch (IFM_SUBTYPE(mii->mii_media_active)) {
+		case IFM_10_T:
+		case IFM_100_TX:
+			sc->sc_flags |= ET_FLAG_LINK;
+			break;
+		case IFM_1000_T:
+			if ((sc->sc_flags & ET_FLA

CVS commit: [netbsd-9] src/sys/arch

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 15:59:53 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC XEN3_DOM0
src/sys/arch/i386/conf [netbsd-9]: GENERIC XEN3PAE_DOM0

Log Message:
Pull up following revision(s) (requested by rin in ticket #35):

sys/arch/amd64/conf/ALL: revision 1.121
sys/arch/i386/conf/XEN3PAE_DOM0: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.168
sys/arch/i386/conf/GENERIC: revision 1.1210
sys/arch/amd64/conf/GENERIC: revision 1.534

xhci(4) is considered stable enough. So, remove misleading comments.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.2.1 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.531 -r1.531.2.1 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.167 -r1.167.2.1 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.1208 -r1.1208.2.1 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/i386/conf/XEN3PAE_DOM0

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



CVS commit: [netbsd-9] src/sys/arch

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 15:59:53 UTC 2019

Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC XEN3_DOM0
src/sys/arch/i386/conf [netbsd-9]: GENERIC XEN3PAE_DOM0

Log Message:
Pull up following revision(s) (requested by rin in ticket #35):

sys/arch/amd64/conf/ALL: revision 1.121
sys/arch/i386/conf/XEN3PAE_DOM0: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.168
sys/arch/i386/conf/GENERIC: revision 1.1210
sys/arch/amd64/conf/GENERIC: revision 1.534

xhci(4) is considered stable enough. So, remove misleading comments.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.2.1 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.531 -r1.531.2.1 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.167 -r1.167.2.1 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.1208 -r1.1208.2.1 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/i386/conf/XEN3PAE_DOM0

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.120 src/sys/arch/amd64/conf/ALL:1.120.2.1
--- src/sys/arch/amd64/conf/ALL:1.120	Wed Jul 24 23:13:46 2019
+++ src/sys/arch/amd64/conf/ALL	Fri Aug  9 15:59:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.120 2019/07/24 23:13:46 tnn Exp $
+# $NetBSD: ALL,v 1.120.2.1 2019/08/09 15:59:52 martin 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.120 $"
+#ident		"ALL-$Revision: 1.120.2.1 $"
 
 maxusers	64		# estimated number of users
 
@@ -1124,7 +1124,6 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 ohci*	at pci?	dev ? function ?	# Open Host Controller
 uhci*	at pci?	dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.531 src/sys/arch/amd64/conf/GENERIC:1.531.2.1
--- src/sys/arch/amd64/conf/GENERIC:1.531	Wed Jul 24 06:35:04 2019
+++ src/sys/arch/amd64/conf/GENERIC	Fri Aug  9 15:59:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.531 2019/07/24 06:35:04 msaitoh Exp $
+# $NetBSD: GENERIC,v 1.531.2.1 2019/08/09 15:59:52 martin 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.531 $"
+#ident		"GENERIC-$Revision: 1.531.2.1 $"
 
 maxusers	64		# estimated number of users
 
@@ -894,7 +894,6 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 ohci*	at pci?	dev ? function ?	# Open Host Controller
 uhci*	at pci?	dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.167 src/sys/arch/amd64/conf/XEN3_DOM0:1.167.2.1
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.167	Mon May  6 02:24:37 2019
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Fri Aug  9 15:59:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.167 2019/05/06 02:24:37 sevan Exp $
+# $NetBSD: XEN3_DOM0,v 1.167.2.1 2019/08/09 15:59:52 martin Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOM0-$Revision: 1.167 $"
+#ident		"XEN3_DOM0-$Revision: 1.167.2.1 $"
 
 maxusers	32		# estimated number of users
 
@@ -570,7 +570,6 @@ wsmouse*	at pms? mux 0
 
 # PCI USB controllers
 xhci*	at pci? dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci? dev ? function ?	# Enhanced Host Controller
 ohci*	at pci? dev ? function ?	# Open Host Controller
 uhci*	at pci? dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1208 src/sys/arch/i386/conf/GENERIC:1.1208.2.1
--- src/sys/arch/i386/conf/GENERIC:1.1208	Mon Jun 17 19:01:17 2019
+++ src/sys/arch/i386/conf/GENERIC	Fri Aug  9 15:59:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1208 2019/06/17 19:01:17 kamil Exp $
+# $NetBSD: GENERIC,v 1.1208.2.1 2019/08/09 15:59:52 martin 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.1208 $"
+#ident		"GENERIC-$Revision: 1.1208.2.1 $"
 
 maxusers	64		#

Re: CVS commit: src/distrib/amd64/liveimage/emuimage

2019-08-09 Thread Greg Troxel
Martin Husemann  writes:

> On Thu, Aug 08, 2019 at 08:09:19PM -0400, Greg Troxel wrote:
>> In addition, I don't like it that images have stuff in /boot in the DOS
>> partition that can't be found in some obvious place, like /usr/mdec.
>> But I haven't gotten around to trying to fix it either so I get it that
>> ENOPATCH.
>
> Yes, but in this case the bug is that sysinst does not know how to properly
> fill the /boot things - which is on my TODO list.
>
> (and also, as you mention, that there is no obvious easy source for the 
> content)

I was talking about the first bug, that these things aren't in the
destdir of a build.  The following belong on /usr/mdec/RPI, or similar,
either for all arm build (or when MKRPI=yes if we want to split that
out).

-rwxr-xr-x  1 root  wheel 1494 Oct 26  2017 LICENCE.broadcom
-rwxr-xr-x  1 root  wheel17932 Oct 26  2017 bootcode.bin
-rwxr-xr-x  1 root  wheel  105 Nov  9  2018 cmdline.txt
-rwxr-xr-x  1 root  wheel 6624 Oct 26  2017 fixup.dat
-rwxr-xr-x  1 root  wheel 2533 Oct 26  2017 fixup_cd.dat
-rwxr-xr-x  1 root  wheel  2823716 Oct 26  2017 start.elf
-rwxr-xr-x  1 root  wheel   634948 Oct 26  2017 start_cd.elf

Arguably installboot should be taught to deal with this; it's a FAT
partition instead of blocks 0-15, but it strikes me as the same thing
logically.


CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 12:05:52 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops1-4_putchar.h rasops1.c
rasops1_putchar_width.h rasops_putchar.h rasops_putchar_width.h

Log Message:
Correctly check whether character is in font in rasops_mapchar().
Also, make sure that in putchar functions for completeness.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/rasops/rasops1-4_putchar.h
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops1_putchar_width.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/rasops/rasops_putchar_width.h

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



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 12:05:52 UTC 2019

Modified Files:
src/sys/dev/rasops: rasops.c rasops1-4_putchar.h rasops1.c
rasops1_putchar_width.h rasops_putchar.h rasops_putchar_width.h

Log Message:
Correctly check whether character is in font in rasops_mapchar().
Also, make sure that in putchar functions for completeness.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/rasops/rasops1-4_putchar.h
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/rasops/rasops1_putchar_width.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/rasops/rasops_putchar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/rasops/rasops_putchar_width.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.119 src/sys/dev/rasops/rasops.c:1.120
--- src/sys/dev/rasops/rasops.c:1.119	Fri Aug  9 11:42:03 2019
+++ src/sys/dev/rasops/rasops.c	Fri Aug  9 12:05:51 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.120 2019/08/09 12:05:51 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.120 2019/08/09 12:05:51 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -598,18 +598,11 @@ rasops_mapchar(void *cookie, int c, u_in
 	KASSERT(ri->ri_font != NULL);
 
 	if ((c = wsfont_map_unichar(ri->ri_font, c)) < 0 ||
-	c < ri->ri_font->firstchar) {
+	!CHAR_IN_FONT(c, ri->ri_font)) {
 		*cp = ' ';
 		return 0;
 	}
 
-#if 0 /* XXXRO */
-	if (CHAR_IN_FONT(c, ri->ri_font)) {
-		*cp = ' ';
-		return 0;
-	}
-#endif
-
 	*cp = c;
 	return 5;
 }

Index: src/sys/dev/rasops/rasops1-4_putchar.h
diff -u src/sys/dev/rasops/rasops1-4_putchar.h:1.1 src/sys/dev/rasops/rasops1-4_putchar.h:1.2
--- src/sys/dev/rasops/rasops1-4_putchar.h:1.1	Wed Aug  7 12:36:36 2019
+++ src/sys/dev/rasops/rasops1-4_putchar.h	Fri Aug  9 12:05:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops1-4_putchar.h,v 1.1 2019/08/07 12:36:36 rin Exp $ */
+/* $NetBSD: rasops1-4_putchar.h,v 1.2 2019/08/09 12:05:51 rin Exp $ */
 
 /* NetBSD: rasops_bitops.h,v 1.23 2019/08/02 04:39:09 rin Exp */
 /*-
@@ -97,6 +97,9 @@ NAME(RASOPS_DEPTH)(void *cookie, int row
 
 	hp = NULL;	/* XXX GCC */
 
+	if (__predict_false(!CHAR_IN_FONT(uc, font)))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	/* Catches 'row < 0' case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)

Index: src/sys/dev/rasops/rasops1.c
diff -u src/sys/dev/rasops/rasops1.c:1.35 src/sys/dev/rasops/rasops1.c:1.36
--- src/sys/dev/rasops/rasops1.c:1.35	Wed Aug  7 12:27:49 2019
+++ src/sys/dev/rasops/rasops1.c	Fri Aug  9 12:05:51 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops1.c,v 1.35 2019/08/07 12:27:49 rin Exp $	*/
+/* 	$NetBSD: rasops1.c,v 1.36 2019/08/09 12:05:51 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.35 2019/08/07 12:27:49 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.36 2019/08/09 12:05:51 rin Exp $");
 
 #include "opt_rasops.h"
 
@@ -100,6 +100,9 @@ rasops1_putchar(void *cookie, int row, i
 
 	hp = NULL;	/* XXX GCC */
 
+	if (__predict_false(!CHAR_IN_FONT(uc, font)))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	/* Catches 'row < 0' case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)

Index: src/sys/dev/rasops/rasops1_putchar_width.h
diff -u src/sys/dev/rasops/rasops1_putchar_width.h:1.4 src/sys/dev/rasops/rasops1_putchar_width.h:1.5
--- src/sys/dev/rasops/rasops1_putchar_width.h:1.4	Wed Aug  7 12:27:49 2019
+++ src/sys/dev/rasops/rasops1_putchar_width.h	Fri Aug  9 12:05:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops1_putchar_width.h,v 1.4 2019/08/07 12:27:49 rin Exp $ */
+/* $NetBSD: rasops1_putchar_width.h,v 1.5 2019/08/09 12:05:51 rin Exp $ */
 
 /* NetBSD: rasops1.c,v 1.28 2019/07/25 03:02:44 rin Exp */
 /*-
@@ -69,6 +69,9 @@ PUTCHAR_WIDTH(RASOPS_WIDTH)(void *cookie
 
 	hp = NULL;	/* XXX GCC */
 
+	if (__predict_false(!CHAR_IN_FONT(uc, font)))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	/* Catches 'row < 0' case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)

Index: src/sys/dev/rasops/rasops_putchar.h
diff -u src/sys/dev/rasops/rasops_putchar.h:1.6 src/sys/dev/rasops/rasops_putchar.h:1.7
--- src/sys/dev/rasops/rasops_putchar.h:1.6	Wed Aug  7 12:33:48 2019
+++ src/sys/dev/rasops/rasops_putchar.h	Fri Aug  9 12:05:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops_putchar.h,v 1.6 2019/08/07 12:33:48 rin Exp $ */
+/* $NetBSD: rasops_putchar.h,v 1.7 2019/08/09 12:05:51 rin Exp $ */
 
 /* NetBSD: rasops8.c,v 1.41 2019/07/25 03:02:44 rin Exp  */
 /*-
@@ -106,7 +106,7 @@ NAME(RASOPS_DEPTH)(void *coo

CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:42:03 UTC 2019

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

Log Message:
Fix color range overflow; we cannot make bright colors more brighter.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/rasops/rasops.c

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



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:42:03 UTC 2019

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

Log Message:
Fix color range overflow; we cannot make bright colors more brighter.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.118 src/sys/dev/rasops/rasops.c:1.119
--- src/sys/dev/rasops/rasops.c:1.118	Fri Aug  9 11:08:20 2019
+++ src/sys/dev/rasops/rasops.c	Fri Aug  9 11:42:03 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -646,7 +646,7 @@ rasops_allocattr_color(void *cookie, int
 #endif
 	}
 
-	if ((flg & WSATTR_HILIT) != 0)
+	if ((flg & WSATTR_HILIT) != 0 && fg < 8)
 		fg += 8;
 
 	if ((flg & WSATTR_REVERSE) != 0) {



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:08:20 UTC 2019

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

Log Message:
When legacy Apple 4-bpp color palette is used, make green dark so that
kernel messages are printed nicely on white background.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.117 src/sys/dev/rasops/rasops.c:1.118
--- src/sys/dev/rasops/rasops.c:1.117	Wed Aug  7 12:27:49 2019
+++ src/sys/dev/rasops/rasops.c	Fri Aug  9 11:08:20 2019
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.117 2019/08/07 12:27:49 rin Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.117 2019/08/07 12:27:49 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -175,7 +175,7 @@ static const uint8_t apple8_devcmap[16] 
 static const uint8_t apple4_devcmap[16] = {
 	15,	/* black	*/
 	 3,	/* red		*/
-	 8,	/* green	*/
+	 9,	/* dark green	*/
 	 1,	/* yellow	*/
 	 6,	/* blue		*/
 	 4,	/* magenta	*/
@@ -184,7 +184,7 @@ static const uint8_t apple4_devcmap[16] 
 
 	13,	/* medium grey	*/
 	 3,	/* red		*/
-	 8,	/* green	*/
+	 9,	/* dark green	*/
 	 1,	/* yellow	*/
 	 6,	/* blue		*/
 	 4,	/* magenta	*/



CVS commit: src/sys/dev/rasops

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:08:20 UTC 2019

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

Log Message:
When legacy Apple 4-bpp color palette is used, make green dark so that
kernel messages are printed nicely on white background.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/rasops/rasops.c

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



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

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:05:53 UTC 2019

Modified Files:
src/sys/arch/mac68k/conf: WSFB.common

Log Message:
Mimic macppc color/font settings, which also reduces differences b/w
color and monochrome color depths.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/conf/WSFB.common

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



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

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 11:05:53 UTC 2019

Modified Files:
src/sys/arch/mac68k/conf: WSFB.common

Log Message:
Mimic macppc color/font settings, which also reduces differences b/w
color and monochrome color depths.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/conf/WSFB.common

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/mac68k/conf/WSFB.common
diff -u src/sys/arch/mac68k/conf/WSFB.common:1.2 src/sys/arch/mac68k/conf/WSFB.common:1.3
--- src/sys/arch/mac68k/conf/WSFB.common:1.2	Fri Aug  2 10:46:50 2019
+++ src/sys/arch/mac68k/conf/WSFB.common	Fri Aug  9 11:05:53 2019
@@ -1,4 +1,4 @@
-# $NetBSD: WSFB.common,v 1.2 2019/08/02 10:46:50 rin Exp $
+# $NetBSD: WSFB.common,v 1.3 2019/08/09 11:05:53 rin Exp $
 
 genfb* at intvid?
 genfb* at macvid?
@@ -14,8 +14,14 @@ options RASOPS_APPLE_PALETTE
 #options GENFB_SHADOWFB
 
 options WSDISPLAY_DEFAULTSCREENS=1
+
+# Mimic macppc color/font settings.
+#
+options WS_DEFAULT_FG=WSCOL_BLACK
+options WS_DEFAULT_BG=WSCOL_LIGHT_WHITE
 options WS_KERNEL_FG=WSCOL_GREEN
-#options WS_KERNEL_BG=WSCOL_BLACK
+options WS_KERNEL_BG=WSCOL_LIGHT_WHITE
+options FONT_QVSS8x15
 
 pseudo-device wsfont
 pseudo-device wsmux



CVS commit: src/etc/rc.d

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 10:05:44 UTC 2019

Modified Files:
src/etc/rc.d: postfix

Log Message:
little bit verbose for slow machines


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/etc/rc.d/postfix

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



CVS commit: src/etc/rc.d

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 10:05:44 UTC 2019

Modified Files:
src/etc/rc.d: postfix

Log Message:
little bit verbose for slow machines


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/etc/rc.d/postfix

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

Modified files:

Index: src/etc/rc.d/postfix
diff -u src/etc/rc.d/postfix:1.18 src/etc/rc.d/postfix:1.19
--- src/etc/rc.d/postfix:1.18	Sun Oct 30 15:47:06 2016
+++ src/etc/rc.d/postfix	Fri Aug  9 10:05:44 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postfix,v 1.18 2016/10/30 15:47:06 riastradh Exp $
+# $NetBSD: postfix,v 1.19 2019/08/09 10:05:44 rin Exp $
 #
 
 # PROVIDE: mail
@@ -64,6 +64,8 @@ postfix_precmd()
 			;;
 		esac
 	done
+
+	echo "Starting ${name}."
 }
 
 postfix_op()



CVS commit: [netbsd-9] src/sbin/reboot

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 09:52:48 UTC 2019

Modified Files:
src/sbin/reboot [netbsd-9]: reboot.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #34):

sbin/reboot/reboot.c: revision 1.41

reboot: fix arg order for logwtmpx(3)
Matches the correct order from init(8).

Thanks to Sascha Wildner 


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.32.1 src/sbin/reboot/reboot.c

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



CVS commit: [netbsd-9] src/sbin/reboot

2019-08-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  9 09:52:48 UTC 2019

Modified Files:
src/sbin/reboot [netbsd-9]: reboot.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #34):

sbin/reboot/reboot.c: revision 1.41

reboot: fix arg order for logwtmpx(3)
Matches the correct order from init(8).

Thanks to Sascha Wildner 


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.32.1 src/sbin/reboot/reboot.c

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

Modified files:

Index: src/sbin/reboot/reboot.c
diff -u src/sbin/reboot/reboot.c:1.40 src/sbin/reboot/reboot.c:1.40.32.1
--- src/sbin/reboot/reboot.c:1.40	Sun Nov  4 22:28:16 2012
+++ src/sbin/reboot/reboot.c	Fri Aug  9 09:52:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: reboot.c,v 1.40 2012/11/04 22:28:16 christos Exp $	*/
+/*	$NetBSD: reboot.c,v 1.40.32.1 2019/08/09 09:52:48 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)reboot.c	8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: reboot.c,v 1.40 2012/11/04 22:28:16 christos Exp $");
+__RCSID("$NetBSD: reboot.c,v 1.40.32.1 2019/08/09 09:52:48 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
 	logwtmp("~", "shutdown", "");
 #endif
 #ifdef SUPPORT_UTMPX
-	logwtmpx("~", "shutdown", "", INIT_PROCESS, 0);
+	logwtmpx("~", "shutdown", "", 0, INIT_PROCESS);
 #endif
 
 	/*



Re: CVS commit: src/distrib/amd64/liveimage/emuimage

2019-08-09 Thread Andreas Gustafsson
Martin Husemann wrote:
> However - the whole idea boils down to:
> 
>  - what purpose do others use the USB install images for?

What others use the USB *install* image for is hardly relevant to
the present discussion.  The install image and the live image (aka
"emuimage") are two separate things, and the commit being discussed
affects only the latter:

  NetBSD-9.99.4-amd64-install.img1.4G
  NetBSD-9.99.4-amd64-live.img   3.6G

I'm guessing almost no one uses the amd64 live image presently, simply
because it is not included in the official binary releases - you have
to build it yourself.  But I think there is a clear trend away from
the 1980's concept of "installing" an operating system towards simply
running images - that's what ARM SBC users do, that's what you do on
Amazon EC2, etc.  Many other open source OSes distribute fully
functional live images for amd64, and I think NetBSD should, too.
-- 
Andreas Gustafsson, g...@netbsd.org


CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal

2019-08-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Aug  9 08:10:39 UTC 2019

Modified Files:
src/external/bsd/jemalloc/include/jemalloc/internal:
jemalloc_internal_defs.h

Log Message:
PR/54307: Rin Okuyama: Lots of jemalloc assertions in latest -current


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.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/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.11
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10	Tue May 14 12:22:09 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h	Fri Aug  9 04:10:39 2019
@@ -47,9 +47,13 @@
  */
 #ifdef _LP64
 /* XXX: I will take care of this later */
-#define LG_VADDR 48
+# ifdef __alpha__
+#  define LG_VADDR 43	/* bit 42 indicates direct map, 42--63 are same */
+# else
+#  define LG_VADDR 48
+# endif
 #else
-#define LG_VADDR 32
+# define LG_VADDR 32
 #endif
 
 /* Defined if C11 atomics are available. */



CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal

2019-08-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Aug  9 08:10:39 UTC 2019

Modified Files:
src/external/bsd/jemalloc/include/jemalloc/internal:
jemalloc_internal_defs.h

Log Message:
PR/54307: Rin Okuyama: Lots of jemalloc assertions in latest -current


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h

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



Re: CVS commit: src/sys/dev/usb

2019-08-09 Thread Nick Hudson



On 08/08/2019 23:32, sc dying wrote:

On Wed, Aug 7, 2019 at 7:06 AM Nick Hudson  wrote:

Module Name:src
Committed By:   skrll
Date:   Wed Aug  7 07:05:54 UTC 2019

Modified Files:
 src/sys/dev/usb: if_smsc.c
Removed Files:
 src/sys/dev/usb: if_smscvar.h

Log Message:
Convert smsc(4) to usbnet

Should buflen in smsc_rxeof_loop() be initialised as `pktlen - ETHER_ALIGN'
if it is instead of m_adj(ETHER_ALIGN) ?


I think you're right.

I'll do some testing.

Thanks,

Nick



CVS commit: src/sys/arch/alpha

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:05:57 UTC 2019

Modified Files:
src/sys/arch/alpha/alpha: promcons.c
src/sys/arch/alpha/conf: GENERIC

Log Message:
Add CONSPEED option, which changes baud rate of serial console.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/alpha/promcons.c
cvs rdiff -u -r1.395 -r1.396 src/sys/arch/alpha/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/alpha/alpha/promcons.c
diff -u src/sys/arch/alpha/alpha/promcons.c:1.39 src/sys/arch/alpha/alpha/promcons.c:1.40
--- src/sys/arch/alpha/alpha/promcons.c:1.39	Fri Jul 25 08:10:31 2014
+++ src/sys/arch/alpha/alpha/promcons.c	Fri Aug  9 08:05:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: promcons.c,v 1.39 2014/07/25 08:10:31 dholland Exp $ */
+/* $NetBSD: promcons.c,v 1.40 2019/08/09 08:05:57 rin Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.39 2014/07/25 08:10:31 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.40 2019/08/09 08:05:57 rin Exp $");
 
 #include 
 #include 
@@ -51,6 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: promcons.c,v
 #include 
 #include 
 
+#ifndef CONSPEED
+#define	CONSPEED 9600
+#endif
+
 #ifdef _PMAP_MAY_USE_PROM_CONSOLE
 
 dev_type_open(promopen);
@@ -129,7 +133,7 @@ promopen(dev_t dev, int flag, int mode, 
 		tp->t_oflag = TTYDEF_OFLAG;
 		tp->t_cflag = TTYDEF_CFLAG|CLOCAL;
 		tp->t_lflag = TTYDEF_LFLAG;
-		tp->t_ispeed = tp->t_ospeed = 9600;
+		tp->t_ispeed = tp->t_ospeed = CONSPEED;
 		ttsetwater(tp);
 
 		setuptimeout = 1;

Index: src/sys/arch/alpha/conf/GENERIC
diff -u src/sys/arch/alpha/conf/GENERIC:1.395 src/sys/arch/alpha/conf/GENERIC:1.396
--- src/sys/arch/alpha/conf/GENERIC:1.395	Fri Aug  9 08:02:23 2019
+++ src/sys/arch/alpha/conf/GENERIC	Fri Aug  9 08:05:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.395 2019/08/09 08:02:23 rin Exp $
+# $NetBSD: GENERIC,v 1.396 2019/08/09 08:05:57 rin Exp $
 #
 # This machine description file is used to generate the default NetBSD
 # kernel.
@@ -19,7 +19,7 @@ include 	"arch/alpha/conf/std.alpha"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident		"GENERIC-$Revision: 1.395 $"
+ident		"GENERIC-$Revision: 1.396 $"
 
 maxusers 32
 
@@ -66,6 +66,8 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	KGDB_DEVADDR=0x2f8	# at this address
 #options 	KGDB_DEVRATE=57600	# at this comm. rate
 
+#options 	CONSPEED=57600		# Console speed (default to 9600)
+
 # File systems
 file-system	FFS		# Fast file system
 file-system	MFS		# Memory-based file system



CVS commit: src/sys/arch/alpha

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:05:57 UTC 2019

Modified Files:
src/sys/arch/alpha/alpha: promcons.c
src/sys/arch/alpha/conf: GENERIC

Log Message:
Add CONSPEED option, which changes baud rate of serial console.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/alpha/promcons.c
cvs rdiff -u -r1.395 -r1.396 src/sys/arch/alpha/conf/GENERIC

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



CVS commit: src/sys/arch/alpha/pci

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:04:16 UTC 2019

Modified Files:
src/sys/arch/alpha/pci: pci_machdep.c

Log Message:
Fix build without vga at pci.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/pci/pci_machdep.c

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



CVS commit: src/sys/arch/alpha/pci

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:04:16 UTC 2019

Modified Files:
src/sys/arch/alpha/pci: pci_machdep.c

Log Message:
Fix build without vga at pci.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/alpha/pci/pci_machdep.c
diff -u src/sys/arch/alpha/pci/pci_machdep.c:1.23 src/sys/arch/alpha/pci/pci_machdep.c:1.24
--- src/sys/arch/alpha/pci/pci_machdep.c:1.23	Fri Oct 17 18:31:07 2014
+++ src/sys/arch/alpha/pci/pci_machdep.c	Fri Aug  9 08:04:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.23 2014/10/17 18:31:07 uebayasi Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.24 2019/08/09 08:04:16 rin Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.23 2014/10/17 18:31:07 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.24 2019/08/09 08:04:16 rin Exp $");
 
 #include 
 #include 
@@ -66,9 +66,12 @@ pci_display_console(bus_space_tag_t iot,
 {
 #if NVGA_PCI || NTGA
 	pcitag_t tag;
-	pcireg_t id, class;
+	pcireg_t id;
 	int match, nmatch;
 #endif
+#if NVGA_PCI
+	pcireg_t class;
+#endif
 	int (*fn)(bus_space_tag_t, bus_space_tag_t, pci_chipset_tag_t,
 	int, int, int);
 
@@ -78,7 +81,9 @@ pci_display_console(bus_space_tag_t iot,
 	if (id == 0 || id == 0x)
 		panic("pci_display_console: no device at %d/%d/%d",
 		bus, device, function);
+#  if NVGA_PCI
 	class = pci_conf_read(pc, tag, PCI_CLASS_REG);
+#  endif
 
 	match = 0;
 #endif



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

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:02:23 UTC 2019

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

Log Message:
Add xhci(4). Just working for me.


To generate a diff of this commit:
cvs rdiff -u -r1.394 -r1.395 src/sys/arch/alpha/conf/GENERIC

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



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

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:02:23 UTC 2019

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

Log Message:
Add xhci(4). Just working for me.


To generate a diff of this commit:
cvs rdiff -u -r1.394 -r1.395 src/sys/arch/alpha/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/alpha/conf/GENERIC
diff -u src/sys/arch/alpha/conf/GENERIC:1.394 src/sys/arch/alpha/conf/GENERIC:1.395
--- src/sys/arch/alpha/conf/GENERIC:1.394	Fri Apr 26 21:40:28 2019
+++ src/sys/arch/alpha/conf/GENERIC	Fri Aug  9 08:02:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.394 2019/04/26 21:40:28 sevan Exp $
+# $NetBSD: GENERIC,v 1.395 2019/08/09 08:02:23 rin Exp $
 #
 # This machine description file is used to generate the default NetBSD
 # kernel.
@@ -19,7 +19,7 @@ include 	"arch/alpha/conf/std.alpha"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident		"GENERIC-$Revision: 1.394 $"
+ident		"GENERIC-$Revision: 1.395 $"
 
 maxusers 32
 
@@ -323,6 +323,7 @@ mpt*	at	pci? dev ? function ?		# LSI Fus
 ne*	at	pci? dev ? function ?		# NE2000-compatible Ethernet
 ohci*	at	pci? dev ? function ?		# USB Open Host Controller
 ehci*	at	pci? dev ? function ?		# USB-2 Host controller
+xhci*	at	pci? dev ? function ?		# eXtensible Host Controller
 pceb*	at	pci? dev ? function ?		# Intel PCI-EISA Bridges
 pciide* at	pci? dev ? function ? flags 0x	# GENERIC pciide driver
 acardide* at	pci? dev ? function ?		# Acard IDE controllers
@@ -551,6 +552,7 @@ iic* 	at alipm?
 slhci*	at pcmcia? function ?			# ScanLogic SL811HS
 
 # USB bus support
+usb*	at xhci?
 usb*	at ehci?
 usb*	at ohci?
 usb*	at slhci?



CVS commit: src/sys/arch

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:01:06 UTC 2019

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

Log Message:
xhci(4) is considered stable enough. So, remove misleading comments.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.533 -r1.534 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.1209 -r1.1210 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/conf/XEN3PAE_DOM0

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.120 src/sys/arch/amd64/conf/ALL:1.121
--- src/sys/arch/amd64/conf/ALL:1.120	Wed Jul 24 23:13:46 2019
+++ src/sys/arch/amd64/conf/ALL	Fri Aug  9 08:01:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.120 2019/07/24 23:13:46 tnn Exp $
+# $NetBSD: ALL,v 1.121 2019/08/09 08:01:06 rin 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.120 $"
+#ident		"ALL-$Revision: 1.121 $"
 
 maxusers	64		# estimated number of users
 
@@ -1124,7 +1124,6 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 ohci*	at pci?	dev ? function ?	# Open Host Controller
 uhci*	at pci?	dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.533 src/sys/arch/amd64/conf/GENERIC:1.534
--- src/sys/arch/amd64/conf/GENERIC:1.533	Wed Aug  7 06:28:03 2019
+++ src/sys/arch/amd64/conf/GENERIC	Fri Aug  9 08:01:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.533 2019/08/07 06:28:03 maxv Exp $
+# $NetBSD: GENERIC,v 1.534 2019/08/09 08:01:06 rin 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.533 $"
+#ident		"GENERIC-$Revision: 1.534 $"
 
 maxusers	64		# estimated number of users
 
@@ -892,7 +892,6 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 ohci*	at pci?	dev ? function ?	# Open Host Controller
 uhci*	at pci?	dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.167 src/sys/arch/amd64/conf/XEN3_DOM0:1.168
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.167	Mon May  6 02:24:37 2019
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Fri Aug  9 08:01:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.167 2019/05/06 02:24:37 sevan Exp $
+# $NetBSD: XEN3_DOM0,v 1.168 2019/08/09 08:01:06 rin Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOM0-$Revision: 1.167 $"
+#ident		"XEN3_DOM0-$Revision: 1.168 $"
 
 maxusers	32		# estimated number of users
 
@@ -570,7 +570,6 @@ wsmouse*	at pms? mux 0
 
 # PCI USB controllers
 xhci*	at pci? dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci? dev ? function ?	# Enhanced Host Controller
 ohci*	at pci? dev ? function ?	# Open Host Controller
 uhci*	at pci? dev ? function ?	# Universal Host Controller (Intel)

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1209 src/sys/arch/i386/conf/GENERIC:1.1210
--- src/sys/arch/i386/conf/GENERIC:1.1209	Thu Aug  8 04:25:21 2019
+++ src/sys/arch/i386/conf/GENERIC	Fri Aug  9 08:01:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1209 2019/08/08 04:25:21 msaitoh Exp $
+# $NetBSD: GENERIC,v 1.1210 2019/08/09 08:01:06 rin 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.1209 $"
+#ident		"GENERIC-$Revision: 1.1210 $"
 
 maxusers	64		# estimated number of users
 
@@ -1140,7 +1140,6 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
-	# xhci is at best experimental
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 gcscehci* at pci? dev ? function ?	# Enhanced Host Controller (Geode CSC)
 ohci*	at pci?	dev ? function ?	# Open Host Controller

Index: src/sys/arch/i386/con

CVS commit: src/sys/arch

2019-08-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  9 08:01:06 UTC 2019

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

Log Message:
xhci(4) is considered stable enough. So, remove misleading comments.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.533 -r1.534 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.1209 -r1.1210 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/conf/XEN3PAE_DOM0

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



CVS commit: src/sys/dev/usb

2019-08-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug  9 07:54:06 UTC 2019

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

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/usb/if_smsc.c

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



CVS commit: src/sys/dev/usb

2019-08-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug  9 07:54:06 UTC 2019

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

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/usb/if_smsc.c

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

Modified files:

Index: src/sys/dev/usb/if_smsc.c
diff -u src/sys/dev/usb/if_smsc.c:1.49 src/sys/dev/usb/if_smsc.c:1.50
--- src/sys/dev/usb/if_smsc.c:1.49	Fri Aug  9 01:17:33 2019
+++ src/sys/dev/usb/if_smsc.c	Fri Aug  9 07:54:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_smsc.c,v 1.49 2019/08/09 01:17:33 mrg Exp $	*/
+/*	$NetBSD: if_smsc.c,v 1.50 2019/08/09 07:54:05 skrll Exp $	*/
 
 /*	$OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.49 2019/08/09 01:17:33 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.50 2019/08/09 07:54:05 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -964,19 +964,6 @@ smsc_rxeof_loop(struct usbnet * un, stru
 			return;
 		}
 
-#if 0
-		struct mbuf *m = usbnet_newbuf();
-		if (m == NULL) {
-			smsc_dbg_printf(un, "smc_newbuf returned NULL\n");
-			ifp->if_ierrors++;
-			return;
-		}
-
-		m_set_rcvif(m, ifp);
-		m->m_pkthdr.len = m->m_len = pktlen;
-		m->m_flags |= M_HASFCS;
-		m_adj(m, ETHER_ALIGN);
-#endif
 		uint8_t *pktbuf = buf + ETHER_ALIGN;
 		size_t buflen = pktlen;
 		int mbuf_flags = M_HASFCS;
@@ -984,7 +971,6 @@ smsc_rxeof_loop(struct usbnet * un, stru
 		uint16_t csum_data = 0;
 
  		KASSERT(pktlen < MCLBYTES);
-//  		memcpy(mtod(m, char *), buf + ETHER_ALIGN, m->m_len);
 
 		/* Check if RX TCP/UDP checksumming is being offloaded */
 		if (sc->sc_coe_ctrl & SMSC_COE_CTRL_RX_EN) {



Re: CVS commit: src/distrib/amd64/liveimage/emuimage

2019-08-09 Thread Martin Husemann
On Fri, Aug 09, 2019 at 05:44:12AM +, m...@netbsd.org wrote:
> I guess not a lot of people use the amd64 .img files as an alternate
> sysinst for remote setups. where you reboot to rescue, dd it to disk,
> then reboot to a complete netbsd install.

Sorry, I am not sure I get your point here.

I have only ever used a virtual ISO for that (as that is trivial to add
in most virtual machine setups, whereas the USB images often need some
conversion and I always forget the details).

On machines with enough RAM the ramdisk module (or on other architctures
the monlithic ramdisk INSTALL kernel) is even better for simple recovery.

However - the whole idea boils down to:

 - what purpose do others use the USB install images for?

My proposition relied on the (obviously wrong) impression that it would be
mostly for:

 1) testing a new NetBSD version on some random (foreign) hardware (e.g.
a Notebook at a shop before buying it)
 2) quickly trying NetBSD (while usually running something else)
 3) installing NetBSD

None of this would require the ability to statically link code or realy debug
binaries in this (limited) setup.

If others use the images more broadly, the whole idea is moot, especially as
USB stick sizes are not exactly limited anywhere close to the size we need
right now.

Martin


Re: CVS commit: src/distrib/amd64/liveimage/emuimage

2019-08-09 Thread Martin Husemann
On Thu, Aug 08, 2019 at 08:09:19PM -0400, Greg Troxel wrote:
> In addition, I don't like it that images have stuff in /boot in the DOS
> partition that can't be found in some obvious place, like /usr/mdec.
> But I haven't gotten around to trying to fix it either so I get it that
> ENOPATCH.

Yes, but in this case the bug is that sysinst does not know how to properly
fill the /boot things - which is on my TODO list.

(and also, as you mention, that there is no obvious easy source for the 
content)

Martin