CVS commit: src/sys/dev/usb

2019-06-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jun 22 04:45:05 UTC 2019

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

Log Message:
s/Static/static/


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/usb/if_cdce.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-06-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jun 22 04:35:46 UTC 2019

Modified Files:
src/sys/dev/usb: if_cdce.c if_cdcereg.h

Log Message:
move the software-only parts of cdce(4) out of if_cdcereg.h.

(if_cdcereg.h probably can go entirely.  it's almost empty,
but at least these definitions have some relationship with
the hardware bits.)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/if_cdce.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/if_cdcereg.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/usb

2019-06-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jun 22 04:35:46 UTC 2019

Modified Files:
src/sys/dev/usb: if_cdce.c if_cdcereg.h

Log Message:
move the software-only parts of cdce(4) out of if_cdcereg.h.

(if_cdcereg.h probably can go entirely.  it's almost empty,
but at least these definitions have some relationship with
the hardware bits.)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/if_cdce.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/if_cdcereg.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_cdce.c
diff -u src/sys/dev/usb/if_cdce.c:1.47 src/sys/dev/usb/if_cdce.c:1.48
--- src/sys/dev/usb/if_cdce.c:1.47	Sun May  5 03:17:54 2019
+++ src/sys/dev/usb/if_cdce.c	Sat Jun 22 04:35:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cdce.c,v 1.47 2019/05/05 03:17:54 mrg Exp $ */
+/*	$NetBSD: if_cdce.c,v 1.48 2019/06/22 04:35:46 mrg Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul 
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.47 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.48 2019/06/22 04:35:46 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -68,8 +69,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 
 #include 
 #endif
 
-
-
 #include 
 #include 
 #include 
@@ -78,6 +77,55 @@ __KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 
 
 #include 
 
+struct cdce_type {
+	struct usb_devno	 cdce_dev;
+	uint16_t		 cdce_flags;
+#define CDCE_ZAURUS	1
+#define CDCE_NO_UNION	2
+};
+
+struct cdce_softc;
+
+struct cdce_chain {
+	struct cdce_softc	*cdce_sc;
+	struct usbd_xfer	*cdce_xfer;
+	char			*cdce_buf;
+	struct mbuf		*cdce_mbuf;
+	int			 cdce_accum;
+	int			 cdce_idx;
+};
+
+struct cdce_cdata {
+	struct cdce_chain	 cdce_rx_chain[CDCE_RX_LIST_CNT];
+	struct cdce_chain	 cdce_tx_chain[CDCE_TX_LIST_CNT];
+	int			 cdce_tx_prod;
+	int			 cdce_tx_cons;
+	int			 cdce_tx_cnt;
+	int			 cdce_rx_prod;
+};
+
+struct cdce_softc {
+	device_t cdce_dev;
+	struct ethercom		 cdce_ec;
+	krndsource_t	 rnd_source;
+#define GET_IFP(sc) (&(sc)->cdce_ec.ec_if)
+	struct usbd_device *	 cdce_udev;
+	struct usbd_interface *	 cdce_ctl_iface;
+	struct usbd_interface *	 cdce_data_iface;
+	int			 cdce_bulkin_no;
+	struct usbd_pipe *	 cdce_bulkin_pipe;
+	int			 cdce_bulkout_no;
+	struct usbd_pipe *	 cdce_bulkout_pipe;
+	char			 cdce_dying;
+	int			 cdce_unit;
+	struct cdce_cdata	 cdce_cdata;
+	int			 cdce_rxeof_errors;
+	uint16_t		 cdce_flags;
+	char			 cdce_attached;
+
+	kmutex_t		 cdce_start_lock;
+};
+
 Static int	 cdce_tx_list_init(struct cdce_softc *);
 Static int	 cdce_rx_list_init(struct cdce_softc *);
 Static int	 cdce_newbuf(struct cdce_softc *, struct cdce_chain *,

Index: src/sys/dev/usb/if_cdcereg.h
diff -u src/sys/dev/usb/if_cdcereg.h:1.9 src/sys/dev/usb/if_cdcereg.h:1.10
--- src/sys/dev/usb/if_cdcereg.h:1.9	Sat Apr 23 10:15:31 2016
+++ src/sys/dev/usb/if_cdcereg.h	Sat Jun 22 04:35:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cdcereg.h,v 1.9 2016/04/23 10:15:31 skrll Exp $ */
+/*	$NetBSD: if_cdcereg.h,v 1.10 2019/06/22 04:35:46 mrg Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul 
@@ -34,55 +34,6 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
-
 #define CDCE_RX_LIST_CNT	1
 #define CDCE_TX_LIST_CNT	1
 #define CDCE_BUFSZ		1542
-
-struct cdce_type {
-	struct usb_devno	 cdce_dev;
-	uint16_t		 cdce_flags;
-#define CDCE_ZAURUS	1
-#define CDCE_NO_UNION	2
-};
-
-struct cdce_softc;
-
-struct cdce_chain {
-	struct cdce_softc	*cdce_sc;
-	struct usbd_xfer	*cdce_xfer;
-	char			*cdce_buf;
-	struct mbuf		*cdce_mbuf;
-	int			 cdce_accum;
-	int			 cdce_idx;
-};
-
-struct cdce_cdata {
-	struct cdce_chain	 cdce_rx_chain[CDCE_RX_LIST_CNT];
-	struct cdce_chain	 cdce_tx_chain[CDCE_TX_LIST_CNT];
-	int			 cdce_tx_prod;
-	int			 cdce_tx_cons;
-	int			 cdce_tx_cnt;
-	int			 cdce_rx_prod;
-};
-
-struct cdce_softc {
-	device_t cdce_dev;
-	struct ethercom		 cdce_ec;
-	krndsource_t	 rnd_source;
-#define GET_IFP(sc) (&(sc)->cdce_ec.ec_if)
-	struct usbd_device *	 cdce_udev;
-	struct usbd_interface *	 cdce_ctl_iface;
-	struct usbd_interface *	 cdce_data_iface;
-	int			 cdce_bulkin_no;
-	struct usbd_pipe *	 cdce_bulkin_pipe;
-	int			 cdce_bulkout_no;
-	struct usbd_pipe *	 cdce_bulkout_pipe;
-	char			 cdce_dying;
-	int			 cdce_unit;
-	struct cdce_cdata	 cdce_cdata;
-	int			 cdce_rxeof_errors;
-	uint16_t		 cdce_flags;
-	char			 cdce_attached;
-};



CVS commit: src/share/misc

2019-06-21 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Jun 21 22:04:26 UTC 2019

Modified Files:
src/share/misc: acronyms.comp

Log Message:
BFD COA CST DS DSCP IST MAB MCLAG TDR


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.266 src/share/misc/acronyms.comp:1.267
--- src/share/misc/acronyms.comp:1.266	Mon Jun 17 15:53:20 2019
+++ src/share/misc/acronyms.comp	Fri Jun 21 22:04:26 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.266 2019/06/17 15:53:20 sevan Exp $
+$NetBSD: acronyms.comp,v 1.267 2019/06/21 22:04:26 sevan Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -129,6 +129,7 @@ BEDO	burst extended data output
 BER	basic encoding rules
 BER	bit error {rate,ratio}
 BERT	boot error record table
+BFB	bidirectional forwarding detection
 BFD	binary {file,format} descriptor
 BFKL	big fscking kernel lock
 BFS	breadth-first search
@@ -261,6 +262,7 @@ CMYK	cyan magenta yellow black
 CN	{common,canonical} name
 CNC	computer numerical control
 CNR	carrier-to-noise ratio
+COA	change of authority
 COF	current operating frequency
 COFDM	coded orthogonal frequency division multiplexing
 COFF	common object file format
@@ -309,6 +311,7 @@ CSP	cryptographic service provider
 CSR	control [and] status registers
 CSRG	Computer Systems Research Group
 CSS	cascading style sheets
+CST	common spanning tree
 CSV	comma-separated values
 CTF	compact c type format
 CTM	close to metal
@@ -420,9 +423,11 @@ DRI	direct rendering infrastructure
 DRM	digital rights management
 DRRS	display refresh rate switching
 DS	debug store
+DS	differentiated services
 DSA	digital signature algorithm
 DSAP	destination service access point
 DSB	double-sideband modulation
+DSCP	differentiated services code point
 DSDT	differentiated system descriptor table
 DSF	device special file
 DSL	dataset and snapshot layer
@@ -740,6 +745,7 @@ ISOC	Internet Society
 ISP	Internet service provider
 ISR	in-service register
 ISR	interrupt service routine
+IST	internal spanning tree
 IST	interrupt stack table
 ISV	independent software vendor
 IT	information technology
@@ -855,6 +861,7 @@ LVDS	Low-Voltage Differential Signaling
 LWP	light-weight process
 LZSS	Lempel Ziv Storer Szymanski
 LZW	Lempel Ziv Welch
+MAB	MAC authentication bypass
 MAC	mandatory access control
 MAC	{media,medium} access control
 MAC	message authentication {check,code}
@@ -871,6 +878,7 @@ MCC	multiversion concurrency control
 MCE	machine check exception
 MCGA	Multi-Color Graphics Array
 MCH	memory controller hub
+MCLAG	multi-chassis link aggregation
 MCM	multi-chip module
 MCQ	memory controlled queue
 MD	machine-dependent
@@ -1491,6 +1499,7 @@ TDM	time division multiplexing
 TDMA	time division multiple access
 TDOA	time difference of arrival
 TDP	thermal design {point,power}
+TDR	time-domain reflectometry
 TECO	Text Editor and Corrector
 TFT	thin film transistor
 TFTP	Trivial File Transfer Protocol



CVS commit: src/share/misc

2019-06-21 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Jun 21 22:04:26 UTC 2019

Modified Files:
src/share/misc: acronyms.comp

Log Message:
BFD COA CST DS DSCP IST MAB MCLAG TDR


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/share/misc/acronyms.comp

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



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun 21 21:54:39 UTC 2019

Modified Files:
src/usr.sbin/sysinst: defs.h disks.c geom.c

Log Message:
refactor disk ioctl stuff to make it smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/geom.c

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



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun 21 21:54:39 UTC 2019

Modified Files:
src/usr.sbin/sysinst: defs.h disks.c geom.c

Log Message:
refactor disk ioctl stuff to make it smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/geom.c

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.35 src/usr.sbin/sysinst/defs.h:1.36
--- src/usr.sbin/sysinst/defs.h:1.35	Thu Jun 20 11:56:41 2019
+++ src/usr.sbin/sysinst/defs.h	Fri Jun 21 17:54:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.35 2019/06/20 15:56:41 christos Exp $	*/
+/*	$NetBSD: defs.h,v 1.36 2019/06/21 21:54:39 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -658,8 +658,11 @@ void	get_disk_info(char *);
 void	set_disk_info(char *);
 
 /* from geom.c */
