CVS commit: src/sys/arch/newsmips/apbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:41:01 UTC 2020

Modified Files:
src/sys/arch/newsmips/apbus: if_sn.c

Log Message:
Trailing whitespace


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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:41:21 UTC 2020

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

Log Message:
Trailing whitespace


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

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

Modified files:

Index: src/sys/dev/pci/if_rge.c
diff -u src/sys/dev/pci/if_rge.c:1.4 src/sys/dev/pci/if_rge.c:1.5
--- src/sys/dev/pci/if_rge.c:1.4	Tue Feb  4 07:37:00 2020
+++ src/sys/dev/pci/if_rge.c	Tue Feb  4 07:41:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rge.c,v 1.4 2020/02/04 07:37:00 skrll Exp $	*/
+/*	$NetBSD: if_rge.c,v 1.5 2020/02/04 07:41:21 skrll Exp $	*/
 /*	$OpenBSD: if_rge.c,v 1.2 2020/01/02 09:00:45 kevlo Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.4 2020/02/04 07:37:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.5 2020/02/04 07:41:21 skrll Exp $");
 
 /* #include "bpfilter.h" Sevan */
 /* #include "vlan.h" Sevan */
@@ -80,7 +80,7 @@ struct mbuf_list {
 #endif
 
 static int		rge_match(device_t, cfdata_t, void *);
-static void		rge_attach(device_t, device_t, void *); 
+static void		rge_attach(device_t, device_t, void *);
 int		rge_intr(void *);
 int		rge_encap(struct rge_softc *, struct mbuf *, int);
 int		rge_ioctl(struct ifnet *, u_long, void *);
@@ -185,7 +185,7 @@ rge_attach(device_t parent, device_t sel
 
 	pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0);
 
-	/* 
+	/*
 	 * Map control/status registers.
 	 */
 	if (pci_mapreg_map(pa, RGE_PCI_BAR2, PCI_MAPREG_TYPE_MEM |
@@ -203,7 +203,7 @@ rge_attach(device_t parent, device_t sel
 		}
 	}
 
-	/* 
+	/*
 	 * Allocate interrupt.
 	 */
 	if (pci_intr_map(pa, ) == 0)
@@ -244,7 +244,7 @@ rge_attach(device_t parent, device_t sel
 
 	rge_config_imtype(sc, RGE_IMTYPE_SIM);
 
-	/* 
+	/*
 	 * PCI Express check.
 	 */
 	if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
@@ -627,7 +627,7 @@ rge_init(struct ifnet *ifp)
 	ETHER_CRC_LEN + 1;
 
 	if (max_frame_size > RGE_JUMBO_FRAMELEN)
-		max_frame_size -= 1; 
+		max_frame_size -= 1;
 
 	RGE_WRITE_2(sc, RGE_RXMAXSIZE, max_frame_size);
 
@@ -724,7 +724,7 @@ rge_init(struct ifnet *ifp)
 	val = rge_read_mac_ocp(sc, 0xd430) & ~0x0fff;
 	rge_write_mac_ocp(sc, 0xd430, val | 0x047f);
 
-	RGE_MAC_SETBIT(sc, 0xe84c, 0x00c0); 
+	RGE_MAC_SETBIT(sc, 0xe84c, 0x00c0);
 
 	/* Disable EEE plus. */
 	RGE_MAC_CLRBIT(sc, 0xe080, 0x0002);
@@ -924,7 +924,7 @@ rge_ifmedia_sts(struct ifnet *ifp, struc
 	}
 }
 
-/* 
+/*
  * Allocate memory for RX/TX rings.
  */
 int
@@ -1171,7 +1171,7 @@ rge_rxeof(struct rge_softc *sc)
 
 		rxstat = letoh32(cur_rx->rge_cmdsts);
 		extsts = letoh32(cur_rx->rge_extsts);
-		
+
 		total_len = RGE_RXBYTES(cur_rx);
 		rxq = >rge_ldata.rge_rxq[i];
 		m = rxq->rxq_mbuf;
@@ -1300,7 +1300,7 @@ rge_txeof(struct rge_softc *sc)
 			break;
 		}
 
-		bus_dmamap_sync(sc->sc_dmat, txq->txq_dmamap, 0, 
+		bus_dmamap_sync(sc->sc_dmat, txq->txq_dmamap, 0,
 		txq->txq_dmamap->dm_mapsize, BUS_DMASYNC_POSTWRITE);
 		bus_dmamap_unload(sc->sc_dmat, txq->txq_dmamap);
 		m_freem(txq->txq_mbuf);
@@ -1444,7 +1444,7 @@ rge_phy_config(struct rge_softc *sc)
 	  0x00bb, 0x0058, 0x0029, 0x0013, 0x0009, 0x0004, 0x0002 };
 
 	static const uint16_t mac_cfg3_b88e_value[] =
-	{ 0xc091, 0x6e12, 0xc092, 0x1214, 0xc094, 0x1516, 0xc096, 0x171b, 
+	{ 0xc091, 0x6e12, 0xc092, 0x1214, 0xc094, 0x1516, 0xc096, 0x171b,
 	  0xc098, 0x1b1c, 0xc09a, 0x1f1f, 0xc09c, 0x2021, 0xc09e, 0x2224,
 	  0xc0a0, 0x2424, 0xc0a2, 0x2424, 0xc0a4, 0x2424, 0xc018, 0x0af2,
 	  0xc01a, 0x0d4a, 0xc01c, 0x0f26, 0xc01e, 0x118d, 0xc020, 0x14f3,
@@ -1496,7 +1496,7 @@ rge_phy_config(struct rge_softc *sc)
 			rge_write_phy_ocp(sc, 0xa436, 0x801e);
 			rge_write_phy_ocp(sc, 0xa438, RGE_MAC_CFG2_MCODE_VER);
 		}
-		
+
 		val = rge_read_phy_ocp(sc, 0xad40) & ~0x03ff;
 		rge_write_phy_ocp(sc, 0xad40, val | 0x0084);
 		RGE_PHY_SETBIT(sc, 0xad4e, 0x0010);



CVS commit: src/sys/arch/newsmips/apbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:41:01 UTC 2020

Modified Files:
src/sys/arch/newsmips/apbus: if_sn.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/newsmips/apbus/if_sn.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/newsmips/apbus/if_sn.c
diff -u src/sys/arch/newsmips/apbus/if_sn.c:1.47 src/sys/arch/newsmips/apbus/if_sn.c:1.48
--- src/sys/arch/newsmips/apbus/if_sn.c:1.47	Tue Feb  4 07:36:42 2020
+++ src/sys/arch/newsmips/apbus/if_sn.c	Tue Feb  4 07:41:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sn.c,v 1.47 2020/02/04 07:36:42 skrll Exp $	*/
+/*	$NetBSD: if_sn.c,v 1.48 2020/02/04 07:41:01 skrll Exp $	*/
 
 /*
  * National Semiconductor  DP8393X SONIC Driver
@@ -16,7 +16,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.47 2020/02/04 07:36:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.48 2020/02/04 07:41:01 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -365,7 +365,7 @@ snreset(struct sn_softc *sc)
 	sninit(sc);
 }
 
-static int 
+static int
 sninit(struct sn_softc *sc)
 {
 	u_long	s_rcr;
@@ -443,7 +443,7 @@ sninit(struct sn_softc *sc)
  * Called on final close of device, or if sninit() fails
  * part way through.
  */
-static int 
+static int
 snstop(struct sn_softc *sc)
 {
 	struct mtd *mtd;
@@ -589,7 +589,7 @@ sonicput(struct sn_softc *sc, struct mbu
 /*
  * CAM support
  */
-static void 
+static void
 caminitialise(struct sn_softc *sc)
 {
 	void	*p_cda = sc->p_cda;
@@ -606,7 +606,7 @@ caminitialise(struct sn_softc *sc)
 	SWO(bitmode, p_cda, CDA_ENABLE, 0);
 }
 
-static void 
+static void
 camentry(struct sn_softc *sc, int entry, const u_char *ea)
 {
 	void	*p_cda = sc->p_cda;
@@ -616,11 +616,11 @@ camentry(struct sn_softc *sc, int entry,
 	SWO(bitmode, p_cda, camoffset + CDA_CAMAP2, (ea[5] << 8) | ea[4]);
 	SWO(bitmode, p_cda, camoffset + CDA_CAMAP1, (ea[3] << 8) | ea[2]);
 	SWO(bitmode, p_cda, camoffset + CDA_CAMAP0, (ea[1] << 8) | ea[0]);
-	SWO(bitmode, p_cda, CDA_ENABLE, 
+	SWO(bitmode, p_cda, CDA_ENABLE,
 	(SRO(bitmode, p_cda, CDA_ENABLE) | (1 << entry)));
 }
 
-static void 
+static void
 camprogram(struct sn_softc *sc)
 {
 	struct ethercom *ec = >sc_ethercom;
@@ -696,7 +696,7 @@ camprogram(struct sn_softc *sc)
 }
 
 #ifdef SNDEBUG
-static void 
+static void
 camdump(struct sn_softc *sc)
 {
 	int	i;
@@ -721,7 +721,7 @@ camdump(struct sn_softc *sc)
 }
 #endif
 
-static void 
+static void
 initialise_tda(struct sn_softc *sc)
 {
 	struct mtd *mtd;
@@ -868,7 +868,7 @@ snintr(void *arg)
 /*
  * Transmit interrupt routine
  */
-static void 
+static void
 sonictxint(struct sn_softc *sc)
 {
 	struct mtd	*mtd;
@@ -943,7 +943,7 @@ sonictxint(struct sn_softc *sc)
 /*
  * Receive interrupt routine
  */
-static void 
+static void
 sonicrxint(struct sn_softc *sc)
 {
 	void *	rda;
@@ -1032,7 +1032,7 @@ sonicrxint(struct sn_softc *sc)
  * sonic_read -- pull packet off interface and forward to
  * appropriate protocol handler
  */
-static inline int 
+static inline int
 sonic_read(struct sn_softc *sc, void *pkt, int len)
 {
 	struct ifnet *ifp = >sc_if;
@@ -1102,10 +1102,10 @@ sonic_get(struct sn_softc *sc, void *pkt
 
 		if (mp == ) {
 			char *newdata = (char *)
-			ALIGN((char *)m->m_data + 
+			ALIGN((char *)m->m_data +
 sizeof(struct ether_header)) -
 			sizeof(struct ether_header);
-			len -= newdata - m->m_data; 
+			len -= newdata - m->m_data;
 			m->m_data = newdata;
 		}
 



CVS commit: src/sys/dev/pci

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:41:21 UTC 2020

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

Log Message:
Trailing whitespace


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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:34 UTC 2020

Modified Files:
src/sys/arch/acorn32/podulebus: if_ie.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/acorn32/podulebus/if_ie.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/acorn32/podulebus/if_ie.c
diff -u src/sys/arch/acorn32/podulebus/if_ie.c:1.45 src/sys/arch/acorn32/podulebus/if_ie.c:1.46
--- src/sys/arch/acorn32/podulebus/if_ie.c:1.45	Tue Feb  4 07:35:21 2020
+++ src/sys/arch/acorn32/podulebus/if_ie.c	Tue Feb  4 07:40:34 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $ */
+/* $NetBSD: if_ie.c,v 1.46 2020/02/04 07:40:34 skrll Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.46 2020/02/04 07:40:34 skrll Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -206,7 +206,7 @@ ie_cli(struct ie_softc *sc)
 	WriteByte(sc->sc_fastbase + (IE_CONTROL<<2), IE_CONT_CLI);
 }
 
-/* 
+/*
  * Wake the i82586 chip up and get it to do something
  */
 
@@ -297,7 +297,7 @@ ieprobe(device_t parent, cfdata_t cf, vo
 /*
  * Attach our driver to the interfaces it uses
  */
-  
+
 void
 ieattach(device_t parent, device_t self, void *aux)
 {
@@ -429,7 +429,7 @@ ieattach(device_t parent, device_t self,
 	crc32(idrom,28), *(u_long *)(idrom+28));
 for ( i=0; i<32; i+=8 ) {
 	printf ( "IDROM: %02x %02x %02x %02x %02x %02x %02x %02x\n",
-		idrom[0+i], idrom[1+i], idrom[2+i], idrom[3+i], 
+		idrom[0+i], idrom[1+i], idrom[2+i], idrom[3+i],
 		idrom[4+i], idrom[5+i], idrom[6+i], idrom[7+i] );
 	}
 	printf ( "ie: I'll ignore this fact for now!\n" );
@@ -448,14 +448,14 @@ ieattach(device_t parent, device_t self,
 	ifp->if_ioctl = ieioctl;
 	ifp->if_watchdog = iewatchdog;
 	ifp->if_flags = IFF_BROADCAST;
-	
+
 	/* Signed, dated then sent */
 if_attach (ifp);
 	if_deferred_start_init(ifp, NULL);
 	ether_ifattach(ifp, hwaddr);
 
 	/* "Hmm," said nuts, "what if the attach fails" */
-
+
 	/* Write some pretty things on the annoucement line */
 	printf ( ": %s using %dk card ram",
 	ether_sprintf(hwaddr),
@@ -479,8 +479,8 @@ ieattach(device_t parent, device_t self,
 
 	printf("\n");
 }
-  
-  
+
+
 /*
  * Oh no!! Where's my shorts!!! I'm sure I put them on this morning
  */
@@ -683,7 +683,7 @@ iewatchdog(struct ifnet *ifp)
 	iereset(sc);
 }
 
-/* 
+/*
  * Start the time-domain-refloctometer running
  */
 
@@ -789,7 +789,7 @@ setup_rfa(struct ie_softc *sc, u_long pt
 	host2ie(sc, , ptr, sizeof rbd);
 	ptr+=sizeof rbd;
 
-	sc->cbuffs[i] = ptr;	
+	sc->cbuffs[i] = ptr;
 	ptr+=IE_RXBUF_SIZE;
 	}
 	rbd.ie_rbd_next = sc->rbuffs[0];
@@ -1131,7 +1131,7 @@ ieget(struct ie_softc *sc, int *to_bpf )
 		void *newdata = (void *)
 		ALIGN(m->m_data + sizeof(struct ether_header)) -
 		sizeof(struct ether_header);
-		len -= newdata - m->m_data; 
+		len -= newdata - m->m_data;
 		m->m_data = newdata;
 	}
 
@@ -1415,7 +1415,7 @@ iexmit(struct ie_softc *sc)
 
 struct ie_xmit_cmd xc;
 struct ie_xmit_buf xb;
-
+
 ie2host(sc, sc->xmit_buffs[sc->xctail], (char *), sizeof xb );
 xb.ie_xmit_flags |= IE_XMIT_LAST;
 xb.ie_xmit_next = 0x;
@@ -1491,7 +1491,7 @@ iestart(struct ifnet *ifp)
 			len = ETHER_MIN_LEN - ETHER_CRC_LEN;
 			buffer += ETHER_MIN_LEN - ETHER_CRC_LEN;
 		}
-			
+
 		/* When we write directly to the card we dont need this */
 		if (len&1)
		host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len+1 );
@@ -1499,7 +1499,7 @@ iestart(struct ifnet *ifp)
		host2ie(sc, txbuf, sc->xmit_cbuffs[sc->xchead], len );
 
 		/* sc->xmit_buffs[sc->xchead]->ie_xmit_flags = len; */
-		
+
 		WRITE_MEMBER(sc,struct ie_xmit_buf, ie_xmit_flags,
 sc->xmit_buffs[sc->xchead], len)
 
@@ -1521,13 +1521,13 @@ ietint(struct ie_softc *sc)
 
 ifp->if_timer=0;
 ifp->if_flags &= ~IFF_OACTIVE;
- 
+
 READ_MEMBER(sc,struct ie_xmit_cmd, ie_xmit_status,
 	sc->xmit_cmds[sc->xctail], status );
 
 if (!(status_STAT_COMPL) || (status & IE_STAT_BUSY) )
 	printf ( "ietint: command still busy!\n" );
-
+
 if ( status & IE_STAT_OK ) {
 	if_statinc(ifp, if_opackets);
 	if_statadd(ifp, if_collisions, status & IE_XS_MAXCOLL);
@@ -1550,7 +1550,7 @@ ietint(struct ie_softc *sc)
 /* Done with the buffer */
 sc->xmit_free++;
 sc->xctail = (sc->xctail + 1 ) % NTXBUF;
- 
+
 /* Start the next packet transmitting, if any */
 if ( sc->xmit_free

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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:53 UTC 2020

Modified Files:
src/sys/arch/mac68k/nubus: if_netdock_nubus.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/mac68k/nubus/if_netdock_nubus.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/nubus/if_netdock_nubus.c
diff -u src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.33 src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.34
--- src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.33	Tue Feb  4 07:36:28 2020
+++ src/sys/arch/mac68k/nubus/if_netdock_nubus.c	Tue Feb  4 07:40:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $	*/
+/*	$NetBSD: if_netdock_nubus.c,v 1.34 2020/02/04 07:40:53 skrll Exp $	*/
 
 /*
  * Copyright (C) 2000,2002 Daishi Kato 
@@ -43,7 +43,7 @@
 /***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.34 2020/02/04 07:40:53 skrll Exp $");
 
 #include 
 #include 
@@ -91,7 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_netdock_n
 #define REG_DATA	0x0008
 #define REG_EFD00	0xefd00
 
-#define ISR_ALL		0x3300	
+#define ISR_ALL		0x3300
 #define ISR_TX		0x0200
 #define ISR_RX		0x0100
 #define ISR_READY	0x0800
@@ -518,7 +518,7 @@ netdock_init(struct netdock_softc *sc)
 	/* 1382 */
 	savetmp = NIC_GET_2(sc, REG_000E);
 	NIC_PUT_2(sc, REG_000E, 0x0100);
-	NIC_ORW(sc, REG_ISR, ISR_BIT_03); 
+	NIC_ORW(sc, REG_ISR, ISR_BIT_03);
 	NIC_PUT_2(sc, REG_000E, savetmp);
 	NIC_PUT_2(sc, REG_ISR , saveisr);
 



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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:53 UTC 2020

Modified Files:
src/sys/arch/mac68k/nubus: if_netdock_nubus.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/mac68k/nubus/if_netdock_nubus.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/acorn32/podulebus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:34 UTC 2020

Modified Files:
src/sys/arch/acorn32/podulebus: if_ie.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/acorn32/podulebus/if_ie.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/gemini

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:45 UTC 2020

Modified Files:
src/sys/arch/arm/gemini: gemini_gmac.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/gemini/gemini_gmac.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/gemini/gemini_gmac.c
diff -u src/sys/arch/arm/gemini/gemini_gmac.c:1.19 src/sys/arch/arm/gemini/gemini_gmac.c:1.20
--- src/sys/arch/arm/gemini/gemini_gmac.c:1.19	Tue Feb  4 07:35:34 2020
+++ src/sys/arch/arm/gemini/gemini_gmac.c	Tue Feb  4 07:40:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $ */
+/* $NetBSD: gemini_gmac.c,v 1.20 2020/02/04 07:40:45 skrll Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,7 +49,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.20 2020/02/04 07:40:45 skrll Exp $");
 
 #define	SWFREEQ_DESCS	256	/* one page worth */
 #define	HWFREEQ_DESCS	256	/* one page worth */
@@ -127,7 +127,7 @@ gmac_init(struct gmac_softc *sc)
 	_ioh);
 	KASSERT(error == 0);
 	aprint_normal_dev(sc->sc_dev, "gmac_init: global_ioh=%#zx\n", global_ioh);
-	bus_space_write_4(sc->sc_iot, global_ioh, GEMINI_GLOBAL_RESET_CTL, 
+	bus_space_write_4(sc->sc_iot, global_ioh, GEMINI_GLOBAL_RESET_CTL,
 	GLOBAL_RESET_GMAC0|GLOBAL_RESET_GMAC1);
 	do {
 		v = bus_space_read_4(sc->sc_iot, global_ioh,
@@ -524,7 +524,7 @@ gmac_hwqueue_desc(gmac_hwqueue_t *hwq, s
 	i += hwq->hwq_wptr;
 	if (i >= hwq->hwq_size)
 		i -= hwq->hwq_size;
-	return hwq->hwq_base + i; 
+	return hwq->hwq_base + i;
 }
 
 static void
@@ -584,14 +584,14 @@ gmac_hwqueue_sync(gmac_hwqueue_t *hwq)
 	 rptr = (rptr + 1) & (hwq->hwq_size - 1)) {
 		gmac_desc_t * const d = hwq->hwq_base + rptr;
 		if (hqm->hqm_flags & HQM_TX) {
-			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 			sizeof(gmac_desc_t [hwq->hwq_qoff + rptr]),
 			sizeof(gmac_desc_t),
 			BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 			if (d->d_desc3 & htole32(DESC3_EOF))
 gmac_hwqueue_txconsume(hwq, d);
 		} else {
-			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 			sizeof(gmac_desc_t [hwq->hwq_qoff + rptr]),
 			sizeof(gmac_desc_t),
 			BUS_DMASYNC_POSTWRITE);
@@ -599,7 +599,7 @@ gmac_hwqueue_sync(gmac_hwqueue_t *hwq)
 			aprint_debug("gmac_hwqueue_sync(%p): %zu@%p=%#x/%#x/%#x/%#x\n",
 			hwq, rptr, d, d->d_desc0, d->d_desc1,
 			d->d_bufaddr, d->d_desc3);
-			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+			bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 			sizeof(gmac_desc_t [hwq->hwq_qoff + rptr]),
 			sizeof(gmac_desc_t),
 			BUS_DMASYNC_PREWRITE);
@@ -631,7 +631,7 @@ gmac_hwqueue_produce(gmac_hwqueue_t *hwq
 	 count > 0;
 	 count--, wptr = (wptr + 1) & (hwq->hwq_size - 1)) {
 		KASSERT(((wptr + 1) & (hwq->hwq_size - 1)) != hwq->hwq_rptr);
-		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 		sizeof(gmac_desc_t [hwq->hwq_qoff + wptr]),
 		sizeof(gmac_desc_t),
 		BUS_DMASYNC_PREWRITE);
@@ -640,7 +640,7 @@ gmac_hwqueue_produce(gmac_hwqueue_t *hwq
 	hwq->hwq_wptr = wptr;
 #else
 	if (hwq->hwq_wptr + count >= hwq->hwq_size) {
-		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 		sizeof(gmac_desc_t [hwq->hwq_qoff + hwq->hwq_wptr]),
 		sizeof(gmac_desc_t [hwq->hwq_size - hwq->hwq_wptr]),
 		BUS_DMASYNC_PREWRITE);
@@ -648,7 +648,7 @@ gmac_hwqueue_produce(gmac_hwqueue_t *hwq
 		hwq->hwq_wptr = 0;
 	}
 	if (count > 0) {
-		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap, 
+		bus_dmamap_sync(hqm->hqm_dmat, hqm->hqm_dmamap,
 		sizeof(gmac_desc_t [hwq->hwq_qoff + hwq->hwq_wptr]),
 		sizeof(gmac_desc_t [count]),
 		BUS_DMASYNC_PREWRITE);
@@ -884,8 +884,8 @@ gmac_hwqueue_consume(gmac_hwqueue_t *hwq
 
 
 	v = bus_space_read_4(hwq->hwq_iot, hwq->hwq_qrwptr_ioh, 0);
-	rptr = (v >>  0) & 0x; 
-	hwq->hwq_wptr = (v >> 16) & 0x; 
+	rptr = (v >>  0) & 0x;
+	hwq->hwq_wptr = (v >> 16) & 0x;
 	KASSERT(rptr == hwq->hwq_rptr);
 	if (rptr == hwq->hwq_wptr)
 		return 0;
@@ -956,7 +956,7 @@ gmac_hwqmem_destroy(gmac_hwqmem_t *hqm)
 gmac_hwqmem_t *
 gmac_hwqmem_create(gmac_mapcache_t *mc, size_t ndesc, size_t nqueue, int flags)
 {
-	gmac_hwqmem_t *hqm; 
+	gmac_hwqmem_t *hqm;
 	int error;
 
 	KASSERT(ndesc > 0 && ndesc <= 2048);
@@ -992,7 +992,7 @@ gmac_hwqmem_create(gmac_mapcache_t *mc, 
 	}
 	error = bus_dmamap_load(hqm->hqm_dmat, hqm->hqm_dmamap, hqm->hqm_base,
 	hqm->hqm_memsize, NULL,
-	BUS_DMA_WAITOK|BUS_DMA_WRITE|BUS_DMA_READ|BUS_DMA_COHERENT); 
+	

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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:40:45 UTC 2020

Modified Files:
src/sys/arch/arm/gemini: gemini_gmac.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/gemini/gemini_gmac.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/qbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:11 UTC 2020

Modified Files:
src/sys/dev/qbus: if_dmc.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/qbus/if_dmc.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/qbus/if_dmc.c
diff -u src/sys/dev/qbus/if_dmc.c:1.26 src/sys/dev/qbus/if_dmc.c:1.27
--- src/sys/dev/qbus/if_dmc.c:1.26	Wed Jul 20 07:37:51 2016
+++ src/sys/dev/qbus/if_dmc.c	Tue Feb  4 07:37:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $	*/
+/*	$NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $	*/
 /*
  * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $");
 
 #undef DMCDEBUG	/* for base table dump on fatal error */
 
@@ -595,7 +595,7 @@ dmcxint(void *a)
 
 			len = (arg & DMC_CCOUNT) - sizeof (struct dmc_header);
 			if (len < 0 || len > DMCMTU) {
-ifp->if_ierrors++;
+if_statinc(ifp, if_ierrors);
 #ifdef DMCDEBUG
 printd("%s: bad rcv pkt addr 0x%x len 0x%x\n",
 device_xname(sc->sc_dev), pkaddr, len);
@@ -653,7 +653,7 @@ dmcxint(void *a)
 			 * A write has completed, start another
 			 * transfer if there is more data to send.
 			 */
-			ifp->if_opackets++;
+			if_statinc(ifp, if_opackets);
 			/* find associated dmcbuf structure */
 			ifxp = >sc_ifw[0];
 			for (rp = >sc_xbufs[0]; rp < >sc_xbufs[NXMT]; rp++) {
@@ -704,7 +704,7 @@ dmcxint(void *a)
 			/* ACCUMULATE STATISTICS */
 			switch(arg) {
 			case DMC_NOBUFS:
-ifp->if_ierrors++;
+if_statinc(ifp, if_ierrors);
 if ((sc->sc_nobuf++ % DMC_RPNBFS) == 0)
 	goto report;
 break;
@@ -717,7 +717,7 @@ dmcxint(void *a)
 	goto report;
 break;
 			case DMC_DATACK:
-ifp->if_oerrors++;
+if_statinc(ifp, if_oerrors);
 if ((sc->sc_datck++ % DMC_RPDCK) == 0)
 	goto report;
 break;



CVS commit: src/sys/dev/ppbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:06 UTC 2020

Modified Files:
src/sys/dev/ppbus: if_plip.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ppbus/if_plip.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/ppbus/if_plip.c
diff -u src/sys/dev/ppbus/if_plip.c:1.34 src/sys/dev/ppbus/if_plip.c:1.35
--- src/sys/dev/ppbus/if_plip.c:1.34	Sun Nov 10 21:16:37 2019
+++ src/sys/dev/ppbus/if_plip.c	Tue Feb  4 07:37:06 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.34 2019/11/10 21:16:37 chs Exp $ */
+/* $NetBSD: if_plip.c,v 1.35 2020/02/04 07:37:06 skrll Exp $ */
 
 /*-
  * Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.34 2019/11/10 21:16:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.35 2020/02/04 07:37:06 skrll Exp $");
 
 /*
  * Parallel port TCP/IP interfaces added.  I looked at the driver from
@@ -656,7 +656,7 @@ end:
 err:
 	/* Return to idle state */
 	ppbus_wdtr(ppbus, 0);
-	ifp->if_ierrors++;
+	if_statinc(ifp, if_ierrors);
 	sc->sc_iferrs++;
 	LP_PRINTF("R");
 	/* Disable interface if there are too many errors */
@@ -735,7 +735,7 @@ lpoutput(struct ifnet *ifp, struct mbuf 
 		if ((ifp->if_flags & IFF_OACTIVE) == 0)
 			lpstart(ifp);
 	} else {
-		ifp->if_oerrors++;
+		if_statinc(ifp, if_oerrors);
 		sc->sc_iferrs++;
 		LP_PRINTF("Q");
 
@@ -908,7 +908,7 @@ nend:
 			/* Go quiescent */
 			ppbus_wdtr(ppbus, 0);
 
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 			lp->sc_iferrs++;
 			LP_PRINTF("X");
 
@@ -925,8 +925,8 @@ nend:
 			IFQ_DEQUEUE(>if_snd, m);
 			if(ifp->if_bpf)
 lptap(ifp, m, BPF_D_OUT);
-			ifp->if_opackets++;
-			ifp->if_obytes += m->m_pkthdr.len;
+			if_statinc(ifp, if_opackets);
+			if_statadd(ifp, if_obytes, m->m_pkthdr.len);
 			m_freem(m);
 		}
 	}



CVS commit: src/sys/dev/usb

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:16 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 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.36 src/sys/dev/usb/if_urndis.c:1.37
--- src/sys/dev/usb/if_urndis.c:1.36	Wed Jan 29 06:39:07 2020
+++ src/sys/dev/usb/if_urndis.c	Tue Feb  4 07:37:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urndis.c,v 1.36 2020/01/29 06:39:07 thorpej Exp $ */
+/*	$NetBSD: if_urndis.c,v 1.37 2020/02/04 07:37:16 skrll 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.36 2020/01/29 06:39:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.37 2020/02/04 07:37:16 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -847,7 +847,7 @@ urndis_watchdog(struct ifnet *ifp)
 	if (un->un_dying)
 		return;
 
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 	printf("%s: watchdog timeout\n", DEVNAME(un));
 
 	urndis_ctrl_keepalive(un);



CVS commit: src/sys/dev/pci

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:00 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_rge.c

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

Modified files:

Index: src/sys/dev/pci/if_kse.c
diff -u src/sys/dev/pci/if_kse.c:1.47 src/sys/dev/pci/if_kse.c:1.48
--- src/sys/dev/pci/if_kse.c:1.47	Mon Jan  6 07:57:06 2020
+++ src/sys/dev/pci/if_kse.c	Tue Feb  4 07:37:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_kse.c,v 1.47 2020/01/06 07:57:06 nisimura Exp $	*/
+/*	$NetBSD: if_kse.c,v 1.48 2020/02/04 07:37:00 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.47 2020/01/06 07:57:06 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.48 2020/02/04 07:37:00 skrll Exp $");
 
 #include 
 #include 
@@ -934,7 +934,7 @@ kse_watchdog(struct ifnet *ifp)
 		aprint_error_dev(sc->sc_dev,
 		"device timeout (txfree %d txsfree %d txnext %d)\n",
 		sc->sc_txfree, sc->sc_txsfree, sc->sc_txnext);
-		ifp->if_oerrors++;
+		if_statinc(ifp, if_oerrors);
 
 		/* Reset the interface. */
 		kse_init(ifp);
@@ -1269,7 +1269,7 @@ rxintr(struct kse_softc *sc)
 		/* R0_FS | R0_LS must have been marked for this desc */
 
 		if (rxstat & R0_ES) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 #define PRINTERR(bit, str)		\
 			if (rxstat & (bit))\
 aprint_error_dev(sc->sc_dev,		\
@@ -1292,7 +1292,7 @@ rxintr(struct kse_softc *sc)
 		m = rxs->rxs_mbuf;
 
 		if (add_rxbuf(sc, i) != 0) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			KSE_INIT_RXDESC(sc, i);
 			bus_dmamap_sync(sc->sc_dmat,
 			rxs->rxs_dmamap, 0,
@@ -1347,7 +1347,7 @@ txreap(struct kse_softc *sc)
 
 		/* There is no way to tell transmission status per frame */
 
-		ifp->if_opackets++;
+		if_statinc(ifp, if_opackets);
 
 		sc->sc_txfree += txs->txs_ndesc;
 		bus_dmamap_sync(sc->sc_dmat, txs->txs_dmamap,

Index: src/sys/dev/pci/if_rge.c
diff -u src/sys/dev/pci/if_rge.c:1.3 src/sys/dev/pci/if_rge.c:1.4
--- src/sys/dev/pci/if_rge.c:1.3	Sun Jan 12 23:22:12 2020
+++ src/sys/dev/pci/if_rge.c	Tue Feb  4 07:37:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rge.c,v 1.3 2020/01/12 23:22:12 sevan Exp $	*/
+/*	$NetBSD: if_rge.c,v 1.4 2020/02/04 07:37:00 skrll Exp $	*/
 /*	$OpenBSD: if_rge.c,v 1.2 2020/01/02 09:00:45 kevlo Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.3 2020/01/12 23:22:12 sevan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.4 2020/02/04 07:37:00 skrll Exp $");
 
 /* #include "bpfilter.h" Sevan */
 /* #include "vlan.h" Sevan */
@@ -599,7 +599,7 @@ rge_watchdog(struct ifnet *ifp)
 	struct rge_softc *sc = ifp->if_softc;
 
 	printf("%s: watchdog timeout\n", sc->sc_dev.dv_xname);
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 
 	rge_init(ifp);
 }
@@ -1189,7 +1189,7 @@ rge_rxeof(struct rge_softc *sc)
 		}
 
 		if (rxstat & RGE_RDCMDSTS_RXERRSUM) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			/*
 			 * If this is part of a multi-fragment packet,
 			 * discard all the pieces.
@@ -1307,9 +1307,9 @@ rge_txeof(struct rge_softc *sc)
 		txq->txq_mbuf = NULL;
 
 		if (txstat & (RGE_TDCMDSTS_EXCESSCOLL | RGE_TDCMDSTS_COLL))
-			ifp->if_collisions++;
+			if_statinc(ifp, if_collisions);
 		if (txstat & RGE_TDCMDSTS_TXERR)
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 
 		bus_dmamap_sync(sc->sc_dmat, sc->rge_ldata.rge_tx_list_map,
 		idx * sizeof(struct rge_tx_desc),



CVS commit: src/sys/dev/qbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:11 UTC 2020

Modified Files:
src/sys/dev/qbus: if_dmc.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/qbus/if_dmc.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/marvell

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:55 UTC 2020

Modified Files:
src/sys/dev/marvell: if_gfe.c if_mvxpe.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/marvell/if_gfe.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/marvell/if_mvxpe.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/marvell/if_gfe.c
diff -u src/sys/dev/marvell/if_gfe.c:1.54 src/sys/dev/marvell/if_gfe.c:1.55
--- src/sys/dev/marvell/if_gfe.c:1.54	Tue May 28 07:41:49 2019
+++ src/sys/dev/marvell/if_gfe.c	Tue Feb  4 07:36:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gfe.c,v 1.54 2019/05/28 07:41:49 msaitoh Exp $	*/
+/*	$NetBSD: if_gfe.c,v 1.55 2020/02/04 07:36:55 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.54 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.55 2020/02/04 07:36:55 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -747,7 +747,7 @@ gfe_ifwatchdog(struct ifnet *ifp)
 		GE_TXDPRESYNC(sc, txq, curtxdnum);
 	}
 	aprint_error("\n");
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 	(void) gfe_whack(sc, GE_WHACK_RESTART);
 	GE_FUNC_EXIT(sc, "");
 }
@@ -907,7 +907,7 @@ gfe_rx_get(struct gfe_softc *sc, enum gf
 			GE_DPRINTF(sc, ("!"));
 			--rxq->rxq_active;
 			ifp->if_ipackets++;
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			goto give_it_back;
 		}
 
@@ -1008,7 +1008,7 @@ gfe_rx_process(struct gfe_softc *sc, uin
 			sc->sc_tickflags |= GE_TICK_RX_RESTART;
 			callout_reset(>sc_co, 1, gfe_tick, sc);
 		}
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		GE_DPRINTF(sc, ("%s: rx queue %d filled at %u\n",
 		device_xname(sc->sc_dev), rxprio, rxq->rxq_fi));
 		memset(masks, 0, sizeof(masks));
@@ -1249,9 +1249,9 @@ gfe_tx_enqueue(struct gfe_softc *sc, enu
 		txq->txq_nactive--;
 
 		/* statistics */
-		ifp->if_opackets++;
+		if_statinc(ifp, if_opackets);
 		if (cmdsts & TX_STS_ES)
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 		GE_DPRINTF(sc, ("%%"));
 	}
 
@@ -1424,9 +1424,9 @@ gfe_tx_done(struct gfe_softc *sc, enum g
 		txq->txq_inptr += roundup(pktlen, dcache_line_size);
 
 		/* statistics */
-		ifp->if_opackets++;
+		if_statinc(ifp, if_opackets);
 		if (cmdsts & TX_STS_ES)
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 
 		/* txd->ed_bufptr = 0; */
 

Index: src/sys/dev/marvell/if_mvxpe.c
diff -u src/sys/dev/marvell/if_mvxpe.c:1.31 src/sys/dev/marvell/if_mvxpe.c:1.32
--- src/sys/dev/marvell/if_mvxpe.c:1.31	Sat Dec 28 03:07:18 2019
+++ src/sys/dev/marvell/if_mvxpe.c	Tue Feb  4 07:36:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mvxpe.c,v 1.31 2019/12/28 03:07:18 gutteridge Exp $	*/
+/*	$NetBSD: if_mvxpe.c,v 1.32 2020/02/04 07:36:55 skrll Exp $	*/
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.31 2019/12/28 03:07:18 gutteridge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.32 2020/02/04 07:36:55 skrll Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -1709,7 +1709,7 @@ mvxpe_start(struct ifnet *ifp)
 		sc->sc_tx_ring[q].tx_queue_len);
 		DPRINTIFNET(ifp, 1, "a packet is added to tx ring\n");
 		sc->sc_tx_pending++;
-		ifp->if_opackets++;
+		if_statinc(ifp, if_opackets);
 		ifp->if_timer = 1;
 		sc->sc_wdogsoft = 1;
 		bpf_mtap(ifp, m, BPF_D_OUT);
@@ -1937,7 +1937,7 @@ mvxpe_watchdog(struct ifnet *ifp)
 MVXPE_EVCNT_INCR(>sc_ev.ev_drv_wdogsoft);
 			} else {
 aprint_error_ifnet(ifp, "watchdog timeout\n");
-ifp->if_oerrors++;
+if_statinc(ifp, if_oerrors);
 mvxpe_linkreset(sc);
 mvxpe_sc_unlock(sc);
 
@@ -3270,7 +3270,7 @@ mvxpe_update_mib(struct mvxpe_softc *sc)
 			ifp->if_ierrors += val;
 			break;
 		case MVXPE_MIBEXT_IF_COLLISIONS:
-			ifp->if_collisions += val;
+			if_statadd(ifp, if_collisions, val);
 			break;
 		default:
 			break;



CVS commit: src/sys/dev/marvell

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:55 UTC 2020

Modified Files:
src/sys/dev/marvell: if_gfe.c if_mvxpe.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/marvell/if_gfe.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/marvell/if_mvxpe.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/ppbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:06 UTC 2020

Modified Files:
src/sys/dev/ppbus: if_plip.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ppbus/if_plip.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/pci

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:00 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_rge.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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:37:16 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 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/arch/mac68k/nubus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:28 UTC 2020

Modified Files:
src/sys/arch/mac68k/nubus: if_netdock_nubus.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mac68k/nubus/if_netdock_nubus.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/nubus/if_netdock_nubus.c
diff -u src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.32 src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.33
--- src/sys/arch/mac68k/nubus/if_netdock_nubus.c:1.32	Wed Jan 29 05:25:42 2020
+++ src/sys/arch/mac68k/nubus/if_netdock_nubus.c	Tue Feb  4 07:36:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_netdock_nubus.c,v 1.32 2020/01/29 05:25:42 thorpej Exp $	*/
+/*	$NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $	*/
 
 /*
  * Copyright (C) 2000,2002 Daishi Kato 
@@ -43,7 +43,7 @@
 /***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.32 2020/01/29 05:25:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $");
 
 #include 
 #include 
@@ -674,9 +674,9 @@ netdock_txint(struct netdock_softc *sc)
 		NIC_GET_2(sc, REG_ISR);
 		regdata = NIC_GET_2(sc, REG_DATA);
 		if ((regdata & REG_DATA_BIT_08) == 0) {
-			/* ifp->if_collisions++; */
+			/* if_statinc(ifp, if_collisions); */
 			if (regdata & REG_DATA_BIT_07)
-			/* ifp->if_oerrors++; */
+			/* if_statinc(ifp, if_oerrors); */
 			NIC_PUT_2(sc, REG_000E, 0);
 			NIC_ORW(sc, REG_, 0x0100);
 			NIC_PUT_2(sc, REG_000E, 0x0200);



CVS commit: src/sys/arch/evbppc/virtex/dev

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:04 UTC 2020

Modified Files:
src/sys/arch/evbppc/virtex/dev: if_temac.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/virtex/dev/if_temac.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/evbppc/virtex/dev/if_temac.c
diff -u src/sys/arch/evbppc/virtex/dev/if_temac.c:1.15 src/sys/arch/evbppc/virtex/dev/if_temac.c:1.16
--- src/sys/arch/evbppc/virtex/dev/if_temac.c:1.15	Wed May 29 06:21:57 2019
+++ src/sys/arch/evbppc/virtex/dev/if_temac.c	Tue Feb  4 07:36:04 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: if_temac.c,v 1.15 2019/05/29 06:21:57 msaitoh Exp $ */
+/* 	$NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.15 2019/05/29 06:21:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $");
 
 
 #include 
@@ -1212,7 +1212,7 @@ temac_rxreap(struct temac_softc *sc)
 			(TEMAC_ISINTR(tail) ? CDMAC_STAT_INTR : 0) |
 			(TEMAC_ISLAST(tail) ? CDMAC_STAT_STOP : 0);
 
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			continue;
  		}
 



CVS commit: src/sys/arch/macppc/dev

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:36 UTC 2020

Modified Files:
src/sys/arch/macppc/dev: am79c950.c if_bm.c if_gm.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/macppc/dev/am79c950.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/macppc/dev/if_bm.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/macppc/dev/if_gm.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/macppc/dev/am79c950.c
diff -u src/sys/arch/macppc/dev/am79c950.c:1.47 src/sys/arch/macppc/dev/am79c950.c:1.48
--- src/sys/arch/macppc/dev/am79c950.c:1.47	Fri Dec 27 09:32:10 2019
+++ src/sys/arch/macppc/dev/am79c950.c	Tue Feb  4 07:36:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: am79c950.c,v 1.47 2019/12/27 09:32:10 msaitoh Exp $	*/
+/*	$NetBSD: am79c950.c,v 1.48 2020/02/04 07:36:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 David Huang 
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.47 2019/12/27 09:32:10 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.48 2020/02/04 07:36:36 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -271,7 +271,7 @@ mcstart(struct ifnet *ifp)
 		ifp->if_flags |= IFF_OACTIVE;
 		maceput(sc, m);
 
-		ifp->if_opackets++;		/* # of pkts */
+		if_statinc(ifp, if_opackets);		/* # of pkts */
 	}
 }
 
@@ -570,13 +570,13 @@ mace_read(struct mc_softc *sc, uint8_t *
 		printf("%s: invalid packet size %d; dropping\n",
 		device_xname(sc->sc_dev), len);
 #endif
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		return;
 	}
 
 	m = mace_get(sc, pkt, len);
 	if (m == NULL) {
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		return;
 	}
 

Index: src/sys/arch/macppc/dev/if_bm.c
diff -u src/sys/arch/macppc/dev/if_bm.c:1.61 src/sys/arch/macppc/dev/if_bm.c:1.62
--- src/sys/arch/macppc/dev/if_bm.c:1.61	Sun Nov 10 21:16:29 2019
+++ src/sys/arch/macppc/dev/if_bm.c	Tue Feb  4 07:36:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bm.c,v 1.61 2019/11/10 21:16:29 chs Exp $	*/
+/*	$NetBSD: if_bm.c,v 1.62 2020/02/04 07:36:36 skrll Exp $	*/
 
 /*-
  * Copyright (C) 1998, 1999, 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.61 2019/11/10 21:16:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.62 2020/02/04 07:36:36 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -490,7 +490,7 @@ bmac_rint(void *v)
 
 		m = bmac_get(sc, data, datalen);
 		if (m == NULL) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			goto next;
 		}
 
@@ -576,7 +576,7 @@ bmac_start(struct ifnet *ifp)
 
 		/* 5 seconds to watch for failing to transmit */
 		ifp->if_timer = 5;
-		ifp->if_opackets++;		/* # of pkts */
+		if_statinc(ifp, if_opackets);		/* # of pkts */
 
 		bmac_transmit_packet(sc, sc->sc_txbuf, tlen);
 	}
@@ -680,7 +680,7 @@ bmac_watchdog(struct ifnet *ifp)
 	bmac_reset_bits(sc, TXCFG, TxMACEnable);
 
 	printf("%s: device timeout\n", ifp->if_xname);
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 
 	bmac_reset(sc);
 }

Index: src/sys/arch/macppc/dev/if_gm.c
diff -u src/sys/arch/macppc/dev/if_gm.c:1.56 src/sys/arch/macppc/dev/if_gm.c:1.57
--- src/sys/arch/macppc/dev/if_gm.c:1.56	Sun Nov 10 21:16:29 2019
+++ src/sys/arch/macppc/dev/if_gm.c	Tue Feb  4 07:36:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gm.c,v 1.56 2019/11/10 21:16:29 chs Exp $	*/
+/*	$NetBSD: if_gm.c,v 1.57 2020/02/04 07:36:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.56 2019/11/10 21:16:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.57 2020/02/04 07:36:36 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -362,13 +362,13 @@ gmac_rint(struct gmac_softc *sc)
 		len -= 4;	/* CRC */
 
 		if (le32toh(dp->cmd_hi) & 0x4000) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			goto next;
 		}
 
 		m = gmac_get(sc, sc->sc_rxbuf[i], len);
 		if (m == NULL) {
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 			goto next;
 		}
 
@@ -458,7 +458,7 @@ gmac_start(struct ifnet *ifp)
 
 		/* 5 seconds to watch for failing to transmit */
 		ifp->if_timer = 5;
-		ifp->if_opackets++;		/* # of pkts */
+		if_statinc(ifp, if_opackets);		/* # of pkts */
 
 		i = sc->sc_txnext;
 		buff = sc->sc_txbuf[i];
@@ -823,7 +823,7 @@ gmac_watchdog(struct ifnet *ifp)
 	struct gmac_softc *sc = ifp->if_softc;
 
 	printf("%s: device timeout\n", ifp->if_xname);
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 
 	gmac_reset(sc);
 	gmac_init(sc);



CVS commit: src/sys/arch/macppc/dev

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:36 UTC 2020

Modified Files:
src/sys/arch/macppc/dev: am79c950.c if_bm.c if_gm.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/macppc/dev/am79c950.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/macppc/dev/if_bm.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/macppc/dev/if_gm.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/ic

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:50 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/am79900.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/newsmips/apbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:42 UTC 2020

Modified Files:
src/sys/arch/newsmips/apbus: if_sn.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/newsmips/apbus/if_sn.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/newsmips/apbus/if_sn.c
diff -u src/sys/arch/newsmips/apbus/if_sn.c:1.46 src/sys/arch/newsmips/apbus/if_sn.c:1.47
--- src/sys/arch/newsmips/apbus/if_sn.c:1.46	Fri Sep 13 07:55:06 2019
+++ src/sys/arch/newsmips/apbus/if_sn.c	Tue Feb  4 07:36:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sn.c,v 1.46 2019/09/13 07:55:06 msaitoh Exp $	*/
+/*	$NetBSD: if_sn.c,v 1.47 2020/02/04 07:36:42 skrll Exp $	*/
 
 /*
  * National Semiconductor  DP8393X SONIC Driver
@@ -16,7 +16,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.46 2019/09/13 07:55:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.47 2020/02/04 07:36:42 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -347,7 +347,7 @@ outloop:
 	sc->mtd_prev = sc->mtd_free;
 	sc->mtd_free = mtd_next;
 
-	ifp->if_opackets++;		/* # of pkts */
+	if_statinc(ifp, if_opackets);		/* # of pkts */
 
 	/* Jump back for possibly more punishment. */
 	goto outloop;
@@ -916,11 +916,11 @@ sonictxint(struct sn_softc *sc)
 
 		txp_status = SRO(sc->bitmode, txp, TXP_STATUS);
 
-		ifp->if_collisions += (txp_status & TCR_EXC) ? 16 :
-			((txp_status & TCR_NC) >> 12);
+		if_statadd(ifp, if_collisions, (txp_status & TCR_EXC) ? 16 :
+			((txp_status & TCR_NC) >> 12));
 
 		if ((txp_status & TCR_PTX) == 0) {
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 			printf("%s: Tx packet status=0x%x\n",
 			device_xname(sc->sc_dev), txp_status);
 



CVS commit: src/sys/dev/ic

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:50 UTC 2020

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

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/am79900.c

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

Modified files:

Index: src/sys/dev/ic/am79900.c
diff -u src/sys/dev/ic/am79900.c:1.28 src/sys/dev/ic/am79900.c:1.29
--- src/sys/dev/ic/am79900.c:1.28	Tue Jun 26 06:48:00 2018
+++ src/sys/dev/ic/am79900.c	Tue Feb  4 07:36:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: am79900.c,v 1.28 2018/06/26 06:48:00 msaitoh Exp $	*/
+/*	$NetBSD: am79900.c,v 1.29 2020/02/04 07:36:50 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: am79900.c,v 1.28 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am79900.c,v 1.29 2020/02/04 07:36:50 skrll Exp $");
 
 #include 
 #include 
@@ -278,12 +278,12 @@ am79900_rint(struct lance_softc *sc)
 			if (rmd.rmd1 & LE_R1_BUFF)
 printf("%s: receive buffer error\n",
 device_xname(sc->sc_dev));
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 		} else if ((rmd.rmd1 & (LE_R1_STP | LE_R1_ENP)) !=
 		(LE_R1_STP | LE_R1_ENP)) {
 			printf("%s: dropping chained buffer\n",
 			device_xname(sc->sc_dev));
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 		} else {
 #ifdef LEDEBUG
 			if (sc->sc_debug)
@@ -360,22 +360,22 @@ am79900_tint(struct lance_softc *sc)
 	device_xname(sc->sc_dev));
 			}
 			if (tmd.tmd2 & LE_T2_LCOL)
-ifp->if_collisions++;
+if_statinc(ifp, if_collisions);
 			if (tmd.tmd2 & LE_T2_RTRY) {
 #ifdef LEDEBUG
 printf("%s: excessive collisions\n",
 device_xname(sc->sc_dev));
 #endif
-ifp->if_collisions += 16;
+if_statadd(ifp, if_collisions, 16);
 			}
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 		} else {
 			if (tmd.tmd1 & LE_T1_ONE)
-ifp->if_collisions++;
+if_statinc(ifp, if_collisions);
 			else if (tmd.tmd1 & LE_T1_MORE)
 /* Real number is unknown. */
-ifp->if_collisions += 2;
-			ifp->if_opackets++;
+if_statadd(ifp, if_collisions, 2);
+			if_statinc(ifp, if_opackets);
 		}
 
 		if (++bix == sc->sc_ntbuf)
@@ -419,20 +419,20 @@ am79900_intr(void *arg)
 #ifdef LEDEBUG
 			printf("%s: babble\n", device_xname(sc->sc_dev));
 #endif
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 		}
 #if 0
 		if (isr & LE_C0_CERR) {
 			printf("%s: collision error\n",
 			device_xname(sc->sc_dev));
-			ifp->if_collisions++;
+			if_statinc(ifp, if_collisions);
 		}
 #endif
 		if (isr & LE_C0_MISS) {
 #ifdef LEDEBUG
 			printf("%s: missed packet\n", device_xname(sc->sc_dev));
 #endif
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 		}
 		if (isr & LE_C0_MERR) {
 			printf("%s: memory error\n", device_xname(sc->sc_dev));
@@ -443,13 +443,13 @@ am79900_intr(void *arg)
 
 	if ((isr & LE_C0_RXON) == 0) {
 		printf("%s: receiver disabled\n", device_xname(sc->sc_dev));
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		lance_reset(sc);
 		return (1);
 	}
 	if ((isr & LE_C0_TXON) == 0) {
 		printf("%s: transmitter disabled\n", device_xname(sc->sc_dev));
-		ifp->if_oerrors++;
+		if_statinc(ifp, if_oerrors);
 		lance_reset(sc);
 		return (1);
 	}



CVS commit: src/sys/arch/newsmips/apbus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:42 UTC 2020

Modified Files:
src/sys/arch/newsmips/apbus: if_sn.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/newsmips/apbus/if_sn.c

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



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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:28 UTC 2020

Modified Files:
src/sys/arch/mac68k/nubus: if_netdock_nubus.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mac68k/nubus/if_netdock_nubus.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/evbppc/virtex/dev

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:36:04 UTC 2020

Modified Files:
src/sys/arch/evbppc/virtex/dev: if_temac.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/virtex/dev/if_temac.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/emips/ebus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:45 UTC 2020

Modified Files:
src/sys/arch/emips/ebus: if_le_ebus.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/emips/ebus/if_le_ebus.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/emips/ebus/if_le_ebus.c
diff -u src/sys/arch/emips/ebus/if_le_ebus.c:1.21 src/sys/arch/emips/ebus/if_le_ebus.c:1.22
--- src/sys/arch/emips/ebus/if_le_ebus.c:1.21	Thu Dec  5 05:28:09 2019
+++ src/sys/arch/emips/ebus/if_le_ebus.c	Tue Feb  4 07:35:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $	*/
+/*	$NetBSD: if_le_ebus.c,v 1.22 2020/02/04 07:35:45 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.22 2020/02/04 07:35:45 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -693,7 +693,7 @@ enic_rint(struct enic_softc *sc, uint32_
 	/* uhu?? */
 	printf("%s: bad recv phys %llx\n", device_xname(sc->sc_dev),
 	(long long)phys);
-	ifp->if_ierrors++;
+	if_statinc(ifp, if_ierrors);
 	return;
 
 	/* got it, pop it */
@@ -714,7 +714,7 @@ enic_rint(struct enic_softc *sc, uint32_
 	len > ((sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) ?
 		ETHER_VLAN_ENCAP_LEN + ETHERMTU + sizeof(struct ether_header) :
 		ETHERMTU + sizeof(struct ether_header))) {
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 
 		/* reuse it */
 		enic_post_recv(sc, m);
@@ -755,7 +755,7 @@ void enic_tint(struct enic_softc *sc, ui
 	/* uhu?? */
 	printf("%s: bad xmit phys %llx\n", device_xname(sc->sc_dev),
 	(long long)phys);
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 	return;
 
 	/* got it, pop it */
@@ -771,7 +771,7 @@ void enic_tint(struct enic_softc *sc, ui
 		sc->bxh++;
 #endif
 	m_freem(m);
-	ifp->if_opackets++;
+	if_statinc(ifp, if_opackets);
 
 	if (--sc->sc_no_td == 0)
 		ifp->if_timer = 0;



CVS commit: src/sys/arch/acorn32/podulebus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:21 UTC 2020

Modified Files:
src/sys/arch/acorn32/podulebus: if_ie.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/acorn32/podulebus/if_ie.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/acorn32/podulebus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:21 UTC 2020

Modified Files:
src/sys/arch/acorn32/podulebus: if_ie.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/acorn32/podulebus/if_ie.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/acorn32/podulebus/if_ie.c
diff -u src/sys/arch/acorn32/podulebus/if_ie.c:1.44 src/sys/arch/acorn32/podulebus/if_ie.c:1.45
--- src/sys/arch/acorn32/podulebus/if_ie.c:1.44	Fri Sep 13 07:55:05 2019
+++ src/sys/arch/acorn32/podulebus/if_ie.c	Tue Feb  4 07:35:21 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.44 2019/09/13 07:55:05 msaitoh Exp $ */
+/* $NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.44 2019/09/13 07:55:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -1274,7 +1274,7 @@ ie_read_frame(struct ie_softc *sc, int n
 }
 
 if ( m==0 ) {
-	ifp->if_ierrors++;
+	if_statinc(ifp, if_ierrors);
 	return;
 }
 
@@ -1529,10 +1529,10 @@ ietint(struct ie_softc *sc)
 	printf ( "ietint: command still busy!\n" );
 
 if ( status & IE_STAT_OK ) {
-	ifp->if_opackets++;
-	ifp->if_collisions += status & IE_XS_MAXCOLL;
+	if_statinc(ifp, if_opackets);
+	if_statadd(ifp, if_collisions, status & IE_XS_MAXCOLL);
 } else {
-	ifp->if_oerrors++;	
+	if_statinc(ifp, if_oerrors);
 	if ( status & IE_STAT_ABORT )
 	printf ( "ie: send aborted\n" );
 	if ( status & IE_XS_LATECOLL )



CVS commit: src/sys/arch/arm

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:34 UTC 2020

Modified Files:
src/sys/arch/arm/at91: at91emac.c
src/sys/arch/arm/gemini: gemini_gmac.c
src/sys/arch/arm/omap: if_cpsw.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/at91/at91emac.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/gemini/gemini_gmac.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/omap/if_cpsw.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/emips/ebus

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:45 UTC 2020

Modified Files:
src/sys/arch/emips/ebus: if_le_ebus.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/emips/ebus/if_le_ebus.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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  4 07:35:34 UTC 2020

Modified Files:
src/sys/arch/arm/at91: at91emac.c
src/sys/arch/arm/gemini: gemini_gmac.c
src/sys/arch/arm/omap: if_cpsw.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/at91/at91emac.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/gemini/gemini_gmac.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/omap/if_cpsw.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/at91/at91emac.c
diff -u src/sys/arch/arm/at91/at91emac.c:1.29 src/sys/arch/arm/at91/at91emac.c:1.30
--- src/sys/arch/arm/at91/at91emac.c:1.29	Tue May 28 07:41:46 2019
+++ src/sys/arch/arm/at91/at91emac.c	Tue Feb  4 07:35:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: at91emac.c,v 1.29 2019/05/28 07:41:46 msaitoh Exp $	*/
+/*	$NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.29 2019/05/28 07:41:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $");
 
 #include 
 #include 
@@ -245,13 +245,13 @@ emac_intr(void *arg)
 		EMAC_WRITE(ETH_CTL, ctl & ~ETH_CTL_RE);	// disable receiver
 		EMAC_WRITE(ETH_RSR, ETH_RSR_BNA);	// clear BNA bit
 		EMAC_WRITE(ETH_CTL, ctl |  ETH_CTL_RE);	// re-enable receiver
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		ifp->if_ipackets++;
 		DPRINTFN(1,("%s: out of receive buffers\n", __FUNCTION__));
 	}
 	if (isr & ETH_ISR_ROVR) {
 		EMAC_WRITE(ETH_RSR, ETH_RSR_OVR);	// clear interrupt
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		ifp->if_ipackets++;
 		DPRINTFN(1,("%s: receive overrun\n", __FUNCTION__));
 	}
@@ -306,7 +306,7 @@ emac_intr(void *arg)
 if (m != NULL) {
 	m_freem(m);
 }
-ifp->if_ierrors++;
+if_statinc(ifp, if_ierrors);
 			}
 			sc->rxqi++;
 		}
@@ -587,7 +587,7 @@ emac_tick(void *arg)
 	int s;
 	uint32_t misses;
 
-	ifp->if_collisions += EMAC_READ(ETH_SCOL) + EMAC_READ(ETH_MCOL);
+	if_statadd(ifp, if_collisions, EMAC_READ(ETH_SCOL) + EMAC_READ(ETH_MCOL));
 	/* These misses are ok, they will happen if the RAM/CPU can't keep up */
 	misses = EMAC_READ(ETH_DRFC);
 	if (misses > 0)

Index: src/sys/arch/arm/gemini/gemini_gmac.c
diff -u src/sys/arch/arm/gemini/gemini_gmac.c:1.18 src/sys/arch/arm/gemini/gemini_gmac.c:1.19
--- src/sys/arch/arm/gemini/gemini_gmac.c:1.18	Wed Oct 30 10:12:37 2019
+++ src/sys/arch/arm/gemini/gemini_gmac.c	Tue Feb  4 07:35:34 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_gmac.c,v 1.18 2019/10/30 10:12:37 msaitoh Exp $ */
+/* $NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,7 +49,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.18 2019/10/30 10:12:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $");
 
 #define	SWFREEQ_DESCS	256	/* one page worth */
 #define	HWFREEQ_DESCS	256	/* one page worth */
@@ -546,8 +546,8 @@ gmac_hwqueue_txconsume(gmac_hwqueue_t *h
 	gmac_mapcache_put(hqm->hqm_mc, map);
 
 	ifp = hwq->hwq_ifp;
-	ifp->if_opackets++;
-	ifp->if_obytes += m->m_pkthdr.len;
+	if_statinc(ifp, if_opackets);
+	if_statiadd(ifp, if_obytes,	 m->m_pkthdr.len);
 
 	aprint_debug("gmac_hwqueue_txconsume(%p): %zu@%p: %s m=%p\n",
 	hwq, d - hwq->hwq_base, d, ifp->if_xname, m);
@@ -859,7 +859,7 @@ gmac_hwqueue_rxconsume(gmac_hwqueue_t *h
 		if_percpuq_enqueue(ifp->if_percpuq, m);
 		break;
 	default:
-		ifp->if_ierrors++;
+		if_statinc(ifp, if_ierrors);
 		m_freem(m);
 		break;
 	}

Index: src/sys/arch/arm/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.27 src/sys/arch/arm/omap/if_cpsw.c:1.28
--- src/sys/arch/arm/omap/if_cpsw.c:1.27	Tue Feb  4 05:15:44 2020
+++ src/sys/arch/arm/omap/if_cpsw.c	Tue Feb  4 07:35:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.28 2020/02/04 07:35:34 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.28 2020/02/04 07:35:34 skrll Exp $");
 
 #include 
 #include 
@@ -621,7 +621,7 @@ cpsw_start(struct ifnet *ifp)
 			device_printf(sc->sc_dev, "won't fit\n");
 			IFQ_DEQUEUE(>if_snd, m);
 			m_freem(m);
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 			continue;
 		} else if (error != 0) {
 			device_printf(sc->sc_dev, "error\n");
@@ -731,7 +731,7 @@ cpsw_watchdog(struct ifnet *ifp)
 
 	device_printf(sc->sc_dev, "device timeout\n");
 
-	ifp->if_oerrors++;
+	if_statinc(ifp, if_oerrors);
 	cpsw_init(ifp);
 	cpsw_start(ifp);
 }
@@ -1161,7 +1161,7 @@ cpsw_rxintr(void *arg)
 
 		if 

CVS commit: src/sys/dev/usb

2020-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  4 06:30:46 UTC 2020

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

Log Message:
don't call usb_syncmem() for zero-length packets.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.268 src/sys/dev/usb/ehci.c:1.269
--- src/sys/dev/usb/ehci.c:1.268	Tue Dec 31 18:11:18 2019
+++ src/sys/dev/usb/ehci.c	Tue Feb  4 06:30:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.268 2019/12/31 18:11:18 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.269 2020/02/04 06:30:46 mrg Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.268 2019/12/31 18:11:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.269 2020/02/04 06:30:46 mrg Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -3946,8 +3946,9 @@ ehci_device_bulk_start(struct usbd_xfer 
 	DPRINTFN(5, "--- dump end ---", 0, 0, 0, 0);
 #endif
 
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
+	if (xfer->ux_length)
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
 
 	/* also does usb_syncmem(sqh) */
 	ehci_set_qh_qtd(sqh, exfer->ex_sqtdstart);
@@ -4020,8 +4021,9 @@ ehci_device_bulk_done(struct usbd_xfer *
 
 	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(>sc_lock));
 
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	rd ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
+	if (xfer->ux_length)
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		rd ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
 
 	DPRINTF("length=%jd", xfer->ux_actlen, 0, 0, 0);
 }
@@ -4163,8 +4165,9 @@ ehci_device_intr_start(struct usbd_xfer 
 	DPRINTFN(5, "--- dump end ---", 0, 0, 0, 0);
 #endif
 
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
+	if (xfer->ux_length)
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
 
 	/* also does usb_syncmem(sqh) */
 	ehci_set_qh_qtd(sqh, exfer->ex_sqtdstart);
@@ -4226,7 +4229,6 @@ ehci_device_intr_done(struct usbd_xfer *
 {
 	ehci_softc_t *sc __diagused = EHCI_XFER2SC(xfer);
 	struct ehci_pipe *epipe = EHCI_XFER2EPIPE(xfer);
-	int isread, endpt;
 
 	EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
@@ -4234,10 +4236,14 @@ ehci_device_intr_done(struct usbd_xfer *
 
 	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(>sc_lock));
 
-	endpt = epipe->pipe.up_endpoint->ue_edesc->bEndpointAddress;
-	isread = UE_GET_DIR(endpt) == UE_DIR_IN;
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
+	if (xfer->ux_length) {
+		int isread, endpt;
+
+		endpt = epipe->pipe.up_endpoint->ue_edesc->bEndpointAddress;
+		isread = UE_GET_DIR(endpt) == UE_DIR_IN;
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
+	}
 }
 
 //
@@ -4493,8 +4499,9 @@ ehci_device_fs_isoc_transfer(struct usbd
 	sizeof(sitd->sitd.sitd_trans),
 	BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 
-	usb_syncmem(>ex_xfer.ux_dmabuf, 0, total_length,
-	BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+	if (total_length)
+		usb_syncmem(>ex_xfer.ux_dmabuf, 0, total_length,
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 	/*
 	 * Part 2: Transfer descriptors have now been set up, now they must
@@ -4601,8 +4608,9 @@ ehci_device_fs_isoc_done(struct usbd_xfe
 	epipe->isoc.cur_xfers--;
 	ehci_remove_sitd_chain(sc, exfer->ex_itdstart);
 
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
+	if (xfer->ux_length)
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 }
 
 /* -- */
@@ -4879,8 +4887,9 @@ ehci_device_isoc_transfer(struct usbd_xf
 		prev = itd;
 	} /* End of frame */
 
-	usb_syncmem(>ex_xfer.ux_dmabuf, 0, total_length,
-	BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+	if (total_length)
+		usb_syncmem(>ex_xfer.ux_dmabuf, 0, total_length,
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 	/*
 	 * Part 2: Transfer descriptors have now been set up, now they must
@@ -4991,6 +5000,7 @@ ehci_device_isoc_done(struct usbd_xfer *
 
 	epipe->isoc.cur_xfers--;
 	ehci_remove_itd_chain(sc, exfer->ex_sitdstart);
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
-	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
+	if (xfer->ux_length)
+		usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
+		BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 }



CVS commit: src/sys/dev/usb

2020-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb  4 06:30:46 UTC 2020

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

Log Message:
don't call usb_syncmem() for zero-length packets.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/usb/ehci.c

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



CVS commit: src/sys

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:46:32 UTC 2020

Modified Files:
src/sys/dev/pcmcia: if_ray.c
src/sys/dev/usb: if_umb.c usbnet.c
src/sys/net: if_spppsubr.c if_tap.c
src/sys/net80211: ieee80211.c
src/sys/netinet: ip_carp.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pcmcia/if_ray.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.185 -r1.186 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.116 -r1.117 src/sys/net/if_tap.c
cvs rdiff -u -r1.57 -r1.58 src/sys/net80211/ieee80211.c
cvs rdiff -u -r1.108 -r1.109 src/sys/netinet/ip_carp.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/pcmcia/if_ray.c
diff -u src/sys/dev/pcmcia/if_ray.c:1.97 src/sys/dev/pcmcia/if_ray.c:1.98
--- src/sys/dev/pcmcia/if_ray.c:1.97	Wed Jan 29 13:54:41 2020
+++ src/sys/dev/pcmcia/if_ray.c	Tue Feb  4 05:46:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ray.c,v 1.97 2020/01/29 13:54:41 thorpej Exp $	*/
+/*	$NetBSD: if_ray.c,v 1.98 2020/02/04 05:46:32 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2000 Christian E. Hopps
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.97 2020/01/29 13:54:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.98 2020/02/04 05:46:32 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -642,9 +642,9 @@ ray_detach(device_t self, int flags)
 	if (sc->sc_if.if_flags & IFF_UP)
 		ray_disable(sc);
 
-	ifmedia_delete_instance(>sc_media, IFM_INST_ANY);
 	ether_ifdetach(ifp);
 	if_detach(ifp);
+	ifmedia_fini(>sc_media);
 
 	pcmcia_function_unconfigure(sc->sc_pf);
 

Index: src/sys/dev/usb/if_umb.c
diff -u src/sys/dev/usb/if_umb.c:1.11 src/sys/dev/usb/if_umb.c:1.12
--- src/sys/dev/usb/if_umb.c:1.11	Wed Jan 29 06:35:28 2020
+++ src/sys/dev/usb/if_umb.c	Tue Feb  4 05:46:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_umb.c,v 1.11 2020/01/29 06:35:28 thorpej Exp $ */
+/*	$NetBSD: if_umb.c,v 1.12 2020/02/04 05:46:32 thorpej Exp $ */
 /*	$OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.11 2020/01/29 06:35:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.12 2020/02/04 05:46:32 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -601,7 +601,7 @@ umb_detach(device_t self, int flags)
 		sc->sc_resp_buf = NULL;
 	}
 	if (ifp->if_softc) {
-		ifmedia_delete_instance(>sc_im, IFM_INST_ANY);
+		ifmedia_fini(>sc_im);
 	}
 	if (sc->sc_attached) {
 		rnd_detach_source(>sc_rnd_source);

Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.34 src/sys/dev/usb/usbnet.c:1.35
--- src/sys/dev/usb/usbnet.c:1.34	Wed Jan 29 06:39:07 2020
+++ src/sys/dev/usb/usbnet.c	Tue Feb  4 05:46:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.34 2020/01/29 06:39:07 thorpej Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.35 2020/02/04 05:46:32 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.34 2020/01/29 06:39:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.35 2020/02/04 05:46:32 thorpej Exp $");
 
 #include 
 #include 
@@ -1534,7 +1534,7 @@ usbnet_detach(device_t self, int flags)
 
 	if (mii) {
 		mii_detach(mii, MII_PHY_ANY, MII_OFFSET_ANY);
-		ifmedia_delete_instance(>mii_media, IFM_INST_ANY);
+		ifmedia_fini(>mii_media);
 	}
 	if (ifp->if_softc) {
 		if (!usbnet_empty_eaddr(un))

Index: src/sys/net/if_spppsubr.c
diff -u src/sys/net/if_spppsubr.c:1.185 src/sys/net/if_spppsubr.c:1.186
--- src/sys/net/if_spppsubr.c:1.185	Wed Jan 29 04:28:27 2020
+++ src/sys/net/if_spppsubr.c	Tue Feb  4 05:46:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_spppsubr.c,v 1.185 2020/01/29 04:28:27 thorpej Exp $	 */
+/*	$NetBSD: if_spppsubr.c,v 1.186 2020/02/04 05:46:32 thorpej Exp $	 */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.185 2020/01/29 04:28:27 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.186 2020/02/04 05:46:32 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1094,8 +1094,7 @@ sppp_detach(struct ifnet *ifp)
 	SPPP_UNLOCK(sp);
 	rw_destroy(>pp_lock);
 
-	/* Safety - shouldn't be needed as there is no media to set. */
-	ifmedia_delete_instance(>pp_im, IFM_INST_ANY);
+	ifmedia_fini(>pp_im);
 }
 
 /*

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.116 src/sys/net/if_tap.c:1.117
--- src/sys/net/if_tap.c:1.116	Wed Jan 29 04:28:27 2020
+++ src/sys/net/if_tap.c	Tue Feb  4 05:46:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.116 2020/01/29 04:28:27 thorpej Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.117 2020/02/04 05:46:32 thorpej Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD 

CVS commit: src/sys

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:46:32 UTC 2020

Modified Files:
src/sys/dev/pcmcia: if_ray.c
src/sys/dev/usb: if_umb.c usbnet.c
src/sys/net: if_spppsubr.c if_tap.c
src/sys/net80211: ieee80211.c
src/sys/netinet: ip_carp.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pcmcia/if_ray.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.185 -r1.186 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.116 -r1.117 src/sys/net/if_tap.c
cvs rdiff -u -r1.57 -r1.58 src/sys/net80211/ieee80211.c
cvs rdiff -u -r1.108 -r1.109 src/sys/netinet/ip_carp.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/pci

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:44:15 UTC 2020

Modified Files:
src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_aq.c if_bge.c if_bnx.c
if_cas.c if_ena.c if_et.c if_ixl.c if_msk.c if_nfe.c if_sip.c
if_vte.c
src/sys/dev/pci/cxgb: cxgb_main.c
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_ale.c src/sys/dev/pci/if_cas.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_aq.c
cvs rdiff -u -r1.343 -r1.344 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/if_et.c src/sys/dev/pci/if_vte.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_ixl.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_nfe.c
cvs rdiff -u -r1.176 -r1.177 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/cxgb/cxgb_main.c
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/if_age.c
diff -u src/sys/dev/pci/if_age.c:1.66 src/sys/dev/pci/if_age.c:1.67
--- src/sys/dev/pci/if_age.c:1.66	Thu Jan 30 13:59:24 2020
+++ src/sys/dev/pci/if_age.c	Tue Feb  4 05:44:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.66 2020/01/30 13:59:24 thorpej Exp $ */
+/*	$NetBSD: if_age.c,v 1.67 2020/02/04 05:44:14 thorpej Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.66 2020/01/30 13:59:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.67 2020/02/04 05:44:14 thorpej Exp $");
 
 #include "vlan.h"
 
@@ -320,13 +320,13 @@ age_detach(device_t self, int flags)
 
 	mii_detach(>sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
 
-	/* Delete all remaining media. */
-	ifmedia_delete_instance(>sc_miibus.mii_media, IFM_INST_ANY);
-
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 	age_dma_free(sc);
 
+	/* Delete all remaining media. */
+	ifmedia_fini(>sc_miibus.mii_media);
+
 	if (sc->sc_irq_handle != NULL) {
 		pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
 		sc->sc_irq_handle = NULL;

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.47 src/sys/dev/pci/if_alc.c:1.48
--- src/sys/dev/pci/if_alc.c:1.47	Thu Jan 30 13:59:24 2020
+++ src/sys/dev/pci/if_alc.c	Tue Feb  4 05:44:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.47 2020/01/30 13:59:24 thorpej Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.48 2020/02/04 05:44:14 thorpej Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -1542,13 +1542,13 @@ alc_detach(device_t self, int flags)
 
 	mii_detach(>sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
 
-	/* Delete all remaining media. */
-	ifmedia_delete_instance(>sc_miibus.mii_media, IFM_INST_ANY);
-
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 	alc_dma_free(sc);
 
+	/* Delete all remaining media. */
+	ifmedia_fini(>sc_miibus.mii_media);
+
 	alc_phy_down(sc);
 	if (sc->sc_irq_handle != NULL) {
 		pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);

Index: src/sys/dev/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.38 src/sys/dev/pci/if_ale.c:1.39
--- src/sys/dev/pci/if_ale.c:1.38	Thu Jan 30 13:59:24 2020
+++ src/sys/dev/pci/if_ale.c	Tue Feb  4 05:44:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.38 2020/01/30 13:59:24 thorpej Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon 
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.38 2020/01/30 13:59:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $");
 
 #include "vlan.h"
 
@@ -613,13 +613,13 @@ ale_detach(device_t self, int flags)
 
 	mii_detach(>sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
 
-	/* Delete all remaining media. */
-	ifmedia_delete_instance(>sc_miibus.mii_media, IFM_INST_ANY);
-
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 	ale_dma_free(sc);
 
+	/* Delete all remaining media. */
+	ifmedia_fini(>sc_miibus.mii_media);
+
 	if (sc->sc_irq_handle != NULL) {
 		pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
 		sc->sc_irq_handle = NULL;
Index: src/sys/dev/pci/if_cas.c
diff -u src/sys/dev/pci/if_cas.c:1.38 src/sys/dev/pci/if_cas.c:1.39
--- src/sys/dev/pci/if_cas.c:1.38	Thu Jan 30 05:24:53 2020
+++ src/sys/dev/pci/if_cas.c	Tue Feb  4 05:44:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cas.c,v 1.38 2020/01/30 05:24:53 thorpej Exp $	*/
+/*	$NetBSD: if_cas.c,v 1.39 2020/02/04 05:44:14 

CVS commit: src/sys/dev/pci

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:44:15 UTC 2020

Modified Files:
src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_aq.c if_bge.c if_bnx.c
if_cas.c if_ena.c if_et.c if_ixl.c if_msk.c if_nfe.c if_sip.c
if_vte.c
src/sys/dev/pci/cxgb: cxgb_main.c
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_ale.c src/sys/dev/pci/if_cas.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_aq.c
cvs rdiff -u -r1.343 -r1.344 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/if_et.c src/sys/dev/pci/if_vte.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_ixl.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_nfe.c
cvs rdiff -u -r1.176 -r1.177 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/cxgb/cxgb_main.c
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/pci/ixgbe/ixv.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

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:25:39 UTC 2020

Modified Files:
src/sys/dev/hyperv: if_hvn.c
src/sys/dev/ic: ax88190.c cs89x0.c dl10019.c dp8390.c elink3.c
elinkxl.c gem.c i82557.c i82596.c mb86950.c mb86960.c rtl8169.c
rtl81x9.c smc91cxx.c tulip.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/hyperv/if_hvn.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/ax88190.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/cs89x0.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/dl10019.c
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ic/dp8390.c
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/ic/elink3.c
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/ic/elinkxl.c
cvs rdiff -u -r1.126 -r1.127 src/sys/dev/ic/gem.c
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/ic/i82557.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/i82596.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/mb86950.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ic/mb86960.c
cvs rdiff -u -r1.162 -r1.163 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/ic/rtl81x9.c
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/ic/smc91cxx.c
cvs rdiff -u -r1.201 -r1.202 src/sys/dev/ic/tulip.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/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.16 src/sys/dev/hyperv/if_hvn.c:1.17
--- src/sys/dev/hyperv/if_hvn.c:1.16	Wed Jan 29 05:55:16 2020
+++ src/sys/dev/hyperv/if_hvn.c	Tue Feb  4 05:25:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hvn.c,v 1.16 2020/01/29 05:55:16 thorpej Exp $	*/
+/*	$NetBSD: if_hvn.c,v 1.17 2020/02/04 05:25:38 thorpej Exp $	*/
 /*	$OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.16 2020/01/29 05:55:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.17 2020/02/04 05:25:38 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -362,6 +362,7 @@ hvn_detach(device_t self, int flags)
 
 	ether_ifdetach(ifp);
 	if_detach(ifp);
+	ifmedia_fini(>sc_media);
 	if_percpuq_destroy(sc->sc_ipq);
 
 	hvn_rndis_detach(sc);

Index: src/sys/dev/ic/ax88190.c
diff -u src/sys/dev/ic/ax88190.c:1.15 src/sys/dev/ic/ax88190.c:1.16
--- src/sys/dev/ic/ax88190.c:1.15	Wed May 29 06:17:28 2019
+++ src/sys/dev/ic/ax88190.c	Tue Feb  4 05:25:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ax88190.c,v 1.15 2019/05/29 06:17:28 msaitoh Exp $	*/
+/*	$NetBSD: ax88190.c,v 1.16 2020/02/04 05:25:39 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ax88190.c,v 1.15 2019/05/29 06:17:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ax88190.c,v 1.16 2020/02/04 05:25:39 thorpej Exp $");
 
 #include 
 #include 
@@ -108,6 +108,7 @@ ax88190_media_fini(struct dp8390_softc *
 {
 
 	mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
+	ifmedia_fini(>sc_mii.mii_media);
 }
 
 int

Index: src/sys/dev/ic/cs89x0.c
diff -u src/sys/dev/ic/cs89x0.c:1.48 src/sys/dev/ic/cs89x0.c:1.49
--- src/sys/dev/ic/cs89x0.c:1.48	Wed Jan 29 14:14:55 2020
+++ src/sys/dev/ic/cs89x0.c	Tue Feb  4 05:25:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs89x0.c,v 1.48 2020/01/29 14:14:55 thorpej Exp $	*/
+/*	$NetBSD: cs89x0.c,v 1.49 2020/02/04 05:25:39 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -212,7 +212,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.48 2020/01/29 14:14:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.49 2020/02/04 05:25:39 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -517,6 +517,7 @@ cs_detach(struct cs_softc *sc)
 		rnd_detach_source(>rnd_source);
 		ether_ifdetach(ifp);
 		if_detach(ifp);
+		ifmedia_fini(>sc_media);
 		sc->sc_cfgflags &= ~CFGFLG_ATTACHED;
 	}
 

Index: src/sys/dev/ic/dl10019.c
diff -u src/sys/dev/ic/dl10019.c:1.14 src/sys/dev/ic/dl10019.c:1.15
--- src/sys/dev/ic/dl10019.c:1.14	Wed May 29 06:17:28 2019
+++ src/sys/dev/ic/dl10019.c	Tue Feb  4 05:25:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dl10019.c,v 1.14 2019/05/29 06:17:28 msaitoh Exp $	*/
+/*	$NetBSD: dl10019.c,v 1.15 2020/02/04 05:25:39 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dl10019.c,v 1.14 2019/05/29 06:17:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dl10019.c,v 1.15 2020/02/04 05:25:39 thorpej Exp $");
 
 #include 
 #include 
@@ -143,6 +143,7 @@ dl10019_media_fini(struct dp8390_softc *
 {
 
 	mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
+	ifmedia_fini(>sc_mii.mii_media);
 }
 
 int

Index: src/sys/dev/ic/dp8390.c
diff -u src/sys/dev/ic/dp8390.c:1.96 src/sys/dev/ic/dp8390.c:1.97
--- src/sys/dev/ic/dp8390.c:1.96	Wed Jan 29 14:14:55 2020
+++ src/sys/dev/ic/dp8390.c	Tue Feb  4 05:25:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dp8390.c,v 1.96 2020/01/29 14:14:55 thorpej Exp 

CVS commit: src/sys/dev

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:25:39 UTC 2020

Modified Files:
src/sys/dev/hyperv: if_hvn.c
src/sys/dev/ic: ax88190.c cs89x0.c dl10019.c dp8390.c elink3.c
elinkxl.c gem.c i82557.c i82596.c mb86950.c mb86960.c rtl8169.c
rtl81x9.c smc91cxx.c tulip.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/hyperv/if_hvn.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/ax88190.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/cs89x0.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/dl10019.c
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ic/dp8390.c
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/ic/elink3.c
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/ic/elinkxl.c
cvs rdiff -u -r1.126 -r1.127 src/sys/dev/ic/gem.c
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/ic/i82557.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/i82596.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/mb86950.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ic/mb86960.c
cvs rdiff -u -r1.162 -r1.163 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/ic/rtl81x9.c
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/ic/smc91cxx.c
cvs rdiff -u -r1.201 -r1.202 src/sys/dev/ic/tulip.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/mips

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:18:36 UTC 2020

Modified Files:
src/sys/arch/mips/atheros/dev: if_ae.c
src/sys/arch/mips/ralink: ralink_eth.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/atheros/dev/if_ae.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/ralink/ralink_eth.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/mips

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:18:36 UTC 2020

Modified Files:
src/sys/arch/mips/atheros/dev: if_ae.c
src/sys/arch/mips/ralink: ralink_eth.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/atheros/dev/if_ae.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/ralink/ralink_eth.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/mips/atheros/dev/if_ae.c
diff -u src/sys/arch/mips/atheros/dev/if_ae.c:1.38 src/sys/arch/mips/atheros/dev/if_ae.c:1.39
--- src/sys/arch/mips/atheros/dev/if_ae.c:1.38	Wed Jan 29 05:30:14 2020
+++ src/sys/arch/mips/atheros/dev/if_ae.c	Tue Feb  4 05:18:36 2020
@@ -1,4 +1,4 @@
-/* $Id: if_ae.c,v 1.38 2020/01/29 05:30:14 thorpej Exp $ */
+/* $Id: if_ae.c,v 1.39 2020/02/04 05:18:36 thorpej Exp $ */
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -98,7 +98,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.38 2020/01/29 05:30:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.39 2020/02/04 05:18:36 thorpej Exp $");
 
 
 #include 
@@ -485,13 +485,13 @@ ae_detach(device_t self, int flags)
 	/* Detach all PHYs */
 	mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
 
-	/* Delete all remaining media. */
-	ifmedia_delete_instance(>sc_mii.mii_media, IFM_INST_ANY);
-
 	rnd_detach_source(>sc_rnd_source);
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 
+	/* Delete all remaining media. */
+	ifmedia_fini(>sc_mii.mii_media);
+
 	for (i = 0; i < AE_NRXDESC; i++) {
 		rxs = >sc_rxsoft[i];
 		if (rxs->rxs_mbuf != NULL) {

Index: src/sys/arch/mips/ralink/ralink_eth.c
diff -u src/sys/arch/mips/ralink/ralink_eth.c:1.20 src/sys/arch/mips/ralink/ralink_eth.c:1.21
--- src/sys/arch/mips/ralink/ralink_eth.c:1.20	Wed Jan 29 05:30:14 2020
+++ src/sys/arch/mips/ralink/ralink_eth.c	Tue Feb  4 05:18:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_eth.c,v 1.20 2020/01/29 05:30:14 thorpej Exp $	*/
+/*	$NetBSD: ralink_eth.c,v 1.21 2020/02/04 05:18:36 thorpej Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 /* ralink_eth.c -- Ralink Ethernet Driver */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ralink_eth.c,v 1.20 2020/01/29 05:30:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_eth.c,v 1.21 2020/02/04 05:18:36 thorpej Exp $");
 
 #include 
 #include 
@@ -656,9 +656,9 @@ ralink_eth_detach(device_t self, int fla
 
 	ralink_eth_disable(sc);
 	mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
-	ifmedia_delete_instance(>sc_mii.mii_media, IFM_INST_ANY);
 	ether_ifdetach(ifp);
 	if_detach(ifp);
+	ifmedia_fini(>sc_mii.mii_media);
 
 	for (i = 0; i < RALINK_ETH_NUM_RX_DESC; i++) {
 		rxs = >sc_rxstate[i];



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

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:16:18 UTC 2020

Modified Files:
src/sys/arch/arm/xscale: ixp425_if_npe.c

Log Message:
Add a comment that ifmedia_fini() should be used here someday.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/xscale/ixp425_if_npe.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/xscale

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:16:18 UTC 2020

Modified Files:
src/sys/arch/arm/xscale: ixp425_if_npe.c

Log Message:
Add a comment that ifmedia_fini() should be used here someday.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/xscale/ixp425_if_npe.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/xscale/ixp425_if_npe.c
diff -u src/sys/arch/arm/xscale/ixp425_if_npe.c:1.45 src/sys/arch/arm/xscale/ixp425_if_npe.c:1.46
--- src/sys/arch/arm/xscale/ixp425_if_npe.c:1.45	Wed Jan 29 06:05:31 2020
+++ src/sys/arch/arm/xscale/ixp425_if_npe.c	Tue Feb  4 05:16:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ixp425_if_npe.c,v 1.45 2020/01/29 06:05:31 thorpej Exp $ */
+/*	$NetBSD: ixp425_if_npe.c,v 1.46 2020/02/04 05:16:18 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2006 Sam Leffler.  All rights reserved.
@@ -28,7 +28,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.45 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.46 2020/02/04 05:16:18 thorpej Exp $");
 
 /*
  * Intel XScale NPE Ethernet driver.
@@ -671,6 +671,7 @@ npe_deactivate(struct npe_softc *sc);
 	npe_dma_destroy(sc, >txdma);
 	npe_dma_destroy(sc, >rxdma);
 	bus_generic_detach(sc->sc_dev);
+	XXX ifmedia_fini somewhere
 	if (sc->sc_mii)
 		device_delete_child(sc->sc_dev, sc->sc_mii);
 #if 0



CVS commit: src/sys/arch/arm

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:15:45 UTC 2020

Modified Files:
src/sys/arch/arm/omap: if_cpsw.c
src/sys/arch/arm/ti: if_cpsw.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/omap/if_cpsw.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/ti/if_cpsw.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

2020-02-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 05:15:45 UTC 2020

Modified Files:
src/sys/arch/arm/omap: if_cpsw.c
src/sys/arch/arm/ti: if_cpsw.c

Log Message:
Use ifmedia_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/omap/if_cpsw.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/ti/if_cpsw.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/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.26 src/sys/arch/arm/omap/if_cpsw.c:1.27
--- src/sys/arch/arm/omap/if_cpsw.c:1.26	Mon Jan  6 06:50:00 2020
+++ src/sys/arch/arm/omap/if_cpsw.c	Tue Feb  4 05:15:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.26 2020/01/06 06:50:00 msaitoh Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.26 2020/01/06 06:50:00 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $");
 
 #include 
 #include 
@@ -362,12 +362,12 @@ cpsw_detach(device_t self, int flags)
 	intr_disestablish(sc->sc_txih);
 	intr_disestablish(sc->sc_miscih);
 
-	/* Delete all media. */
-	ifmedia_delete_instance(>sc_mii.mii_media, IFM_INST_ANY);
-
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 
+	/* Delete all media. */
+	ifmedia_fini(>sc_mii.mii_media);
+
 	/* Free the packet padding buffer */
 	kmem_free(sc->sc_txpad, ETHER_MIN_LEN);
 	bus_dmamap_destroy(sc->sc_bdt, sc->sc_txpad_dm);

Index: src/sys/arch/arm/ti/if_cpsw.c
diff -u src/sys/arch/arm/ti/if_cpsw.c:1.11 src/sys/arch/arm/ti/if_cpsw.c:1.12
--- src/sys/arch/arm/ti/if_cpsw.c:1.11	Wed Jan 29 06:05:31 2020
+++ src/sys/arch/arm/ti/if_cpsw.c	Tue Feb  4 05:15:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.11 2020/01/29 06:05:31 thorpej Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.11 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $");
 
 #include 
 #include 
@@ -361,12 +361,12 @@ cpsw_detach(device_t self, int flags)
 	intr_disestablish(sc->sc_txih);
 	intr_disestablish(sc->sc_miscih);
 
-	/* Delete all media. */
-	ifmedia_delete_instance(>sc_mii.mii_media, IFM_INST_ANY);
-
 	ether_ifdetach(ifp);
 	if_detach(ifp);
 
+	/* Delete all media. */
+	ifmedia_fini(>sc_mii.mii_media);
+
 	/* Free the packet padding buffer */
 	kmem_free(sc->sc_txpad, ETHER_MIN_LEN);
 	bus_dmamap_destroy(sc->sc_bdt, sc->sc_txpad_dm);



CVS commit: src/sys/miscfs/kernfs

2020-02-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Feb  4 04:19:24 UTC 2020

Modified Files:
src/sys/miscfs/kernfs: kernfs.h kernfs_vfsops.c kernfs_vnops.c

Log Message:
Use specfs vnops for specnodes in kernfs.

While here, don't filter out rootdev and rrootdev merely because
they're not cached.

Fixes the elusive /kern/rootdev and /kern/rrootdev nodes, which only
appeared sometimes when they felt like it, and fixes operations on
/kern/rootdev and /kern/rrootdev always returning EOPNOTSUPP.

We didn't seem to have a single PR for these issues but the following
PRs are all relevant:

PR bin/13564
PR kern/38265
PR kern/38778
PR kern/45974

XXX pullup-9, pullup-8, pullup-7, pullup-6, pullup-5, pullup-4, pullup-3, 
pullup-2, pullup-1.4T...


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/miscfs/kernfs/kernfs.h
cvs rdiff -u -r1.97 -r1.98 src/sys/miscfs/kernfs/kernfs_vfsops.c
cvs rdiff -u -r1.162 -r1.163 src/sys/miscfs/kernfs/kernfs_vnops.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/miscfs/kernfs/kernfs.h
diff -u src/sys/miscfs/kernfs/kernfs.h:1.42 src/sys/miscfs/kernfs/kernfs.h:1.43
--- src/sys/miscfs/kernfs/kernfs.h:1.42	Fri Jan 17 20:08:09 2020
+++ src/sys/miscfs/kernfs/kernfs.h	Tue Feb  4 04:19:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs.h,v 1.42 2020/01/17 20:08:09 ad Exp $	*/
+/*	$NetBSD: kernfs.h,v 1.43 2020/02/04 04:19:24 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -122,6 +122,7 @@ extern const struct kern_target kern_tar
 extern int nkern_targets;
 extern const int static_nkern_targets;
 extern int (**kernfs_vnodeop_p)(void *);
+extern int (**kernfs_specop_p)(void *);
 extern struct vfsops kernfs_vfsops;
 extern dev_t rrootdev;
 extern kmutex_t kfs_lock;

Index: src/sys/miscfs/kernfs/kernfs_vfsops.c
diff -u src/sys/miscfs/kernfs/kernfs_vfsops.c:1.97 src/sys/miscfs/kernfs/kernfs_vfsops.c:1.98
--- src/sys/miscfs/kernfs/kernfs_vfsops.c:1.97	Fri Jan 17 20:08:09 2020
+++ src/sys/miscfs/kernfs/kernfs_vfsops.c	Tue Feb  4 04:19:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vfsops.c,v 1.97 2020/01/17 20:08:09 ad Exp $	*/
+/*	$NetBSD: kernfs_vfsops.c,v 1.98 2020/02/04 04:19:24 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.97 2020/01/17 20:08:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.98 2020/02/04 04:19:24 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -283,6 +283,7 @@ again:
 		vp->v_vflag = VV_ROOT;
 
 	if (kt->kt_tag == KFSdevice) {
+		vp->v_op = kernfs_specop_p;
 		spec_node_init(vp, *(dev_t *)kt->kt_data);
 	}
 
@@ -293,9 +294,11 @@ again:
 }
 
 extern const struct vnodeopv_desc kernfs_vnodeop_opv_desc;
+extern const struct vnodeopv_desc kernfs_specop_opv_desc;
 
 const struct vnodeopv_desc * const kernfs_vnodeopv_descs[] = {
 	_vnodeop_opv_desc,
+	_specop_opv_desc,
 	NULL,
 };
 

Index: src/sys/miscfs/kernfs/kernfs_vnops.c
diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.162 src/sys/miscfs/kernfs/kernfs_vnops.c:1.163
--- src/sys/miscfs/kernfs/kernfs_vnops.c:1.162	Thu Jan  2 15:42:27 2020
+++ src/sys/miscfs/kernfs/kernfs_vnops.c	Tue Feb  4 04:19:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernfs_vnops.c,v 1.162 2020/01/02 15:42:27 thorpej Exp $	*/
+/*	$NetBSD: kernfs_vnops.c,v 1.163 2020/02/04 04:19:24 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.162 2020/01/02 15:42:27 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.163 2020/02/04 04:19:24 riastradh Exp $");
 
 #include 
 #include 
@@ -227,6 +227,54 @@ const struct vnodeopv_entry_desc kernfs_
 const struct vnodeopv_desc kernfs_vnodeop_opv_desc =
 	{ _vnodeop_p, kernfs_vnodeop_entries };
 
+int (**kernfs_specop_p)(void *);
+const struct vnodeopv_entry_desc kernfs_specop_entries[] = {
+	{ _default_desc, vn_default_error },
+	{ _lookup_desc, spec_lookup },		/* lookup */
+	{ _create_desc, spec_create },		/* create */
+	{ _mknod_desc, spec_mknod },		/* mknod */
+	{ _open_desc, spec_open },			/* open */
+	{ _close_desc, spec_close },		/* close */
+	{ _access_desc, kernfs_access },		/* access */
+	{ _getattr_desc, kernfs_getattr },		/* getattr */
+	{ _setattr_desc, kernfs_setattr },		/* setattr */
+	{ _read_desc, spec_read },			/* read */
+	{ _write_desc, spec_write },		/* write */
+	{ _fallocate_desc, spec_fallocate },	/* fallocate */
+	{ _fdiscard_desc, spec_fdiscard },		/* fdiscard */
+	{ _fcntl_desc, spec_fcntl },		/* fcntl */
+	{ _ioctl_desc, spec_ioctl },		/* ioctl */
+	{ _poll_desc, spec_poll },			/* poll */
+	{ _revoke_desc, spec_revoke },		/* revoke */
+	{ _fsync_desc, spec_fsync },		/* fsync */
+	{ _seek_desc, spec_seek },			/* seek */
+	{ _remove_desc, spec_remove },		/* remove */
+	{ _link_desc, spec_link },			/* link */
+	{ _rename_desc, 

CVS commit: src/sys/miscfs/kernfs

2020-02-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Feb  4 04:19:24 UTC 2020

Modified Files:
src/sys/miscfs/kernfs: kernfs.h kernfs_vfsops.c kernfs_vnops.c

Log Message:
Use specfs vnops for specnodes in kernfs.

While here, don't filter out rootdev and rrootdev merely because
they're not cached.

Fixes the elusive /kern/rootdev and /kern/rrootdev nodes, which only
appeared sometimes when they felt like it, and fixes operations on
/kern/rootdev and /kern/rrootdev always returning EOPNOTSUPP.

We didn't seem to have a single PR for these issues but the following
PRs are all relevant:

PR bin/13564
PR kern/38265
PR kern/38778
PR kern/45974

XXX pullup-9, pullup-8, pullup-7, pullup-6, pullup-5, pullup-4, pullup-3, 
pullup-2, pullup-1.4T...


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/miscfs/kernfs/kernfs.h
cvs rdiff -u -r1.97 -r1.98 src/sys/miscfs/kernfs/kernfs_vfsops.c
cvs rdiff -u -r1.162 -r1.163 src/sys/miscfs/kernfs/kernfs_vnops.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/news68k/news68k

2020-02-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Feb  3 23:09:04 UTC 2020

Modified Files:
src/sys/arch/news68k/news68k: machdep.c

Log Message:
Add a missing semicolon missed in rev 1.27.

Noticed by recent pmap_update() macro change.
I wonder how I've missed this for 18 years..


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.106 src/sys/arch/news68k/news68k/machdep.c:1.107
--- src/sys/arch/news68k/news68k/machdep.c:1.106	Tue Dec 31 13:07:11 2019
+++ src/sys/arch/news68k/news68k/machdep.c	Mon Feb  3 23:09:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107 2020/02/03 23:09:03 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2020/02/03 23:09:03 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -189,7 +189,7 @@ news68k_init(void)
 	 */
 	for (i = 0; i < btoc(MSGBUFSIZE); i++)
 		pmap_kenter_pa((vaddr_t)msgbufaddr + i * PAGE_SIZE,
-		avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, 0)
+		avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, 0);
 	pmap_update(pmap_kernel());
 	initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
 }



CVS commit: src/sys/arch/news68k/news68k

2020-02-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Feb  3 23:09:04 UTC 2020

Modified Files:
src/sys/arch/news68k/news68k: machdep.c

Log Message:
Add a missing semicolon missed in rev 1.27.

Noticed by recent pmap_update() macro change.
I wonder how I've missed this for 18 years..


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/news68k/machdep.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/make

2020-02-03 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Feb  3 22:25:17 UTC 2020

Modified Files:
src/usr.bin/make: make.1

Log Message:
Make delimiters in  and "file" literal.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/usr.bin/make/make.1

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



CVS commit: src/usr.bin/make

2020-02-03 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Feb  3 22:25:17 UTC 2020

Modified Files:
src/usr.bin/make: make.1

Log Message:
Make delimiters in  and "file" literal.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/usr.bin/make/make.1

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/make/make.1
diff -u src/usr.bin/make/make.1:1.277 src/usr.bin/make/make.1:1.278
--- src/usr.bin/make/make.1:1.277	Mon Feb  3 15:47:03 2020
+++ src/usr.bin/make/make.1	Mon Feb  3 22:25:17 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.277 2020/02/03 15:47:03 kamil Exp $
+.\"	$NetBSD: make.1,v 1.278 2020/02/03 22:25:17 uwe Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -272,7 +272,7 @@ that do not depend on the target whose c
 .It Fl m Ar directory
 Specify a directory in which to search for sys.mk and makefiles included
 via the
-.Pf < Ar file Ns > Ns -style
+.Li \&< Ns Ar file Ns Li \&> Ns -style
 include statement.
 The
 .Fl m
@@ -280,7 +280,7 @@ option can be used multiple times to for
 This path will override the default system include path: /usr/share/mk.
 Furthermore the system include path will be appended to the search path used
 for
-.Pf \*q Ar file Ns \*q Ns -style
+.Li \*q Ns Ar file Ns Li \*q Ns -style
 include statements (see the
 .Fl I
 option).
@@ -1622,9 +1622,9 @@ dot
 .Pq Ql \&.
 character.
 Files are included with either
-.Cm \&.include Pf < Ar file Ns >
+.Cm \&.include \&< Ns Ar file Ns Cm \&>
 or
-.Cm \&.include Pf \*q Ar file Ns \*q .
+.Cm \&.include \&\*q Ns Ar file Ns Cm \&\*q .
 Variables between the angle brackets or double quotes are expanded
 to form the file name.
 If angle brackets are used, the included makefile is expected to be in



CVS commit: src/sys/net

2020-02-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  3 20:34:13 UTC 2020

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

Log Message:
rtsock: favour ifatoia and ifatoia6 over direct struct casts


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/net/rtsock.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

2020-02-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  3 20:34:13 UTC 2020

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

Log Message:
rtsock: favour ifatoia and ifatoia6 over direct struct casts


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/net/rtsock.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.c
diff -u src/sys/net/rtsock.c:1.253 src/sys/net/rtsock.c:1.254
--- src/sys/net/rtsock.c:1.253	Wed Jan 29 04:35:13 2020
+++ src/sys/net/rtsock.c	Mon Feb  3 20:34:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock.c,v 1.253 2020/01/29 04:35:13 thorpej Exp $	*/
+/*	$NetBSD: rtsock.c,v 1.254 2020/02/03 20:34:13 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.253 2020/01/29 04:35:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.254 2020/02/03 20:34:13 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -129,11 +129,11 @@ if_addrflags(struct ifaddr *ifa)
 	switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 	case AF_INET:
-		return ((struct in_ifaddr *)ifa)->ia4_flags;
+		return ifatoia(ifa)->ia4_flags;
 #endif
 #ifdef INET6
 	case AF_INET6:
-		return ((struct in6_ifaddr *)ifa)->ia6_flags;
+		return ifatoia6(ifa)->ia6_flags;
 #endif
 	default:
 		return 0;



CVS commit: src/sys

2020-02-03 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Feb  3 19:37:42 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL
src/sys/dev/usb: files.usb

Log Message:
Remove more urio(4) traces.

Pointed out by maxv, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.487 -r1.488 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.170 -r1.171 src/sys/dev/usb/files.usb

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



CVS commit: src/sys

2020-02-03 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Feb  3 19:37:42 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL
src/sys/dev/usb: files.usb

Log Message:
Remove more urio(4) traces.

Pointed out by maxv, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.487 -r1.488 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.170 -r1.171 src/sys/dev/usb/files.usb

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.143 src/sys/arch/amd64/conf/ALL:1.144
--- src/sys/arch/amd64/conf/ALL:1.143	Wed Jan 29 18:39:00 2020
+++ src/sys/arch/amd64/conf/ALL	Mon Feb  3 19:37:42 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.143 2020/01/29 18:39:00 maya Exp $
+# $NetBSD: ALL,v 1.144 2020/02/03 19:37:42 maya 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.143 $"
+#ident		"ALL-$Revision: 1.144 $"
 
 maxusers	64		# estimated number of users
 
@@ -2263,7 +2263,6 @@ options UPGT_DEBUG
 options UPLCOM_DEBUG
 options UPL_DEBUG
 options URAL_DEBUG
-options URIO_DEBUG
 options URLPHY_DEBUG
 options URL_DEBUG
 options URNDIS_DEBUG

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.487 src/sys/arch/i386/conf/ALL:1.488
--- src/sys/arch/i386/conf/ALL:1.487	Wed Jan 29 18:39:02 2020
+++ src/sys/arch/i386/conf/ALL	Mon Feb  3 19:37:42 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.487 2020/01/29 18:39:02 maya Exp $
+# $NetBSD: ALL,v 1.488 2020/02/03 19:37:42 maya 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.487 $"
+#ident		"ALL-$Revision: 1.488 $"
 
 maxusers	64		# estimated number of users
 
@@ -2379,7 +2379,6 @@ options UPGT_DEBUG
 options UPLCOM_DEBUG
 options UPL_DEBUG
 options URAL_DEBUG
-options URIO_DEBUG
 options URLPHY_DEBUG
 options URL_DEBUG
 options URNDIS_DEBUG

Index: src/sys/dev/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.170 src/sys/dev/usb/files.usb:1.171
--- src/sys/dev/usb/files.usb:1.170	Mon Feb  3 12:56:26 2020
+++ src/sys/dev/usb/files.usb	Mon Feb  3 19:37:42 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.170 2020/02/03 12:56:26 kre Exp $
+#	$NetBSD: files.usb,v 1.171 2020/02/03 19:37:42 maya Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -68,7 +68,6 @@ defflag opt_usb.h	UPGT_DEBUG: USB_DEBUG
 defflag opt_usb.h	UPLCOM_DEBUG: USB_DEBUG
 defflag opt_usb.h	UPL_DEBUG: USB_DEBUG
 defflag opt_usb.h	URAL_DEBUG: USB_DEBUG
-defflag opt_usb.h	URIO_DEBUG: USB_DEBUG
 defflag opt_usb.h	URL_DEBUG: USB_DEBUG
 defflag opt_usb.h	URNDIS_DEBUG: USB_DEBUG
 defflag opt_usb.h	URTWN_DEBUG: USB_DEBUG



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

2020-02-03 Thread Martin Husemann
On Mon, Feb 03, 2020 at 05:45:29PM -, Christos Zoulas wrote:
> Write a function perhaps instead of open-coding it in 3 places?

I'm more inclined to completely remove it as I think it never can
happen with the current editing frontend and disklabel backend, but
going for minimal changes right now as this needs to go into 9.0 and I
can't test localy.

Martin


Re: CVS commit: src/lib/libc/gen

2020-02-03 Thread Kamil Rytarowski
On 03.02.2020 17:24, Kamil Rytarowski wrote:
> On 03.02.2020 17:21, Joerg Sonnenberger wrote:
>> On Sat, Feb 01, 2020 at 03:38:46PM +, Kamil Rytarowski wrote:
>>> Module Name:src
>>> Committed By:   kamil
>>> Date:   Sat Feb  1 15:38:46 UTC 2020
>>>
>>> Modified Files:
>>> src/lib/libc/gen: pthread_atfork.c
>>>
>>> Log Message:
>>> Switch atform allocations from malloc()+free() to mmap()+munmap()
>>>
>>> This avoid bootstrapping malloc too early when libc+libpthread are not
>>> ready. It is called through pthread__init() -> _pthread_atfork().
>>>
>>> This also helps LLVM Leak Sanitizer to pacify false positive reports.
>>
>> Can we please stop adding more and more hacks for the still questionable
>> "new" jemalloc and sit down for a sane init model first please? I'm
>> still at the point to ask to just revert to the known-to-be-working
>> version and therefore would also strongly prefer this change to be
>> reverted.
>>
>> Joerg
>>
> 
> This change was reverted as there was a fallout. Init model is sane
> except for pthread_atfork()+malloc() called prematurely in pthread__init().
> 

OK. The pthread_atfork(3) call was introduced with the following change.

Maybe we should fix Python?

commit 25c9c068b18fceac33cc6fec61a1277b5dc6107c
Author: joerg 
Date:   Wed Dec 25 00:44:45 2019 +

Since pthread_setspecific requires locks, ensure that they are acquired
before fork and dropped in both parent and child. At least Python
depends on TSD after fork, even though it is undefined behavior in
POSIX.

diff --git a/lib/libpthread/pthread_tsd.c b/lib/libpthread/pthread_tsd.c
index 666cbab85f1b..d6e261de0bb9 100644
--- a/lib/libpthread/pthread_tsd.c
+++ b/lib/libpthread/pthread_tsd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_tsd.c,v 1.17 2019/03/05 01:35:52 christos Exp $
*/
+/* $NetBSD: pthread_tsd.c,v 1.18 2019/12/25 00:44:45 joerg Exp $   */

 /*-
  * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */

 #include 
-__RCSID("$NetBSD: pthread_tsd.c,v 1.17 2019/03/05 01:35:52 christos Exp
$");
+__RCSID("$NetBSD: pthread_tsd.c,v 1.18 2019/12/25 00:44:45 joerg Exp $");

 /* Functions and structures dealing with thread-specific data */
 #include 
@@ -61,6 +61,18 @@ null_destructor(void *p)
 #include 
 #include 

+static void
+pthread_tsd_prefork(void)
+{
+   pthread_mutex_lock(_mutex);
+}
+
+static void
+pthread_tsd_postfork(void)
+{
+   pthread_mutex_unlock(_mutex);
+}
+
 void *
 pthread_tsd_init(size_t *tlen)
 {
@@ -68,6 +80,8 @@ pthread_tsd_init(size_t *tlen)
size_t alen;
char *arena;

+   pthread_atfork(pthread_tsd_prefork, pthread_tsd_postfork,
pthread_tsd_postfork);
+
if ((pkm = pthread__getenv("PTHREAD_KEYS_MAX")) != NULL) {
pthread_keys_max = (int)strtol(pkm, NULL, 0);
if (pthread_keys_max < _POSIX_THREAD_KEYS_MAX)







signature.asc
Description: OpenPGP digital signature


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

2020-02-03 Thread Christos Zoulas
In article <20200203130929.9de7df...@cvs.netbsd.org>,
Martin Husemann  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  martin
>Date:  Mon Feb  3 13:09:29 UTC 2020
>
>Modified Files:
>   src/usr.sbin/sysinst/arch/hp300: md.c
>   src/usr.sbin/sysinst/arch/mvme68k: md.c
>   src/usr.sbin/sysinst/arch/x68k: md.c
>
>Log Message:
>PR install/54921: skip non-user partitions when checking for overlaps

Write a function perhaps instead of open-coding it in 3 places?

christos



CVS commit: src/sys/external/bsd/drm2/nouveau

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:52:13 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/nouveau: nouveau_pci.c

Log Message:
Disable simplefb if nouveau attaches


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c

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



CVS commit: src/sys/external/bsd/drm2/nouveau

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:52:13 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/nouveau: nouveau_pci.c

Log Message:
Disable simplefb if nouveau attaches


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c

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

Modified files:

Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c
diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.26
--- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25	Sat Oct  5 22:37:49 2019
+++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c	Mon Feb  3 16:52:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $	*/
+/*	$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $");
+
+#ifdef _KERNEL_OPT
+#if defined(__arm__) || defined(__aarch64__)
+#include "opt_fdt.h"
+#endif
+#endif
 
 #include 
 #include 
@@ -43,6 +49,10 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci.
 #include 
 #include 
 
+#ifdef FDT
+#include 
+#endif
+
 #include "nouveau_drm.h"
 #include "nouveau_pci.h"
 
@@ -154,6 +164,15 @@ nouveau_pci_attach(device_t parent, devi
 	sc->sc_dev = NULL;
 	sc->sc_pa = *pa;
 
+#ifdef FDT
+	/*
+	 * XXX Remove the simple framebuffer, assuming that this device
+	 * will take over.
+	 */
+	const char *fb_compatible[] = { "simple-framebuffer", NULL };
+	fdt_remove_bycompat(fb_compatible);
+#endif
+
 	config_mountroot(self, _pci_attach_real);
 }
 



Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Kamil Rytarowski
On 03.02.2020 17:10, Ryo ONODERA wrote:
> Hi,
> 
> Kamil Rytarowski  writes:
> 
>> Please check this workaround:
>>
>> http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt
>>
>> It has to be applied on firefox's package.
> 
> Thank you very much.
> 
> This should be applied to pkgsrc/devel/nspr with slight change.
> (devel/nspr's C files cannot accept // comment.)
> This eliminates segfaults.
> 
> For the record, pthread_equal()'s first thread pointer, mon->owner, is
> invalid in PR_GetMonitorEntryCount() in nspr/pr/src/pthreads/ptsynch.c
> of devel/nspr.
> 

Please patch all affected packages in pkgsrc.

>>
>> The problem has to be reported upstream as a real bug.
> 
> Please file the bug report to Mozilla's bugzilla.
> 

I don't have a direct reproducer as of now myself. Please report a bug.

> Thank you very much.
> 




signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> On 03.02.2020 17:10, Ryo ONODERA wrote:
>> Hi,
>> 
>> Kamil Rytarowski  writes:
>> 
>>> Please check this workaround:
>>>
>>> http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt
>>>
>>> It has to be applied on firefox's package.
>> 
>> Thank you very much.
>> 
>> This should be applied to pkgsrc/devel/nspr with slight change.
>> (devel/nspr's C files cannot accept // comment.)
>> This eliminates segfaults.
>> 
>> For the record, pthread_equal()'s first thread pointer, mon->owner, is
>> invalid in PR_GetMonitorEntryCount() in nspr/pr/src/pthreads/ptsynch.c
>> of devel/nspr.
>> 
>
> Please patch all affected packages in pkgsrc.

I will commit this patch to devwl/nspr.

>>>
>>> The problem has to be reported upstream as a real bug.
>> 
>> Please file the bug report to Mozilla's bugzilla.
>> 
>
> I don't have a direct reproducer as of now myself. Please report a bug.

O.k. I will submit this to Mozilla.

Thank you very much.

>> Thank you very much.
>> 
>
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/lib/libc/gen

2020-02-03 Thread Kamil Rytarowski
On 03.02.2020 17:21, Joerg Sonnenberger wrote:
> On Sat, Feb 01, 2020 at 03:38:46PM +, Kamil Rytarowski wrote:
>> Module Name: src
>> Committed By:kamil
>> Date:Sat Feb  1 15:38:46 UTC 2020
>>
>> Modified Files:
>>  src/lib/libc/gen: pthread_atfork.c
>>
>> Log Message:
>> Switch atform allocations from malloc()+free() to mmap()+munmap()
>>
>> This avoid bootstrapping malloc too early when libc+libpthread are not
>> ready. It is called through pthread__init() -> _pthread_atfork().
>>
>> This also helps LLVM Leak Sanitizer to pacify false positive reports.
> 
> Can we please stop adding more and more hacks for the still questionable
> "new" jemalloc and sit down for a sane init model first please? I'm
> still at the point to ask to just revert to the known-to-be-working
> version and therefore would also strongly prefer this change to be
> reverted.
> 
> Joerg
> 

This change was reverted as there was a fallout. Init model is sane
except for pthread_atfork()+malloc() called prematurely in pthread__init().



signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/external/bsd/drm2/linux

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:22:52 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/linux: linux_pci.c

Log Message:
Re-enable PCI MSI for DRM devices


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/linux/linux_pci.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:22:25 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci:
nouveau_nvkm_subdev_pci_base.c

Log Message:
Use the correct PCI interrupt type based on what the driver has configured


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c

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



CVS commit: src/sys/external/bsd/drm2/linux

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:22:52 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/linux: linux_pci.c

Log Message:
Re-enable PCI MSI for DRM devices


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/linux/linux_pci.c

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

Modified files:

Index: src/sys/external/bsd/drm2/linux/linux_pci.c
diff -u src/sys/external/bsd/drm2/linux/linux_pci.c:1.7 src/sys/external/bsd/drm2/linux/linux_pci.c:1.8
--- src/sys/external/bsd/drm2/linux/linux_pci.c:1.7	Sat Jan 18 02:59:42 2020
+++ src/sys/external/bsd/drm2/linux/linux_pci.c	Mon Feb  3 16:22:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_pci.c,v 1.7 2020/01/18 02:59:42 jmcneill Exp $	*/
+/*	$NetBSD: linux_pci.c,v 1.8 2020/02/03 16:22:52 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.7 2020/01/18 02:59:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.8 2020/02/03 16:22:52 jmcneill Exp $");
 
 #include 
 
@@ -266,7 +266,6 @@ pci_bus_write_config_byte(struct pci_bus
 int
 pci_enable_msi(struct pci_dev *pdev)
 {
-#ifdef notyet
 	const struct pci_attach_args *const pa = >pd_pa;
 
 	if (pci_msi_alloc_exact(pa, >pd_intr_handles, 1))
@@ -274,9 +273,6 @@ pci_enable_msi(struct pci_dev *pdev)
 
 	pdev->msi_enabled = 1;
 	return 0;
-#else
-	return -ENOSYS;
-#endif
 }
 
 void



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci

2020-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb  3 16:22:25 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci:
nouveau_nvkm_subdev_pci_base.c

Log Message:
Use the correct PCI interrupt type based on what the driver has configured


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.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/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c:1.4 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c:1.5
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c:1.4	Wed Dec 19 09:20:56 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c	Mon Feb  3 16:22:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_nvkm_subdev_pci_base.c,v 1.4 2018/12/19 09:20:56 maya Exp $	*/
+/*	$NetBSD: nouveau_nvkm_subdev_pci_base.c,v 1.5 2020/02/03 16:22:25 jmcneill Exp $	*/
 
 /*
  * Copyright 2015 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs 
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_base.c,v 1.4 2018/12/19 09:20:56 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_base.c,v 1.5 2020/02/03 16:22:25 jmcneill Exp $");
 
 #include "priv.h"
 #include "agp.h"
@@ -142,14 +142,18 @@ nvkm_pci_init(struct nvkm_subdev *subdev
 #ifdef __NetBSD__
 {
 	const struct pci_attach_args *pa = >pd_pa;
+	const pci_intr_type_t intr_type = pci->msi ?
+	PCI_INTR_TYPE_MSI : PCI_INTR_TYPE_INTX;
+
 	int counts[PCI_INTR_TYPE_SIZE] =  {
-			[PCI_INTR_TYPE_INTX] = 1,
+			[PCI_INTR_TYPE_INTX] = 0,
 			[PCI_INTR_TYPE_MSI] = 0,
 			[PCI_INTR_TYPE_MSIX] = 0,
 	};
+	counts[intr_type] = 1;
 
 	/* XXX errno NetBSD->Linux */
-	ret = -pci_intr_alloc(pa, >pci_ihp, counts, PCI_INTR_TYPE_INTX);
+	ret = -pci_intr_alloc(pa, >pci_ihp, counts, intr_type);
 	if (ret)
 		return ret;
 	pci->pci_intrcookie = pci_intr_establish_xname(pa->pa_pc,



Re: CVS commit: src/lib/libc/gen

2020-02-03 Thread Joerg Sonnenberger
On Sat, Feb 01, 2020 at 03:38:46PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Sat Feb  1 15:38:46 UTC 2020
> 
> Modified Files:
>   src/lib/libc/gen: pthread_atfork.c
> 
> Log Message:
> Switch atform allocations from malloc()+free() to mmap()+munmap()
> 
> This avoid bootstrapping malloc too early when libc+libpthread are not
> ready. It is called through pthread__init() -> _pthread_atfork().
> 
> This also helps LLVM Leak Sanitizer to pacify false positive reports.

Can we please stop adding more and more hacks for the still questionable
"new" jemalloc and sit down for a sane init model first please? I'm
still at the point to ask to just revert to the known-to-be-working
version and therefore would also strongly prefer this change to be
reverted.

Joerg


Re: CVS commit: src/external/mit/xorg/lib/gallium

2020-02-03 Thread Joerg Sonnenberger
On Fri, Jan 31, 2020 at 09:13:40PM +, Jared D. McNeill wrote:
> Module Name:  src
> Committed By: jmcneill
> Date: Fri Jan 31 21:13:40 UTC 2020
> 
> Modified Files:
>   src/external/mit/xorg/lib/gallium: Makefile
> 
> Log Message:
> Bump MESA_LLVM_VERSION_STRING

Directly use ${LLVM_VERSION}?

Joerg


Re: CVS commit: src/external/mit/xorg/lib

2020-02-03 Thread Joerg Sonnenberger
On Fri, Jan 31, 2020 at 08:58:18PM +, Jared D. McNeill wrote:
> Module Name:  src
> Committed By: jmcneill
> Date: Fri Jan 31 20:58:18 UTC 2020
> 
> Modified Files:
>   src/external/mit/xorg/lib: libmesa.mk
>   src/external/mit/xorg/lib/libglapi: Makefile
> 
> Log Message:
> Change HAVE_LLVM from 0x0700 to 0x0900.

Can we change this to something like:

NUMERIC_LLVM_VERSION!=  ${LLVM_VERSION:R:R} * 256
-DHAVE_LLVM=${NUMERIC_LLVM_VERSION}

(not bothering with the minor, since it will be 0 anyway).

Joerg


Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Kamil Rytarowski  writes:

> Please check this workaround:
>
> http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt
>
> It has to be applied on firefox's package.

Thank you very much.

This should be applied to pkgsrc/devel/nspr with slight change.
(devel/nspr's C files cannot accept // comment.)
This eliminates segfaults.

For the record, pthread_equal()'s first thread pointer, mon->owner, is
invalid in PR_GetMonitorEntryCount() in nspr/pr/src/pthreads/ptsynch.c
of devel/nspr.

>
> The problem has to be reported upstream as a real bug.

Please file the bug report to Mozilla's bugzilla.

Thank you very much.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/usr.bin/make

2020-02-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb  3 15:47:04 UTC 2020

Modified Files:
src/usr.bin/make: make.1

Log Message:
Fix usage of angle-brackets and quotes in make(1) manpage

make(1) has commands .include  and .include "file",
but the manpage was (inconsistently) rendering  with
angle-brackets (e.g. in UTF8  ) and "file" with curly-quotes
in HTML output (but not text).

This is an attempt to fix that and output only literal 
and "file" as is actually required in the makefile.fileoutput,

https://reviews.freebsd.org/D21470

Submitted by Mateusz Piotrowski (FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/make.1

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/make/make.1
diff -u src/usr.bin/make/make.1:1.276 src/usr.bin/make/make.1:1.277
--- src/usr.bin/make/make.1:1.276	Thu Dec 19 07:14:07 2019
+++ src/usr.bin/make/make.1	Mon Feb  3 15:47:03 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.276 2019/12/19 07:14:07 maxv Exp $
+.\"	$NetBSD: make.1,v 1.277 2020/02/03 15:47:03 kamil Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -272,7 +272,7 @@ that do not depend on the target whose c
 .It Fl m Ar directory
 Specify a directory in which to search for sys.mk and makefiles included
 via the
-.Ao Ar file Ac Ns -style
+.Pf < Ar file Ns > Ns -style
 include statement.
 The
 .Fl m
@@ -280,7 +280,7 @@ option can be used multiple times to for
 This path will override the default system include path: /usr/share/mk.
 Furthermore the system include path will be appended to the search path used
 for
-.Qo Ar file Qc Ns -style
+.Pf \*q Ar file Ns \*q Ns -style
 include statements (see the
 .Fl I
 option).
@@ -1622,7 +1622,7 @@ dot
 .Pq Ql \&.
 character.
 Files are included with either
-.Cm \&.include Aq Ar file
+.Cm \&.include Pf < Ar file Ns >
 or
 .Cm \&.include Pf \*q Ar file Ns \*q .
 Variables between the angle brackets or double quotes are expanded



CVS commit: src/usr.bin/make

2020-02-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Feb  3 15:47:04 UTC 2020

Modified Files:
src/usr.bin/make: make.1

Log Message:
Fix usage of angle-brackets and quotes in make(1) manpage

make(1) has commands .include  and .include "file",
but the manpage was (inconsistently) rendering  with
angle-brackets (e.g. in UTF8  ) and "file" with curly-quotes
in HTML output (but not text).

This is an attempt to fix that and output only literal 
and "file" as is actually required in the makefile.fileoutput,

https://reviews.freebsd.org/D21470

Submitted by Mateusz Piotrowski (FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/make.1

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



Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Kamil Rytarowski
Please check this workaround:

http://netbsd.org/~kamil/patch-00224-firefox-pthread_equal.txt

It has to be applied on firefox's package.

The problem has to be reported upstream as a real bug.

On 03.02.2020 16:01, Ryo ONODERA wrote:
> Hi,
> 
> Ryo ONODERA  writes:
> 
>> Hi,
>>
>> I had tested with PTHREAD_DIAGASSERT however it did not produce any output.
>>
>> I am building current and pkgsrc packages from scratch now.
>>
>> I will reply my situation after this rebuild.
>>
>> Thank you.
> 
> With latest toolchain, kernel and userland,
> my firefox gets sefgault every run.
> 
> The core dump generated from PTHREAD_DIAGASSERT=ae does not show
> any useful things.
> See:
> Core was generated by `firefox'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
> [Current thread is 1 (process 4)]
> (gdb) bt
> #0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
> #1  0x743ca1943721 in ?? () from /usr/pkg/lib/firefox/libxul.so
> #2  0x743ca2172bee in ?? () from /usr/pkg/lib/firefox/libxul.so
> #3  0x743cb38b0140 in opendir () from /usr/lib/libc.so.12
> #4  0x0001000b in ?? ()
> #5  0x in ?? ()
> 
> 
> And I cannot get any text output to stdout.
> As far as I understand correctly, PTHREAD_DIAGASSERT=e enables the output
> to stdout.
> 
> 
> Still I feel that pthread_equal() is cause of my segfault.
> $ gdb /usr/pkg/lib/firefox/firefox
> GNU gdb (GDB) 8.3
> Copyright (C) 2019 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64--netbsd".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> .
> Find the GDB manual and other documentation resources online at:
> .
> 
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /usr/pkg/lib/firefox/firefox...
> (No debugging symbols found in /usr/pkg/lib/firefox/firefox)
> (gdb) r
> Starting program: /usr/pkg/lib/firefox/firefox
> [New process 18477]
> [Detaching after fork from child process 17695]
> [New LWP 2 of process 18477]
> [New LWP 3 of process 18477]
> [New LWP 4 of process 18477]
> [New LWP 5 of process 18477]
> [New LWP 6 of process 18477]
> [New LWP 7 of process 18477]
> [New LWP 8 of process 18477]
> [New LWP 9 of process 18477]
> [New LWP 10 of process 18477]
> [New LWP 11 of process 18477]
> [New LWP 12 of process 18477]
> [New LWP 13 of process 18477]
> [New LWP 14 of process 18477]
> [New LWP 15 of process 18477]
> [New LWP 16 of process 18477]
> JavaScript error: , line 0: UnknownError: The operation failed for reasons 
> unrelated to the database itself and not covered by any other error code.
> process 18477 is executing new program: /usr/pkg/lib/firefox/firefox
> [New process 18477]
> [Detaching after fork from child process 17526]
> [New LWP 2 of process 18477]
> [New LWP 3 of process 18477]
> [New LWP 4 of process 18477]
> [New LWP 5 of process 18477]
> [New LWP 6 of process 18477]
> [New LWP 7 of process 18477]
> [New LWP 8 of process 18477]
> [New LWP 9 of process 18477]
> [New LWP 10 of process 18477]
> [New LWP 11 of process 18477]
> [New LWP 12 of process 18477]
> [New LWP 13 of process 18477]
> [New LWP 14 of process 18477]
> [New LWP 15 of process 18477]
> [New LWP 16 of process 18477]
> [New LWP 17 of process 18477]
> [New LWP 18 of process 18477]
> [New LWP 19 of process 18477]
> [New LWP 20 of process 18477]
> [New LWP 21 of process 18477]
> [New LWP 22 of process 18477]
> [New LWP 23 of process 18477]
> [New LWP 24 of process 18477]
> [New LWP 25 of process 18477]
> [New LWP 26 of process 18477]
> [New LWP 27 of process 18477]
> [New LWP 28 of process 18477]
> [New LWP 29 of process 18477]
> [New LWP 14 of process 18477]
> [New LWP 30 of process 18477]
> [New LWP 31 of process 18477]
> [New LWP 32 of process 18477]
> [New LWP 33 of process 18477]
> [New LWP 34 of process 18477]
> [New LWP 35 of process 18477]
> [New LWP 36 of process 18477]
> [New LWP 37 of process 18477]
> [New LWP 38 of process 18477]
> [New LWP 39 of process 18477]
> [New process 18477]
> [Detaching after fork from child process 17454]
> [New LWP 39 of process 18477]
> [New LWP 41 of process 18477]
> [New LWP 42 of process 18477]
> [New LWP 43 of process 18477]
> [New LWP 44 of process 18477]
> [New LWP 45 of process 18477]
> [New process 18477]
> [Detaching after fork from child process 15097]
> [New LWP 47 of process 18477]
> [New LWP 48 of process 18477]
> [New LWP 49 of process 18477]
> [New LWP 50 of process 18477]
> [New LWP 51 of process 18477]
> [New LWP 45 of process 18477]

Re: CVS commit: src/lib/libpthread

2020-02-03 Thread Ryo ONODERA
Hi,

Ryo ONODERA  writes:

> Hi,
>
> I had tested with PTHREAD_DIAGASSERT however it did not produce any output.
>
> I am building current and pkgsrc packages from scratch now.
>
> I will reply my situation after this rebuild.
>
> Thank you.

With latest toolchain, kernel and userland,
my firefox gets sefgault every run.

The core dump generated from PTHREAD_DIAGASSERT=ae does not show
any useful things.
See:
Core was generated by `firefox'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
[Current thread is 1 (process 4)]
(gdb) bt
#0  0x743cb39860ca in _lwp_kill () from /usr/lib/libc.so.12
#1  0x743ca1943721 in ?? () from /usr/pkg/lib/firefox/libxul.so
#2  0x743ca2172bee in ?? () from /usr/pkg/lib/firefox/libxul.so
#3  0x743cb38b0140 in opendir () from /usr/lib/libc.so.12
#4  0x0001000b in ?? ()
#5  0x in ?? ()


And I cannot get any text output to stdout.
As far as I understand correctly, PTHREAD_DIAGASSERT=e enables the output
to stdout.


Still I feel that pthread_equal() is cause of my segfault.
$ gdb /usr/pkg/lib/firefox/firefox
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/pkg/lib/firefox/firefox...
(No debugging symbols found in /usr/pkg/lib/firefox/firefox)
(gdb) r
Starting program: /usr/pkg/lib/firefox/firefox
[New process 18477]
[Detaching after fork from child process 17695]
[New LWP 2 of process 18477]
[New LWP 3 of process 18477]
[New LWP 4 of process 18477]
[New LWP 5 of process 18477]
[New LWP 6 of process 18477]
[New LWP 7 of process 18477]
[New LWP 8 of process 18477]
[New LWP 9 of process 18477]
[New LWP 10 of process 18477]
[New LWP 11 of process 18477]
[New LWP 12 of process 18477]
[New LWP 13 of process 18477]
[New LWP 14 of process 18477]
[New LWP 15 of process 18477]
[New LWP 16 of process 18477]
JavaScript error: , line 0: UnknownError: The operation failed for reasons 
unrelated to the database itself and not covered by any other error code.
process 18477 is executing new program: /usr/pkg/lib/firefox/firefox
[New process 18477]
[Detaching after fork from child process 17526]
[New LWP 2 of process 18477]
[New LWP 3 of process 18477]
[New LWP 4 of process 18477]
[New LWP 5 of process 18477]
[New LWP 6 of process 18477]
[New LWP 7 of process 18477]
[New LWP 8 of process 18477]
[New LWP 9 of process 18477]
[New LWP 10 of process 18477]
[New LWP 11 of process 18477]
[New LWP 12 of process 18477]
[New LWP 13 of process 18477]
[New LWP 14 of process 18477]
[New LWP 15 of process 18477]
[New LWP 16 of process 18477]
[New LWP 17 of process 18477]
[New LWP 18 of process 18477]
[New LWP 19 of process 18477]
[New LWP 20 of process 18477]
[New LWP 21 of process 18477]
[New LWP 22 of process 18477]
[New LWP 23 of process 18477]
[New LWP 24 of process 18477]
[New LWP 25 of process 18477]
[New LWP 26 of process 18477]
[New LWP 27 of process 18477]
[New LWP 28 of process 18477]
[New LWP 29 of process 18477]
[New LWP 14 of process 18477]
[New LWP 30 of process 18477]
[New LWP 31 of process 18477]
[New LWP 32 of process 18477]
[New LWP 33 of process 18477]
[New LWP 34 of process 18477]
[New LWP 35 of process 18477]
[New LWP 36 of process 18477]
[New LWP 37 of process 18477]
[New LWP 38 of process 18477]
[New LWP 39 of process 18477]
[New process 18477]
[Detaching after fork from child process 17454]
[New LWP 39 of process 18477]
[New LWP 41 of process 18477]
[New LWP 42 of process 18477]
[New LWP 43 of process 18477]
[New LWP 44 of process 18477]
[New LWP 45 of process 18477]
[New process 18477]
[Detaching after fork from child process 15097]
[New LWP 47 of process 18477]
[New LWP 48 of process 18477]
[New LWP 49 of process 18477]
[New LWP 50 of process 18477]
[New LWP 51 of process 18477]
[New LWP 45 of process 18477]
[New LWP 52 of process 18477]
[New LWP 53 of process 18477]
[New LWP 54 of process 18477]
[New LWP 55 of process 18477]
[New LWP 56 of process 18477]
[New LWP 57 of process 18477]
[New LWP 58 of process 18477]
[New LWP 59 of process 18477]
[New LWP 60 of process 18477]

Thread 21 "Socket Thread" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 4 of process 18477]
0x71a59bc0c2eb in pthread_equal () from /usr/lib/libpthread.so.1
(gdb) bt
#0  0x71a59bc0c2eb in pthread_equal 

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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Feb  3 13:58:05 UTC 2020

Modified Files:
src/sys/arch/arm/ep93xx: epe.c

Log Message:
More if_stat*


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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Feb  3 13:58:05 UTC 2020

Modified Files:
src/sys/arch/arm/ep93xx: epe.c

Log Message:
More if_stat*


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/ep93xx/epe.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/ep93xx/epe.c
diff -u src/sys/arch/arm/ep93xx/epe.c:1.46 src/sys/arch/arm/ep93xx/epe.c:1.47
--- src/sys/arch/arm/ep93xx/epe.c:1.46	Mon Feb  3 13:53:57 2020
+++ src/sys/arch/arm/ep93xx/epe.c	Mon Feb  3 13:58:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: epe.c,v 1.46 2020/02/03 13:53:57 skrll Exp $	*/
+/*	$NetBSD: epe.c,v 1.47 2020/02/03 13:58:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.46 2020/02/03 13:53:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.47 2020/02/03 13:58:05 skrll Exp $");
 
 #include 
 #include 
@@ -505,7 +505,7 @@ epe_tick(void *arg)
 	int s;
 	uint32_t misses;
 
-	ifp->if_collisions += EPE_READ(TXCollCnt);
+	if_statadd(ifp, if_collisions, EPE_READ(TXCollCnt));
 	/* These misses are ok, they will happen if the RAM/CPU can't keep up */
 	misses = EPE_READ(RXMissCnt);
 	if (misses > 0)



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

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Feb  3 13:53:57 UTC 2020

Modified Files:
src/sys/arch/arm/ep93xx: epe.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/ep93xx/epe.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/ep93xx

2020-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Feb  3 13:53:57 UTC 2020

Modified Files:
src/sys/arch/arm/ep93xx: epe.c

Log Message:
Adopt 


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/ep93xx/epe.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/ep93xx/epe.c
diff -u src/sys/arch/arm/ep93xx/epe.c:1.45 src/sys/arch/arm/ep93xx/epe.c:1.46
--- src/sys/arch/arm/ep93xx/epe.c:1.45	Mon Oct 21 08:22:06 2019
+++ src/sys/arch/arm/ep93xx/epe.c	Mon Feb  3 13:53:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: epe.c,v 1.45 2019/10/21 08:22:06 msaitoh Exp $	*/
+/*	$NetBSD: epe.c,v 1.46 2020/02/03 13:53:57 skrll Exp $	*/
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.45 2019/10/21 08:22:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.46 2020/02/03 13:53:57 skrll Exp $");
 
 #include 
 #include 
@@ -172,7 +172,7 @@ epe_gctx(struct epe_softc *sc)
 		struct mbuf *m = sc->txq[tbi].m;
 
 		if ((*sc->TXStsQ_cur & TXStsQ_TxWE) == 0)
-			ifp->if_oerrors++;
+			if_statinc(ifp, if_oerrors);
 
 		bus_dmamap_unload(sc->sc_dmat, sc->txq[tbi].m_dmamap);
 		m_freem(m);
@@ -182,7 +182,7 @@ epe_gctx(struct epe_softc *sc)
 			tbi = (tbi + 1) % TX_QLEN;
 		} while (sc->txq[tbi].m == m);
 
-		ifp->if_opackets++;
+		if_statinc(ifp, if_opackets);
 		sc->TXStsQ_cur++;
 		if (sc->TXStsQ_cur >= sc->TXStsQ + TX_QLEN) {
 			sc->TXStsQ_cur = sc->TXStsQ;
@@ -243,10 +243,10 @@ begin:
 if (m != NULL)
 	m_freem(m);
 
-ifp->if_ierrors++;
+if_statinc(ifp, if_ierrors);
 			}
 		} else
-			ifp->if_ierrors++;
+			if_statinc(ifp, if_ierrors);
 
 		ndq++;
 



CVS commit: src/sys/arch/aarch64

2020-02-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Feb  3 13:37:01 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/aarch64/include: pmap.h

Log Message:
add support pmap_pv(9)

Patch originally from jmcneill@. thanks


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/aarch64/include/pmap.h

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



CVS commit: src/sys/arch/aarch64

2020-02-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Feb  3 13:37:01 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/aarch64/include: pmap.h

Log Message:
add support pmap_pv(9)

Patch originally from jmcneill@. thanks


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/aarch64/include/pmap.h

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.62 src/sys/arch/aarch64/aarch64/pmap.c:1.63
--- src/sys/arch/aarch64/aarch64/pmap.c:1.62	Mon Feb  3 13:35:44 2020
+++ src/sys/arch/aarch64/aarch64/pmap.c	Mon Feb  3 13:37:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.62 2020/02/03 13:35:44 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.63 2020/02/03 13:37:01 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.62 2020/02/03 13:35:44 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.63 2020/02/03 13:37:01 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.6
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -116,6 +117,7 @@ PMAP_COUNTER(protect_remove_fallback, "p
 PMAP_COUNTER(protect_none, "pmap_protect non-exists pages");
 PMAP_COUNTER(protect_managed, "pmap_protect managed pages");
 PMAP_COUNTER(protect_unmanaged, "pmap_protect unmanaged pages");
+PMAP_COUNTER(protect_pvmanaged, "pmap_protect pv-tracked unmanaged pages");
 
 PMAP_COUNTER(clear_modify, "pmap_clear_modify call");
 PMAP_COUNTER(clear_modify_pages, "pmap_clear_modify pages");
@@ -135,6 +137,7 @@ PMAP_COUNTER(user_mappings_changed, "use
 PMAP_COUNTER(kern_mappings_changed, "kernel mapping changed");
 PMAP_COUNTER(uncached_mappings, "uncached pages mapped");
 PMAP_COUNTER(unmanaged_mappings, "unmanaged pages mapped");
+PMAP_COUNTER(pvmanaged_mappings, "pv-tracked unmanaged pages mapped");
 PMAP_COUNTER(managed_mappings, "managed pages mapped");
 PMAP_COUNTER(mappings, "pages mapped (including remapped)");
 PMAP_COUNTER(remappings, "pages remapped");
@@ -245,6 +248,12 @@ pm_unlock(struct pmap *pm)
 	mutex_exit(>pm_lock);
 }
 
+static inline void
+_pmap_page_init(struct pmap_page *pp)
+{
+	mutex_init(>pp_pvlock, MUTEX_SPIN, IPL_VM);
+}
+
 static inline struct pmap_page *
 phys_to_pp(paddr_t pa)
 {
@@ -254,7 +263,17 @@ phys_to_pp(paddr_t pa)
 	if (pg != NULL)
 		return VM_PAGE_TO_PP(pg);
 
+#ifdef __HAVE_PMAP_PV_TRACK
+	struct pmap_page *pp = pmap_pv_tracked(pa);
+	if (pp != NULL && (pp->pp_flags & PMAP_PAGE_FLAGS_PV_TRACKED) == 0) {
+		/* XXX: initialize pv_tracked pmap_page. should not init here */
+		_pmap_page_init(pp);
+		pp->pp_flags |= PMAP_PAGE_FLAGS_PV_TRACKED;
+	}
+	return pp;
+#else
 	return NULL;
+#endif /* __HAVE_PMAP_PV_TRACK */
 }
 
 #define IN_RANGE(va,sta,end)	(((sta) <= (va)) && ((va) < (end)))
@@ -538,7 +557,7 @@ pmap_init(void)
 		 pfn++) {
 			pg = PHYS_TO_VM_PAGE(ptoa(pfn));
 			md = VM_PAGE_TO_MD(pg);
-			mutex_init(>mdpg_pp.pp_pvlock, MUTEX_SPIN, IPL_VM);
+			_pmap_page_init(>mdpg_pp);
 		}
 	}
 }
@@ -1284,8 +1303,18 @@ pmap_protect(struct pmap *pm, vaddr_t sv
 			pp = VM_PAGE_TO_PP(pg);
 			PMAP_COUNT(protect_managed);
 		} else {
+#ifdef __HAVE_PMAP_PV_TRACK
+			pp = pmap_pv_tracked(pa);
+#ifdef PMAPCOUNTERS
+			if (pp != NULL)
+PMAP_COUNT(protect_pvmanaged);
+			else
+PMAP_COUNT(protect_unmanaged);
+#endif
+#else
 			pp = NULL;
 			PMAP_COUNT(protect_unmanaged);
+#endif /* __HAVE_PMAP_PV_TRACK */
 		}
 
 		if (pp != NULL) {
@@ -1621,8 +1650,18 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 			pp = VM_PAGE_TO_PP(pg);
 			PMAP_COUNT(managed_mappings);
 		} else {
+#ifdef __HAVE_PMAP_PV_TRACK
+			pp = pmap_pv_tracked(pa);
+#ifdef PMAPCOUNTERS
+			if (pp != NULL)
+PMAP_COUNT(pvmanaged_mappings);
+			else
+PMAP_COUNT(unmanaged_mappings);
+#endif
+#else
 			pp = NULL;
 			PMAP_COUNT(unmanaged_mappings);
+#endif /* __HAVE_PMAP_PV_TRACK */
 		}
 	}
 
@@ -1995,26 +2034,13 @@ pmap_remove(struct pmap *pm, vaddr_t sva
 	}
 }
 
-void
-pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
+static void
+pmap_page_remove(struct pmap_page *pp, vm_prot_t prot)
 {
-	struct pmap_page *pp = VM_PAGE_TO_PP(pg);
 	struct pv_entry *pv, *pvtmp;
+	struct pv_entry *pvtofree = NULL;
 	pt_entry_t opte;
 
-	KASSERT((prot & VM_PROT_READ) || !(prot & VM_PROT_WRITE));
-
-	UVMHIST_FUNC(__func__);
-	UVMHIST_CALLED(pmaphist);
-
-	UVMHIST_LOG(pmaphist, "pg=%p, pp=%p, pa=%016lx, prot=%08x",
-	pg, pp, VM_PAGE_TO_PHYS(pg), prot);
-
-
-	if ((prot & (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)) ==
-	VM_PROT_NONE) {
-		struct pv_entry *pvtofree = NULL;
-
 		/* remove all pages 

CVS commit: src/sys/arch/aarch64

2020-02-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Feb  3 13:35:44 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/include: pmap.h

Log Message:
separate struct vm_page_md into vm_page_md and pmap_page
for preparation pmap_pv(9)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/aarch64/include/pmap.h

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



CVS commit: src/sys/arch/aarch64

2020-02-03 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Mon Feb  3 13:35:44 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/aarch64/include: pmap.h

Log Message:
separate struct vm_page_md into vm_page_md and pmap_page
for preparation pmap_pv(9)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/aarch64/include/pmap.h

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.61 src/sys/arch/aarch64/aarch64/pmap.c:1.62
--- src/sys/arch/aarch64/aarch64/pmap.c:1.61	Thu Jan  9 01:38:34 2020
+++ src/sys/arch/aarch64/aarch64/pmap.c	Mon Feb  3 13:35:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.61 2020/01/09 01:38:34 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.62 2020/02/03 13:35:44 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.61 2020/01/09 01:38:34 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.62 2020/02/03 13:35:44 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -183,6 +183,8 @@ PMAP_COUNTER(unwire_failure, "pmap_unwir
 		cpu_icache_sync_range((va), PAGE_SIZE);			\
 	} while (0/*CONSTCOND*/)
 
+#define VM_PAGE_TO_PP(pg)	(&(pg)->mdpage.mdpg_pp)
+
 struct pv_entry {
 	TAILQ_ENTRY(pv_entry) pv_link;
 	struct pmap *pv_pmap;
@@ -217,17 +219,17 @@ static struct pool_cache _pmap_pv_pool;
 
 
 static inline void
-pmap_pv_lock(struct vm_page_md *md)
+pmap_pv_lock(struct pmap_page *pp)
 {
 
-	mutex_enter(>mdpg_pvlock);
+	mutex_enter(>pp_pvlock);
 }
 
 static inline void
-pmap_pv_unlock(struct vm_page_md *md)
+pmap_pv_unlock(struct pmap_page *pp)
 {
 
-	mutex_exit(>mdpg_pvlock);
+	mutex_exit(>pp_pvlock);
 }
 
 
@@ -243,6 +245,18 @@ pm_unlock(struct pmap *pm)
 	mutex_exit(>pm_lock);
 }
 
+static inline struct pmap_page *
+phys_to_pp(paddr_t pa)
+{
+	struct vm_page *pg;
+
+	pg = PHYS_TO_VM_PAGE(pa);
+	if (pg != NULL)
+		return VM_PAGE_TO_PP(pg);
+
+	return NULL;
+}
+
 #define IN_RANGE(va,sta,end)	(((sta) <= (va)) && ((va) < (end)))
 
 #define IN_KSEG_ADDR(va)	\
@@ -512,7 +526,7 @@ pmap_init(void)
 	0, 0, 0, "pvpl", NULL, IPL_VM, _pmap_pv_ctor, NULL, NULL);
 
 	/*
-	 * initialize vm_page_md:mdpg_pvlock at this time.
+	 * initialize mutex in vm_page_md at this time.
 	 * When LOCKDEBUG, mutex_init() calls km_alloc,
 	 * but VM_MDPAGE_INIT() is called before initialized kmem_vm_arena.
 	 */
@@ -524,7 +538,7 @@ pmap_init(void)
 		 pfn++) {
 			pg = PHYS_TO_VM_PAGE(ptoa(pfn));
 			md = VM_PAGE_TO_MD(pg);
-			mutex_init(>mdpg_pvlock, MUTEX_SPIN, IPL_VM);
+			mutex_init(>mdpg_pp.pp_pvlock, MUTEX_SPIN, IPL_VM);
 		}
 	}
 }
@@ -994,22 +1008,19 @@ _pmap_pte_adjust_cacheflags(pt_entry_t p
 }
 
 static struct pv_entry *
-_pmap_remove_pv(struct vm_page *pg, struct pmap *pm, vaddr_t va, pt_entry_t pte)
+_pmap_remove_pv(struct pmap_page *pp, struct pmap *pm, vaddr_t va, pt_entry_t pte)
 {
-	struct vm_page_md *md;
 	struct pv_entry *pv;
 
 	UVMHIST_FUNC(__func__);
 	UVMHIST_CALLED(pmaphist);
 
-	UVMHIST_LOG(pmaphist, "pg=%p, pm=%p, va=%llx, pte=%llx",
-	pg, pm, va, pte);
-
-	md = VM_PAGE_TO_MD(pg);
+	UVMHIST_LOG(pmaphist, "pp=%p, pm=%p, va=%llx, pte=%llx",
+	pp, pm, va, pte);
 
-	TAILQ_FOREACH(pv, >mdpg_pvhead, pv_link) {
+	TAILQ_FOREACH(pv, >pp_pvhead, pv_link) {
 		if ((pm == pv->pv_pmap) && (va == pv->pv_va)) {
-			TAILQ_REMOVE(>mdpg_pvhead, pv, pv_link);
+			TAILQ_REMOVE(>pp_pvhead, pv, pv_link);
 			PMAP_COUNT(pv_remove);
 			break;
 		}
@@ -1061,18 +1072,18 @@ pg_dump(struct vm_page *pg, void (*pr)(c
 }
 
 static void
-pv_dump(struct vm_page_md *md, void (*pr)(const char *, ...) __printflike(1, 2))
+pv_dump(struct pmap_page *pp, void (*pr)(const char *, ...) __printflike(1, 2))
 {
 	struct pv_entry *pv;
 	int i;
 
 	i = 0;
 
-	pr("md=%p\n", md);
-	pr(" md->mdpg_flags=%08x %s\n", md->mdpg_flags,
-	str_vmflags(md->mdpg_flags));
+	pr("pp=%p\n", pp);
+	pr(" pp->pp_flags=%08x %s\n", pp->pp_flags,
+	str_vmflags(pp->pp_flags));
 
-	TAILQ_FOREACH(pv, >mdpg_pvhead, pv_link) {
+	TAILQ_FOREACH(pv, >pp_pvhead, pv_link) {
 		pr("  pv[%d] pv=%p\n",
 		i, pv);
 		pr("pv[%d].pv_pmap = %p (asid=%d)\n",
@@ -1089,22 +1100,19 @@ pv_dump(struct vm_page_md *md, void (*pr
 #endif /* PMAP_PV_DEBUG & DDB */
 
 static int
-_pmap_enter_pv(struct vm_page *pg, struct pmap *pm, struct pv_entry **pvp,
+_pmap_enter_pv(struct pmap_page *pp, struct pmap *pm, struct pv_entry **pvp,
 vaddr_t va, pt_entry_t *ptep, paddr_t pa, u_int flags)
 {
-	struct vm_page_md *md;
 	struct pv_entry *pv;
 
 	UVMHIST_FUNC(__func__);
 	UVMHIST_CALLED(pmaphist);
 
-	UVMHIST_LOG(pmaphist, "pg=%p, pm=%p, va=%llx, pa=%llx", pg, pm, va, pa);
+	UVMHIST_LOG(pmaphist, "pp=%p, pm=%p, va=%llx, pa=%llx", pp, pm, va, pa);
 	UVMHIST_LOG(pmaphist, "ptep=%p, flags=%08x", 

CVS commit: src/sys/conf

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 13:28:11 UTC 2020

Modified Files:
src/sys/conf: majors.usb

Log Message:
urio has gone.   Comment it out (remaining visible to hold the number)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/conf/majors.usb

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



CVS commit: src/sys/conf

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 13:28:11 UTC 2020

Modified Files:
src/sys/conf: majors.usb

Log Message:
urio has gone.   Comment it out (remaining visible to hold the number)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/conf/majors.usb

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

Modified files:

Index: src/sys/conf/majors.usb
diff -u src/sys/conf/majors.usb:1.1 src/sys/conf/majors.usb:1.2
--- src/sys/conf/majors.usb:1.1	Fri Sep 19 17:32:34 2014
+++ src/sys/conf/majors.usb	Mon Feb  3 13:28:11 2020
@@ -1,4 +1,4 @@
-# $NetBSD: majors.usb,v 1.1 2014/09/19 17:32:34 matt Exp $
+# $NetBSD: majors.usb,v 1.2 2020/02/03 13:28:11 kre Exp $
 #
 # MI major assignments for USB devices
 #
@@ -7,5 +7,5 @@ device-major	uhid		char 221		uhid
 device-major	ulpt		char 222		ulpt
 device-major	ugen		char 223		ugen
 device-major	ucom		char 224		ucom
-device-major	urio		char 225		urio
+#device-major	urio		char 225		urio
 device-major	uscanner	char 226		uscanner



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

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 13:09:29 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/hp300: md.c
src/usr.sbin/sysinst/arch/mvme68k: md.c
src/usr.sbin/sysinst/arch/x68k: md.c

Log Message:
PR install/54921: skip non-user partitions when checking for overlaps


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/x68k/md.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/arch

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 13:09:29 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/hp300: md.c
src/usr.sbin/sysinst/arch/mvme68k: md.c
src/usr.sbin/sysinst/arch/x68k: md.c

Log Message:
PR install/54921: skip non-user partitions when checking for overlaps


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/arch/x68k/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/hp300/md.c
diff -u src/usr.sbin/sysinst/arch/hp300/md.c:1.9 src/usr.sbin/sysinst/arch/hp300/md.c:1.10
--- src/usr.sbin/sysinst/arch/hp300/md.c:1.9	Sun Dec 15 13:39:24 2019
+++ src/usr.sbin/sysinst/arch/hp300/md.c	Mon Feb  3 13:09:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.9 2019/12/15 13:39:24 martin Exp $ */
+/*	$NetBSD: md.c,v 1.10 2020/02/03 13:09:29 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -136,6 +136,12 @@ md_check_partitions(struct install_parti
 
 	for (i = 0; i < install->num; i++) {
 		if (i > 0) {
+			/* skip raw part and similar */
+			if (install->infos[i].cur_flags &
+			(PTI_SEC_CONTAINER|PTI_PSCHEME_INTERNAL|
+			PTI_RAW_PART))
+continue;
+
 			if (install->infos[i].cur_start < last_end) {
 snprintf(desc, sizeof desc,
 "%zu (%s)", i,

Index: src/usr.sbin/sysinst/arch/mvme68k/md.c
diff -u src/usr.sbin/sysinst/arch/mvme68k/md.c:1.9 src/usr.sbin/sysinst/arch/mvme68k/md.c:1.10
--- src/usr.sbin/sysinst/arch/mvme68k/md.c:1.9	Sun Dec 15 13:39:24 2019
+++ src/usr.sbin/sysinst/arch/mvme68k/md.c	Mon Feb  3 13:09:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.9 2019/12/15 13:39:24 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.10 2020/02/03 13:09:29 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -136,6 +136,12 @@ md_check_partitions(struct install_parti
 
 	for (i = 0; i < install->num; i++) {
 		if (i > 0) {
+			/* skip raw part and similar */
+			if (install->infos[i].cur_flags &
+			(PTI_SEC_CONTAINER|PTI_PSCHEME_INTERNAL|
+			PTI_RAW_PART))
+continue;
+
 			if (install->infos[i].cur_start < last_end) {
 snprintf(desc, sizeof desc,
 "%zu (%s)", i,

Index: src/usr.sbin/sysinst/arch/x68k/md.c
diff -u src/usr.sbin/sysinst/arch/x68k/md.c:1.9 src/usr.sbin/sysinst/arch/x68k/md.c:1.10
--- src/usr.sbin/sysinst/arch/x68k/md.c:1.9	Sun Dec 15 13:39:24 2019
+++ src/usr.sbin/sysinst/arch/x68k/md.c	Mon Feb  3 13:09:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.9 2019/12/15 13:39:24 martin Exp $ */
+/*	$NetBSD: md.c,v 1.10 2020/02/03 13:09:29 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -164,6 +164,12 @@ md_check_partitions(struct install_parti
 
 	for (i = 0; i < install->num; i++) {
 		if (i > 0) {
+			/* skip raw part and similar */
+			if (install->infos[i].cur_flags &
+			(PTI_SEC_CONTAINER|PTI_PSCHEME_INTERNAL|
+			PTI_RAW_PART))
+continue;
+
 			if (install->infos[i].cur_start < last_end) {
 snprintf(desc, sizeof desc,
 "%zu (%s)", i,



CVS commit: src/sys/dev/usb

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 12:56:27 UTC 2020

Modified Files:
src/sys/dev/usb: files.usb

Log Message:
urio(4) has gone - remove it from here as well, so any kernel config
files that reference it will fail to configure, rather than later
failing to build.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/usb/files.usb

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.169 src/sys/dev/usb/files.usb:1.170
--- src/sys/dev/usb/files.usb:1.169	Fri Jan 17 15:00:20 2020
+++ src/sys/dev/usb/files.usb	Mon Feb  3 12:56:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.169 2020/01/17 15:00:20 maya Exp $
+#	$NetBSD: files.usb,v 1.170 2020/02/03 12:56:26 kre Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -282,11 +282,6 @@ device	umodeswitch
 attach	umodeswitch at usbdevif
 file	dev/usb/umodeswitch.c		umodeswitch
 
-# Diamond Multimedia Rio 500
-device	urio
-attach	urio at usbdevif
-file	dev/usb/urio.c			urio			needs-flag
-
 # Apple iPad
 device	uipad
 attach	uipad at usbdevif



CVS commit: src/sys/dev/usb

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 12:56:27 UTC 2020

Modified Files:
src/sys/dev/usb: files.usb

Log Message:
urio(4) has gone - remove it from here as well, so any kernel config
files that reference it will fail to configure, rather than later
failing to build.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/usb/files.usb

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/arch

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 10:37:46 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/mvme68k: msg.md.de msg.md.en msg.md.es
msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/x68k: msg.md.en

Log Message:
PR install/54921: message "ordering" takes a %s argument.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.en \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.es \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/x68k/msg.md.en

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

Modified files:

Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.de
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.3
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.de	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.de,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.de,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -55,7 +55,7 @@ wird ein neues erstellen.
 }
 
 message ordering
-{Die Anordnung der Partition %c ist falsch. Erneut editieren?}
+{Die Anordnung der Partition %s ist falsch. Erneut editieren?}
 
 
 message set_kernel_1
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.en
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.3
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.en	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -54,7 +54,7 @@ writing a disklabel.
 }
 
 message ordering
-{The order of partition %c is wrong.  Edit again?}
+{The order of partition %s is wrong.  Edit again?}
 
 message set_kernel_1
 {Kernel (GENERIC)}
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.es
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.3
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.es	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.es,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.es,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -54,7 +54,7 @@ a escribir un disklabel.
 }
 
 message ordering
-{El orden de la partición %c esta mal. ¿Editar de nuevo?}
+{El orden de la partición %s esta mal. ¿Editar de nuevo?}
 
 message set_kernel_1
 {Núcleo (GENERIC)}
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.3
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.fr,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.fr,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -53,7 +53,7 @@ sysinst écrit un label de disque.
 }
 
 message ordering
-{L'ordre de la partition %c est erroné.  Modifier à nouveau ?}
+{L'ordre de la partition %s est erroné.  Modifier à nouveau ?}
 
 message set_kernel_1
 {Kernel (GENERIC)}
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl:1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl:1.3
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.pl,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.pl,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 /* Based on english version: */
 /*	NetBSD: msg.md.en,v 1.1 2002/03/24 22:04:06 scw Exp */
 
@@ -56,7 +56,7 @@ taka etykiete.
 }
 
 message ordering
-{Uklad partycji %c jest bledny. Edytowac jeszcze raz?}
+{Uklad partycji %s jest bledny. Edytowac jeszcze raz?}
 
 message set_kernel_1
 {Kernel (GENERIC)}

Index: src/usr.sbin/sysinst/arch/x68k/msg.md.en
diff -u src/usr.sbin/sysinst/arch/x68k/msg.md.en:1.2 src/usr.sbin/sysinst/arch/x68k/msg.md.en:1.3
--- src/usr.sbin/sysinst/arch/x68k/msg.md.en:1.2	Mon Feb  3 10:29:34 2020
+++ src/usr.sbin/sysinst/arch/x68k/msg.md.en	Mon Feb  3 10:37:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.3 2020/02/03 10:37:46 martin Exp $	*/
 
 /*
  * Copyright 1997 

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

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 10:37:46 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/mvme68k: msg.md.de msg.md.en msg.md.es
msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/x68k: msg.md.en

Log Message:
PR install/54921: message "ordering" takes a %s argument.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.en \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.es \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/x68k/msg.md.en

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



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

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 10:29:34 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/mvme68k: msg.md.de msg.md.en msg.md.es
msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/x68k: msg.md.en

Log Message:
remove unused "emptypart" message (or moved to ifdef notyet area)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.en \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.es \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/x68k/msg.md.en

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



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

2020-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  3 10:29:34 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/mvme68k: msg.md.de msg.md.en msg.md.es
msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/x68k: msg.md.en

Log Message:
remove unused "emptypart" message (or moved to ifdef notyet area)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.en \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.es \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr \
src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/x68k/msg.md.en

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

Modified files:

Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.de
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.1 src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.2
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.de:1.1	Sat Jul 26 19:30:46 2014
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.de	Mon Feb  3 10:29:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:46 dholland Exp $	*/
+/*	$NetBSD: msg.md.de,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,16 +58,15 @@ message ordering
 {Die Anordnung der Partition %c ist falsch. Erneut editieren?}
 
 
-message emptypart
-{Nach der oder den leeren Partition(en) besteht eine gültige Partition %c.
-Bitte editieren Sie die Partitionstabelle noch einmal.}
-
-
 message set_kernel_1
 {Kernel (GENERIC)}
 
 .if notyet
 /* XXX: not yet implemented */
+message emptypart
+{Nach der oder den leeren Partition(en) existiert eine gültige Partition %c.
+Bitte editieren Sie die Partitionstabelle noch einmal.}
+
 message existing
 {Wollen Sie die vorhandene(n) BSD Partition(en) beibehalten?}
 
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.en
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.1 src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.2
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.en:1.1	Sat Jul 26 19:30:46 2014
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.en	Mon Feb  3 10:29:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:46 dholland Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -56,15 +56,16 @@ writing a disklabel.
 message ordering
 {The order of partition %c is wrong.  Edit again?}
 
-message emptypart
-{There is a valid partition %c after empty partition(s).
-Please re-edit the partition table.}
-
 message set_kernel_1
 {Kernel (GENERIC)}
 
 .if notyet
 /* XXX: not yet implemented */
+
+message emptypart
+{There is a valid partition %c after empty partition(s).
+Please re-edit the partition table.}
+
 message existing
 {Do you want to preserve existing BSD partition(s)?}
 
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.es
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.1 src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.2
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.es:1.1	Sat Jul 26 19:30:46 2014
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.es	Mon Feb  3 10:29:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:46 dholland Exp $	*/
+/*	$NetBSD: msg.md.es,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -56,15 +56,15 @@ a escribir un disklabel.
 message ordering
 {El orden de la partición %c esta mal. ¿Editar de nuevo?}
 
-message emptypart
-{Hay una partición valida %c despues de particion(es) valida(s).
-Por favor, reedite la tabla de particiones}
-
 message set_kernel_1
 {Núcleo (GENERIC)}
 
 .if notyet
 /* XXX: not yet implemented */
+message emptypart
+{Hay una partición valida %c despues de particion(es) valida(s).
+Por favor, reedite la tabla de particiones}
+
 message existing
 {¿Quiere preservar particion(es) BSD existente(s)?}
 
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.1 src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.2
--- src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr:1.1	Sat Jul 26 19:30:46 2014
+++ src/usr.sbin/sysinst/arch/mvme68k/msg.md.fr	Mon Feb  3 10:29:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.fr,v 1.1 2014/07/26 19:30:46 dholland Exp $	*/
+/*	$NetBSD: msg.md.fr,v 1.2 2020/02/03 10:29:34 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -55,10 +55,6 @@ sysinst écrit un label de disque.
 message ordering
 {L'ordre de la partition %c est erroné.  Modifier à nouveau ?}
 
-message emptypart
-{Il y a une partition valide %c après une (ou plusieurs) partition(s) vide(s).
-Veuillez modifier la table des partitions.}
-
 message set_kernel_1
 {Kernel (GENERIC)}
 
Index: src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl
diff -u src/usr.sbin/sysinst/arch/mvme68k/msg.md.pl:1.1 

CVS commit: src/etc/defaults

2020-02-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  3 09:12:53 UTC 2020

Modified Files:
src/etc/defaults: rc.conf

Log Message:
Enable hostapd syslog support by default.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/etc/defaults/rc.conf

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.152 src/etc/defaults/rc.conf:1.153
--- src/etc/defaults/rc.conf:1.152	Sun Sep 15 19:38:09 2019
+++ src/etc/defaults/rc.conf	Mon Feb  3 09:12:53 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.152 2019/09/15 19:38:09 brad Exp $
+#	$NetBSD: rc.conf,v 1.153 2020/02/03 09:12:53 roy Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -316,7 +316,7 @@ iscsi_target=NO		iscsi_target_flags=""
 iscsid=NO
 
 # WPA daemons.
-hostapd=NO		hostapd_flags="-B /etc/hostapd.conf"
+hostapd=NO		hostapd_flags="-Bs /etc/hostapd.conf"
 wpa_supplicant=NO	wpa_supplicant_flags="-Ms -c /etc/wpa_supplicant.conf"
 
 # Bluetooth configuration



CVS commit: src/etc/defaults

2020-02-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  3 09:12:53 UTC 2020

Modified Files:
src/etc/defaults: rc.conf

Log Message:
Enable hostapd syslog support by default.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/etc/defaults/rc.conf

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



  1   2   >