CVS commit: src/sys/dev/bi

2022-09-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 18 16:51:28 UTC 2022

Modified Files:
src/sys/dev/bi: if_ni.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/bi/if_ni.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/bi/if_ni.c
diff -u src/sys/dev/bi/if_ni.c:1.49 src/sys/dev/bi/if_ni.c:1.50
--- src/sys/dev/bi/if_ni.c:1.49	Tue May 28 07:41:48 2019
+++ src/sys/dev/bi/if_ni.c	Sun Sep 18 16:51:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ni.c,v 1.49 2019/05/28 07:41:48 msaitoh Exp $ */
+/*	$NetBSD: if_ni.c,v 1.50 2022/09/18 16:51:28 thorpej Exp $ */
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.49 2019/05/28 07:41:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.50 2022/09/18 16:51:28 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -482,7 +482,6 @@ niinit(struct ni_softc *sc)
 	 * Set flags (so ni_setup() do the right thing).
 	 */
 	ifp->if_flags |= IFF_RUNNING;
-	ifp->if_flags &= ~IFF_OACTIVE;
 
 	/*
 	 * Send setup messages so that the rx/tx locic starts.
@@ -503,8 +502,6 @@ nistart(struct ifnet *ifp)
 	struct mbuf *m, *m0;
 	int i, cnt, res, mlen;
 
-	if (ifp->if_flags & IFF_OACTIVE)
-		return;
 #ifdef DEBUG
 	if (ifp->if_flags & IFF_DEBUG)
 		printf("%s: nistart\n", device_xname(sc->sc_dev));
@@ -517,7 +514,6 @@ nistart(struct ifnet *ifp)
 
 		data = REMQHI(>nf_dforw);
 		if ((int)data == Q_EMPTY) {
-			ifp->if_flags |= IFF_OACTIVE;
 			break;
 		}
 
@@ -623,7 +619,6 @@ niintr(void *arg)
 
 		case BVP_DGRAM:
 			m = (struct mbuf *)data->nd_cmdref;
-			ifp->if_flags &= ~IFF_OACTIVE;
 			m_freem(m);
 			res = INSQTI(data, >nf_dforw);
 			if (res == Q_EMPTY) {



CVS commit: src/sys/dev/bi

2022-09-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 18 16:51:28 UTC 2022

Modified Files:
src/sys/dev/bi: if_ni.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/bi/if_ni.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/bi

2019-05-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 23 10:34:44 UTC 2019

Modified Files:
src/sys/dev/bi: if_ni.c

Log Message:
- Use aprint_*().
- KNF
- u_int*_t -> uint*_t


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/bi/if_ni.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/bi

2019-05-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 23 10:34:44 UTC 2019

Modified Files:
src/sys/dev/bi: if_ni.c

Log Message:
- Use aprint_*().
- KNF
- u_int*_t -> uint*_t


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/bi/if_ni.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/bi/if_ni.c
diff -u src/sys/dev/bi/if_ni.c:1.46 src/sys/dev/bi/if_ni.c:1.47
--- src/sys/dev/bi/if_ni.c:1.46	Tue Jun 26 06:48:00 2018
+++ src/sys/dev/bi/if_ni.c	Thu May 23 10:34:44 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ni.c,v 1.46 2018/06/26 06:48:00 msaitoh Exp $ */
+/*	$NetBSD: if_ni.c,v 1.47 2019/05/23 10:34:44 msaitoh Exp $ */
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.46 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.47 2019/05/23 10:34:44 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -130,7 +130,7 @@ struct	ni_softc {
 	struct ni_gvppqb *sc_pgvppqb;	/* Phys address of PQB		*/
 	struct ni_fqb	*sc_fqb;	/* Free Queue block		*/
 	struct ni_bbd	*sc_bbd;	/* Buffer descriptors		*/
-	u_int8_t	sc_enaddr[ETHER_ADDR_LEN];
+	uint8_t	sc_enaddr[ETHER_ADDR_LEN];
 };
 
 static	int	nimatch(device_t, cfdata_t, void *);
@@ -143,8 +143,8 @@ static	int	ni_add_rxbuf(struct ni_softc 
 static	void	ni_setup(struct ni_softc *);
 static	void	nitimeout(struct ifnet *);
 static	void	ni_shutdown(void *);
-static	void ni_getpgs(struct ni_softc *sc, int size, void **v, paddr_t *p);
-static	int failtest(struct ni_softc *, int, int, int, const char *);
+static	void	ni_getpgs(struct ni_softc *, int, void **, paddr_t *);
+static	int	failtest(struct ni_softc *, int, int, int, const char *);
 
 volatile int endwait, retry;	/* Used during autoconfig */
 
@@ -192,7 +192,7 @@ ni_getpgs(struct ni_softc *sc, int size,
 		panic(" unable to allocate memory: error %d", error);
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, , nsegs, size, v,
-	BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0)
+	BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0)
 		panic(" unable to map memory: error %d", error);
 
 	if (p)