-int	get_disk_geom(const char *, struct disk_geom *);
-int	get_label_geom(const char *, struct disklabel *);
+bool	disk_ioctl(const char *, unsigned long, void *);
+bool	get_wedge_list(const char *, struct dkwedge_list *);
+bool	get_wedge_info(const char *, struct dkwedge_info *);
+bool	get_disk_geom(const char *, struct disk_geom *);
+bool	get_label_geom(const char *, struct disklabel *);
 
 /* from net.c */
 extern int network_up;

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.34 src/usr.sbin/sysinst/disks.c:1.35
--- src/usr.sbin/sysinst/disks.c:1.34	Thu Jun 20 11:49:20 2019
+++ src/usr.sbin/sysinst/disks.c	Fri Jun 21 17:54:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.34 2019/06/20 15:49:20 christos Exp $ */
+/*	$NetBSD: disks.c,v 1.35 2019/06/21 21:54:39 christos Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -205,7 +205,7 @@ scsi_strvis(char *sdst, size_t dlen, con
 
 
 static int
-get_descr_scsi(struct disk_desc *dd, int fd)
+get_descr_scsi(struct disk_desc *dd)
 {
 	struct scsipi_inquiry_data inqbuf;
 	struct scsipi_inquiry cmd;
@@ -215,7 +215,6 @@ get_descr_scsi(struct disk_desc *dd, int
 	 product[(sizeof(inqbuf.product) * 4) + 1],
 	 revision[(sizeof(inqbuf.revision) * 4) + 1];
 	char size[5];
-	int error;
 
 	memset(, 0, sizeof(inqbuf));
 	memset(, 0, sizeof(cmd));
@@ -231,8 +230,8 @@ get_descr_scsi(struct disk_desc *dd, int
 	req.flags = SCCMD_READ;
 	req.senselen = SENSEBUFLEN;
 
-	error = ioctl(fd, SCIOCCOMMAND, );
-	if (error == -1 || req.retsts != SCCMD_OK)
+	if (!disk_ioctl(dd->dd_name, SCIOCCOMMAND, )
+	|| req.retsts != SCCMD_OK)
 		return 0;
 
 	scsi_strvis(vendor, sizeof(vendor), inqbuf.vendor,
@@ -254,7 +253,7 @@ get_descr_scsi(struct disk_desc *dd, int
 }
 
 static int
-get_descr_ata(struct disk_desc *dd, int fd)
+get_descr_ata(struct disk_desc *dd)
 {
 	struct atareq req;
 	static union {
@@ -264,7 +263,7 @@ get_descr_ata(struct disk_desc *dd, int 
 	struct ataparams *inqbuf = 
 	char model[sizeof(inqbuf->atap_model)+1];
 	char size[5];
-	int error, needswap = 0;
+	int needswap = 0;
 
 	memset(, 0, sizeof(inbuf));
 	memset(, 0, sizeof(req));
@@ -275,8 +274,8 @@ get_descr_ata(struct disk_desc *dd, int 
 	req.datalen = sizeof(inbuf);
 	req.timeout = 1000;
 
-	error = ioctl(fd, ATAIOCCOMMAND, );
-	if (error == -1 || req.retsts != ATACMD_OK)
+	if (!disk_ioctl(dd->dd_name, ATAIOCCOMMAND, )
+	|| req.retsts != ATACMD_OK)
 		return 0;
 
 #if BYTE_ORDER == LITTLE_ENDIAN
@@ -311,26 +310,20 @@ get_descr_ata(struct disk_desc *dd, int 
 static void
 get_descr(struct disk_desc *dd)
 {
-	char diskpath[MAXPATHLEN], size[5];
-	int fd = -1;
-
-	fd = opendisk(dd->dd_name, O_RDONLY, diskpath, sizeof(diskpath), 0);
-	if (fd < 0)
-		goto done;
-
+	char size[5];
 	dd->dd_descr[0] = '\0';
 
 	/* try ATA */
