CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 19 06:35:14 UTC 2019

Modified Files:
src/sys/dev/usb: usbhist.h usbnet.c

Log Message:
add USBHIST_CALLARGS() frontend to KERNHIST_CALLARGS().
add USBNETHIST_CALLARGS() frontend to USBHIST_CALLARGS().

use both in read/write reg, instead of aprint.

use %jx and (uintptr_t) and fix the 32 bit debug build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/usbhist.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/usbnet.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/usbhist.h
diff -u src/sys/dev/usb/usbhist.h:1.4 src/sys/dev/usb/usbhist.h:1.5
--- src/sys/dev/usb/usbhist.h:1.4	Sat Apr 23 10:15:32 2016
+++ src/sys/dev/usb/usbhist.h	Mon Aug 19 06:35:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbhist.h,v 1.4 2016/04/23 10:15:32 skrll Exp $	*/
+/*	$NetBSD: usbhist.h,v 1.5 2019/08/19 06:35:14 mrg Exp $	*/
 
 /*
  * Copyright (c) 2012 Matthew R. Green
@@ -69,6 +69,11 @@ extern int usbdebug;
 		KERNHIST_CALLED(usbhist);			\
 	}			\
 } while (0)
+#define USBHIST_CALLARGS(NAME,FMT,A,B,C,D) do {			\
+	if ((NAME) != 0) {	\
+		KERNHIST_CALLARGS(usbhist,FMT,A,B,C,D);		\
+	}			\
+} while (0)
 #define USBHIST_FUNC()			KERNHIST_FUNC(__func__)
 
 USBHIST_DECL(usbhist);
@@ -83,6 +88,7 @@ USBHIST_DECL(usbhist);
 #define USBHIST_LOGN(N,NAME,FMT,A,B,C,D)	do { } while(0)
 #define USBHIST_LOGM(N,NAME,FMT,A,B,C,D)	do { } while(0)
 #define USBHIST_LOG(NAME,FMT,A,B,C,D)		do { } while(0)
+#define USBHIST_CALLARGS(NAME,FMT,A,B,C,D)
 #define USBHIST_CALLED(NAME)
 #define USBHIST_FUNC()
 

Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.18 src/sys/dev/usb/usbnet.c:1.19
--- src/sys/dev/usb/usbnet.c:1.18	Sun Aug 18 09:46:58 2019
+++ src/sys/dev/usb/usbnet.c	Mon Aug 19 06:35:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.18 2019/08/18 09:46:58 mrg Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.19 2019/08/19 06:35:14 mrg Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.18 2019/08/18 09:46:58 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.19 2019/08/19 06:35:14 mrg Exp $");
 
 #include 
 #include 
@@ -134,6 +134,8 @@ fail:
 #define DPRINTFN(N,FMT,A,B,C,D)	USBHIST_LOGN(usbnetdebug,N,FMT,A,B,C,D)
 #define USBNETHIST_FUNC()	USBHIST_FUNC()
 #define USBNETHIST_CALLED(name)	USBHIST_CALLED(usbnetdebug)
+#define USBNETHIST_CALLARGS(FMT,A,B,C,D) \
+USBHIST_CALLARGS(usbnetdebug,FMT,A,B,C,D)
 
 /* Callback vectors. */
 