@@ -237,8 +237,8 @@ niattach(device_t parent, device_t self,
 	sc->sc_dev = self;
 
 	type = bus_space_read_2(ba->ba_iot, ba->ba_ioh, BIREG_DTYPE);
-	printf(": DEBN%c\n", type == BIDT_DEBNA ? 'A' : type == BIDT_DEBNT ?
-	'T' : 'K');
+	aprint_normal(": DEBN%c\n", type == BIDT_DEBNA ? 'A'
+	: type == BIDT_DEBNT ? 'T' : 'K');
 	sc->sc_iot = ba->ba_iot;
 	sc->sc_ioh = ba->ba_ioh;
 	sc->sc_dmat = ba->ba_dmat;
@@ -259,7 +259,7 @@ niattach(device_t parent, device_t self,
 
 	nipqb->np_veclvl = (ba->ba_ivec << 2) + 2;
 	nipqb->np_node = ba->ba_intcpu;
-	nipqb->np_vpqb = (u_int32_t)gvp;
+	nipqb->np_vpqb = (uint32_t)gvp;
 #ifdef __vax__
 	nipqb->np_spt = nipqb->np_gpt = mfpr(PR_SBR);
 	nipqb->np_sptlen = nipqb->np_gptlen = mfpr(PR_SLR);
@@ -267,8 +267,8 @@ niattach(device_t parent, device_t self,
 #error Must fix support for non-vax.
 #endif
 	nipqb->np_bvplvl = 1;
-	nipqb->np_vfqb = (u_int32_t)fqb;
-	nipqb->np_vbdt = (u_int32_t)bbd;
+	nipqb->np_vfqb = (uint32_t)fqb;
+	nipqb->np_vbdt = (uint32_t)bbd;
 	nipqb->np_nbdr = NBDESCS;
 
 	/* Free queue block */
@@ -296,7 +296,7 @@ niattach(device_t parent, device_t self,
 	while ((NI_RREG(BIREG_VAXBICSR) & BICSR_BROKE) && --i)
 		DELAY(50);
 	if (i == 0) {
-		printf("%s: BROKE bit set after reset\n", device_xname(self));
+		aprint_error_dev(self, "BROKE bit set after reset\n");
 		return;
 	}
 
@@ -309,7 +309,7 @@ niattach(device_t parent, device_t self,
 	NI_WREG(NI_PCR, NI_RREG(NI_PCR) & ~PCR_OWN);
 
 	/* kick off init */
-	NI_WREG(NI_PCR, (u_int32_t)sc->sc_pgvppqb | PCR_INIT | PCR_OWN);
+	NI_WREG(NI_PCR, (uint32_t)sc->sc_pgvppqb | PCR_INIT | PCR_OWN);
 	while (NI_RREG(NI_PCR) & PCR_OWN)
 		DELAY(10);
 
@@ -320,7 +320,7 @@ niattach(device_t parent, device_t self,
 	NI_WREG(NI_PSR, NI_RREG(NI_PSR) & ~PSR_OWN);
 
 	WAITREG(NI_PCR, PCR_OWN);
-	NI_WREG(NI_PCR, PCR_OWN|PCR_ENABLE);
+	NI_WREG(NI_PCR, PCR_OWN | PCR_ENABLE);
 	WAITREG(NI_PCR, PCR_OWN);
 	WAITREG(NI_PSR, PSR_OWN);
 
@@ -347,7 +347,7 @@ niattach(device_t parent, device_t self,
 		INSQTI(msg, >nf_mforw);
 	}
 	WAITREG(NI_PCR, PCR_OWN);
-	NI_WREG(NI_PCR, PCR_FREEQNE|PCR_MFREEQ|PCR_OWN);
+	NI_WREG(NI_PCR, PCR_FREEQNE | PCR_MFREEQ | PCR_OWN);
 	WAITREG(NI_PCR, PCR_OWN);
 
 	/* Set up xmit queue */
@@ -370,7 +370,7 @@ niattach(device_t parent, device_t self,
 		INSQTI(data, >nf_dforw);
 	}
 	WAITREG(NI_PCR, PCR_OWN);
-	NI_WREG(NI_PCR, PCR_FREEQNE|PCR_DFREEQ|PCR_OWN);
+	NI_WREG(NI_PCR, PCR_FREEQNE | PCR_DFREEQ | PCR_OWN);
 	WAITREG(NI_PCR, PCR_OWN);
 
 	/* recv buffers */
@@ -392,7 +392,7 @@ niattach(device_t parent, device_t self,
 		INSQTI(data, >nf_rforw);
 	}
 	WAITREG(NI_PCR, PCR_OWN);
-	NI_WREG(NI_PCR, PCR_FREEQNE|PCR_RFREEQ|PCR_OWN);
+	NI_WREG(NI_PCR, PCR_FREEQNE | 

CVS commit: src/sys/dev/bi

2010-01-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sat Jan 16 18:43:34 UTC 2010

Modified Files:
src/sys/dev/bi: kdb.c

Log Message:
Delete some dead (#ifdef notyet) code.


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

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