-	if (get_descr_ata(dd, fd))
+	if (get_descr_ata(dd))
 		goto done;
 	/* try SCSI */
-	if (get_descr_scsi(dd, fd))
+	if (get_descr_scsi(dd))
 		goto done;
 
 	/* XXX: identify for ld @ NVME or microSD */
 
 	/* XXX: get description from raid, cgd, vnd... */
-
+done:
 	/* punt, just give some generic info */
 	humanize_number(size, sizeof(size),
 	(uint64_t)dd->dd_secsize * (uint64_t)dd->dd_totsec,
@@ -338,10 +331,6 @@ get_descr(struct disk_desc *dd)
 
 	snprintf(dd->dd_descr, sizeof(dd->dd_descr),
 	"%s (%s)", dd->dd_name, size);
-
-done:
-	if (fd >= 0)
-		close(fd);
 }
 
 /*
@@ -396,80 +385,39 @@ static bool
 get_wedge_descr(struct disk_desc *dd)
 {
 	struct dkwedge_info dkw;
-	char buf[MAXPATHLEN];
-	int fd;
-	bool ok = false;
 
-	fd = opendisk(dd->dd_name, O_RDONLY, buf, sizeof(buf), 0);
-	if (fd == -1)
+	if (!get_wedge_info(dd->dd_name, ))
 		return false;
 
-	if (ioctl(fd, DIOCGWEDGEINFO, ) == 0) {
-		sprintf(dd->dd_descr, "%s (%s@%s)",
-		dkw.dkw_wname, dkw.dkw_devname, dkw.dkw_parent);
-		ok = true;
-	}
-	close(fd);
-	return ok;
+	snprintf(dd->dd_descr, 

CVS commit: src/external/gpl3/gdb/dist/gdb

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 19:20:18 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: sh-nbsd-tdep.c

Log Message:
Sync (c) note in GDB:sh-nbsd-tdep.c with upstream

This file is now GPLv3+, not GPLv2+.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 19:20:18 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: sh-nbsd-tdep.c

Log Message:
Sync (c) note in GDB:sh-nbsd-tdep.c with upstream

This file is now GPLv3+, not GPLv2+.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c:1.6	Mon Jun 17 06:33:53 2019
+++ src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c	Fri Jun 21 19:20:18 2019
@@ -8,7 +8,7 @@
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
@@ -17,9 +17,7 @@
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see .  */
 
 #include "defs.h"
 #include "gdbcore.h"