@@ -274,7 +276,8 @@ usbnet_input(struct usbnet * const un, u
 	struct mbuf *m;
 
 	usbnet_isowned_rx(un);
-	DPRINTFN(0, "called! un %p buf %p len %ju", un, buf, buflen, 0);
+	DPRINTFN(0, "called! un %jx buf %jx len %ju",
+	(uintmax_t)un, (uintmax_t)buf, buflen, 0);
 
 	m = usbnet_newbuf(buflen);
 	if (m == NULL) {
@@ -860,6 +863,7 @@ usbnet_mutex_mii(struct usbnet *un)
 int
 usbnet_mii_readreg(device_t dev, int phy, int reg, uint16_t *val)
 {
+	USBNETHIST_FUNC();
 	struct usbnet * const un = device_private(dev);
 	struct usbnet_private * const unp = un->un_pri;
 	usbd_status err;
@@ -876,7 +880,7 @@ usbnet_mii_readreg(device_t dev, int phy
 	usbnet_unlock_mii(un);
 
 	if (err) {
-		aprint_error_dev(un->un_dev, "read PHY failed: %d\n", err);
+		USBNETHIST_CALLARGS("read PHY failed: %d", err, 0, 0, 0);
 		return EIO;
 	}
 
@@ -886,6 +890,7 @@ usbnet_mii_readreg(device_t dev, int phy
 int
 usbnet_mii_writereg(device_t dev, int phy, int reg, uint16_t val)
 {
+	USBNETHIST_FUNC();
 	struct usbnet * const un = device_private(dev);
 	struct usbnet_private * const unp = un->un_pri;
 	usbd_status err;
@@ -902,7 +907,7 @@ usbnet_mii_writereg(device_t dev, int ph
 	usbnet_unlock_mii(un);
 
 	if (err) {
-		aprint_error_dev(un->un_dev, "write PHY failed: %d\n", err);
+		USBNETHIST_CALLARGS("write PHY failed: %d", err, 0, 0, 0);
 		return EIO;
 	}
 



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 19 06:35:14 UTC 2019

Modified Files:
src/sys/dev/usb: usbhist.h usbnet.c

Log Message:
add USBHIST_CALLARGS() frontend to KERNHIST_CALLARGS().
add USBNETHIST_CALLARGS() frontend to USBHIST_CALLARGS().

use both in read/write reg, instead of aprint.

use %jx and (uintptr_t) and fix the 32 bit debug build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/usbhist.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/usbnet.c

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



Re: CVS commit: src/sys/arch/x86/pci

2019-08-18 Thread Kengo NAKAHARA

Hi,

On 2019/08/19 14:25, Kengo NAKAHARA wrote:

Module Name:src
Committed By:   knakahara
Date:   Mon Aug 19 05:25:38 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
add vmx(4) basic statistics counters.

Sorry, I have forgotten this TODO in r1.40 commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/pci/if_vmx.c

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


I have finished my task for vmx(4), so I think if_vmx.c can be moved
to sys/dev/pci/ directory as pointed out by mrg@n.o.

However, it would require some htole* codes to become MI correctly.
cf. 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/vmxnet3/vmxnet3_drv.c?h=v5.3-rc5&id=115924b6bdc7cc6bf7da5b933b09281e1f4e17a9


It would be required to test on big endian architectures before moving
to sys/dev/pci directory.


Thanks,

--
//
Internet Initiative Japan Inc.

Device Engineering Section,
Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA 


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

2019-08-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 19 05:25:38 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
add vmx(4) basic statistics counters.

Sorry, I have forgotten this TODO in r1.40 commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/pci/if_vmx.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/x86/pci

2019-08-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 19 05:25:38 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
add vmx(4) basic statistics counters.

Sorry, I have forgotten this TODO in r1.40 commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/pci/if_vmx.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/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.47 src/sys/arch/x86/pci/if_vmx.c:1.48
--- src/sys/arch/x86/pci/if_vmx.c:1.47	Mon Aug 19 05:23:50 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Mon Aug 19 05:25:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.48 2019/08/19 05:25:38 knakahara Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.48 2019/08/19 05:25:38 knakahara Exp $");
 
 #include 
 #include 
@@ -200,6 +200,13 @@ struct vmxnet3_txqueue {
 	char vxtxq_name[16];
 
 	void *vxtxq_si;
+
+	struct evcnt vxtxq_intr;
+	struct evcnt vxtxq_defer;
+	struct evcnt vxtxq_deferreq;
+	struct evcnt vxtxq_pcqdrop;
+	struct evcnt vxtxq_transmitdef;
+	struct evcnt vxtxq_watchdogto;
 };
 
 struct vmxnet3_rxq_stats {
@@ -219,6 +226,10 @@ struct vmxnet3_rxqueue {
 	struct vmxnet3_rxq_stats vxrxq_stats;
 	struct vmxnet3_rxq_shared *vxrxq_rs;
 	char vxrxq_name[16];
+
+	struct evcnt vxrxq_intr;
+	struct evcnt vxrxq_defer;
+	struct evcnt vxrxq_deferreq;
 };
 
 struct vmxnet3_queue {
@@ -271,6 +282,12 @@ struct vmxnet3_softc {
 	int vmx_max_rxsegs;
 
 	struct vmxnet3_statistics vmx_stats;
+	struct evcnt vmx_event_intr;
+	struct evcnt vmx_event_link;
+	struct evcnt vmx_event_txqerror;
+	struct evcnt vmx_event_rxqerror;
+	struct evcnt vmx_event_dic;
+	struct evcnt vmx_event_debug;
 
 	int vmx_intr_type;
 	int vmx_intr_mask_mode;
@@ -349,6 +366,9 @@ void vmxnet3_set_interrupt_idx(struct vm
 int vmxnet3_setup_interrupts(struct vmxnet3_softc *);
 int vmxnet3_setup_sysctl(struct vmxnet3_softc *);
 
+int vmxnet3_setup_stats(struct vmxnet3_softc *);
+void vmxnet3_teardown_stats(struct vmxnet3_softc *);
+
 int vmxnet3_init_rxq(struct vmxnet3_softc *, int);
 int vmxnet3_init_txq(struct vmxnet3_softc *, int);
 int vmxnet3_alloc_rxtx_queues(struct vmxnet3_softc *);
@@ -631,6 +651,10 @@ vmxnet3_attach(device_t parent, device_t
 	if (error)
 		return;
 
+	error = vmxnet3_setup_stats(sc);
+	if (error)
+		return;
+
 	sc->vmx_flags |= VMXNET3_FLAG_ATTACHED;
 }
 
@@ -655,6 +679,7 @@ vmxnet3_detach(device_t self, int flags)
 		if_detach(ifp);
 	}
 
+	vmxnet3_teardown_stats(sc);
 	sysctl_teardown(&sc->vmx_sysctllog);
 
 	vmxnet3_free_interrupts(sc);
@@ -1923,6 +1948,93 @@ out:
 	return error;
 }
 
+int
+vmxnet3_setup_stats(struct vmxnet3_softc *sc)
+{
+	struct vmxnet3_queue *vmxq;
+	struct vmxnet3_txqueue *txq;
+	struct vmxnet3_rxqueue *rxq;
+	int i;
+
+	for (i = 0; i < sc->vmx_ntxqueues; i++) {
+		vmxq = &sc->vmx_queue[i];
+		txq = &vmxq->vxq_txqueue;
+		evcnt_attach_dynamic(&txq->vxtxq_intr, EVCNT_TYPE_INTR,
+		NULL, txq->vxtxq_name, "Interrupt on queue");
+		evcnt_attach_dynamic(&txq->vxtxq_defer, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "Handled queue in softint/workqueue");
+		evcnt_attach_dynamic(&txq->vxtxq_deferreq, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "Requested in softint/workqueue");
+		evcnt_attach_dynamic(&txq->vxtxq_pcqdrop, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "Dropped in pcq");
+		evcnt_attach_dynamic(&txq->vxtxq_transmitdef, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "Deferred transmit");
+		evcnt_attach_dynamic(&txq->vxtxq_watchdogto, EVCNT_TYPE_MISC,
+		NULL, txq->vxtxq_name, "Watchdog timeount");
+	}
+
+	for (i = 0; i < sc->vmx_nrxqueues; i++) {
+		vmxq = &sc->vmx_queue[i];
+		rxq = &vmxq->vxq_rxqueue;
+		evcnt_attach_dynamic(&rxq->vxrxq_intr, EVCNT_TYPE_INTR,
+		NULL, rxq->vxrxq_name, "Interrupt on queue");
+		evcnt_attach_dynamic(&rxq->vxrxq_defer, EVCNT_TYPE_MISC,
+		NULL, rxq->vxrxq_name, "Handled queue in softint/workqueue");
+		evcnt_attach_dynamic(&rxq->vxrxq_deferreq, EVCNT_TYPE_MISC,
+		NULL, rxq->vxrxq_name, "Requested in softint/workqueue");
+	}
+
+	evcnt_attach_dynamic(&sc->vmx_event_intr, EVCNT_TYPE_INTR,
+	NULL, device_xname(sc->vmx_dev), "Interrupt for other events");
+	evcnt_attach_dynamic(&sc->vmx_event_link, EVCNT_TYPE_MISC,
+	NULL, device_xname(sc->vmx_dev), "Link status event");
+	evcnt_attach_dynamic(&sc->vmx_event_txqerror, EVCNT_TYPE_MISC,
+	NULL, device_xname(sc->vmx_dev), "Tx queue error event");
+	evcnt_attach_dynamic(&sc->vmx_event_rxqerror, EVCNT_TYPE_MISC,
+	NULL, device_xname(sc->vmx_dev), "Rx queue error event");
+	evcnt_attach_dynamic(&sc->vmx_event_dic, EVCNT_TYPE_MISC,
+	N

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

2019-08-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 19 05:23:50 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
fix panic when vmx(4) is detached.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/pci/if_vmx.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/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.46 src/sys/arch/x86/pci/if_vmx.c:1.47
--- src/sys/arch/x86/pci/if_vmx.c:1.46	Thu Aug  1 09:37:34 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Mon Aug 19 05:23:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.46 2019/08/01 09:37:34 knakahara Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.46 2019/08/01 09:37:34 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $");
 
 #include 
 #include 
@@ -859,11 +859,13 @@ vmxnet3_free_interrupts(struct vmxnet3_s
 	int i;
 
 	workqueue_destroy(sc->vmx_queue_wq);
-	for (i = 0; i < sc->vmx_nintrs; i++) {
+	for (i = 0; i < sc->vmx_ntxqueues; i++) {
 		struct vmxnet3_queue *vmxq =  &sc->vmx_queue[i];
 
 		softint_disestablish(vmxq->vxq_si);
 		vmxq->vxq_si = NULL;
+	}
+	for (i = 0; i < sc->vmx_nintrs; i++) {
 		pci_intr_disestablish(pc, sc->vmx_ihs[i]);
 	}
 	pci_intr_release(pc, sc->vmx_intrs, sc->vmx_nintrs);



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

2019-08-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Aug 19 05:23:50 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
fix panic when vmx(4) is detached.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/pci/if_vmx.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/arm/imx/fdt

2019-08-18 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Mon Aug 19 03:48:41 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_sdhc.c

Log Message:
Support write protect gpio pin.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.c

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

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_sdhc.c
diff -u src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.1 src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2
--- src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.1	Wed Jul 24 13:12:33 2019
+++ src/sys/arch/arm/imx/fdt/imx6_sdhc.c	Mon Aug 19 03:48:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_sdhc.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $	*/
+/*	$NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $");
 
 #include "opt_fdt.h"
 
@@ -50,6 +50,7 @@ static int imx6_sdhc_match(device_t, cfd
 static void imx6_sdhc_attach(device_t, device_t, void *);
 
 static int imx6_sdhc_card_detect(struct sdhc_softc *);
+static int imx6_sdhc_write_protect(struct sdhc_softc *);
 
 struct imx6_sdhc_softc {
 	struct sdhc_softc sc_sdhc;
@@ -64,6 +65,7 @@ struct imx6_sdhc_softc {
 	struct clk		*sc_clk_per;
 
 	struct fdtbus_gpio_pin	*sc_pin_cd;
+	struct fdtbus_gpio_pin	*sc_pin_wp;
 };
 
 CFATTACH_DECL_NEW(imx6_sdhc, sizeof(struct imx6_sdhc_softc),
@@ -116,13 +118,12 @@ imx6_sdhc_attach(device_t parent, device
 	SDHC_FLAG_NO_PWR0 |
 	SDHC_FLAG_HAVE_DVS |
 	SDHC_FLAG_32BIT_ACCESS |
-	SDHC_FLAG_8BIT_MODE |
 	SDHC_FLAG_USE_ADMA2 |
 	SDHC_FLAG_USDHC;
 
-	if (bus_width == 8) {
+	if (bus_width == 8)
 		sc->sc_sdhc.sc_flags |= SDHC_FLAG_8BIT_MODE;
-	}
+
 	sc->sc_sdhc.sc_host = &sc->sc_host;
 
 	sc->sc_bst = faa->faa_bst;
@@ -135,12 +136,17 @@ imx6_sdhc_attach(device_t parent, device
 
 	sc->sc_pin_cd = fdtbus_gpio_acquire(faa->faa_phandle,
 	"cd-gpios", GPIO_PIN_INPUT);
-
 	if (sc->sc_pin_cd) {
 		sc->sc_sdhc.sc_vendor_card_detect = imx6_sdhc_card_detect;
 		sc->sc_sdhc.sc_flags |= SDHC_FLAG_POLL_CARD_DET;
 	}
 
+	sc->sc_pin_wp = fdtbus_gpio_acquire(faa->faa_phandle,
+	"wp-gpios", GPIO_PIN_INPUT);
+	if (sc->sc_pin_wp) {
+		sc->sc_sdhc.sc_vendor_write_protect = imx6_sdhc_write_protect;
+	}
+
 	error = clk_enable(sc->sc_clk_per);
 	if (error) {
 		aprint_error(": couldn't enable clock: %d\n", error);
@@ -160,8 +166,8 @@ imx6_sdhc_attach(device_t parent, device
 		return;
 	}
 
-	sc->sc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SDMMC, 0,
-	sdhc_intr, &sc->sc_sdhc);
+	sc->sc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SDMMC,
+	FDT_INTR_MPSAFE, sdhc_intr, &sc->sc_sdhc);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt on %s\n",
 		intrstr);
@@ -189,3 +195,13 @@ imx6_sdhc_card_detect(struct sdhc_softc 
 	return fdtbus_gpio_read(sc->sc_pin_cd);
 }
 
+static int
+imx6_sdhc_write_protect(struct sdhc_softc *ssc)
+{
+	struct imx6_sdhc_softc *sc = device_private(ssc->sc_dev);
+
+	KASSERT(sc->sc_pin_wp != NULL);
+
+	return fdtbus_gpio_read(sc->sc_pin_wp);
+}
+



CVS commit: src/sys/arch/arm/imx/fdt

2019-08-18 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Mon Aug 19 03:48:41 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_sdhc.c

Log Message:
Support write protect gpio pin.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.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/arm/imx/fdt

2019-08-18 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Mon Aug 19 03:45:51 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: if_enet_imx.c imx6_ahcisata.c imx6_gpio.c
imx6_pcie.c imx6_usb.c

Log Message:
Enable FDT_INTR_MPSAFE flag.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/if_enet_imx.c \
src/sys/arch/arm/imx/fdt/imx6_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \
src/sys/arch/arm/imx/fdt/imx6_gpio.c src/sys/arch/arm/imx/fdt/imx6_usb.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/arm/imx/fdt

2019-08-18 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Mon Aug 19 03:45:51 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: if_enet_imx.c imx6_ahcisata.c imx6_gpio.c
imx6_pcie.c imx6_usb.c

Log Message:
Enable FDT_INTR_MPSAFE flag.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/if_enet_imx.c \
src/sys/arch/arm/imx/fdt/imx6_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \
src/sys/arch/arm/imx/fdt/imx6_gpio.c src/sys/arch/arm/imx/fdt/imx6_usb.c

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

Modified files:

Index: src/sys/arch/arm/imx/fdt/if_enet_imx.c
diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.2 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.3
--- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.2	Tue Jul 30 06:26:31 2019
+++ src/sys/arch/arm/imx/fdt/if_enet_imx.c	Mon Aug 19 03:45:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet_imx.c,v 1.2 2019/07/30 06:26:31 hkenken Exp $	*/
+/*	$NetBSD: if_enet_imx.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.2 2019/07/30 06:26:31 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $");
 
 #include "opt_fdt.h"
 
@@ -118,8 +118,8 @@ enet_attach(device_t parent, device_t se
 		aprint_error_dev(self, "failed to decode interrupt\n");
 		goto failure;
 	}
-	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0,
-	enet_intr, sc);
+	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET,
+	FDT_INTR_MPSAFE, enet_intr, sc);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "failed to establish interrupt on %s\n",
 		intrstr);
Index: src/sys/arch/arm/imx/fdt/imx6_pcie.c
diff -u src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.2 src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.3
--- src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.2	Fri Jul 26 06:57:54 2019
+++ src/sys/arch/arm/imx/fdt/imx6_pcie.c	Mon Aug 19 03:45:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_pcie.c,v 1.2 2019/07/26 06:57:54 skrll Exp $	*/
+/*	$NetBSD: imx6_pcie.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.2 2019/07/26 06:57:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"
@@ -179,7 +179,8 @@ imx6_pcie_attach(device_t parent, device
 		return;
 	}
 
-	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, imxpcie_intr, sc);
+	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM,
+	FDT_INTR_MPSAFE, imxpcie_intr, sc);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "failed to establish interrupt on %s\n",
 		intrstr);

Index: src/sys/arch/arm/imx/fdt/imx6_ahcisata.c
diff -u src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.1 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.2
--- src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.1	Wed Jul 24 13:12:33 2019
+++ src/sys/arch/arm/imx/fdt/imx6_ahcisata.c	Mon Aug 19 03:45:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_ahcisata.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $	*/
+/*	$NetBSD: imx6_ahcisata.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $");
 
 #include 
 #include 
@@ -181,8 +181,8 @@ imx6_ahcisata_attach(device_t parent, de
 		return;
 	}
 
-	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0,
-	ahci_intr, &sc->sc);
+	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO,
+	FDT_INTR_MPSAFE, ahci_intr, &sc->sc);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "failed to establish interrupt on %s\n",
 		intrstr);
Index: src/sys/arch/arm/imx/fdt/imx6_gpio.c
diff -u src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.1 src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.2
--- src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.1	Wed Jul 24 13:12:33 2019
+++ src/sys/arch/arm/imx/fdt/imx6_gpio.c	Mon Aug 19 03:45:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_gpio.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $	*/
+/*	$NetBSD: imx6_gpio.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_gpio.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $");
+__KE

CVS commit: src/sys/arch

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:25:40 UTC 2019

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

Log Message:
Add MBUFTRACE to ALL configs


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.469 -r1.470 src/sys/arch/i386/conf/ALL

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.121 src/sys/arch/amd64/conf/ALL:1.122
--- src/sys/arch/amd64/conf/ALL:1.121	Fri Aug  9 08:01:06 2019
+++ src/sys/arch/amd64/conf/ALL	Mon Aug 19 03:25:40 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.121 2019/08/09 08:01:06 rin Exp $
+# $NetBSD: ALL,v 1.122 2019/08/19 03:25:40 ozaki-r 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.121 $"
+#ident		"ALL-$Revision: 1.122 $"
 
 maxusers	64		# estimated number of users
 
@@ -2025,6 +2025,7 @@ options LPT_DEBUG
 options MAGMA_DEBUG
 options MAPLE_DEBUG
 options MB8795_DEBUG
+options MBUFTRACE
 options MCDDEBUG
 options MCDEBUG
 options MCHAIN_DEBUG

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.469 src/sys/arch/i386/conf/ALL:1.470
--- src/sys/arch/i386/conf/ALL:1.469	Wed Jul 24 23:13:46 2019
+++ src/sys/arch/i386/conf/ALL	Mon Aug 19 03:25:40 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.469 2019/07/24 23:13:46 tnn Exp $
+# $NetBSD: ALL,v 1.470 2019/08/19 03:25:40 ozaki-r Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.469 $"
+#ident		"ALL-$Revision: 1.470 $"
 
 maxusers	64		# estimated number of users
 
@@ -2148,6 +2148,7 @@ options LPT_DEBUG
 options MAGMA_DEBUG
 options MAPLE_DEBUG
 options MB8795_DEBUG
+options MBUFTRACE
 options MCDDEBUG
 options MCDEBUG
 options MCHAIN_DEBUG



CVS commit: src/sys/arch

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:25:40 UTC 2019

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

Log Message:
Add MBUFTRACE to ALL configs


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.469 -r1.470 src/sys/arch/i386/conf/ALL

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



CVS commit: src/sys/netcan

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:24:38 UTC 2019

Modified Files:
src/sys/netcan: can.c

Log Message:
can: add missing mowner variables for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/netcan/can.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/netcan/can.c
diff -u src/sys/netcan/can.c:1.7 src/sys/netcan/can.c:1.8
--- src/sys/netcan/can.c:1.7	Sat Jul 20 15:34:41 2019
+++ src/sys/netcan/can.c	Mon Aug 19 03:24:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: can.c,v 1.7 2019/07/20 15:34:41 bouyer Exp $	*/
+/*	$NetBSD: can.c,v 1.8 2019/08/19 03:24:38 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.7 2019/07/20 15:34:41 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.8 2019/08/19 03:24:38 ozaki-r Exp $");
 
 #include 
 #include 
@@ -76,6 +76,12 @@ int	can_recvspace = 40 * (1024 + sizeof(
 #endif
 int	canhashsize = CANHASHSIZE;
 
+#ifdef MBUFTRACE
+static struct mowner can_mowner = MOWNER_INIT("can", "");
+static struct mowner can_rx_mowner = MOWNER_INIT("can", "rx");
+static struct mowner can_tx_mowner = MOWNER_INIT("can", "tx");
+#endif
+
 static int can_output(struct mbuf *, struct canpcb *);
 
 static int can_control(struct socket *, u_long, void *, struct ifnet *);



CVS commit: src/sys/netcan

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:24:38 UTC 2019

Modified Files:
src/sys/netcan: can.c

Log Message:
can: add missing mowner variables for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/netcan/can.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-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:24:05 UTC 2019

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

Log Message:
l2tp: initialize mowner variables for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/net/if_l2tp.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_l2tp.c
diff -u src/sys/net/if_l2tp.c:1.35 src/sys/net/if_l2tp.c:1.36
--- src/sys/net/if_l2tp.c:1.35	Tue Jun 25 12:30:50 2019
+++ src/sys/net/if_l2tp.c	Mon Aug 19 03:24:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_l2tp.c,v 1.35 2019/06/25 12:30:50 msaitoh Exp $	*/
+/*	$NetBSD: if_l2tp.c,v 1.36 2019/08/19 03:24:05 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.35 2019/06/25 12:30:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.36 2019/08/19 03:24:05 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -275,6 +275,24 @@ l2tpattach0(struct l2tp_softc *sc)
 	sc->l2tp_ec.ec_if.if_transmit = l2tp_transmit;
 	sc->l2tp_ec.ec_if._if_input = ether_input;
 	IFQ_SET_READY(&sc->l2tp_ec.ec_if.if_snd);
+
+#ifdef MBUFTRACE
+	struct ethercom *ec = &sc->l2tp_ec;
+	struct ifnet *ifp = &sc->l2tp_ec.ec_if;
+
+	strlcpy(ec->ec_tx_mowner.mo_name, ifp->if_xname,
+	sizeof(ec->ec_tx_mowner.mo_name));
+	strlcpy(ec->ec_tx_mowner.mo_descr, "tx",
+	sizeof(ec->ec_tx_mowner.mo_descr));
+	strlcpy(ec->ec_rx_mowner.mo_name, ifp->if_xname,
+	sizeof(ec->ec_rx_mowner.mo_name));
+	strlcpy(ec->ec_rx_mowner.mo_descr, "rx",
+	sizeof(ec->ec_rx_mowner.mo_descr));
+	MOWNER_ATTACH(&ec->ec_tx_mowner);
+	MOWNER_ATTACH(&ec->ec_rx_mowner);
+	ifp->if_mowner = &ec->ec_tx_mowner;
+#endif
+
 	/* XXX
 	 * It may improve performance to use if_initialize()/if_register()
 	 * so that l2tp_input() calls if_input() instead of



CVS commit: src/sys/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:24:05 UTC 2019

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

Log Message:
l2tp: initialize mowner variables for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/net/if_l2tp.c

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-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:23:30 UTC 2019

Modified Files:
src/sys/net: rtsock_shared.c
src/sys/netinet: if_arp.c

Log Message:
Initialize dom_mowner for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.282 -r1.283 src/sys/netinet/if_arp.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/rtsock_shared.c
diff -u src/sys/net/rtsock_shared.c:1.9 src/sys/net/rtsock_shared.c:1.10
--- src/sys/net/rtsock_shared.c:1.9	Fri May  3 02:10:58 2019
+++ src/sys/net/rtsock_shared.c	Mon Aug 19 03:23:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_shared.c,v 1.9 2019/05/03 02:10:58 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_shared.c,v 1.10 2019/08/19 03:23:30 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.9 2019/05/03 02:10:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.10 2019/08/19 03:23:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1646,6 +1646,10 @@ COMPATNAME(route_init)(void)
 	ri->ri_sih = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
 	COMPATNAME(route_intr), NULL);
 	IFQ_LOCK_INIT(&ri->ri_intrq);
+
+#ifdef MBUFTRACE
+	MOWNER_ATTACH(&COMPATNAME(routedomain).dom_mowner);
+#endif
 }
 
 /*
@@ -1698,4 +1702,7 @@ struct domain COMPATNAME(routedomain) = 
 	.dom_protosw = COMPATNAME(route_protosw),
 	.dom_protoswNPROTOSW =
 	&COMPATNAME(route_protosw)[__arraycount(COMPATNAME(route_protosw))],
+#ifdef MBUFTRACE
+	.dom_mowner = MOWNER_INIT("route", "rtm"),
+#endif
 };

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.282 src/sys/netinet/if_arp.c:1.283
--- src/sys/netinet/if_arp.c:1.282	Mon Apr 29 16:12:30 2019
+++ src/sys/netinet/if_arp.c	Mon Aug 19 03:23:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.282 2019/04/29 16:12:30 roy Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.283 2019/08/19 03:23:30 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.282 2019/04/29 16:12:30 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.283 2019/08/19 03:23:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -247,6 +247,9 @@ struct domain arpdomain = {
 	.dom_name = "arp",
 	.dom_protosw = arpsw,
 	.dom_protoswNPROTOSW = &arpsw[__arraycount(arpsw)],
+#ifdef MBUFTRACE
+	.dom_mowner = MOWNER_INIT("internet", "arp"),
+#endif
 };
 
 static void sysctl_net_inet_arp_setup(struct sysctllog **);
@@ -258,6 +261,10 @@ arp_init(void)
 	sysctl_net_inet_arp_setup(NULL);
 	arpstat_percpu = percpu_alloc(sizeof(uint64_t) * ARP_NSTATS);
 	IFQ_LOCK_INIT(&arpintrq);
+
+#ifdef MBUFTRACE
+	MOWNER_ATTACH(&arpdomain.dom_mowner);
+#endif
 }
 
 static void



CVS commit: src/sys

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:23:30 UTC 2019

Modified Files:
src/sys/net: rtsock_shared.c
src/sys/netinet: if_arp.c

Log Message:
Initialize dom_mowner for MBUFTRACE


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/net/rtsock_shared.c
cvs rdiff -u -r1.282 -r1.283 src/sys/netinet/if_arp.c

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



CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:22:47 UTC 2019

Modified Files:
src/tests/net: net_common.sh

Log Message:
tests: check pool object leaks

Currently only llentpl leaks can be detected.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tests/net/net_common.sh

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



CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:22:47 UTC 2019

Modified Files:
src/tests/net: net_common.sh

Log Message:
tests: check pool object leaks

Currently only llentpl leaks can be detected.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tests/net/net_common.sh

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

Modified files:

Index: src/tests/net/net_common.sh
diff -u src/tests/net/net_common.sh:1.33 src/tests/net/net_common.sh:1.34
--- src/tests/net/net_common.sh:1.33	Mon Aug 19 03:21:13 2019
+++ src/tests/net/net_common.sh	Mon Aug 19 03:22:47 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: net_common.sh,v 1.33 2019/08/19 03:21:13 ozaki-r Exp $
+#	$NetBSD: net_common.sh,v 1.34 2019/08/19 03:22:47 ozaki-r Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -337,10 +337,31 @@ rump_server_add_iface()
 	return 0
 }
 
+rump_server_check_poolleaks()
+{
+	local target=$1
+
+	reqs=$($HIJACKING vmstat -mv | awk "/$target/ {print \$3;}")
+	rels=$($HIJACKING vmstat -mv | awk "/$target/ {print \$5;}")
+	atf_check_equal '$target$reqs' '$target$rels'
+}
+
+
+rump_server_check_memleaks()
+{
+
+	rump_server_check_poolleaks llentrypl
+	# This doesn't work for objects allocated through pool_cache
+	#rump_server_check_poolleaks mbpl
+	#rump_server_check_poolleaks mclpl
+	#rump_server_check_poolleaks socket
+}
+
 rump_server_destroy_ifaces()
 {
 	local backup=$RUMP_SERVER
 	local output=ignore
+	local reqs= rels=
 
 	$DEBUG && cat $_rump_server_ifaces
 
@@ -372,6 +393,11 @@ rump_server_destroy_ifaces()
 	done < __ifaces
 	rm -f __ifaces
 
+	for sock in $(cat $_rump_server_socks); do
+		export RUMP_SERVER=$sock
+		rump_server_check_memleaks
+	done
+
 	export RUMP_SERVER=$backup
 
 	return 0
@@ -410,6 +436,7 @@ dump_kernel_stats()
 	rump.netstat -nr
 	# XXX still need hijacking
 	$HIJACKING rump.netstat -nai
+	$HIJACKING vmstat -m
 	rump.arp -na
 	rump.ndp -na
 	$HIJACKING ifmcstat



CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:22:06 UTC 2019

Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/carp: t_basic.sh
src/tests/net/if_bridge: t_bridge.sh t_rtable.sh
src/tests/net/if_gif: t_gif.sh
src/tests/net/if_ipsec: t_ipsec.sh t_ipsec_natt.sh t_ipsec_pfil.sh
src/tests/net/if_l2tp: t_l2tp.sh
src/tests/net/if_pppoe: t_pppoe.sh
src/tests/net/if_tap: t_tap.sh
src/tests/net/ipsec: t_ipsec_gif.sh t_ipsec_l2tp.sh t_ipsec_natt.sh

Log Message:
tests: use rump_server_add_iface to create interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/net/carp/t_basic.sh
cvs rdiff -u -r1.18 -r1.19 src/tests/net/if_bridge/t_bridge.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/net/if_bridge/t_rtable.sh
cvs rdiff -u -r1.12 -r1.13 src/tests/net/if_gif/t_gif.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/net/if_ipsec/t_ipsec.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/net/if_ipsec/t_ipsec_natt.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/net/if_ipsec/t_ipsec_pfil.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/net/if_l2tp/t_l2tp.sh
cvs rdiff -u -r1.18 -r1.19 src/tests/net/if_pppoe/t_pppoe.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/net/if_tap/t_tap.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/net/ipsec/t_ipsec_gif.sh \
src/tests/net/ipsec/t_ipsec_l2tp.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/net/ipsec/t_ipsec_natt.sh

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



CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:22:06 UTC 2019

Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/carp: t_basic.sh
src/tests/net/if_bridge: t_bridge.sh t_rtable.sh
src/tests/net/if_gif: t_gif.sh
src/tests/net/if_ipsec: t_ipsec.sh t_ipsec_natt.sh t_ipsec_pfil.sh
src/tests/net/if_l2tp: t_l2tp.sh
src/tests/net/if_pppoe: t_pppoe.sh
src/tests/net/if_tap: t_tap.sh
src/tests/net/ipsec: t_ipsec_gif.sh t_ipsec_l2tp.sh t_ipsec_natt.sh

Log Message:
tests: use rump_server_add_iface to create interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/net/carp/t_basic.sh
cvs rdiff -u -r1.18 -r1.19 src/tests/net/if_bridge/t_bridge.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/net/if_bridge/t_rtable.sh
cvs rdiff -u -r1.12 -r1.13 src/tests/net/if_gif/t_gif.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/net/if_ipsec/t_ipsec.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/net/if_ipsec/t_ipsec_natt.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/net/if_ipsec/t_ipsec_pfil.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/net/if_l2tp/t_l2tp.sh
cvs rdiff -u -r1.18 -r1.19 src/tests/net/if_pppoe/t_pppoe.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/net/if_tap/t_tap.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/net/ipsec/t_ipsec_gif.sh \
src/tests/net/ipsec/t_ipsec_l2tp.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/net/ipsec/t_ipsec_natt.sh

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

Modified files:

Index: src/tests/net/arp/t_arp.sh
diff -u src/tests/net/arp/t_arp.sh:1.37 src/tests/net/arp/t_arp.sh:1.38
--- src/tests/net/arp/t_arp.sh:1.37	Mon May 13 17:55:08 2019
+++ src/tests/net/arp/t_arp.sh	Mon Aug 19 03:22:05 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_arp.sh,v 1.37 2019/05/13 17:55:08 bad Exp $
+#	$NetBSD: t_arp.sh,v 1.38 2019/08/19 03:22:05 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -485,7 +485,7 @@ test_proxy_arp()
 	# Test#1: First setup an endpoint then create proxy arp entry
 	#
 	export RUMP_SERVER=$SOCKDST
-	atf_check -s exit:0 rump.ifconfig tap1 create
+	rump_server_add_iface $SOCKDST tap1
 	atf_check -s exit:0 rump.ifconfig tap1 $IP4DST_PROXYARP1/24 up
 	atf_check -s exit:0 rump.ifconfig -w 10
 
@@ -536,7 +536,7 @@ test_proxy_arp()
 	atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'"
 
 	export RUMP_SERVER=$SOCKDST
-	atf_check -s exit:0 rump.ifconfig tap2 create
+	rump_server_add_iface $SOCKDST tap2
 	atf_check -s exit:0 rump.ifconfig tap2 $IP4DST_PROXYARP2/24 up
 	atf_check -s exit:0 rump.ifconfig -w 10
 

Index: src/tests/net/carp/t_basic.sh
diff -u src/tests/net/carp/t_basic.sh:1.7 src/tests/net/carp/t_basic.sh:1.8
--- src/tests/net/carp/t_basic.sh:1.7	Thu Aug  3 03:16:26 2017
+++ src/tests/net/carp/t_basic.sh	Mon Aug 19 03:22:05 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_basic.sh,v 1.7 2017/08/03 03:16:26 ozaki-r Exp $
+#	$NetBSD: t_basic.sh,v 1.8 2019/08/19 03:22:05 ozaki-r Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -60,7 +60,7 @@ setup_carp()
 		atf_check -s exit:0 -o match:'0.->.1' \
 		rump.sysctl -w net.inet.carp.log=1
 	fi
-	atf_check -s exit:0 rump.ifconfig $carpif create
+	rump_server_add_iface $sock $carpif
 	if [ $carpdevip = yes ]; then
 		atf_check -s exit:0 rump.ifconfig shmif0 $ip/24 up
 		atf_check -s exit:0 rump.ifconfig $carpif \
@@ -200,7 +200,7 @@ setup_carp6()
 		atf_check -s exit:0 -o match:'0.->.1' \
 		rump.sysctl -w net.inet.carp.log=1
 	fi
-	atf_check -s exit:0 rump.ifconfig $carpif create
+	rump_server_add_iface $sock $carpif
 	if [ $carpdevip = yes ]; then
 		atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip up
 		atf_check -s exit:0 rump.ifconfig $carpif inet6 \

Index: src/tests/net/if_bridge/t_bridge.sh
diff -u src/tests/net/if_bridge/t_bridge.sh:1.18 src/tests/net/if_bridge/t_bridge.sh:1.19
--- src/tests/net/if_bridge/t_bridge.sh:1.18	Thu Feb  1 05:22:01 2018
+++ src/tests/net/if_bridge/t_bridge.sh	Mon Aug 19 03:22:05 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_bridge.sh,v 1.18 2018/02/01 05:22:01 ozaki-r Exp $
+#	$NetBSD: t_bridge.sh,v 1.19 2019/08/19 03:22:05 ozaki-r Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -169,7 +169,7 @@ setup6()
 setup_bridge()
 {
 	export RUMP_SERVER=$SOCK2
-	atf_check -s exit:0 rump.ifconfig bridge0 create
+	rump_server_add_iface $SOCK2 bridge0
 	atf_check -s exit:0 rump.ifconfig bridge0 up
 
 	export LD_PRELOAD=/usr/lib/librumphijack.so

Index: src/tests/net/if_bridge/t_rtable.sh
diff -u src/tests/net/if_bridge/t_rtable.sh:1.6 src/tests/net/if_bridge/t_rtable.sh:1.7
--- src/tests/net/if_bridge/t_rtable.sh:1.6	Tue Jul  9 02:50:24 2019
+++ src/tests/net/if_bridge/t_rtable.sh	Mon Aug 19 03:22:05 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_rtable.sh,v 1.6 2019/07/09 02:50:24 ozaki-r Exp $
+#	$NetBSD: t_rtable.sh,v 1.7 2019/08/19 03:22:05 ozaki-r Ex

CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:21:13 UTC 2019

Modified Files:
src/tests/net: net_common.sh

Log Message:
tests: enable to create interfaces other than shmif with rump_server_add_iface

For this change interfaces are destroyed in the reverse order of their
creations in case there are dependencies between interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/net/net_common.sh

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

Modified files:

Index: src/tests/net/net_common.sh
diff -u src/tests/net/net_common.sh:1.32 src/tests/net/net_common.sh:1.33
--- src/tests/net/net_common.sh:1.32	Thu Jul 18 04:22:22 2019
+++ src/tests/net/net_common.sh	Mon Aug 19 03:21:13 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: net_common.sh,v 1.32 2019/07/18 04:22:22 ozaki-r Exp $
+#	$NetBSD: net_common.sh,v 1.33 2019/08/19 03:21:13 ozaki-r Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -321,7 +321,9 @@ rump_server_add_iface()
 
 	export RUMP_SERVER=$sock
 	atf_check -s exit:0 rump.ifconfig $ifname create
-	atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus
+	if [ -n "$bus" ]; then
+		atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus
+	fi
 	export RUMP_SERVER=$backup
 
 	echo $sock $ifname >> $_rump_server_ifaces
@@ -359,13 +361,17 @@ rump_server_destroy_ifaces()
 
 	# XXX using pipe doesn't work. See PR bin/51667
 	#cat $_rump_server_ifaces | while read sock ifname; do
+	# Destroy interfaces in the reverse order
+	tac $_rump_server_ifaces > __ifaces
 	while read sock ifname; do
 		export RUMP_SERVER=$sock
 		if rump.ifconfig -l |grep -q $ifname; then
 			atf_check -s exit:0 rump.ifconfig $ifname destroy
 		fi
 		atf_check -s exit:0 -o ignore rump.ifconfig
-	done < $_rump_server_ifaces
+	done < __ifaces
+	rm -f __ifaces
+
 	export RUMP_SERVER=$backup
 
 	return 0



CVS commit: src/tests/net

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:21:13 UTC 2019

Modified Files:
src/tests/net: net_common.sh

Log Message:
tests: enable to create interfaces other than shmif with rump_server_add_iface

For this change interfaces are destroyed in the reverse order of their
creations in case there are dependencies between interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/net/net_common.sh

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



CVS commit: src/tests/net/ndp

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:20:28 UTC 2019

Modified Files:
src/tests/net/ndp: t_ndp.sh

Log Message:
tests: fix test header name


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/tests/net/ndp/t_ndp.sh

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

Modified files:

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.34 src/tests/net/ndp/t_ndp.sh:1.35
--- src/tests/net/ndp/t_ndp.sh:1.34	Tue Aug 13 07:20:43 2019
+++ src/tests/net/ndp/t_ndp.sh	Mon Aug 19 03:20:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.34 2019/08/13 07:20:43 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.35 2019/08/19 03:20:27 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -687,7 +687,7 @@ ndp_stray_entries_cleanup()
 }
 
 atf_test_case ndp_cache_state cleanup
-ndp_stray_entries_head()
+ndp_cache_state_head()
 {
 
 	atf_set "descr" "Tests states of neighbor cache entries"



CVS commit: src/tests/net/ndp

2019-08-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Aug 19 03:20:28 UTC 2019

Modified Files:
src/tests/net/ndp: t_ndp.sh

Log Message:
tests: fix test header name


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/tests/net/ndp/t_ndp.sh

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



CVS commit: src

2019-08-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Aug 18 20:15:59 UTC 2019

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/c++: Makefile
src/tests/usr.bin/cc: Makefile
Added Files:
src/tests/usr.bin/c++: t_fuzzer_oom.sh t_fuzzer_simple.sh
t_fuzzer_timeout.sh t_msan_allocated_memory.sh t_msan_check_mem.sh
t_msan_free.sh t_msan_heap.sh t_msan_partial_poison.sh
t_msan_poison.sh t_msan_realloc.sh t_msan_shadow.sh t_msan_stack.sh
t_msan_unpoison.sh t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
t_tsan_thread_leak.sh t_tsan_vptr_race.sh
src/tests/usr.bin/cc: t_fuzzer_oom.sh t_fuzzer_simple.sh
t_fuzzer_timeout.sh t_msan_allocated_memory.sh t_msan_check_mem.sh
t_msan_free.sh t_msan_heap.sh t_msan_partial_poison.sh
t_msan_poison.sh t_msan_realloc.sh t_msan_shadow.sh t_msan_stack.sh
t_msan_unpoison.sh t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
t_tsan_thread_leak.sh

Log Message:
Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.


To generate a diff of this commit:
cvs rdiff -u -r1.818 -r1.819 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/c++/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/c++/t_fuzzer_oom.sh \
src/tests/usr.bin/c++/t_fuzzer_simple.sh \
src/tests/usr.bin/c++/t_fuzzer_timeout.sh \
src/tests/usr.bin/c++/t_msan_allocated_memory.sh \
src/tests/usr.bin/c++/t_msan_check_mem.sh \
src/tests/usr.bin/c++/t_msan_free.sh src/tests/usr.bin/c++/t_msan_heap.sh \
src/tests/usr.bin/c++/t_msan_partial_poison.sh \
src/tests/usr.bin/c++/t_msan_poison.sh \
src/tests/usr.bin/c++/t_msan_realloc.sh \
src/tests/usr.bin/c++/t_msan_shadow.sh \
src/tests/usr.bin/c++/t_msan_stack.sh \
src/tests/usr.bin/c++/t_msan_unpoison.sh \
src/tests/usr.bin/c++/t_tsan_data_race.sh \
src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/c++/t_tsan_signal_errno.sh \
src/tests/usr.bin/c++/t_tsan_thread_leak.sh \
src/tests/usr.bin/c++/t_tsan_vptr_race.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/cc/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/cc/t_fuzzer_oom.sh \
src/tests/usr.bin/cc/t_fuzzer_simple.sh \
src/tests/usr.bin/cc/t_fuzzer_timeout.sh \
src/tests/usr.bin/cc/t_msan_allocated_memory.sh \
src/tests/usr.bin/cc/t_msan_check_mem.sh \
src/tests/usr.bin/cc/t_msan_free.sh src/tests/usr.bin/cc/t_msan_heap.sh \
src/tests/usr.bin/cc/t_msan_partial_poison.sh \
src/tests/usr.bin/cc/t_msan_poison.sh \
src/tests/usr.bin/cc/t_msan_realloc.sh \
src/tests/usr.bin/cc/t_msan_shadow.sh \
src/tests/usr.bin/cc/t_msan_stack.sh \
src/tests/usr.bin/cc/t_msan_unpoison.sh \
src/tests/usr.bin/cc/t_tsan_data_race.sh \
src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/cc/t_tsan_signal_errno.sh \
src/tests/usr.bin/cc/t_tsan_thread_leak.sh

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



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

2019-08-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Aug 18 16:49:30 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Correct the memset(3)'s third argument in i386 biosdisk.c

The size of allocation is the size of the structure biosdisk, not the size
of a pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/i386/stand/lib/biosdisk.c

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

Modified files:

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.50 src/sys/arch/i386/stand/lib/biosdisk.c:1.51
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.50	Sun Aug 18 02:18:25 2019
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Sun Aug 18 16:49:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.50 2019/08/18 02:18:25 manu Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.51 2019/08/18 16:49:30 kamil Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -858,7 +858,7 @@ biosdisk_probe(void)
 			printf("Out of memory\n");
 			return;
 		}
-		memset(d, 0, sizeof(d));
+		memset(d, 0, sizeof(*d));
 		memset(&ed, 0, sizeof(ed));
 		if (i >= MAX_BIOSDISKS)
 			d->ll.dev = 0x00 + i - MAX_BIOSDISKS;	/* fd */



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

2019-08-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Aug 18 16:49:30 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Correct the memset(3)'s third argument in i386 biosdisk.c

The size of allocation is the size of the structure biosdisk, not the size
of a pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/i386/stand/lib/biosdisk.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-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 14:36:49 UTC 2019

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

Log Message:
Ticket #74-#80, #82-#83, #88-#89.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 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.22 src/doc/CHANGES-9.0:1.1.2.23
--- src/doc/CHANGES-9.0:1.1.2.22	Sun Aug 18 10:02:10 2019
+++ src/doc/CHANGES-9.0	Sun Aug 18 14:36:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.22 2019/08/18 10:02:10 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.23 2019/08/18 14:36:49 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -1943,3 +1943,94 @@ sys/arch/mac68k/mac68k/machdep.c		1.354
 	mac68k has switched to 8KB page size.
 	[rin, ticket #87]
 
+distrib/utils/libhack/strcasecmp.c		1.2-1.3
+
+	Fix (non locale aware) strcasecmp() for small install media.
+	[martin, ticket #74]
+
+distrib/common/Makefile.mdset			1.46
+distrib/evbarm/instkernel/instkernel/Makefile	1.32
+
+	Fix parallel build race resulting in non-bootable RPI install images.
+	[martin, ticket #75]
+
+usr.sbin/sysinst/partman.c			1.42
+
+	Make sure to completely initialize dynamic menu entries.
+	[martin, ticket #76]
+
+usr.sbin/sysinst/arch/arc/md.c			1.9
+usr.sbin/sysinst/arch/bebox/md.c		1.6
+usr.sbin/sysinst/arch/cobalt/md.c		1.9
+usr.sbin/sysinst/arch/evbarm/md.c		1.9
+usr.sbin/sysinst/arch/evbmips/md.c		1.6
+usr.sbin/sysinst/arch/evbppc/md.c		1.6
+usr.sbin/sysinst/arch/hpcarm/md.c		1.6
+usr.sbin/sysinst/arch/hpcmips/md.c		1.6
+usr.sbin/sysinst/arch/hpcsh/md.c		1.7
+usr.sbin/sysinst/arch/i386/md.c			1.21
+usr.sbin/sysinst/arch/landisk/md.c		1.11
+usr.sbin/sysinst/arch/ofppc/md.c		1.8
+usr.sbin/sysinst/arch/playstation2/md.c		1.6
+usr.sbin/sysinst/arch/prep/md.c			1.9
+usr.sbin/sysinst/arch/sandpoint/md.c		1.6
+usr.sbin/sysinst/arch/zaurus/md.c		1.6
+
+	When we ask the user to select a partitioning scheme and they refuse
+	(that is: select "Exit" in the menu), abort installation.
+	[martin, ticket #77]
+
+usr.sbin/sysinst/disklabel.c			1.12
+usr.sbin/sysinst/gpt.c1.10
+usr.sbin/sysinst/mbr.c1.20
+usr.sbin/sysinst/msg.mi.de			1.14
+usr.sbin/sysinst/msg.mi.en			1.20
+usr.sbin/sysinst/msg.mi.es			1.15
+usr.sbin/sysinst/msg.mi.fr			1.18
+usr.sbin/sysinst/msg.mi.pl			1.21
+usr.sbin/sysinst/partitions.c			1.2
+usr.sbin/sysinst/partitions.h			1.6
+
+	On architectures that usually do MBR/disklabel, nevertheless deal with
+	pure/plain disklabel disks, and explicitly offer this as partitioning
+	option when bootability is not a concern.
+	[martin, ticket #78]
+
+usr.sbin/sysinst/disklabel.c			1.13
+
+	Fix some "partition index" (as used in the abstract interface)
+	versus disklabel "partition letter" confusion.
+	[martin, ticket #79]
+
+usr.sbin/installboot/Makefile			1.53-1.54
+usr.sbin/installboot/machines.c			1.41-1.42
+
+	installboot(8#): only include a single target architecture in
+small (crunched) install media binaries.
+	[martin, ticket #80]
+
+usr.sbin/sysinst/msg.mi.de			1.15
+usr.sbin/sysinst/msg.mi.en			1.21
+usr.sbin/sysinst/msg.mi.es			1.16
+usr.sbin/sysinst/msg.mi.fr			1.19
+usr.sbin/sysinst/msg.mi.pl			1.22
+usr.sbin/sysinst/util.c1.30
+
+	PR 54473: fix error prompt when a set file is missing.
+	[martin, ticket #82]
+
+usr.sbin/sysinst/install.c			1.10-1.11
+usr.sbin/sysinst/util.c1.31
+
+	Fix some memory leaks in error paths and avoid double free.
+	[martin, ticket #83]
+
+sbin/fsck/partutil.c1.16
+
+	Fix memory leak.
+	[martin, ticket #88]
+
+usr.sbin/sysinst/checkrc.c			1.2
+
+	Fix memory leak (found by MKSANITIZER=yes build).
+	[martin, ticket #89]



CVS commit: [netbsd-9] src/doc

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 14:36:49 UTC 2019

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

Log Message:
Ticket #74-#80, #82-#83, #88-#89.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 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: src/sys/dev/sdmmc

2019-08-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 18 14:32:34 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmcdevs.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/sdmmc

2019-08-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 18 14:32:05 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs

Log Message:
Add Broadcom devices


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmcdevs

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/sdmmc/sdmmcdevs
diff -u src/sys/dev/sdmmc/sdmmcdevs:1.4 src/sys/dev/sdmmc/sdmmcdevs:1.5
--- src/sys/dev/sdmmc/sdmmcdevs:1.4	Sat Dec 29 04:58:52 2018
+++ src/sys/dev/sdmmc/sdmmcdevs	Sun Aug 18 14:32:04 2019
@@ -1,4 +1,4 @@
-	$NetBSD: sdmmcdevs,v 1.4 2018/12/29 04:58:52 thorpej Exp $
+	$NetBSD: sdmmcdevs,v 1.5 2019/08/18 14:32:04 mlelstv Exp $
 /*	$OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $	*/
 
 /*
@@ -24,6 +24,7 @@ vendor CGUYS			0x0092	C-guys, Inc.
 vendor TOSHIBA			0x0098	Toshiba
 vendor SOCKETCOM		0x0104	Socket Communications, Inc.
 vendor REALTEK			0x024c	Realtek
+vendor BROADCOM			0x0270	Broadcom
 vendor ATHEROS			0x0271	Atheros
 vendor SYCHIP			0x02db	SyChip Inc.
 vendor SPECTEC			0x02fe	Spectec Computer Co., Ltd
@@ -45,6 +46,20 @@ product ATHEROS AR6001_9	0x0109	AR6001
 product ATHEROS AR6001_a	0x010a	AR6001
 product ATHEROS AR6001_b	0x010b	AR6001
 
+/* Broadcom */ 
+product BROADCOM BCM4324	0x4324	BCM 4324
+product BROADCOM BCM4329	0x4329	BCM 4329
+product BROADCOM BCM4330	0x4330	BCM 4330
+product BROADCOM BCM4334	0x4334	BCM 4334
+product BROADCOM BCM4339	0x4339	BCM 4339
+product BROADCOM BCM4345	0x4345	BCM 4345
+product BROADCOM BCM4354	0x4354	BCM 4354
+product BROADCOM BCM43143	0xa887	BCM 43143
+product BROADCOM BCM43340	0xa94c	BCM 43140
+product BROADCOM BCM43341	0xa94d	BCM 43141
+product BROADCOM BCM43362	0xa962	BCM 43362
+product BROADCOM BCM43430	0xa9a6	BCM 43430
+
 /* C-guys, Inc. */
 product CGUYS TIACX100		0x0001	TI ACX100 SD-Link11b WiFi Card
 product CGUYS SDFMRADIO2	0x0005	C-guys SD FM Radio 2



CVS commit: src/sys/dev/sdmmc

2019-08-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 18 14:32:05 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs

Log Message:
Add Broadcom devices


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmcdevs

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



CVS commit: src/sys/dev/sdmmc

2019-08-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 18 14:32:34 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmcdevs.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/sdmmc/sdmmcdevs.h
diff -u src/sys/dev/sdmmc/sdmmcdevs.h:1.4 src/sys/dev/sdmmc/sdmmcdevs.h:1.5
--- src/sys/dev/sdmmc/sdmmcdevs.h:1.4	Sat Dec 29 04:59:33 2018
+++ src/sys/dev/sdmmc/sdmmcdevs.h	Sun Aug 18 14:32:34 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: sdmmcdevs.h,v 1.4 2018/12/29 04:59:33 thorpej Exp $	*/
+/*	$NetBSD: sdmmcdevs.h,v 1.5 2019/08/18 14:32:34 mlelstv Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *		NetBSD: sdmmcdevs,v 1.4 2018/12/29 04:58:52 thorpej Exp 
+ *		NetBSD: sdmmcdevs,v 1.5 2019/08/18 14:32:04 mlelstv Exp 
  */
 /*	$OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $	*/
 
@@ -31,6 +31,7 @@
 #define	SDMMC_VENDOR_TOSHIBA	0x0098	/* Toshiba */
 #define	SDMMC_VENDOR_SOCKETCOM	0x0104	/* Socket Communications, Inc. */
 #define	SDMMC_VENDOR_REALTEK	0x024c	/* Realtek */
+#define	SDMMC_VENDOR_BROADCOM	0x0270	/* Broadcom */
 #define	SDMMC_VENDOR_ATHEROS	0x0271	/* Atheros */
 #define	SDMMC_VENDOR_SYCHIP	0x02db	/* SyChip Inc. */
 #define	SDMMC_VENDOR_SPECTEC	0x02fe	/* Spectec Computer Co., Ltd */
@@ -57,6 +58,32 @@
 #define	SDMMC_CIS_ATHEROS_AR6001_b	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_ATHEROS_AR6001_b	0x010b
 
+/* Broadcom */ 
+#define	SDMMC_CIS_BROADCOM_BCM4324	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4324	0x4324
+#define	SDMMC_CIS_BROADCOM_BCM4329	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4329	0x4329
+#define	SDMMC_CIS_BROADCOM_BCM4330	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4330	0x4330
+#define	SDMMC_CIS_BROADCOM_BCM4334	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4334	0x4334
+#define	SDMMC_CIS_BROADCOM_BCM4339	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4339	0x4339
+#define	SDMMC_CIS_BROADCOM_BCM4345	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4345	0x4345
+#define	SDMMC_CIS_BROADCOM_BCM4354	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM4354	0x4354
+#define	SDMMC_CIS_BROADCOM_BCM43143	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM43143	0xa887
+#define	SDMMC_CIS_BROADCOM_BCM43340	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM43340	0xa94c
+#define	SDMMC_CIS_BROADCOM_BCM43341	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM43341	0xa94d
+#define	SDMMC_CIS_BROADCOM_BCM43362	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM43362	0xa962
+#define	SDMMC_CIS_BROADCOM_BCM43430	{ NULL, NULL, NULL, NULL }
+#define	SDMMC_PRODUCT_BROADCOM_BCM43430	0xa9a6
+
 /* C-guys, Inc. */
 #define	SDMMC_CIS_CGUYS_TIACX100	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_CGUYS_TIACX100	0x0001



CVS commit: src/usr.bin/tip

2019-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 18 14:16:02 UTC 2019

Modified Files:
src/usr.bin/tip: cu.c

Log Message:
check speed argument conversion (Thierry Laronde)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/tip/cu.c

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



CVS commit: src/usr.bin/tip

2019-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 18 14:16:02 UTC 2019

Modified Files:
src/usr.bin/tip: cu.c

Log Message:
check speed argument conversion (Thierry Laronde)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/tip/cu.c

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

Modified files:

Index: src/usr.bin/tip/cu.c
diff -u src/usr.bin/tip/cu.c:1.23 src/usr.bin/tip/cu.c:1.24
--- src/usr.bin/tip/cu.c:1.23	Sun Jan  3 10:38:29 2016
+++ src/usr.bin/tip/cu.c	Sun Aug 18 10:16:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cu.c,v 1.23 2016/01/03 15:38:29 christos Exp $	*/
+/*	$NetBSD: cu.c,v 1.24 2019/08/18 14:16:02 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,12 +31,13 @@
 
 #include 
 #include 
+#include 
 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cu.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: cu.c,v 1.23 2016/01/03 15:38:29 christos Exp $");
+__RCSID("$NetBSD: cu.c,v 1.24 2019/08/18 14:16:02 christos Exp $");
 #endif /* not lint */
 
 #include "tip.h"
@@ -50,7 +51,7 @@ __dead static void cuusage(void);
 void
 cumain(int argc, char *argv[])
 {
-	int c, i, phonearg = 0;
+	int c, i, phonearg = 0, e;
 	int parity = 0;		/* 0 is no parity */
 	int flow = -1;		/* -1 is "tandem" ^S/^Q */
 	static int helpme = 0, nostop = 0;
@@ -140,7 +141,10 @@ cumain(int argc, char *argv[])
 			useresc = -1;
 			break;
 		case 's':
-			BR = atoi(optarg);
+			BR = (long)strtoi(optarg, NULL, 0, 1, LONG_MAX, &e);
+			if (e)
+warnc(e, "Conversion of `%s' to a baud rate "
+"failed, using %ld", optarg, BR);
 			break;
 		case 'h':
 			HD = TRUE;



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:32:50 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: checkrc.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #89):
usr.sbin/sysinst/checkrc.c: revision 1.2
Fix memory leak (found by MKSANITIZER=yes build).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/checkrc.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:32:50 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: checkrc.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #89):
usr.sbin/sysinst/checkrc.c: revision 1.2
Fix memory leak (found by MKSANITIZER=yes build).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/checkrc.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/checkrc.c
diff -u src/usr.sbin/sysinst/checkrc.c:1.1 src/usr.sbin/sysinst/checkrc.c:1.1.30.1
--- src/usr.sbin/sysinst/checkrc.c:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/checkrc.c	Sun Aug 18 13:32:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: checkrc.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
+/* $NetBSD: checkrc.c,v 1.1.30.1 2019/08/18 13:32:50 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@ static int
 check(const char *varname, int filetocheck)
 {
 	char *buf;
+	int rv;
 
 	create_script(varname, filetocheck);
 
@@ -98,10 +99,9 @@ check(const char *varname, int filetoche
 		fflush(logfp);
 	}
 
-	if (strncmp(buf, "YES", strlen("YES")) == 0)
-		return 1;
-	else
-		return 0;
+	rv = strncmp(buf, "YES", strlen("YES")) == 0;
+	free(buf);
+	return rv;
 }
 
 int



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

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:31:21 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by martin in ticket #88):
sbin/fsck/partutil.c: revision 1.16
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.18.1 src/sbin/fsck/partutil.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/fsck

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:31:21 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by martin in ticket #88):
sbin/fsck/partutil.c: revision 1.16
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.18.1 src/sbin/fsck/partutil.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/fsck/partutil.c
diff -u src/sbin/fsck/partutil.c:1.15 src/sbin/fsck/partutil.c:1.15.18.1
--- src/sbin/fsck/partutil.c:1.15	Wed Jun  3 17:53:23 2015
+++ src/sbin/fsck/partutil.c	Sun Aug 18 13:31:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $	*/
+/*	$NetBSD: partutil.c,v 1.15.18.1 2019/08/18 13:31:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $");
+__RCSID("$NetBSD: partutil.c,v 1.15.18.1 2019/08/18 13:31:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -131,6 +131,8 @@ getdiskinfo(const char *s, int fd, const
 		geom_dict = prop_dictionary_get(disk_dict, "geometry");
 		dict2geom(geo, geom_dict);
 	}
+	if (disk_dict != NULL)
+		prop_object_release(disk_dict);
 
 	if (dkw == NULL)
 		return 0;



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:29:15 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: install.c util.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #83):
usr.sbin/sysinst/util.c: revision 1.31
usr.sbin/sysinst/install.c: revision 1.10
usr.sbin/sysinst/install.c: revision 1.11
Fix some memory leaks in error paths
Oops, avoid double free.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.2.1 src/usr.sbin/sysinst/install.c
cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/sysinst/util.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:29:15 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: install.c util.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #83):
usr.sbin/sysinst/util.c: revision 1.31
usr.sbin/sysinst/install.c: revision 1.10
usr.sbin/sysinst/install.c: revision 1.11
Fix some memory leaks in error paths
Oops, avoid double free.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.2.1 src/usr.sbin/sysinst/install.c
cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/sysinst/util.c

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

Modified files:

Index: src/usr.sbin/sysinst/install.c
diff -u src/usr.sbin/sysinst/install.c:1.9 src/usr.sbin/sysinst/install.c:1.9.2.1
--- src/usr.sbin/sysinst/install.c:1.9	Tue Jul 23 18:13:40 2019
+++ src/usr.sbin/sysinst/install.c	Sun Aug 18 13:29:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: install.c,v 1.9 2019/07/23 18:13:40 martin Exp $	*/
+/*	$NetBSD: install.c,v 1.9.2.1 2019/08/18 13:29:15 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -165,7 +165,7 @@ do_install(void)
 		if (!md_get_info(&install) ||
 		!md_make_bsd_partitions(&install)) {
 			hit_enter_to_continue(MSG_abort_inst, NULL);
-			return;
+			goto error;
 		}
 
 		/* Last chance ... do you really want to do this? */
@@ -173,7 +173,7 @@ do_install(void)
 		refresh();
 		msg_fmt_display(MSG_lastchance, "%s", pm->diskdev);
 		if (!ask_noyes(NULL))
-			return;
+			goto error;
 
 		/*
 		 * Check if we have a secondary partitioning and
@@ -194,19 +194,19 @@ do_install(void)
 		make_filesystems(&install) ||
 		make_fstab(&install) != 0 ||
 		md_post_newfs(&install) != 0)
-		return;
+		goto error;
 	}
 
 	/* Unpack the distribution. */
 	process_menu(MENU_distset, &retcode);
 	if (retcode == 0)
-		return;
+		goto error;
 	if (get_and_unpack_sets(0, MSG_disksetupdone,
 	MSG_extractcomplete, MSG_abortinst) != 0)
-		return;
+		goto error;
 
 	if (md_post_extract(&install) != 0)
-		return;
+		goto error;
 
 	do_configmenu(&install);
 
@@ -214,7 +214,8 @@ do_install(void)
 
 	md_cleanup_install(&install);
 
-	free(install.infos);
-
 	hit_enter_to_continue(MSG_instcomplete, NULL);
+
+error:
+	free(install.infos);
 }

Index: src/usr.sbin/sysinst/util.c
diff -u src/usr.sbin/sysinst/util.c:1.29.2.1 src/usr.sbin/sysinst/util.c:1.29.2.2
--- src/usr.sbin/sysinst/util.c:1.29.2.1	Sun Aug 18 13:25:21 2019
+++ src/usr.sbin/sysinst/util.c	Sun Aug 18 13:29:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.29.2.1 2019/08/18 13:25:21 msaitoh Exp $	*/
+/*	$NetBSD: util.c,v 1.29.2.2 2019/08/18 13:29:15 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -933,6 +933,7 @@ extract_file(distinfo *dist, int update)
 			1, &dist->name);
 			hit_enter_to_continue(err, NULL);
 			free(err);
+			free(owd);
 			return SET_RETRY;
 		}
 #ifdef SUPPORT_8_3_SOURCE_FILESYSTEM



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:25:21 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #82):
usr.sbin/sysinst/util.c: revision 1.30
usr.sbin/sysinst/msg.mi.fr: revision 1.19
usr.sbin/sysinst/msg.mi.de: revision 1.15
usr.sbin/sysinst/msg.mi.es: revision 1.16
usr.sbin/sysinst/msg.mi.pl: revision 1.22
usr.sbin/sysinst/msg.mi.en: revision 1.21
PR 54473: fix error prompt when a set file is missing


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.29 -r1.29.2.1 src/usr.sbin/sysinst/util.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:25:21 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #82):
usr.sbin/sysinst/util.c: revision 1.30
usr.sbin/sysinst/msg.mi.fr: revision 1.19
usr.sbin/sysinst/msg.mi.de: revision 1.15
usr.sbin/sysinst/msg.mi.es: revision 1.16
usr.sbin/sysinst/msg.mi.pl: revision 1.22
usr.sbin/sysinst/msg.mi.en: revision 1.21
PR 54473: fix error prompt when a set file is missing


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.29 -r1.29.2.1 src/usr.sbin/sysinst/util.c

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.de
diff -u src/usr.sbin/sysinst/msg.mi.de:1.13.2.1 src/usr.sbin/sysinst/msg.mi.de:1.13.2.2
--- src/usr.sbin/sysinst/msg.mi.de:1.13.2.1	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/msg.mi.de	Sun Aug 18 13:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.13.2.1 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.13.2.2 2019/08/18 13:25:21 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -679,8 +679,11 @@ Installation abgebrochen.}
 message delete_xfer_file
 {Nach der Installation löschen}
 
+/* Called with: 			Example
+ *  $0 = set name			base
+ */
 message notarfile
-{Das Release-Paket %s existiert nicht.}
+{Das Release-Paket $0 existiert nicht.}
 
 message endtarok
 {Alle Distributionspakete wurden erfolgreich entpackt.}

Index: src/usr.sbin/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.19.2.1 src/usr.sbin/sysinst/msg.mi.en:1.19.2.2
--- src/usr.sbin/sysinst/msg.mi.en:1.19.2.1	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/msg.mi.en	Sun Aug 18 13:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.19.2.1 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.19.2.2 2019/08/18 13:25:21 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -652,8 +652,11 @@ Install aborted.}
 message delete_xfer_file
 {Delete after install}
 
+/* Called with: 			Example
+ *  $0 = set name			base
+ */
 message notarfile
-{Release set %s does not exist.}
+{Release set $0 does not exist.}
 
 message endtarok
 {All selected distribution sets unpacked successfully.}

Index: src/usr.sbin/sysinst/msg.mi.es
diff -u src/usr.sbin/sysinst/msg.mi.es:1.14.2.1 src/usr.sbin/sysinst/msg.mi.es:1.14.2.2
--- src/usr.sbin/sysinst/msg.mi.es:1.14.2.1	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/msg.mi.es	Sun Aug 18 13:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.14.2.1 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.14.2.2 2019/08/18 13:25:21 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -668,8 +668,11 @@ Instalación interrumpida.}
 message delete_xfer_file
 {A eliminar después de la instalación}
 
+/* Called with: 			Example
+ *  $0 = set name			base
+ */
 message notarfile
-{El conjunto %s no existe.}
+{El conjunto $0 no existe.}
 
 message endtarok
 {Todos los conjuntos de distribución han sido desempaquetados

Index: src/usr.sbin/sysinst/msg.mi.fr
diff -u src/usr.sbin/sysinst/msg.mi.fr:1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr:1.17.2.2
--- src/usr.sbin/sysinst/msg.mi.fr:1.17.2.1	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/msg.mi.fr	Sun Aug 18 13:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.17.2.1 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.17.2.2 2019/08/18 13:25:21 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -684,8 +684,11 @@ message delete_xfer_file
 Effacer après l'installation
 }
 
+/* Called with: 			Example
+ *  $0 = set name			base
+ */
 message notarfile
-{Le composant %s n'existe pas.}
+{Le composant $0 n'existe pas.}
 
 message endtarok
 {

Index: src/usr.sbin/sysinst/msg.mi.pl
diff -u src/usr.sbin/sysinst/msg.mi.pl:1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl:1.20.2.2
--- src/usr.sbin/sysinst/msg.mi.pl:1.20.2.1	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/msg.mi.pl	Sun Aug 18 13:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.pl,v 1.20.2.1 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: msg.mi.pl,v 1.20.2.2 2019/08/18 13:25:21 msaitoh Exp $	*/
 /*	Based on english version: */
 /*	NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp   */
 
@@ -648,8 +648,11 @@ Instalacja przerwana.}
 message delete_xfer_file
 {Usun po zakonczeniu instalacji}
 
+/* Called with: 			Example
+ *  $0 =

CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:22:49 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: disklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #79):
usr.sbin/sysinst/disklabel.c: revision 1.13
Fix some "partition index" (as used in the abstract interface)
versus disklabel "partition letter" confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/usr.sbin/sysinst/disklabel.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:22:49 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: disklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #79):
usr.sbin/sysinst/disklabel.c: revision 1.13
Fix some "partition index" (as used in the abstract interface)
versus disklabel "partition letter" confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/usr.sbin/sysinst/disklabel.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/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.10.2.2 src/usr.sbin/sysinst/disklabel.c:1.10.2.3
--- src/usr.sbin/sysinst/disklabel.c:1.10.2.2	Sun Aug 18 13:21:40 2019
+++ src/usr.sbin/sysinst/disklabel.c	Sun Aug 18 13:22:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.10.2.2 2019/08/18 13:21:40 msaitoh Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.10.2.3 2019/08/18 13:22:49 msaitoh Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -814,9 +814,25 @@ disklabel_get_part_device(const struct d
 part_id ptn, char *devname, size_t max_devname_len, int *part,
 enum dev_name_usage which_name, bool with_path)
 {
+	const struct disklabel_disk_partitions *parts =
+	(const struct disklabel_disk_partitions*)arg;
+	part_id id;
+	int part_index;
+	char pname;
+
+	if (ptn >= parts->l.d_npartitions)
+		return false;
+
+	for (id = part_index = 0; id < ptn &&
+	part_index < parts->l.d_npartitions; part_index++)
+		if (parts->l.d_partitions[part_index].p_fstype != FS_UNUSED ||
+		parts->l.d_partitions[part_index].p_size != 0)
+			id++;
 
 	if (part != 0)
-		*part = ptn;
+		*part = part_index;
+
+	pname = 'a'+ part_index;
 
 	switch (which_name) {
 	case parent_device_only:
@@ -826,18 +842,18 @@ disklabel_get_part_device(const struct d
 	case plain_name:
 		if (with_path)
 			snprintf(devname, max_devname_len, _PATH_DEV "%s%c",
-			arg->disk, (char)ptn + 'a');
+			arg->disk, pname);
 		else
 			snprintf(devname, max_devname_len, "%s%c",
-			arg->disk, (char)ptn + 'a');
+			arg->disk, pname);
 		return true;
 	case raw_dev_name:
 		if (with_path)
 			snprintf(devname, max_devname_len, _PATH_DEV "r%s%c",
-			arg->disk, (char)ptn + 'a');
+			arg->disk, pname);
 		else
 			snprintf(devname, max_devname_len, "r%s%c",
-			arg->disk, (char)ptn + 'a');
+			arg->disk, pname);
 		return true;
 	}
 
@@ -1024,7 +1040,7 @@ disklabel_find_by_name(struct disk_parti
 	(const struct disklabel_disk_partitions*)arg;
 	char *sl, part;
 	ptrdiff_t n;
-	part_id pno;
+	part_id pno, id, i;
 
 	sl = strrchr(name, '/');
 	if (sl == NULL)
@@ -1040,7 +1056,11 @@ disklabel_find_by_name(struct disk_parti
 		return NO_PART;
 	if (parts->l.d_partitions[pno].p_fstype == FS_UNUSED)
 		return NO_PART;
-	return pno;
+	for (id = 0, i = 0; i < pno; i++)
+		if (parts->l.d_partitions[i].p_fstype != FS_UNUSED ||
+		parts->l.d_partitions[i].p_size != 0)
+			id++;
+	return id;
 }
 
 static void



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:21:40 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: disklabel.c gpt.c mbr.c msg.mi.de
msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl partitions.c partitions.h

Log Message:
Pull up following revision(s) (requested by martin in ticket #78):
usr.sbin/sysinst/gpt.c: revision 1.10
usr.sbin/sysinst/disklabel.c: revision 1.12
usr.sbin/sysinst/msg.mi.fr: revision 1.18
usr.sbin/sysinst/msg.mi.de: revision 1.14
usr.sbin/sysinst/partitions.c: revision 1.2
usr.sbin/sysinst/msg.mi.es: revision 1.15
usr.sbin/sysinst/msg.mi.pl: revision 1.21
usr.sbin/sysinst/partitions.h: revision 1.6
usr.sbin/sysinst/msg.mi.en: revision 1.20
usr.sbin/sysinst/mbr.c: revision 1.20
On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/usr.sbin/sysinst/gpt.c
cvs rdiff -u -r1.19 -r1.19.2.1 src/usr.sbin/sysinst/mbr.c \
src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.13 -r1.13.2.1 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.14 -r1.14.2.1 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17 -r1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.1 -r1.1.2.1 src/usr.sbin/sysinst/partitions.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.sbin/sysinst/partitions.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:21:40 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: disklabel.c gpt.c mbr.c msg.mi.de
msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl partitions.c partitions.h

Log Message:
Pull up following revision(s) (requested by martin in ticket #78):
usr.sbin/sysinst/gpt.c: revision 1.10
usr.sbin/sysinst/disklabel.c: revision 1.12
usr.sbin/sysinst/msg.mi.fr: revision 1.18
usr.sbin/sysinst/msg.mi.de: revision 1.14
usr.sbin/sysinst/partitions.c: revision 1.2
usr.sbin/sysinst/msg.mi.es: revision 1.15
usr.sbin/sysinst/msg.mi.pl: revision 1.21
usr.sbin/sysinst/partitions.h: revision 1.6
usr.sbin/sysinst/msg.mi.en: revision 1.20
usr.sbin/sysinst/mbr.c: revision 1.20
On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/usr.sbin/sysinst/gpt.c
cvs rdiff -u -r1.19 -r1.19.2.1 src/usr.sbin/sysinst/mbr.c \
src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.13 -r1.13.2.1 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.14 -r1.14.2.1 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17 -r1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.1 -r1.1.2.1 src/usr.sbin/sysinst/partitions.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.sbin/sysinst/partitions.h

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

Modified files:

Index: src/usr.sbin/sysinst/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.10.2.1 src/usr.sbin/sysinst/disklabel.c:1.10.2.2
--- src/usr.sbin/sysinst/disklabel.c:1.10.2.1	Thu Aug  8 05:51:43 2019
+++ src/usr.sbin/sysinst/disklabel.c	Sun Aug 18 13:21:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.10.2.1 2019/08/08 05:51:43 msaitoh Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.10.2.2 2019/08/18 13:21:40 msaitoh Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -164,7 +164,8 @@ disklabel_parts_new(const char *dev, dad
 }
 
 static struct disk_partitions *
-disklabel_parts_read(const char *disk, daddr_t start, daddr_t len)
+disklabel_parts_read(const char *disk, daddr_t start, daddr_t len,
+const struct disk_partitioning_scheme *scheme)
 {
 	int fd;
 	char diskpath[MAXPATHLEN];
@@ -214,7 +215,7 @@ disklabel_parts_read(const char *disk, d
 
 	if (len > disklabel_parts.size_limit)
 		len = disklabel_parts.size_limit;
-	parts->dp.pscheme = &disklabel_parts;
+	parts->dp.pscheme = scheme;
 	parts->dp.disk = disk;
 	parts->dp.disk_start = start;
 	parts->dp.disk_size = parts->dp.free_space = len;

Index: src/usr.sbin/sysinst/gpt.c
diff -u src/usr.sbin/sysinst/gpt.c:1.6.2.3 src/usr.sbin/sysinst/gpt.c:1.6.2.4
--- src/usr.sbin/sysinst/gpt.c:1.6.2.3	Thu Aug  8 05:51:43 2019
+++ src/usr.sbin/sysinst/gpt.c	Sun Aug 18 13:21:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt.c,v 1.6.2.3 2019/08/08 05:51:43 msaitoh Exp $	*/
+/*	$NetBSD: gpt.c,v 1.6.2.4 2019/08/18 13:21:40 msaitoh Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -249,7 +249,8 @@ update_part_from_wedge_info(struct gpt_d
 }
 
 static struct disk_partitions *
-gpt_read_from_disk(const char *dev, daddr_t start, daddr_t len)
+gpt_read_from_disk(const char *dev, daddr_t start, daddr_t len,
+const struct disk_partitioning_scheme *scheme)
 {
 	char diskpath[MAXPATHLEN];
 	int fd;
@@ -362,7 +363,7 @@ gpt_read_from_disk(const char *dev, dadd
 		return NULL;
 	}
 
-	parts->dp.pscheme = &gpt_parts;
+	parts->dp.pscheme = scheme;
 	parts->dp.disk = dev;
 	parts->dp.disk_start = start;
 	parts->dp.disk_size = disk_size;

Index: src/usr.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.19 src/usr.sbin/sysinst/mbr.c:1.19.2.1
--- src/usr.sbin/sysinst/mbr.c:1.19	Fri Jul 26 08:18:47 2019
+++ src/usr.sbin/sysinst/mbr.c	Sun Aug 18 13:21:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.19 2019/07/26 08:18:47 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.19.2.1 2019/08/18 13:21:40 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -880,7 +880,8 @@ mbr_calc_free_space(struct mbr_disk_part
 }
 
 static struct disk_partitions *
-mbr_read_from_disk(const char *disk, daddr_t start, daddr_t len)
+mbr_read_from_disk(const char *disk, daddr_t start, daddr_t len,
+const struct disk_partitioning_scheme *scheme)
 {
 	struct mbr_disk_partitions *parts;
 
@@ -892,7 +893,7 @@ mbr_read_from_disk(const char *disk, dad
 	if (!parts)
 		return NULL;
 
-	parts->dp.pscheme = &mbr_parts;
+	parts->dp.pscheme = scheme;
 	parts->dp.disk = disk;
 	if (len >= mbr_parts.size_limit)
 		len = mbr_parts.size_limit;
@@ -1629,7 +1630,8 @@ mbr_read_disklabel(struct disk_partition
 
 		if (!force_emp

CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:19:53 UTC 2019

Modified Files:
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #77):
usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.6
usr.sbin/sysinst/arch/playstation2/md.c: revision 1.6
usr.sbin/sysinst/arch/evbppc/md.c: revision 1.6
usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.6
usr.sbin/sysinst/arch/zaurus/md.c: revision 1.6
usr.sbin/sysinst/arch/arc/md.c: revision 1.9
usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.6
usr.sbin/sysinst/arch/bebox/md.c: revision 1.6
usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.7
usr.sbin/sysinst/arch/landisk/md.c: revision 1.11
usr.sbin/sysinst/arch/prep/md.c: revision 1.9
usr.sbin/sysinst/arch/i386/md.c: revision 1.21
usr.sbin/sysinst/arch/evbmips/md.c: revision 1.6
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.9
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.9
usr.sbin/sysinst/arch/ofppc/md.c: revision 1.8
When we ask the user to select a partitioning scheme and they refuse
(that is: select "Exit" in the menu), abort installation.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/arc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/bebox/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/cobalt/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/evbarm/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbmips/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbppc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcarm/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcmips/md.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/hpcsh/md.c
cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/arch/ofppc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/playstation2/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/prep/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/sandpoint/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/zaurus/md.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/usr.sbin/sysinst/arch

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:19:53 UTC 2019

Modified Files:
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #77):
usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.6
usr.sbin/sysinst/arch/playstation2/md.c: revision 1.6
usr.sbin/sysinst/arch/evbppc/md.c: revision 1.6
usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.6
usr.sbin/sysinst/arch/zaurus/md.c: revision 1.6
usr.sbin/sysinst/arch/arc/md.c: revision 1.9
usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.6
usr.sbin/sysinst/arch/bebox/md.c: revision 1.6
usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.7
usr.sbin/sysinst/arch/landisk/md.c: revision 1.11
usr.sbin/sysinst/arch/prep/md.c: revision 1.9
usr.sbin/sysinst/arch/i386/md.c: revision 1.21
usr.sbin/sysinst/arch/evbmips/md.c: revision 1.6
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.9
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.9
usr.sbin/sysinst/arch/ofppc/md.c: revision 1.8
When we ask the user to select a partitioning scheme and they refuse
(that is: select "Exit" in the menu), abort installation.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/arc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/bebox/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/cobalt/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/evbarm/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbmips/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbppc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcarm/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcmips/md.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/hpcsh/md.c
cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/arch/ofppc/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/playstation2/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/prep/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/sandpoint/md.c
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/zaurus/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/arc/md.c
diff -u src/usr.sbin/sysinst/arch/arc/md.c:1.8 src/usr.sbin/sysinst/arch/arc/md.c:1.8.2.1
--- src/usr.sbin/sysinst/arch/arc/md.c:1.8	Sat Jul 13 17:13:36 2019
+++ src/usr.sbin/sysinst/arch/arc/md.c	Sun Aug 18 13:19:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8 2019/07/13 17:13:36 martin Exp $ */
+/*	$NetBSD: md.c,v 1.8.2.1 2019/08/18 13:19:51 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -75,7 +75,7 @@ md_get_info(struct install_partition_des
 		select_part_scheme(pm, NULL, true, NULL);
 
 		if (!ps)
-			return true;
+			return false;
 
 		struct disk_partitions *parts =
 		   (*ps->create_new_for_disk)(pm->diskdev,

Index: src/usr.sbin/sysinst/arch/bebox/md.c
diff -u src/usr.sbin/sysinst/arch/bebox/md.c:1.5 src/usr.sbin/sysinst/arch/bebox/md.c:1.5.2.1
--- src/usr.sbin/sysinst/arch/bebox/md.c:1.5	Sat Jul 13 17:13:36 2019
+++ src/usr.sbin/sysinst/arch/bebox/md.c	Sun Aug 18 13:19:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.5 2019/07/13 17:13:36 martin Exp $ */
+/*	$NetBSD: md.c,v 1.5.2.1 2019/08/18 13:19:52 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -68,7 +68,7 @@ md_get_info(struct install_partition_des
 		select_part_scheme(pm, NULL, true, NULL);
 
 		if (!ps)
-			return true;
+			return false;
 
 		struct disk_partitions *parts =
 		   (*ps->create_new_for_disk)(pm->diskdev,

Index: src/usr.sbin/sysinst/arch/cobalt/md.c
diff -u src/usr.sbin/sysinst/arch/cobalt/md.c:1.8 src/usr.sbin/sysinst/arch/cobalt/md.c:1.8.2.1
--- src/usr.sbin/sysinst/arch/cobalt/md.c:1.8	Sat

CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:17:39 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: partman.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #76):
usr.sbin/sysinst/partman.c: revision 1.42
Make sure to completely initialize dynamic menu entries.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.2.1 src/usr.sbin/sysinst/partman.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/usr.sbin/sysinst

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:17:39 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: partman.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #76):
usr.sbin/sysinst/partman.c: revision 1.42
Make sure to completely initialize dynamic menu entries.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.2.1 src/usr.sbin/sysinst/partman.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/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.41 src/usr.sbin/sysinst/partman.c:1.41.2.1
--- src/usr.sbin/sysinst/partman.c:1.41	Thu Jul 25 19:01:08 2019
+++ src/usr.sbin/sysinst/partman.c	Sun Aug 18 13:17:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.41 2019/07/25 19:01:08 martin Exp $ */
+/*	$NetBSD: partman.c,v 1.41.2.1 2019/08/18 13:17:39 msaitoh Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -2802,8 +2802,7 @@ pm_upddevlist(menudesc *m, void *arg)
 		return -1;
 
 	SLIST_FOREACH(pm_i, &pm_head, l) {
-		m->opts[i].opt_name = NULL;
-		m->opts[i].opt_exp_name = NULL;
+		memset(&m->opts[i], 0, sizeof m->opts[i]);
 		m->opts[i].opt_action = pm_submenu;
 		((struct part_entry *)arg)[i].dev_ptr = pm_i;
 		((struct part_entry *)arg)[i].id = NO_PART;
@@ -2837,8 +2836,7 @@ pm_upddevlist(menudesc *m, void *arg)
 if (i >= MAX_ENTRIES)
 	break;
 i++;
-m->opts[i].opt_name = NULL;
-m->opts[i].opt_exp_name = NULL;
+memset(&m->opts[i], 0, sizeof m->opts[i]);
 m->opts[i].opt_action = pm_submenu;
 ((struct part_entry *)arg)[i].parts =
 pm_i->parts;
@@ -2860,8 +2858,7 @@ pm_upddevlist(menudesc *m, void *arg)
 if (i >= MAX_ENTRIES)
 	break;
 i++;
-m->opts[i].opt_name = NULL;
-m->opts[i].opt_exp_name = NULL;
+memset(&m->opts[i], 0, sizeof m->opts[i]);
 m->opts[i].opt_action = pm_submenu;
 ((struct part_entry *)arg)[i].parts = secondary;
 ((struct part_entry *)arg)[i].dev_ptr = pm_i;



CVS commit: [netbsd-9] src/distrib

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:14:26 UTC 2019

Modified Files:
src/distrib/common [netbsd-9]: Makefile.mdset
src/distrib/evbarm/instkernel/instkernel [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by martin in ticket #75):
distrib/evbarm/instkernel/instkernel/Makefile: revision 1.32
distrib/common/Makefile.mdset: revision 1.46
Allow individual MDSETTARGETS/MDSET_SUFFIXES to define optional dependencies
between themselves.
Use that to make netbsd-RPI_INSTALL.img depend on netbsd-RPI_INSTALL.bin,
resolving the parallel build race.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.2.1 src/distrib/common/Makefile.mdset
cvs rdiff -u -r1.31 -r1.31.2.1 \
src/distrib/evbarm/instkernel/instkernel/Makefile

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

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.43 src/distrib/common/Makefile.mdset:1.43.2.1
--- src/distrib/common/Makefile.mdset:1.43	Wed Feb  6 07:33:08 2019
+++ src/distrib/common/Makefile.mdset	Sun Aug 18 13:14:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.43 2019/02/06 07:33:08 mrg Exp $
+#	$NetBSD: Makefile.mdset,v 1.43.2.1 2019/08/18 13:14:26 msaitoh Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -94,7 +94,7 @@ _KERNEL.${_K}.${_F}:=	${_F}
 .for _S _C in ${MDSET_SUFFIXES.${_F}}		# {
 CLEANFILES+=	${_KERNEL.${_K}.${_F}}.${_S}
 
-${_KERNEL.${_K}.${_F}}.${_S}: ${_KERNEL.${_K}.${_F}}
+${_KERNEL.${_K}.${_F}}.${_S}: ${_KERNEL.${_K}.${_F}} ${MDSET_.${_K}.${_F}.${_S}.deps}
 .if defined(${_C})
 	${${_C}}
 .else

Index: src/distrib/evbarm/instkernel/instkernel/Makefile
diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.31 src/distrib/evbarm/instkernel/instkernel/Makefile:1.31.2.1
--- src/distrib/evbarm/instkernel/instkernel/Makefile:1.31	Sat May 18 07:33:10 2019
+++ src/distrib/evbarm/instkernel/instkernel/Makefile	Sun Aug 18 13:14:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2019/05/18 07:33:10 skrll Exp $
+#	$NetBSD: Makefile,v 1.31.2.1 2019/08/18 13:14:26 msaitoh Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -15,6 +15,7 @@ MDSETTARGETS=
 .if ${i} == "RPI_INSTALL"
 MDSETTARGETS+=		${i}	${SSHRAMDISK}	netbsd-${i}
 MDSET_SUFFIXES.netbsd-${i}=	bin create-bin  img create-img
+MDSET_.RPI_INSTALL.netbsd-RPI_INSTALL.img.deps=	netbsd-RPI_INSTALL.bin
 .else
 MDSETTARGETS+=		${i}	${RAMDISK}	-
 .endif



CVS commit: [netbsd-9] src/distrib

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:14:26 UTC 2019

Modified Files:
src/distrib/common [netbsd-9]: Makefile.mdset
src/distrib/evbarm/instkernel/instkernel [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by martin in ticket #75):
distrib/evbarm/instkernel/instkernel/Makefile: revision 1.32
distrib/common/Makefile.mdset: revision 1.46
Allow individual MDSETTARGETS/MDSET_SUFFIXES to define optional dependencies
between themselves.
Use that to make netbsd-RPI_INSTALL.img depend on netbsd-RPI_INSTALL.bin,
resolving the parallel build race.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.43.2.1 src/distrib/common/Makefile.mdset
cvs rdiff -u -r1.31 -r1.31.2.1 \
src/distrib/evbarm/instkernel/instkernel/Makefile

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



CVS commit: [netbsd-9] src/distrib/utils/libhack

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:12:27 UTC 2019

Modified Files:
src/distrib/utils/libhack [netbsd-9]: strcasecmp.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #74):
distrib/utils/libhack/strcasecmp.c: revision 1.2
distrib/utils/libhack/strcasecmp.c: revision 1.3
Make this at least work for ASCII strings (there are way more users
than libcurses in various crunched environments, so the original assumption
of a very limited set of inputs was wrong).
use unsigned char to prevent sign extension.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/distrib/utils/libhack/strcasecmp.c

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

Modified files:

Index: src/distrib/utils/libhack/strcasecmp.c
diff -u src/distrib/utils/libhack/strcasecmp.c:1.1 src/distrib/utils/libhack/strcasecmp.c:1.1.2.1
--- src/distrib/utils/libhack/strcasecmp.c:1.1	Sun Jul 28 10:21:18 2019
+++ src/distrib/utils/libhack/strcasecmp.c	Sun Aug 18 13:12:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: strcasecmp.c,v 1.1 2019/07/28 10:21:18 martin Exp $	*/
+/*	$NetBSD: strcasecmp.c,v 1.1.2.1 2019/08/18 13:12:27 msaitoh Exp $	*/
 
 /*
  * Written by Martin Husemann 
@@ -8,13 +8,21 @@
 #include 
 
 /*
- * Cheap and dirty strcasecmp() - implements just enough
- * for our libcurses in crunched environments: since we
- * know all compared strings are fixed, uppercase, and plain ASCII,
- * just use strcmp()
+ * Simple strcasecmp, try to avoid pulling in real locales
  */
 int
 strcasecmp(const char *s1, const char *s2)
 {
-	return strcmp(s1, s2);
+	unsigned char c1, c2;
+
+	do {
+		c1 = *s1++;
+		c2 = *s2++;
+		if (c1 >= 'A' && c1 <= 'Z')
+			c1 += 'a' - 'A';
+		if (c2 >= 'A' && c2 <= 'Z')
+			c2 += 'a' - 'A';
+	} while (c1 == c2 && c1 != 0 && c2 != 0);
+
+	return ((c1 == c2) ? 0 : ((c1 > c2) ? 1 : -1));
 }



CVS commit: [netbsd-9] src/distrib/utils/libhack

2019-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Aug 18 13:12:27 UTC 2019

Modified Files:
src/distrib/utils/libhack [netbsd-9]: strcasecmp.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #74):
distrib/utils/libhack/strcasecmp.c: revision 1.2
distrib/utils/libhack/strcasecmp.c: revision 1.3
Make this at least work for ASCII strings (there are way more users
than libcurses in various crunched environments, so the original assumption
of a very limited set of inputs was wrong).
use unsigned char to prevent sign extension.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/distrib/utils/libhack/strcasecmp.c

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



CVS commit: src/share/man/man4

2019-08-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Aug 18 11:53:23 UTC 2019

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

Log Message:
G/C mention of SCIOCREPROBE, removed in 1998.

Thanks to Hiroyuki Bessho in PR kern/34146


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/scsi.4

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



CVS commit: src/share/man/man4

2019-08-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Aug 18 11:53:23 UTC 2019

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

Log Message:
G/C mention of SCIOCREPROBE, removed in 1998.

Thanks to Hiroyuki Bessho in PR kern/34146


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/scsi.4

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

Modified files:

Index: src/share/man/man4/scsi.4
diff -u src/share/man/man4/scsi.4:1.31 src/share/man/man4/scsi.4:1.32
--- src/share/man/man4/scsi.4:1.31	Sun Nov 20 07:02:21 2016
+++ src/share/man/man4/scsi.4	Sun Aug 18 11:53:23 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsi.4,v 1.31 2016/11/20 07:02:21 dholland Exp $
+.\"	$NetBSD: scsi.4,v 1.32 2019/08/18 11:53:23 maya Exp $
 .\" Copyright (c) 1996
 .\"	Julian Elischer .  All rights reserved.
 .\"
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 26, 2006
+.Dd August 18, 2019
 .Dt SCSI 4
 .Os
 .Sh NAME
@@ -239,15 +239,6 @@ The
 call will return a successful status even if the device rejected the command.
 As all status is returned to the user, it is up to the user
 process to examine this information to decide the success of the command.
-.It Dv SCIOCREPROBE
-Ask the system to probe the
-.Tn SCSI
-busses for any new devices.
-If it finds any, they will be attached to the appropriate drivers.
-The search can be narrowed to a specific bus, target or Logical
-Unit Number (LUN).
-The new device may or may not be related to the device on which
-the ioctl was performed.
 .It Dv SCIOCIDENTIFY
 Ask the driver what its bus, target and LUN are.
 .It Dv SCIOCDECONFIG



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 11:46:38 UTC 2019

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

Log Message:
regen and add kue adapters:

ACTIONTEC KL5KUSB101 USB Ethernet adapter
ALLIEDTELESYN AT-USB10 USB Ethernet Adapter
SILICOM Psion Gold Port Ethernet (existing usbdevs entry)


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/usb/if_kue.c
cvs rdiff -u -r1.761 -r1.762 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 11:45:23 UTC 2019

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

Log Message:
add two kue(4) adapters:
ACTIONTEC KL5KUSB101 USB Ethernet adapter
ALLIEDTELESYN AT-USB10 USB Ethernet Adapter


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.771 src/sys/dev/usb/usbdevs:1.772
--- src/sys/dev/usb/usbdevs:1.771	Sun Aug 18 09:05:31 2019
+++ src/sys/dev/usb/usbdevs	Sun Aug 18 11:45:23 2019
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.771 2019/08/18 09:05:31 mrg Exp $
+$NetBSD: usbdevs,v 1.772 2019/08/18 11:45:23 mrg Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -724,6 +724,7 @@ product ACERW WARPLINK		0x0204	Warplink
 product ACTIONTEC PRISM_25	0x0408	Prism2.5 WLAN
 product ACTIONTEC PRISM_25A	0x0421	Prism2.5 WLAN A
 product ACTIONTEC AR9287	0x1200	AR9287+AR7010
+product ACTIONTEC KL5KUSB101	0x1200	KL5KUSB101 USB Ethernet adapter
 product ACTIONTEC FREELAN	0x6106	ROPEX FreeLan 802.11b
 product ACTIONTEC UAT1		0x7605	UAT1 Wireless Ethernet adapter
 
@@ -3067,6 +3068,9 @@ product SIGMATEL I_BEAD150	0x8009	i-Bead
 product SIGMATEL DNSSF7X	0x8020	Datum Networks SSF-7X Multi Players
 product SIGMATEL MUSICSTICK	0x8134	TrekStor Musicstick
 
+/* Allied Telesyn products */
+product ALLIEDTELESYN AT_USB10	0x07c9	AT-USB10 USB Ethernet Adapter
+
 /* SIIG products */
 product SIIG DIGIFILMREADER	0x0004	DigiFilm-Combo Reader
 product SIIG UISDMC2S		0x0200	MULTICARDREADER



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 11:45:23 UTC 2019

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

Log Message:
add two kue(4) adapters:
ACTIONTEC KL5KUSB101 USB Ethernet adapter
ALLIEDTELESYN AT-USB10 USB Ethernet Adapter


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

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-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 11:11:48 UTC 2019

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

Log Message:
Fix memory leak (found by MKSANITIZER=yes build).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/checkrc.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-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 11:11:48 UTC 2019

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

Log Message:
Fix memory leak (found by MKSANITIZER=yes build).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/checkrc.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/checkrc.c
diff -u src/usr.sbin/sysinst/checkrc.c:1.1 src/usr.sbin/sysinst/checkrc.c:1.2
--- src/usr.sbin/sysinst/checkrc.c:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/checkrc.c	Sun Aug 18 11:11:48 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: checkrc.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
+/* $NetBSD: checkrc.c,v 1.2 2019/08/18 11:11:48 martin Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@ static int
 check(const char *varname, int filetocheck)
 {
 	char *buf;
+	int rv;
 
 	create_script(varname, filetocheck);
 
@@ -98,10 +99,9 @@ check(const char *varname, int filetoche
 		fflush(logfp);
 	}
 
-	if (strncmp(buf, "YES", strlen("YES")) == 0)
-		return 1;
-	else
-		return 0;
+	rv = strncmp(buf, "YES", strlen("YES")) == 0;
+	free(buf);
+	return rv;
 }
 
 int



CVS commit: src/sbin/fsck

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 11:08:57 UTC 2019

Modified Files:
src/sbin/fsck: partutil.c

Log Message:
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck/partutil.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/fsck/partutil.c
diff -u src/sbin/fsck/partutil.c:1.15 src/sbin/fsck/partutil.c:1.16
--- src/sbin/fsck/partutil.c:1.15	Wed Jun  3 17:53:23 2015
+++ src/sbin/fsck/partutil.c	Sun Aug 18 11:08:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $	*/
+/*	$NetBSD: partutil.c,v 1.16 2019/08/18 11:08:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: partutil.c,v 1.15 2015/06/03 17:53:23 martin Exp $");
+__RCSID("$NetBSD: partutil.c,v 1.16 2019/08/18 11:08:56 martin Exp $");
 
 #include 
 #include 
@@ -131,6 +131,8 @@ getdiskinfo(const char *s, int fd, const
 		geom_dict = prop_dictionary_get(disk_dict, "geometry");
 		dict2geom(geo, geom_dict);
 	}
+	if (disk_dict != NULL)
+		prop_object_release(disk_dict);
 
 	if (dkw == NULL)
 		return 0;



CVS commit: src/sbin/fsck

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 11:08:57 UTC 2019

Modified Files:
src/sbin/fsck: partutil.c

Log Message:
Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck/partutil.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-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 10:02:11 UTC 2019

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

Log Message:
Tickets #81, #84, #85, #86, #87


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 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-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 10:02:11 UTC 2019

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

Log Message:
Tickets #81, #84, #85, #86, #87


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 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.21 src/doc/CHANGES-9.0:1.1.2.22
--- src/doc/CHANGES-9.0:1.1.2.21	Fri Aug 16 19:31:27 2019
+++ src/doc/CHANGES-9.0	Sun Aug 18 10:02:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.21 2019/08/16 19:31:27 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.22 2019/08/18 10:02:10 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -1913,3 +1913,33 @@ sbin/fsck_lfs/main.c1.54
 	fsck: Stop defining the same variable concurrently in bss and data.
 	[kamil, ticket #73]
 
+sys/kern/subr_pool.c1.253-1.255
+
+	Kernel Heap Hardening: perform certain sanity checks on the pool
+	caches directly, to immediately detect certain bugs that would
+	otherwise have been detected only later on the pool layer.
+	[maxv, ticket #81]
+
+sys/arch/mac68k/conf/WSFB.common		1.2
+sys/arch/mac68k/conf/WSFB.common		1.3
+
+	Mimic macppc color/font settings, which also reduces differences b/w
+	color and monochrome color depths.
+	Add commented out GENFB_SHADOWFB option.
+	[rin, ticket #84]
+
+sys/external/bsd/drm2/i915drm/intelfb.c		1.17
+
+	Fix PR kern/52229: correct stride for intelfb(4).
+	[rin, ticket #85]
+
+sys/dev/pci/radeonfb.c1.105
+
+	Support bitmap fonts with stride 4 (i.e., width 17 to 32).
+	[rin, ticket #86]
+
+sys/arch/mac68k/mac68k/machdep.c		1.354
+
+	mac68k has switched to 8KB page size.
+	[rin, ticket #87]
+



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

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 10:00:41 UTC 2019

Modified Files:
src/sys/arch/mac68k/mac68k [netbsd-9]: machdep.c

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

sys/arch/mac68k/mac68k/machdep.c: revision 1.354

We've switched to 8KB page.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.353.2.1 src/sys/arch/mac68k/mac68k/machdep.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/arch/mac68k/mac68k

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 10:00:41 UTC 2019

Modified Files:
src/sys/arch/mac68k/mac68k [netbsd-9]: machdep.c

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

sys/arch/mac68k/mac68k/machdep.c: revision 1.354

We've switched to 8KB page.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.353.2.1 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.353 src/sys/arch/mac68k/mac68k/machdep.c:1.353.2.1
--- src/sys/arch/mac68k/mac68k/machdep.c:1.353	Fri Jul 26 10:48:44 2019
+++ src/sys/arch/mac68k/mac68k/machdep.c	Sun Aug 18 10:00:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.353 2019/07/26 10:48:44 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.353.2.1 2019/08/18 10:00:41 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353 2019/07/26 10:48:44 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353.2.1 2019/08/18 10:00:41 martin Exp $");
 
 #include "opt_adb.h"
 #include "opt_copy_symtab.h"
@@ -812,7 +812,7 @@ int	get_top_of_ram(void);
 int
 get_top_of_ram(void)
 {
-	return ((mac68k_machine.mach_memsize * (1024 * 1024)) - 4096);
+	return ((mac68k_machine.mach_memsize * (1024 * 1024)) - PAGE_SIZE);
 }
 
 /*



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

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:58:49 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: radeonfb.c

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

sys/dev/pci/radeonfb.c: revision 1.105

Support bitmap fonts with stride 4 (i.e., width 17 to 32).


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.104.4.1 src/sys/dev/pci/radeonfb.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/pci

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:58:49 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: radeonfb.c

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

sys/dev/pci/radeonfb.c: revision 1.105

Support bitmap fonts with stride 4 (i.e., width 17 to 32).


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.104.4.1 src/sys/dev/pci/radeonfb.c

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

Modified files:

Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.104 src/sys/dev/pci/radeonfb.c:1.104.4.1
--- src/sys/dev/pci/radeonfb.c:1.104	Wed Mar 27 22:00:33 2019
+++ src/sys/dev/pci/radeonfb.c	Sun Aug 18 09:58:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.104 2019/03/27 22:00:33 macallan Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.104.4.1 2019/08/18 09:58:49 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.104 2019/03/27 22:00:33 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.104.4.1 2019/08/18 09:58:49 martin Exp $");
 
 #include 
 #include 
@@ -2931,6 +2931,7 @@ radeonfb_putchar(void *cookie, int row, 
 	uint32_t		reg;
 	uint8_t			*data8;
 	uint16_t		*data16;
+	uint32_t		*data32;
 	void			*data;
 
 	if (dp->rd_wsmode != WSDISPLAYIO_MODE_EMUL)
@@ -3009,6 +3010,16 @@ radeonfb_putchar(void *cookie, int row, 
 			}
 			break;
 		}
+		case 4: {
+			data32 = data;
+			for (i = 0; i < h; i++) {
+reg = *data32;
+bus_space_write_stream_4(sc->sc_regt, 
+sc->sc_regh, RADEON_HOST_DATA0, reg);
+data32++;
+			}
+			break;
+		}
 	}
 	if (attr & 1)
 		radeonfb_rectfill(dp, xd, yd + h - 2, w, 1, fg);



CVS commit: [netbsd-9] src/sys/external/bsd/drm2/i915drm

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:57:40 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/i915drm [netbsd-9]: intelfb.c

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

sys/external/bsd/drm2/i915drm/intelfb.c: revision 1.17

PR kern/52229:

Correct linebytes (stride) for intelfb(4), which fixes screen
corruption on the following machines:
- MacBookAir5,2 (Ivy Bridge, 13-inch, Mid 2012)
- MacBookAir6,1 (Haswell, 11-inch, Early 2014)

Now, wsdisplay(4) console as well as intel(4) driver of Xorg
works fine on these machines.

Also there's no side effects found on another machine:
- ThinkPad T480s (Kaby Lake R)

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/external/bsd/drm2/i915drm/intelfb.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/drm2/i915drm/intelfb.c
diff -u src/sys/external/bsd/drm2/i915drm/intelfb.c:1.16 src/sys/external/bsd/drm2/i915drm/intelfb.c:1.16.4.1
--- src/sys/external/bsd/drm2/i915drm/intelfb.c:1.16	Sat Dec  1 01:56:30 2018
+++ src/sys/external/bsd/drm2/i915drm/intelfb.c	Sun Aug 18 09:57:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: intelfb.c,v 1.16 2018/12/01 01:56:30 msaitoh Exp $	*/
+/*	$NetBSD: intelfb.c,v 1.16.4.1 2019/08/18 09:57:40 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.16 2018/12/01 01:56:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.16.4.1 2019/08/18 09:57:40 martin Exp $");
 
 #include 
 #include 
@@ -166,14 +166,12 @@ intelfb_attach_task(struct i915drmkms_ta
 	struct intelfb_softc *const sc = container_of(task,
 	struct intelfb_softc, sc_attach_task);
 	const struct intelfb_attach_args *const ifa = &sc->sc_ifa;
-	const struct drm_fb_helper_surface_size *const sizes = &ifa->ifa_fb_sizes;
 	const struct drmfb_attach_args da = {
 		.da_dev = sc->sc_dev,
 		.da_fb_helper = ifa->ifa_fb_helper,
 		.da_fb_sizes = &ifa->ifa_fb_sizes,
 		.da_fb_vaddr = bus_space_vaddr(ifa->ifa_fb_bst, sc->sc_fb_bsh),
-		.da_fb_linebytes = roundup2((sizes->surface_width *
-		howmany(sizes->surface_bpp, 8)), 64),
+		.da_fb_linebytes = ifa->ifa_fb_helper->fb->pitches[0],
 		.da_params = &intelfb_drmfb_params,
 	};
 	int error;



CVS commit: [netbsd-9] src/sys/external/bsd/drm2/i915drm

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:57:40 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/i915drm [netbsd-9]: intelfb.c

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

sys/external/bsd/drm2/i915drm/intelfb.c: revision 1.17

PR kern/52229:

Correct linebytes (stride) for intelfb(4), which fixes screen
corruption on the following machines:
- MacBookAir5,2 (Ivy Bridge, 13-inch, Mid 2012)
- MacBookAir6,1 (Haswell, 11-inch, Early 2014)

Now, wsdisplay(4) console as well as intel(4) driver of Xorg
works fine on these machines.

Also there's no side effects found on another machine:
- ThinkPad T480s (Kaby Lake R)

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/external/bsd/drm2/i915drm/intelfb.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/arch/mac68k/conf

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:54:12 UTC 2019

Modified Files:
src/sys/arch/mac68k/conf [netbsd-9]: WSFB.common

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

sys/arch/mac68k/conf/WSFB.common: revision 1.2
sys/arch/mac68k/conf/WSFB.common: revision 1.3

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

Add commented out GENFB_SHADOWFB option.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 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: [netbsd-9] src/sys/arch/mac68k/conf

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:54:12 UTC 2019

Modified Files:
src/sys/arch/mac68k/conf [netbsd-9]: WSFB.common

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

sys/arch/mac68k/conf/WSFB.common: revision 1.2
sys/arch/mac68k/conf/WSFB.common: revision 1.3

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

Add commented out GENFB_SHADOWFB option.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 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.1 src/sys/arch/mac68k/conf/WSFB.common:1.1.2.1
--- src/sys/arch/mac68k/conf/WSFB.common:1.1	Fri Jul 26 10:48:44 2019
+++ src/sys/arch/mac68k/conf/WSFB.common	Sun Aug 18 09:54:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: WSFB.common,v 1.1 2019/07/26 10:48:44 rin Exp $
+# $NetBSD: WSFB.common,v 1.1.2.1 2019/08/18 09:54:12 martin Exp $
 
 genfb* at intvid?
 genfb* at macvid?
@@ -6,9 +6,22 @@ wsdisplay* at wsemuldisplaydev?
 
 options RASOPS_APPLE_PALETTE
 
+# At the expense of memory, boost display output drastically for
+# some depth/font settings.
+# XXX
+# This may have the opposite effect. Specify with care!
+#
+#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: [netbsd-9] src/sys/kern

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:52:12 UTC 2019

Modified Files:
src/sys/kern [netbsd-9]: subr_pool.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #81):

sys/kern/subr_pool.c: revision 1.253
sys/kern/subr_pool.c: revision 1.254
sys/kern/subr_pool.c: revision 1.255

Kernel Heap Hardening: perform certain sanity checks on the pool caches
directly, to immediately detect certain bugs that would otherwise have
been detected only later on the pool layer, if the buffer ever reached
the pool layer.

 -

Replace || by && in KASAN, to increase the pool coverage.
Strictly speaking, what we want to avoid is poisoning buffers that were
referenced in a global list as part of the ctor. But, if a buffer indeed
got referenced as part of the ctor, it necessarily has to be unreferenced
in the dtor; which implies it has to have a dtor. So we want both a ctor
and a dtor, and not just one of them.

Note that POOL_QUARANTINE already implicitly provides this increased
coverage.

 -

Initialize pp->pr_redzone to false. For some reason with KUBSAN GCC does
not eliminate the unused branch in pr_item_linkedlist_put(), and this
leads to a unused uninitialized access which triggers KUBSAN messages.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.252.2.1 src/sys/kern/subr_pool.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/kern

2019-08-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 18 09:52:12 UTC 2019

Modified Files:
src/sys/kern [netbsd-9]: subr_pool.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #81):

sys/kern/subr_pool.c: revision 1.253
sys/kern/subr_pool.c: revision 1.254
sys/kern/subr_pool.c: revision 1.255

Kernel Heap Hardening: perform certain sanity checks on the pool caches
directly, to immediately detect certain bugs that would otherwise have
been detected only later on the pool layer, if the buffer ever reached
the pool layer.

 -

Replace || by && in KASAN, to increase the pool coverage.
Strictly speaking, what we want to avoid is poisoning buffers that were
referenced in a global list as part of the ctor. But, if a buffer indeed
got referenced as part of the ctor, it necessarily has to be unreferenced
in the dtor; which implies it has to have a dtor. So we want both a ctor
and a dtor, and not just one of them.

Note that POOL_QUARANTINE already implicitly provides this increased
coverage.

 -

Initialize pp->pr_redzone to false. For some reason with KUBSAN GCC does
not eliminate the unused branch in pr_item_linkedlist_put(), and this
leads to a unused uninitialized access which triggers KUBSAN messages.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.252.2.1 src/sys/kern/subr_pool.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/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.252 src/sys/kern/subr_pool.c:1.252.2.1
--- src/sys/kern/subr_pool.c:1.252	Sat Jun 29 11:13:23 2019
+++ src/sys/kern/subr_pool.c	Sun Aug 18 09:52:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.252 2019/06/29 11:13:23 maxv Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.252.2.1 2019/08/18 09:52:12 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.252 2019/06/29 11:13:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.252.2.1 2019/08/18 09:52:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -216,6 +216,8 @@ struct pool_item {
 
 #define	POOL_NEEDS_CATCHUP(pp)		\
 	((pp)->pr_nitems < (pp)->pr_minitems)
+#define	POOL_OBJ_TO_PAGE(pp, v)		\
+	(void *)((uintptr_t)v & pp->pr_alloc->pa_pagemask)
 
 /*
  * Pool cache management.
@@ -408,6 +410,40 @@ pr_item_linkedlist_get(struct pool *pp, 
 
 /* -- */
 
+static inline void
+pr_phinpage_check(struct pool *pp, struct pool_item_header *ph, void *page,
+void *object)
+{
+	if (__predict_false((void *)ph->ph_page != page)) {
+		panic("%s: [%s] item %p not part of pool", __func__,
+		pp->pr_wchan, object);
+	}
+	if (__predict_false((char *)object < (char *)page + ph->ph_off)) {
+		panic("%s: [%s] item %p below item space", __func__,
+		pp->pr_wchan, object);
+	}
+	if (__predict_false(ph->ph_poolid != pp->pr_poolid)) {
+		panic("%s: [%s] item %p poolid %u != %u", __func__,
+		pp->pr_wchan, object, ph->ph_poolid, pp->pr_poolid);
+	}
+}
+
+static inline void
+pc_phinpage_check(pool_cache_t pc, void *object)
+{
+	struct pool_item_header *ph;
+	struct pool *pp;
+	void *page;
+
+	pp = &pc->pc_pool;
+	page = POOL_OBJ_TO_PAGE(pp, object);
+	ph = (struct pool_item_header *)page;
+
+	pr_phinpage_check(pp, ph, page, object);
+}
+
+/* -- */
+
 static inline int
 phtree_compare(struct pool_item_header *a, struct pool_item_header *b)
 {
@@ -456,25 +492,10 @@ pr_find_pagehead(struct pool *pp, void *
 	if ((pp->pr_roflags & PR_NOALIGN) != 0) {
 		ph = pr_find_pagehead_noalign(pp, v);
 	} else {
-		void *page =
-		(void *)((uintptr_t)v & pp->pr_alloc->pa_pagemask);
-
+		void *page = POOL_OBJ_TO_PAGE(pp, v);
 		if ((pp->pr_roflags & PR_PHINPAGE) != 0) {
 			ph = (struct pool_item_header *)page;
-			if (__predict_false((void *)ph->ph_page != page)) {
-panic("%s: [%s] item %p not part of pool",
-__func__, pp->pr_wchan, v);
-			}
-			if (__predict_false((char *)v < (char *)page +
-			ph->ph_off)) {
-panic("%s: [%s] item %p below item space",
-__func__, pp->pr_wchan, v);
-			}
-			if (__predict_false(ph->ph_poolid != pp->pr_poolid)) {
-panic("%s: [%s] item %p poolid %u != %u",
-__func__, pp->pr_wchan, v, ph->ph_poolid,
-pp->pr_poolid);
-			}
+			pr_phinpage_check(pp, ph, page, v);
 		} else {
 			tmp.ph_page = page;
 			ph = SPLAY_FIND(phtree, &pp->pr_phtree, &tmp);
@@ -746,6 +767,7 @@ pool_init(struct pool *pp, size_t size, 
 	pp->pr_drain_hook = NULL;
 	pp->pr_drain_hook_arg = NULL;
 	pp->pr_freecheck = NULL;
+	pp->pr_redzone = false;
 	pool_redzone_init(pp, size);
 	pool_quarantine_init(pp);
 
@@ -1832,7 +1854,7 @@ pool_chk_page(struct pool *pp, const cha
 	int n;
 
 	if ((pp-

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k

2019-08-18 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 09:51:06 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: aes-m68k.S

Log Message:
Fix copy-paste.

Pointed out by Takehiko NOZAKI.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k

2019-08-18 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 09:51:06 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: aes-m68k.S

Log Message:
Fix copy-paste.

Pointed out by Takehiko NOZAKI.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.3	Wed Mar  7 06:55:01 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S	Sun Aug 18 09:51:06 2019
@@ -1,4 +1,4 @@
-|	$NetBSD: aes-m68k.S,v 1.3 2018/03/07 06:55:01 mlelstv Exp $
+|	$NetBSD: aes-m68k.S,v 1.4 2019/08/18 09:51:06 rin Exp $
 
 | Copyright (C) 2016 Tetsuya Isaki. All rights reserved.
 | Copyright (C) 2016 Y.Sugahara (moveccr). All rights reserved.
@@ -828,7 +828,7 @@ AES_encrypt:
 
 	moveml	%sp@+,%d2-%d7/%a2-%a5
 	rts
-	.size	AES_set_decrypt_key, .-AES_set_decrypt_key
+	.size	AES_encrypt, .-AES_encrypt
 
 | void
 | AES_decrypt(const unsigned char *in,



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:46:58 UTC 2019

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

Log Message:
fix a think-o in the previous: don't return when saving the first error.
from skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/usbnet.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/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.17 src/sys/dev/usb/usbnet.c:1.18
--- src/sys/dev/usb/usbnet.c:1.17	Sun Aug 18 09:29:38 2019
+++ src/sys/dev/usb/usbnet.c	Sun Aug 18 09:46:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.17 2019/08/18 09:29:38 mrg Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.18 2019/08/18 09:46:58 mrg Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.17 2019/08/18 09:29:38 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.18 2019/08/18 09:46:58 mrg Exp $");
 
 #include 
 #include 
@@ -725,7 +725,7 @@ usbnet_ep_stop_pipes(struct usbnet * con
 			continue;
 		usbd_status err2 = usbd_abort_pipe(unp->unp_ep[i]);
 		if (err == USBD_NORMAL_COMPLETION && err2)
-			return err = err2;
+			err = err2;
 	}
 
 	return err;



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:46:58 UTC 2019

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

Log Message:
fix a think-o in the previous: don't return when saving the first error.
from skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/usbnet.c

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-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:43:26 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
note kue/upl ported to usbnet.


To generate a diff of this commit:
cvs rdiff -u -r1.2569 -r1.2570 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-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:43:26 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
note kue/upl ported to usbnet.


To generate a diff of this commit:
cvs rdiff -u -r1.2569 -r1.2570 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.2569 src/doc/CHANGES:1.2570
--- src/doc/CHANGES:1.2569	Thu Aug 15 13:33:15 2019
+++ src/doc/CHANGES	Sun Aug 18 09:43:26 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2569 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2570 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -29,3 +29,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		axe(4), axen(4), cdce(4), cue(4), mue(4), smsc(4), udav(4),
 		ure(4), url(4), and urndis(4) drivers fixing many bugs and
 		porting to NET_MPSAFE in the process.  [mrg 20190814]
+	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:29:38 UTC 2019

Modified Files:
src/sys/dev/usb: files.usb if_upl.c usbnet.c

Log Message:
update usbnet slight:
- drivers that want to use if_input() will also set _if_input.  for
  now, avoid attaching a per-cpu queue for them.  use if_initialize()
  and if_register().
- when stopping pipes, don't give up after the first failure, but
  keep the first failure error for return and keep going
- if 0 a KASSERT() in usbnet_init_rx_tx().  there's a path via
  if_mcast_op() that can have the ifnet unlocked today..
- in usbnet_watchdog(), abort the pipe instead of faking tx
  completion.  avoids issues with devices with more than one tx
  descriptor, as well as avoiding triggering usb asserts.

with these, upl(4) port to usbnet(9) now works.  (would be a version
bump, but upl(4) and the unported umb(4) are the only consumers that
would care.)


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/usbnet.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/files.usb
diff -u src/sys/dev/usb/files.usb:1.165 src/sys/dev/usb/files.usb:1.166
--- src/sys/dev/usb/files.usb:1.165	Fri Aug 16 08:52:46 2019
+++ src/sys/dev/usb/files.usb	Sun Aug 18 09:29:38 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.165 2019/08/16 08:52:46 mrg Exp $
+#	$NetBSD: files.usb,v 1.166 2019/08/18 09:29:38 mrg Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -354,7 +354,7 @@ attach	kue at usbdevif
 file	dev/usb/if_kue.c		kue
 
 # Prolific PL2302 host-host
-device	upl: ifnet
+device	upl: ifnet, usbnet
 attach	upl at usbdevif
 file	dev/usb/if_upl.c		upl
 

Index: src/sys/dev/usb/if_upl.c
diff -u src/sys/dev/usb/if_upl.c:1.64 src/sys/dev/usb/if_upl.c:1.65
--- src/sys/dev/usb/if_upl.c:1.64	Sun Jul 21 10:27:56 2019
+++ src/sys/dev/usb/if_upl.c	Sun Aug 18 09:29:38 2019
@@ -1,4 +1,5 @@
-/*	$NetBSD: if_upl.c,v 1.64 2019/07/21 10:27:56 mrg Exp $	*/
+/*	$NetBSD: if_upl.c,v 1.65 2019/08/18 09:29:38 mrg Exp $	*/
+
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.64 2019/07/21 10:27:56 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.65 2019/08/18 09:29:38 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -42,22 +43,10 @@ __KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1
 #endif
 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
-#include 
+#include 
 
-#include 
 #include 
-#include 
-#include 
-
-#include 
 
 #ifdef INET
 #include 
@@ -65,12 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1
 #include 
 #endif
 
-
-#include 
-#include 
-#include 
-#include 
-
 /*
  * 7  6  5  4  3  2  1  0
  * tx rx 1  0
@@ -83,8 +66,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1
 #define UPL_RXDATA		0x40
 #define UPL_TXOK		0x80
 
-#define UPL_INTR_PKTLEN		1
-
 #define UPL_CONFIG_NO		1
 #define UPL_IFACE_IDX		0
 
@@ -94,63 +75,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1
 
 #define UPL_BUFSZ		1024
 
-#define UPL_RX_FRAMES		1
-#define UPL_TX_FRAMES		1
-
 #define UPL_RX_LIST_CNT		1
 #define UPL_TX_LIST_CNT		1
 
-#define UPL_ENDPT_RX		0x0
-#define UPL_ENDPT_TX		0x1
-#define UPL_ENDPT_INTR		0x2
-#define UPL_ENDPT_MAX		0x3
-
-struct upl_type {
-	uint16_t		upl_vid;
-	uint16_t		upl_did;
-};
-
-struct upl_softc;
-
-struct upl_chain {
-	struct upl_softc	*upl_sc;
-	struct usbd_xfer	*upl_xfer;
-	char			*upl_buf;
-	struct mbuf		*upl_mbuf;
-};
-
-struct upl_cdata {
-	struct upl_chain	upl_tx_chain[UPL_TX_LIST_CNT];
-	struct upl_chain	upl_rx_chain[UPL_RX_LIST_CNT];
-	int			upl_tx_prod;
-	int			upl_tx_cnt;
-};
-
-struct upl_softc {
-	device_t		sc_dev;
-
-	struct ifnet		sc_if;
-	krndsource_t	sc_rnd_source;
-
-	struct callout		sc_stat_ch;
-
-	struct usbd_device *	sc_udev;
-	struct usbd_interface *	sc_iface;
-	uint16_t		sc_vendor;
-	uint16_t		sc_product;
-	int			sc_ed[UPL_ENDPT_MAX];
-	struct usbd_pipe *	sc_ep[UPL_ENDPT_MAX];
-	struct upl_cdata	sc_cdata;
-
-	uByte			sc_ibuf;
-
-	char			sc_dying;
-	char			sc_attached;
-	u_int			sc_rx_errs;
-	struct timeval		sc_rx_notice;
-	u_int			sc_intr_errs;
-};
-
 #ifdef UPL_DEBUG
 #define DPRINTF(x)	if (upldebug) printf x
 #define DPRINTFN(n,x)	if (upldebug >= (n)) printf x
@@ -163,37 +90,43 @@ int	upldebug = 0;
 /*
  * Various supported device vendors/products.
  */
-Static struct upl_type sc_devs[] = {
+static struct usb_devno sc_devs[] = {
 	{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301 },
 	{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302 },
+	{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL25A1 },
+	{ USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U258 },
+	{ USB_VENDOR_NI, USB_PRODUCT_NI_HT

CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:29:38 UTC 2019

Modified Files:
src/sys/dev/usb: files.usb if_upl.c usbnet.c

Log Message:
update usbnet slight:
- drivers that want to use if_input() will also set _if_input.  for
  now, avoid attaching a per-cpu queue for them.  use if_initialize()
  and if_register().
- when stopping pipes, don't give up after the first failure, but
  keep the first failure error for return and keep going
- if 0 a KASSERT() in usbnet_init_rx_tx().  there's a path via
  if_mcast_op() that can have the ifnet unlocked today..
- in usbnet_watchdog(), abort the pipe instead of faking tx
  completion.  avoids issues with devices with more than one tx
  descriptor, as well as avoiding triggering usb asserts.

with these, upl(4) port to usbnet(9) now works.  (would be a version
bump, but upl(4) and the unported umb(4) are the only consumers that
would care.)


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/usbnet.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/makemandb

2019-08-18 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Sun Aug 18 09:14:30 UTC 2019

Modified Files:
src/usr.sbin/makemandb: apropos-utils.c

Log Message:
PR bin/54343:  We want the callback_args.machine to be NULL if it is not 
present in the DB.

The previous commit fixed the problem of allowing apropos to not crash and
produce output even if the database is missing values for certain mandatory
fields, such as name, section etc. Normally we don't expect those values
to be missing in the database but in case of parsing errors it can happen.

However, the machine architecture is an optional field since not all man pages
are hardware specific so that should be allowed to be set to NULL if not
present in the database.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/makemandb/apropos-utils.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/makemandb

2019-08-18 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Sun Aug 18 09:14:30 UTC 2019

Modified Files:
src/usr.sbin/makemandb: apropos-utils.c

Log Message:
PR bin/54343:  We want the callback_args.machine to be NULL if it is not 
present in the DB.

The previous commit fixed the problem of allowing apropos to not crash and
produce output even if the database is missing values for certain mandatory
fields, such as name, section etc. Normally we don't expect those values
to be missing in the database but in case of parsing errors it can happen.

However, the machine architecture is an optional field since not all man pages
are hardware specific so that should be allowed to be set to NULL if not
present in the database.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/makemandb/apropos-utils.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/makemandb/apropos-utils.c
diff -u src/usr.sbin/makemandb/apropos-utils.c:1.46 src/usr.sbin/makemandb/apropos-utils.c:1.47
--- src/usr.sbin/makemandb/apropos-utils.c:1.46	Thu Aug 15 10:29:07 2019
+++ src/usr.sbin/makemandb/apropos-utils.c	Sun Aug 18 09:14:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos-utils.c,v 1.46 2019/08/15 10:29:07 christos Exp $	*/
+/*	$NetBSD: apropos-utils.c,v 1.47 2019/08/18 09:14:30 abhinav Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: apropos-utils.c,v 1.46 2019/08/15 10:29:07 christos Exp $");
+__RCSID("$NetBSD: apropos-utils.c,v 1.47 2019/08/18 09:14:30 abhinav Exp $");
 
 #include 
 #include 
@@ -705,7 +705,7 @@ execute_search_query(sqlite3 *db, char *
 		callback_args.section = get_stmt_col_text(stmt, 0);
 		name_temp = get_stmt_col_text(stmt, 1);
 		callback_args.name_desc = get_stmt_col_text(stmt, 2);
-		callback_args.machine = get_stmt_col_text(stmt, 3);
+		callback_args.machine = (const char *) sqlite3_column_text(stmt, 3);
 		if (!args->legacy) {
 			callback_args.snippet = get_stmt_col_text(stmt, 4);
 			callback_args.snippet_length =



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:05:49 UTC 2019

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

Log Message:
regen for new upl(3) devices.


To generate a diff of this commit:
cvs rdiff -u -r1.760 -r1.761 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:05:32 UTC 2019

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

Log Message:
add 3 devices for upl(4) host-to-host networking:
- belkin F5U258
- national instruments USB host to host adapter
- prolific id 25a1


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

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-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 09:05:32 UTC 2019

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

Log Message:
add 3 devices for upl(4) host-to-host networking:
- belkin F5U258
- national instruments USB host to host adapter
- prolific id 25a1


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.770 src/sys/dev/usb/usbdevs:1.771
--- src/sys/dev/usb/usbdevs:1.770	Wed Jan 30 19:51:28 2019
+++ src/sys/dev/usb/usbdevs	Sun Aug 18 09:05:31 2019
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.770 2019/01/30 19:51:28 jakllsch Exp $
+$NetBSD: usbdevs,v 1.771 2019/08/18 09:05:31 mrg Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1066,6 +1066,7 @@ product BELKIN RTL8192CU_2	0x1004	RTL819
 product BELKIN RTL8188CU	0x1102	RTL8188CU
 product BELKIN RTL8188CUS	0x11f2	RTL8188CUS
 product BELKIN F5U120		0x1203	F5U120-PC Hub
+product BELKIN F5U258		0x258a	F5U258/F5U279 Host to host adapter
 product BELKIN RTL8192CU	0x2102	RTL8192CU
 product BELKIN F7D2102		0x2103	F7D2102
 product BELKIN RTL8192CU_1	0x21f2	RTL8192CU
@@ -2409,6 +2410,7 @@ product MUSTEK DV2000		0xc441	DV2000 dig
 
 /* National Instruments */
 product NI GPIB_USB_A		0xc920	GPIB-USB-A
+product NI HTOH_7825		0x7825	Host to Host Adapter
 
 /* National Semiconductor */
 product NATIONAL BEARPAW1200	0x1000	BearPaw 1200
@@ -2752,6 +2754,7 @@ product PROLIFIC PL2303		0x2303	PL2303 S
 product PROLIFIC PL2305		0x2305	Parallel printer adapter
 product PROLIFIC ATAPI4		0x2307	ATAPI-4 Bridge Controller
 product PROLIFIC PL2501		0x2501	PL2501 Host-Host interface
+product PROLIFIC PL25A1		0x25a1	PL25A1 Host-Host interface
 product PROLIFIC PL2303X	0xaaa0	PL2303 Serial adapter (Pharos GPS)
 product PROLIFIC RSAQ3		0xaaa2	PL2303 Serial adapter (IODATA USB-RSAQ3)
 product PROLIFIC2 PL2303	0x2303	PL2303 Serial adapter (SMART Technologies)



CVS commit: src/sys/dev/usb

2019-08-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 08:16:34 UTC 2019

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

Log Message:
usbnet_ifp() doesn't work before usbnet_attach().  avoid it.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_urndis.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-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 18 08:16:34 UTC 2019

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

Log Message:
usbnet_ifp() doesn't work before usbnet_attach().  avoid it.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_urndis.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_urndis.c
diff -u src/sys/dev/usb/if_urndis.c:1.31 src/sys/dev/usb/if_urndis.c:1.32
--- src/sys/dev/usb/if_urndis.c:1.31	Thu Aug 15 05:52:23 2019
+++ src/sys/dev/usb/if_urndis.c	Sun Aug 18 08:16:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urndis.c,v 1.31 2019/08/15 05:52:23 mrg Exp $ */
+/*	$NetBSD: if_urndis.c,v 1.32 2019/08/18 08:16:34 mrg Exp $ */
 /*	$OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
 
 /*
@@ -21,7 +21,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.31 2019/08/15 05:52:23 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.32 2019/08/18 08:16:34 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1044,13 +1044,13 @@ urndis_attach(device_t parent, device_t 
 	if (un->un_ed[USBNET_ENDPT_RX] == 0 || un->un_ed[USBNET_ENDPT_TX] == 0)
 		return;
 
-	struct ifnet *ifp = usbnet_ifp(un);
 #if 0
 	ifp->if_watchdog = urndis_watchdog;
 #endif
 
 	usbnet_attach(un, "urndisdet");
 
+	struct ifnet *ifp = usbnet_ifp(un);
 	urndis_init_un(ifp, un);
 
 	if (urndis_ctrl_query(un, OID_802_3_PERMANENT_ADDRESS, NULL, 0,



CVS commit: src/share/man/man8/man8.x86

2019-08-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 18 08:12:36 UTC 2019

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Typo fixes, 'file system'; new sentence, new line; expand IA-32.
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man8/man8.x86/boot.8

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

Modified files:

Index: src/share/man/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.16 src/share/man/man8/man8.x86/boot.8:1.17
--- src/share/man/man8/man8.x86/boot.8:1.16	Sun Aug 18 02:23:48 2019
+++ src/share/man/man8/man8.x86/boot.8	Sun Aug 18 08:12:36 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.8,v 1.16 2019/08/18 02:23:48 manu Exp $
+.\"	$NetBSD: boot.8,v 1.17 2019/08/18 08:12:36 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\"
-.Dd May 15, 2019
+.Dd August 18, 2019
 .Dt BOOT 8 x86
 .Os
 .Sh NAME
@@ -40,13 +40,9 @@
 .Nd
 system bootstrapping procedures
 .Sh DESCRIPTION
-.Tn IA-32
-computers
-.Po
-the
+Intel Architecture, 32-bit (IA-32) computers (the
 .Tn IBM PC
-and its clones
-.Pc
+and its clones)
 that can run
 .Nx Ns /i386
 or
@@ -62,7 +58,7 @@ from the system
 .Tn BIOS
 .It efiboot
 bootstrap
-.Nx 
+.Nx
 from the system
 .Tn UEFI
 .It Xr x86/dosboot 8
@@ -180,8 +176,8 @@ input of these commands:
 .It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
 The default
 .Va device
-will be set to the disk from which the boot loader was loaded. The
-partition is set to the first match in this list:
+will be set to the disk from which the boot loader was loaded.
+The partition is set to the first match in this list:
 .Bl -enum -compact
 .It
 The first
@@ -193,7 +189,7 @@ attribute set.
 The partition from which the boot loader was loaded from, if that
 can be detected.
 .It
-The first partition with a filesystem that could be bootable.
+The first partition with a file system that could be bootable.
 .It
 The first partition.
 .El
@@ -204,7 +200,8 @@ is of the form
 .Va NAME=partition_label
 when booting from a
 .Xr gpt 8
-partitionned disk. Otherwise, the syntax is
+partitioned disk.
+Otherwise, the syntax is
 .Xo Va xd
 .Op Va N Ns Op Va x
 .Xc
@@ -231,17 +228,17 @@ Floppy drives as numbered by the BIOS.
 CD-ROM drives as numbered by the BIOS.
 .It raid
 RAIDframe configured from hard disks recognized by the BIOS.
-Only RAID level 1 sets are supported by bootstrap code. If
-the RAID is partitionned, the first partition is used, or the
+Only RAID level 1 sets are supported by bootstrap code.
+If the RAID is partitioned, the first partition is used, or the
 first
 .Xr gpt 8
 partition that has the
 .Va bootme
-attribute set. Inner RAIDframe partition can also be
-given to the
+attribute set.
+Inner RAIDframe partitions can also be given to the
 .Ic dev
 command using he
-.Va NAME=partiton_label
+.Va NAME=partition_label
 syntax.
 .El
 .Pp
@@ -839,12 +836,13 @@ partitionning, but some do not handle th
 Booting
 from a
 .Xr gpt 8
-partitionned disk is still possible in this case, by adding
+partitioned disk is still possible in this case, by adding
 an overlapping
 .Tn EFI
 partition in the protective
 .Xr mbr 8
-block. This can be achieved using the following commands
+block.
+This can be achieved using the following commands
 (you must adapt the hard disk and
 .Tn EFI
 partition start end size to fit your setup):
@@ -863,4 +861,3 @@ partition table will look like this:
 2: 
 3: 
 .Ed
-



CVS commit: src/share/man/man8/man8.x86

2019-08-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug 18 08:12:36 UTC 2019

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Typo fixes, 'file system'; new sentence, new line; expand IA-32.
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man8/man8.x86/boot.8

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



CVS commit: src/distrib/sets/lists/xetc

2019-08-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Aug 18 07:25:54 UTC 2019

Modified Files:
src/distrib/sets/lists/xetc: mi

Log Message:
Don't mark /etc/X11/conf.d entries obsolete: a user may choose to have
an entry here.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/xetc/mi

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



CVS commit: src/distrib/sets/lists/xetc

2019-08-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Aug 18 07:25:54 UTC 2019

Modified Files:
src/distrib/sets/lists/xetc: mi

Log Message:
Don't mark /etc/X11/conf.d entries obsolete: a user may choose to have
an entry here.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/xetc/mi

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

Modified files:

Index: src/distrib/sets/lists/xetc/mi
diff -u src/distrib/sets/lists/xetc/mi:1.35 src/distrib/sets/lists/xetc/mi:1.36
--- src/distrib/sets/lists/xetc/mi:1.35	Mon May 13 08:38:45 2019
+++ src/distrib/sets/lists/xetc/mi	Sun Aug 18 07:25:54 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.35 2019/05/13 08:38:45 uki Exp $
+# $NetBSD: mi,v 1.36 2019/08/18 07:25:54 maya Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -78,7 +78,6 @@
 ./etc/fonts/conf.d/65-fonts-persian.conf		-unknown-	xorg
 ./etc/fonts/conf.d/65-nonlatin.conf			-unknown-	xorg
 ./etc/fonts/conf.d/69-unifont.conf			-unknown-	xorg
-./etc/fonts/conf.d/70-no-bitmaps.conf			-unknown-	obsolete
 ./etc/fonts/conf.d/80-delicious.conf			-unknown-	xorg
 ./etc/fonts/conf.d/90-synthetic.conf			-unknown-	xorg
 ./etc/fonts/fonts.conf	-unknown-	xorg



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

2019-08-18 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 07:05:16 UTC 2019

Modified Files:
src/sys/arch/mac68k/mac68k: machdep.c pmap_bootstrap.c

Log Message:
0x%p ---> %p


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/arch/mac68k/mac68k/machdep.c
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/mac68k/mac68k/pmap_bootstrap.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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.354 src/sys/arch/mac68k/mac68k/machdep.c:1.355
--- src/sys/arch/mac68k/mac68k/machdep.c:1.354	Sun Aug 18 07:03:55 2019
+++ src/sys/arch/mac68k/mac68k/machdep.c	Sun Aug 18 07:05:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.354 2019/08/18 07:03:55 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.355 2019/08/18 07:05:16 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.354 2019/08/18 07:03:55 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.355 2019/08/18 07:05:16 rin Exp $");
 
 #include "opt_adb.h"
 #include "opt_copy_symtab.h"
@@ -2326,7 +2326,7 @@ check_video(const char *id, u_long limit
 			addr += 32768;
 		}
 		if (mac68k_machine.do_graybars) {
-			printf("  %s internal video at addr 0x%p (phys 0x%p), ",
+			printf("  %s internal video at addr %p (phys %p), ",
 			id, (void *)mac68k_video.mv_log,
 			(void *)mac68k_video.mv_phys);
 			printf("len 0x%x.\n", mac68k_video.mv_len);
@@ -2471,7 +2471,7 @@ get_mapping(void)
 		 * Tell the user what we know.
 		 */
 		if (mac68k_machine.do_graybars)
-			printf("On-board video at addr 0x%p (phys 0x%p), "
+			printf("On-board video at addr %p (phys %p), "
 			"len 0x%x.\n",
 			(void *)mac68k_video.mv_kvaddr,
 			(void *)mac68k_video.mv_phys,
@@ -2597,9 +2597,9 @@ get_mapping(void)
 	mac68k_video.mv_kvaddr);
 			}
 		} else if (mac68k_machine.do_graybars) {
-			printf("  Video address = 0x%p\n",
+			printf("  Video address = %p\n",
 			(void *)mac68k_video.mv_kvaddr);
-			printf("  Int video starts at 0x%p\n",
+			printf("  Int video starts at %p\n",
 			(void *)mac68k_video.mv_log);
 			printf("  Length = 0x%x (%d) bytes\n",
 			mac68k_video.mv_len, mac68k_video.mv_len);

Index: src/sys/arch/mac68k/mac68k/pmap_bootstrap.c
diff -u src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.94 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.95
--- src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.94	Tue Jul 16 07:31:40 2013
+++ src/sys/arch/mac68k/mac68k/pmap_bootstrap.c	Sun Aug 18 07:05:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.94 2013/07/16 07:31:40 jklos Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.95 2019/08/18 07:05:16 rin Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.94 2013/07/16 07:31:40 jklos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.95 2019/08/18 07:05:16 rin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -587,7 +587,7 @@ bootstrap_mac68k(int tc)
 	mrg_fixupROMBase(oldROMBase, ROMBase);
 
 	if (mac68k_machine.do_graybars)
-		printf("Video address 0x%p -> 0x%p.\n",
+		printf("Video address %p -> %p.\n",
 		(void *)mac68k_video.mv_kvaddr, (void *)newvideoaddr);
 
 	mac68k_set_io_offsets(IOBase);



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

2019-08-18 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 07:05:16 UTC 2019

Modified Files:
src/sys/arch/mac68k/mac68k: machdep.c pmap_bootstrap.c

Log Message:
0x%p ---> %p


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/arch/mac68k/mac68k/machdep.c
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c

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



  1   2   >