Re: CVS commit: src/share/mk

2019-06-21 Thread Kamil Rytarowski
On 21.06.2019 18:29, Christos Zoulas wrote:
> On Jun 21,  3:21pm, n...@gmx.com (Kamil Rytarowski) wrote:
> -- Subject: Re: CVS commit: src/share/mk
> 
> | I've started to observe issues with signals in recent GDB as well, a
> | debugger is stopping self and detaching from terminal.
> | 
> | Please tell me whether you want me to fix it. It slows down testing of
> | my kernel changes now. I had to revert my previous change due to GDB
> | misbehavior (I suspect that the problems come from the recent GDB upgrade).=
> 
> Go for it. I think we need more "gdb" atf tests...
> 

Thanks!

I got NetBSD truss to be very reliable with multiple threads, but GDB is
misbehaving.

> | I can spend some more time on fixing local GDB, upstreaming the support
> | and adding support for running the regress test in GDB... this will
> | allow us to get more predictable results with future GDB upgrades, cover
> | kernel code paths with GDB tests and maybe run regression tests on the
> | GDB buildbot.
> 
> Sounds good to me!
> 

I've compared src/ GDB 8.3 and upstream GDB 8.3.

There are a lot of differences and it looks like a lot of our changes
predate gpl2->gpl3 switch in GDB. I have an impression that sometimes we
unintentionally revert to an older GDB code.

I will start with upstreaming small code chunks first and getting
upstream GDB to work on NetBSD/amd64 with its regression tests... It
should be better long term action than mutating local in-tree version.

> Thanks,
> 
> christos
> 




signature.asc
Description: OpenPGP digital signature


CVS commit: src/usr.sbin/sysinst/arch/landisk

2019-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jun 21 16:57:12 UTC 2019

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
Use the raw partition for installboot, not the root partition.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/landisk/md.c

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

Modified files:

Index: src/usr.sbin/sysinst/arch/landisk/md.c
diff -u src/usr.sbin/sysinst/arch/landisk/md.c:1.8 src/usr.sbin/sysinst/arch/landisk/md.c:1.9
--- src/usr.sbin/sysinst/arch/landisk/md.c:1.8	Thu Jun 20 00:43:56 2019
+++ src/usr.sbin/sysinst/arch/landisk/md.c	Fri Jun 21 16:57:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8 2019/06/20 00:43:56 christos Exp $	*/
+/*	$NetBSD: md.c,v 1.9 2019/06/21 16:57:12 martin Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -156,7 +156,7 @@ md_post_newfs(struct install_partition_d
 	bootxx = bootxx_name(install);
 	if (bootxx != NULL) {
 		error = run_program(RUN_DISPLAY,
-		"/usr/sbin/installboot -v /dev/r%sa %s", pm->diskdev, bootxx);
+		"/usr/sbin/installboot -v /dev/r%sd %s", pm->diskdev, bootxx);
 		free(bootxx);
 	} else
 		error = -1;



CVS commit: src/usr.sbin/sysinst/arch/landisk

2019-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jun 21 16:57:12 UTC 2019

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
Use the raw partition for installboot, not the root partition.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/landisk/md.c

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



Re: CVS commit: src/share/mk

2019-06-21 Thread Christos Zoulas
On Jun 21,  3:21pm, n...@gmx.com (Kamil Rytarowski) wrote:
-- Subject: Re: CVS commit: src/share/mk

| I've started to observe issues with signals in recent GDB as well, a
| debugger is stopping self and detaching from terminal.
| 
| Please tell me whether you want me to fix it. It slows down testing of
| my kernel changes now. I had to revert my previous change due to GDB
| misbehavior (I suspect that the problems come from the recent GDB upgrade).=

Go for it. I think we need more "gdb" atf tests...

| I can spend some more time on fixing local GDB, upstreaming the support
| and adding support for running the regress test in GDB... this will
| allow us to get more predictable results with future GDB upgrades, cover
| kernel code paths with GDB tests and maybe run regression tests on the
| GDB buildbot.

Sounds good to me!

Thanks,

christos


CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:59:15 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.es msg.mi.fr

Log Message:
Replicate change in .en as requested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/msg.mi.fr

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.es
diff -u src/usr.sbin/sysinst/msg.mi.es:1.12 src/usr.sbin/sysinst/msg.mi.es:1.13
--- src/usr.sbin/sysinst/msg.mi.es:1.12	Wed Jun 12 06:20:18 2019
+++ src/usr.sbin/sysinst/msg.mi.es	Fri Jun 21 15:59:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.12 2019/06/12 06:20:18 martin Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.13 2019/06/21 15:59:14 pgoyette Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1319,8 +1319,8 @@ message	other_fs_type	{Other type}
 message	editpack	{Edit name of the disk}
 message	edit_disk_pack_hdr
 {The name of the disk is arbitrary. 
-It is usefull to tell various disks apart. 
-It may alse be used when auto-crating dk(4) "wedges" for this disk. 
+It is useful for distinguishing between multiple disks.
+It may also be used when auto-creating dk(4) "wedges" for this disk.
 
 Enter disk name}
 

Index: src/usr.sbin/sysinst/msg.mi.fr
diff -u src/usr.sbin/sysinst/msg.mi.fr:1.15 src/usr.sbin/sysinst/msg.mi.fr:1.16
--- src/usr.sbin/sysinst/msg.mi.fr:1.15	Wed Jun 12 06:20:18 2019
+++ src/usr.sbin/sysinst/msg.mi.fr	Fri Jun 21 15:59:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.15 2019/06/12 06:20:18 martin Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.16 2019/06/21 15:59:14 pgoyette Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1372,8 +1372,8 @@ message	other_fs_type	{Other type}
 message	editpack	{Edit name of the disk}
 message	edit_disk_pack_hdr
 {The name of the disk is arbitrary. 
-It is usefull to tell various disks apart. 
-It may alse be used when auto-crating dk(4) "wedges" for this disk. 
+It is useful for distinguishing between multiple disks.
+It may also be used when auto-creating dk(4) "wedges" for this disk.
 
 Enter disk name}
 



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:59:15 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.es msg.mi.fr

Log Message:
Replicate change in .en as requested by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/msg.mi.fr

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



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:53:16 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en

Log Message:
Typo - distinguish has a 'g' not a 'q'


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/msg.mi.en

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



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:53:16 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en

Log Message:
Typo - distinguish has a 'g' not a 'q'


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/msg.mi.en

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.17 src/usr.sbin/sysinst/msg.mi.en:1.18
--- src/usr.sbin/sysinst/msg.mi.en:1.17	Fri Jun 21 15:52:05 2019
+++ src/usr.sbin/sysinst/msg.mi.en	Fri Jun 21 15:53:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.17 2019/06/21 15:52:05 pgoyette Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.18 2019/06/21 15:53:16 pgoyette Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1269,7 +1269,7 @@ message	other_fs_type	{Other type}
 message	editpack	{Edit name of the disk}
 message	edit_disk_pack_hdr
 {The name of the disk is arbitrary. 
-It is useful for distinquishing between multiple disks.
+It is useful for distinguishing between multiple disks.
 It may also be used when auto-creating dk(4) "wedges" for this disk. 
 
 Enter disk name}



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:52:05 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en

Log Message:
Typos, grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/msg.mi.en

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.16 src/usr.sbin/sysinst/msg.mi.en:1.17
--- src/usr.sbin/sysinst/msg.mi.en:1.16	Wed Jun 12 06:20:18 2019
+++ src/usr.sbin/sysinst/msg.mi.en	Fri Jun 21 15:52:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.16 2019/06/12 06:20:18 martin Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.17 2019/06/21 15:52:05 pgoyette Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1269,8 +1269,8 @@ message	other_fs_type	{Other type}
 message	editpack	{Edit name of the disk}
 message	edit_disk_pack_hdr
 {The name of the disk is arbitrary. 
-It is usefull to tell various disks apart. 
-It may alse be used when auto-crating dk(4) "wedges" for this disk. 
+It is useful for distinquishing between multiple disks.
+It may also be used when auto-creating dk(4) "wedges" for this disk. 
 
 Enter disk name}
 



CVS commit: src/usr.sbin/sysinst

2019-06-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jun 21 15:52:05 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en

Log Message:
Typos, grammar.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/msg.mi.en

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



CVS commit: src/sys/kern

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 14:58:32 UTC 2019

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

Log Message:
Restore ability to create regular files with mknod(2)

This behavior is requested in ATF tests.


To generate a diff of this commit:
cvs rdiff -u -r1.531 -r1.532 src/sys/kern/vfs_syscalls.c

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

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.531 src/sys/kern/vfs_syscalls.c:1.532
--- src/sys/kern/vfs_syscalls.c:1.531	Thu Jun 20 03:31:54 2019
+++ src/sys/kern/vfs_syscalls.c	Fri Jun 21 14:58:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.532 2019/06/21 14:58:32 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.532 2019/06/21 14:58:32 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2156,13 +2156,18 @@ do_posix_mknodat(struct lwp *l, int fdat
 dev_t dev)
 {
 
+	/*
+	 * The POSIX mknod(2) call is an alias for mkfifo(2) for S_IFIFO
+	 * in mode and dev=0.
+	 *
+	 * In all the other cases it's implementation defined behavior.
+	 */
+
 	if ((mode & S_IFIFO) && dev == 0)
 		return do_sys_mkfifoat(l, fdat, pathname, mode);
-	else if (mode & (S_IFCHR | S_IFBLK))
+	else
 		return do_sys_mknodat(l, fdat, pathname, mode, dev,
 		UIO_USERSPACE);
-	else
-		return EINVAL;
 }
 
 /*



CVS commit: src/sys/kern

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 14:58:32 UTC 2019

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

Log Message:
Restore ability to create regular files with mknod(2)

This behavior is requested in ATF tests.


To generate a diff of this commit:
cvs rdiff -u -r1.531 -r1.532 src/sys/kern/vfs_syscalls.c

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



CVS commit: src/tools/rpcgen

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 14:56:40 UTC 2019

Modified Files:
src/tools/rpcgen: Makefile

Log Message:
Instruct tools/rpcgen about new path for rpc headers

Fixes build on Gentoo.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tools/rpcgen/Makefile

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

Modified files:

Index: src/tools/rpcgen/Makefile
diff -u src/tools/rpcgen/Makefile:1.4 src/tools/rpcgen/Makefile:1.5
--- src/tools/rpcgen/Makefile:1.4	Sun Dec  8 20:20:05 2002
+++ src/tools/rpcgen/Makefile	Fri Jun 21 14:56:39 2019
@@ -1,6 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2002/12/08 20:20:05 thorpej Exp $
+#	$NetBSD: Makefile,v 1.5 2019/06/21 14:56:39 kamil Exp $
 
 HOSTPROGNAME=	${_TOOL_PREFIX}rpcgen
 HOST_SRCDIR=	usr.bin/rpcgen
 
+RPCGEN_INC=	${.CURDIR}/../../common/include
+
+HOST_CPPFLAGS+=	-I${RPCGEN_INC}
+
 .include "${.CURDIR}/../Makefile.host"



CVS commit: src/tools/rpcgen

2019-06-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun 21 14:56:40 UTC 2019

Modified Files:
src/tools/rpcgen: Makefile

Log Message:
Instruct tools/rpcgen about new path for rpc headers

Fixes build on Gentoo.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tools/rpcgen/Makefile

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-06-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun 21 14:19:46 UTC 2019

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

Log Message:
fix issues seen with transfers being reused before they are finished
being used.

adapt locking to the modern world.  some what inspired by if_smsc.c:
- add locks for softc, rx and tx
- add safe detach support
- safe detach vs mii lock requires 2 methods to lock the MII lock,
- check axen_dying and new axen_stopping more often
- consolidate checks to reduce the number of error paths that need
  to release a resource
- move axen_watchdog() out of if_timer into the tick task to
  prepare for MPSAFEification

TODO:
- remove spl usage
- enable mpsafe

special thanks to skrll and mlelstv for clearing up various
confusion and providing examples.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/if_axen.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_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.43 src/sys/dev/usb/if_axen.c:1.44
--- src/sys/dev/usb/if_axen.c:1.43	Thu Jun 20 10:46:24 2019
+++ src/sys/dev/usb/if_axen.c	Fri Jun 21 14:19:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.43 2019/06/20 10:46:24 mrg Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.44 2019/06/21 14:19:46 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.43 2019/06/20 10:46:24 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.44 2019/06/21 14:19:46 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -36,7 +36,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -100,6 +99,8 @@ struct axen_softc {
 	uint16_t		axen_product;
 	uint16_t		axen_flags;
 
+	uint16_t		axen_timer;
+
 	int			axen_ed[AXEN_ENDPT_MAX];
 	struct usbd_pipe	*axen_ep[AXEN_ENDPT_MAX];
 	int			axen_if_flags;
@@ -108,11 +109,16 @@ struct axen_softc {
 
 	int			axen_refcnt;
 	bool			axen_dying;
+	bool			axen_stopping;
 	bool			axen_attached;
 
 	struct usb_task		axen_tick_task;
 
+	kmutex_t		axen_lock;
 	kmutex_t		axen_mii_lock;
+	kmutex_t		axen_rxlock;
+	kmutex_t		axen_txlock;
+	kcondvar_t		axen_detachcv;
 
 	int			axen_link;
 
@@ -167,9 +173,11 @@ static void	axen_txeof(struct usbd_xfer 
 static void	axen_tick(void *);
 static void	axen_tick_task(void *);
 static void	axen_start(struct ifnet *);
+static void	axen_start_locked(struct ifnet *);
 static int	axen_ioctl(struct ifnet *, u_long, void *);
 static int	axen_init(struct ifnet *);
 static void	axen_stop(struct ifnet *, int);
+static void	axen_stop_locked(struct ifnet *, int);
 static void	axen_watchdog(struct ifnet *);
 static int	axen_miibus_readreg(device_t, int, int, uint16_t *);
 static int	axen_miibus_writereg(device_t, int, int, uint16_t);
@@ -183,11 +191,26 @@ static void	axen_iff(struct axen_softc *
 static void	axen_ax88179_init(struct axen_softc *);
 static void	axen_setcoe(struct axen_softc *);
 
-/* Get exclusive access to the MII registers */
+/*
+ * Access functions for MII.  Take the MII lock to call axen_cmd().
+ * Two forms: softc lock currently held or not.
+ */
 static void
 axen_lock_mii(struct axen_softc *sc)
 {
 
+	mutex_enter(>axen_lock);
+	sc->axen_refcnt++;
+	mutex_exit(>axen_lock);
+
+	mutex_enter(>axen_mii_lock);
+}
+
+static void
+axen_lock_mii_sc_locked(struct axen_softc *sc)
+{
+	KASSERT(mutex_owned(>axen_lock));
+
 	sc->axen_refcnt++;
 	mutex_enter(>axen_mii_lock);
 }
@@ -197,8 +220,20 @@ axen_unlock_mii(struct axen_softc *sc)
 {
 
 	mutex_exit(>axen_mii_lock);
+	mutex_enter(>axen_lock);
 	if (--sc->axen_refcnt < 0)
-		usb_detach_wakeupold(sc->axen_dev);
+		cv_broadcast(>axen_detachcv);
+	mutex_exit(>axen_lock);
+}
+
+static void
+axen_unlock_mii_sc_locked(struct axen_softc *sc)
+{
+	KASSERT(mutex_owned(>axen_lock));
+
+	mutex_exit(>axen_mii_lock);
+	if (--sc->axen_refcnt < 0)
+		cv_broadcast(>axen_detachcv);
 }
 
 static int
@@ -240,13 +275,12 @@ axen_miibus_readreg(device_t dev, int ph
 	usbd_status err;
 	uint16_t data;
 
-	if (sc->axen_dying) {
-		DPRINTF(("axen: dying\n"));
+	mutex_enter(>axen_lock);
+	if (sc->axen_dying || sc->axen_phyno != phy) {
+		mutex_exit(>axen_lock);
 		return -1;
 	}
-
-	if (sc->axen_phyno != phy)
-		return -1;
+	mutex_exit(>axen_lock);
 
 	axen_lock_mii(sc);
 	err = axen_cmd(sc, AXEN_CMD_MII_READ_REG, reg, phy, );
@@ -275,13 +309,15 @@ axen_miibus_writereg(device_t dev, int p
 	usbd_status err;
 	uint16_t uval;
 
-	if (sc->axen_dying)
-		return -1;
-
-	if (sc->axen_phyno != phy)
+	mutex_enter(>axen_lock);
+	if (sc->axen_dying || sc->axen_phyno != phy) {
+		mutex_exit(>axen_lock);
 		return -1;
+	}
+	mutex_exit(>axen_lock);
 
 	uval = htole16(val);
+
 	axen_lock_mii(sc);
 	err = axen_cmd(sc, AXEN_CMD_MII_WRITE_REG, reg, phy, );
 	axen_unlock_mii(sc);
@@ -411,10 +447,11 @@ axen_iff(struct 

CVS commit: src/sys/dev/usb

2019-06-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun 21 14:19:46 UTC 2019

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

Log Message:
fix issues seen with transfers being reused before they are finished
being used.

adapt locking to the modern world.  some what inspired by if_smsc.c:
- add locks for softc, rx and tx
- add safe detach support
- safe detach vs mii lock requires 2 methods to lock the MII lock,
- check axen_dying and new axen_stopping more often
- consolidate checks to reduce the number of error paths that need
  to release a resource
- move axen_watchdog() out of if_timer into the tick task to
  prepare for MPSAFEification

TODO:
- remove spl usage
- enable mpsafe

special thanks to skrll and mlelstv for clearing up various
confusion and providing examples.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/if_axen.c

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



Re: CVS commit: src/share/mk

2019-06-21 Thread Christos Zoulas
Both of them should be simple to fix... Let me take a look.

christos

> On Jun 21, 2019, at 7:55 AM, Martin Husemann  wrote:
> 
> On Fri, Jun 21, 2019 at 11:22:18AM +, m...@netbsd.org wrote:
>> On Fri, Jun 21, 2019 at 01:15:18PM +0200, Martin Husemann wrote:
>>> On Fri, Jun 21, 2019 at 11:08:16AM +, m...@netbsd.org wrote:
 Please revert for mips. The debugger is extremely broken, and the old
 version is slightly less broken.
>>> 
>>> Same for sparc64.
>>> 
>>> Martin
>>> 
>> 
>> What's the failure mode for sparc64?
> 
> Various signal handling issues, gdb TSTOPs itself or something when receiving
> events (or so it looks).
> 
> Martin



Re: CVS commit: src/share/mk

2019-06-21 Thread Martin Husemann
On Fri, Jun 21, 2019 at 11:22:18AM +, m...@netbsd.org wrote:
> On Fri, Jun 21, 2019 at 01:15:18PM +0200, Martin Husemann wrote:
> > On Fri, Jun 21, 2019 at 11:08:16AM +, m...@netbsd.org wrote:
> > > Please revert for mips. The debugger is extremely broken, and the old
> > > version is slightly less broken.
> > 
> > Same for sparc64.
> > 
> > Martin
> > 
> 
> What's the failure mode for sparc64?

Various signal handling issues, gdb TSTOPs itself or something when receiving
events (or so it looks).

Martin


Re: CVS commit: src/share/mk

2019-06-21 Thread maya
On Fri, Jun 21, 2019 at 01:15:18PM +0200, Martin Husemann wrote:
> On Fri, Jun 21, 2019 at 11:08:16AM +, m...@netbsd.org wrote:
> > Please revert for mips. The debugger is extremely broken, and the old
> > version is slightly less broken.
> 
> Same for sparc64.
> 
> Martin
> 

What's the failure mode for sparc64?


Re: CVS commit: src/share/mk

2019-06-21 Thread Martin Husemann
On Fri, Jun 21, 2019 at 11:08:16AM +, m...@netbsd.org wrote:
> Please revert for mips. The debugger is extremely broken, and the old
> version is slightly less broken.

Same for sparc64.

Martin



Re: CVS commit: src/share/mk

2019-06-21 Thread maya
On Thu, May 30, 2019 at 05:33:57PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Thu May 30 21:33:57 UTC 2019
> 
> Modified Files:
>   src/share/mk: bsd.own.mk
> 
> Log Message:
> Everyone is on gdb-8.3 now.

Please revert for mips. The debugger is extremely broken, and the old
version is slightly less broken.

gdb 8.3
"/mnt/sudo.core" is not a core dump: file format not recognized

gdb 8.0.1

# gdb -q /usr/pkg/bin/sudo /sudo.core
Reading symbols from /usr/pkg/bin/sudo...done.
[New process 1]
Core was generated by `sudo'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x78670744 in ?? () from /usr/pkg/lib/sudo/libsudo_util.so.0
(gdb) bt
#0  0x78670744 in ?? () from /usr/pkg/lib/sudo/libsudo_util.so.0
warning: GDB can't find the start of the function at 0x78662e57.

GDB is unable to find the start of the function at 0x78662e57
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x78662e57 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
#1  0x78662e58 in ?? () from /usr/pkg/lib/sudo/libsudo_util.so.0




CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2019-06-21 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jun 21 10:59:50 UTC 2019

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: dmu_tx.c

Log Message:
Disable assertion: illumos 7793 ztest fails assertion in dmu_tx_willuse_space


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.4
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.3	Sun Jun  3 03:05:56 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c	Fri Jun 21 10:59:50 2019
@@ -1427,8 +1427,10 @@ dmu_tx_willuse_space(dmu_tx_t *tx, int64
 		return;
 
 	if (delta > 0) {
+/* FreeBSD r318821, illumos 7793 ztest fails assertion in dmu_tx_willuse_space
 		ASSERT3U(refcount_count(>tx_space_written) + delta, <=,
 		tx->tx_space_towrite);
+*/
 		(void) refcount_add_many(>tx_space_written, delta, NULL);
 	} else {
 		(void) refcount_add_many(>tx_space_freed, -delta, NULL);



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2019-06-21 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Jun 21 10:59:50 UTC 2019

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: dmu_tx.c

Log Message:
Disable assertion: illumos 7793 ztest fails assertion in dmu_tx_willuse_space


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.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

2019-06-21 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Fri Jun 21 09:34:30 UTC 2019

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

Log Message:
Use hztoms() instead of incorrect calculation.
This makes spkr work on HZ=1024 like alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/spkr_audio.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/spkr_audio.c
diff -u src/sys/dev/spkr_audio.c:1.7 src/sys/dev/spkr_audio.c:1.8
--- src/sys/dev/spkr_audio.c:1.7	Wed May  8 13:40:17 2019
+++ src/sys/dev/spkr_audio.c	Fri Jun 21 09:34:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: spkr_audio.c,v 1.7 2019/05/08 13:40:17 isaki Exp $	*/
+/*	$NetBSD: spkr_audio.c,v 1.8 2019/06/21 09:34:30 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.7 2019/05/08 13:40:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.8 2019/06/21 09:34:30 isaki Exp $");
 
 #include 
 #include 
@@ -70,7 +70,7 @@ spkr_audio_tone(device_t self, u_int xhz
 #ifdef SPKRDEBUG
 	aprint_debug_dev(self, "%s: %u %d\n", __func__, xhz, ticks);
 #endif /* SPKRDEBUG */
-	audiobell(sc->sc_audiodev, xhz, ticks * (1000 / hz),
+	audiobell(sc->sc_audiodev, xhz, hztoms(ticks),
 	sc->sc_spkr.sc_vol, 0);
 }
 
@@ -83,7 +83,7 @@ spkr_audio_rest(device_t self, int ticks
 	aprint_debug_dev(self, "%s: %d\n", __func__, ticks);
 #endif /* SPKRDEBUG */
 	if (ticks > 0)
-		audiobell(sc->sc_audiodev, 0, ticks * (1000 / hz),
+		audiobell(sc->sc_audiodev, 0, hztoms(ticks),
 		sc->sc_spkr.sc_vol, 0);
 }
 



CVS commit: src/sys/dev

2019-06-21 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Fri Jun 21 09:34:30 UTC 2019

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

Log Message:
Use hztoms() instead of incorrect calculation.
This makes spkr work on HZ=1024 like alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/spkr_audio.c

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



CVS commit: src/tools/gdb

2019-06-21 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jun 21 07:05:02 UTC 2019

Modified Files:
src/tools/gdb: README.mknative

Log Message:
Update to working instructions.

thx mrg for the build_install suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/gdb/README.mknative

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

Modified files:

Index: src/tools/gdb/README.mknative
diff -u src/tools/gdb/README.mknative:1.5 src/tools/gdb/README.mknative:1.6
--- src/tools/gdb/README.mknative:1.5	Mon Sep 26 02:36:19 2011
+++ src/tools/gdb/README.mknative	Fri Jun 21 07:05:02 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.5 2011/09/26 02:36:19 christos Exp $
+$NetBSD: README.mknative,v 1.6 2019/06/21 07:05:02 maya Exp $
 
 This file describes how to use the cross-compiler to generate the
 native files for GDB on a target platform.
@@ -20,16 +20,13 @@ work.
 1. Set MKMAINTAINERTOOLS=yes in mk.conf.  (Needed so that src/tools/gettext
gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.)
 
-2. Build and install a cross toolchain (via "build.sh -m MACHINE tools").
+2. Build and install a cross toolchain (via "build.sh -U -m MACHINE tools").
 
-3. At top level, do "nbmake-MACHINE do-distrib-dirs obj includes".
+3. At top level, do "nbmake-MACHINE obj do-distrib-dirs includes".
 
-4. In src/gnu/lib/crtstuff4 do "nbmake-MACHINE depend all install"
+4. At top level, do "nbmake-MACHINE -C lib build_install".
 
-5. In src/lib/csu, src/gnu/lib/libgcc4, and src/lib, do
-   "nbmake-MACHINE all install".
-
-6. In src/tools/gdb, do "nbmake-MACHINE obj native-gdb".
+5. In src/tools/gdb, do "nbmake-MACHINE obj native-gdb".
 
This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
cross toolchain (--build reflects the host platform, but --host and
@@ -40,8 +37,8 @@ work.
NOTE: this step writes files under src/external/gpl3/gdb/bin/gdb, so you
need to do it in a writable src tree!
 
-7. Try out a full build using "nbmake-MACHINE" in
-   src/external/gpl3/bin/gdb; the result should include a native GDB.
+6. Try out a full build using "nbmake-MACHINE" in
+   src/external/gpl3/gdb/bin; the result should include a native GDB.
 
-8. If all is well, commit the glue files and directories added to
+7. If all is well, commit the glue files and directories added to
src/external/gpl3/gdb/bin/gdb.



CVS commit: src/tools/gdb

2019-06-21 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jun 21 07:05:02 UTC 2019

Modified Files:
src/tools/gdb: README.mknative

Log Message:
Update to working instructions.

thx mrg for the build_install suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/gdb/README.mknative

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