CVS commit: src/sys/arch/mips/sibyte/dev

2021-01-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan  4 18:19:53 UTC 2021

Modified Files:
src/sys/arch/mips/sibyte/dev: sbjcn.c sbscn.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/mips/sibyte/dev/sbjcn.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mips/sibyte/dev/sbscn.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/sibyte/dev/sbjcn.c
diff -u src/sys/arch/mips/sibyte/dev/sbjcn.c:1.31 src/sys/arch/mips/sibyte/dev/sbjcn.c:1.32
--- src/sys/arch/mips/sibyte/dev/sbjcn.c:1.31	Sun Nov 10 21:16:30 2019
+++ src/sys/arch/mips/sibyte/dev/sbjcn.c	Mon Jan  4 18:19:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sbjcn.c,v 1.31 2019/11/10 21:16:30 chs Exp $ */
+/* $NetBSD: sbjcn.c,v 1.32 2021/01/04 18:19:53 thorpej Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -103,7 +103,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbjcn.c,v 1.31 2019/11/10 21:16:30 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbjcn.c,v 1.32 2021/01/04 18:19:53 thorpej Exp $");
 
 #define	SBJCN_DEBUG
 
@@ -123,7 +123,7 @@ __KERNEL_RCSID(0, "$NetBSD: sbjcn.c,v 1.
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -322,7 +322,7 @@ sbjcn_attach_channel(struct sbjcn_softc 
 	tp->t_hwiflow = sbjcn_hwiflow;
 
 	ch->ch_tty = tp;
-	ch->ch_rbuf = malloc(sbjcn_rbuf_size << 1, M_DEVBUF, M_WAITOK);
+	ch->ch_rbuf = kmem_alloc(sbjcn_rbuf_size << 1, KM_SLEEP);
 	ch->ch_ebuf = ch->ch_rbuf + (sbjcn_rbuf_size << 1);
 
 	tty_attach(tp);

Index: src/sys/arch/mips/sibyte/dev/sbscn.c
diff -u src/sys/arch/mips/sibyte/dev/sbscn.c:1.44 src/sys/arch/mips/sibyte/dev/sbscn.c:1.45
--- src/sys/arch/mips/sibyte/dev/sbscn.c:1.44	Sun Nov 10 21:16:30 2019
+++ src/sys/arch/mips/sibyte/dev/sbscn.c	Mon Jan  4 18:19:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sbscn.c,v 1.44 2019/11/10 21:16:30 chs Exp $ */
+/* $NetBSD: sbscn.c,v 1.45 2021/01/04 18:19:53 thorpej Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -109,7 +109,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.44 2019/11/10 21:16:30 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.45 2021/01/04 18:19:53 thorpej Exp $");
 
 #define	SBSCN_DEBUG
 
@@ -133,7 +133,7 @@ __KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -352,7 +352,7 @@ sbscn_attach_channel(struct sbscn_softc 
 	tp->t_hwiflow = sbscn_hwiflow;
 
 	ch->ch_tty = tp;
-	ch->ch_rbuf = malloc(sbscn_rbuf_size << 1, M_DEVBUF, M_WAITOK);
+	ch->ch_rbuf = kmem_alloc(sbscn_rbuf_size << 1, KM_SLEEP);
 	ch->ch_ebuf = ch->ch_rbuf + (sbscn_rbuf_size << 1);
 
 	tty_attach(tp);



CVS commit: src/sys/arch/mips/sibyte/dev

2019-04-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Apr 22 08:39:10 UTC 2019

Modified Files:
src/sys/arch/mips/sibyte/dev: sbmac.c

Log Message:
 This driver does ether_ioctl() on SIOC{ADD,DEL}MULTI, SIOC{G,S}IFMEDIA and
default case in the switch statement. Only the default case didn't check the
return value with ENETRESET. Integrate them to one ether_ioctl() call with
ENETRESET test. This driver might require some additional fixes for SIOCSIFMTU
and other ioctl()s.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mips/sibyte/dev/sbmac.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/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.56 src/sys/arch/mips/sibyte/dev/sbmac.c:1.57
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.56	Sun Mar 31 12:47:33 2019
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Mon Apr 22 08:39:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $ */
+/* $NetBSD: sbmac.c,v 1.57 2019/04/22 08:39:10 msaitoh Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.57 2019/04/22 08:39:10 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -2026,19 +2026,13 @@ sbmac_ioctl(struct ifnet *ifp, u_long cm
 		error = 0;
 		break;
 
-	case SIOCADDMULTI:
-	case SIOCDELMULTI:
-	case SIOCSIFMEDIA:
-	case SIOCGIFMEDIA:
+	default:
 		if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
 			error = 0;
 			if (ifp->if_flags & IFF_RUNNING)
 sbmac_setmulti(sc);
 		}
 		break;
-	default:
-		error = ether_ioctl(ifp, cmd, data);
-		break;
 	}
 
 	(void)splx(s);



CVS commit: src/sys/arch/mips/sibyte/dev

2019-03-31 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Mar 31 12:47:33 UTC 2019

Modified Files:
src/sys/arch/mips/sibyte/dev: sbmac.c

Log Message:
Allocate memory for for the ethernet DMA descriptor rings aligned to a
cache line boundary, as documented in the chip documentation.

Fixes SiByte ethernet which hasn't worked since the 8kB page size switch
(and just happened to work previously because the descriptor rings were
the same size as a page and so were allocated on a page boundary).


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mips/sibyte/dev/sbmac.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/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.55 src/sys/arch/mips/sibyte/dev/sbmac.c:1.56
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.55	Tue Mar  5 08:25:02 2019
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Sun Mar 31 12:47:33 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.55 2019/03/05 08:25:02 msaitoh Exp $ */
+/* $NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.55 2019/03/05 08:25:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -102,10 +102,9 @@ typedef enum { sbmac_state_uninit, sbmac
 
 #define	SBDMA_NEXTBUF(d, f)	((f + 1) & (d)->sbdma_dscr_mask)
 
-#define	CACHELINESIZE 32
-#define	NUMCACHEBLKS(x) (((x)+CACHELINESIZE-1)/CACHELINESIZE)
-#define	KMALLOC(x) malloc((x), M_DEVBUF, M_DONTWAIT)
-#define	KVTOPHYS(x) kvtophys((vaddr_t)(x))
+#define	CACHELINESIZE	32
+#define	NUMCACHEBLKS(x)	(((x)+CACHELINESIZE-1)/CACHELINESIZE)
+#define	KVTOPHYS(x)	kvtophys((vaddr_t)(x))
 
 #ifdef SBMACDEBUG
 #define	dprintf(x)	printf x
@@ -380,6 +379,8 @@ static void
 sbdma_initctx(sbmacdma_t *d, struct sbmac_softc *sc, int chan, int txrx,
 int maxdescr)
 {
+	uintptr_t ptr;
+
 	/*
 	 * Save away interesting stuff in the structure
 	 */
@@ -404,16 +405,15 @@ sbdma_initctx(sbmacdma_t *d, struct sbma
 	R_MAC_DMA_REGISTER(txrx, chan, R_MAC_DMA_CUR_DSCRADDR));
 
 	/*
-	 * Allocate memory for the ring
+	 * Allocate memory for the ring.  This must be aligned to a
+	 * 32-byte cache line boundary on pass1 or pass2 silicon.
 	 */
 
 	d->sbdma_maxdescr = maxdescr;
 	d->sbdma_dscr_mask = d->sbdma_maxdescr - 1;
-
-	d->sbdma_dscrtable = (sbdmadscr_t *)
-	KMALLOC(d->sbdma_maxdescr * sizeof(sbdmadscr_t));
-
-	memset(d->sbdma_dscrtable, 0, d->sbdma_maxdescr*sizeof(sbdmadscr_t));
+	ptr = (uintptr_t)kmem_zalloc(d->sbdma_maxdescr * sizeof(sbdmadscr_t) +
+	CACHELINESIZE - 1, KM_SLEEP);
+	d->sbdma_dscrtable = (sbdmadscr_t *)roundup2(ptr, CACHELINESIZE);
 
 	d->sbdma_dscrtable_phys = KVTOPHYS(d->sbdma_dscrtable);
 
@@ -422,9 +422,7 @@ sbdma_initctx(sbmacdma_t *d, struct sbma
 	 */
 
 	d->sbdma_ctxtable = (struct mbuf **)
-	KMALLOC(d->sbdma_maxdescr*sizeof(struct mbuf *));
-
-	memset(d->sbdma_ctxtable, 0, d->sbdma_maxdescr*sizeof(struct mbuf *));
+	kmem_zalloc(d->sbdma_maxdescr * sizeof(struct mbuf *), KM_SLEEP);
 }
 
 /*



CVS commit: src/sys/arch/mips/sibyte/dev

2019-01-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan 23 07:40:05 UTC 2019

Modified Files:
src/sys/arch/mips/sibyte/dev: sbmac.c

Log Message:
 Fix build break (return type of mii_writereg).


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/mips/sibyte/dev/sbmac.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/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.52 src/sys/arch/mips/sibyte/dev/sbmac.c:1.53
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.52	Tue Jan 22 03:42:26 2019
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Wed Jan 23 07:40:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.52 2019/01/22 03:42:26 msaitoh Exp $ */
+/* $NetBSD: sbmac.c,v 1.53 2019/01/23 07:40:05 msaitoh Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.52 2019/01/22 03:42:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.53 2019/01/23 07:40:05 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -314,7 +314,7 @@ sbmac_mii_readreg(device_t self, int phy
 /*
  * Write to a PHY register through the MII.
  */
-static 
+static int
 sbmac_mii_writereg(device_t self, int phy, int reg, uint16_t val)
 {
 



CVS commit: src/sys/arch/mips/sibyte/dev

2011-03-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Mar 10 17:40:50 UTC 2011

Modified Files:
src/sys/arch/mips/sibyte/dev: sbtimer.c

Log Message:
Set correct struct clockframe .intr value for hardclock(9).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/sibyte/dev/sbtimer.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/sibyte/dev/sbtimer.c
diff -u src/sys/arch/mips/sibyte/dev/sbtimer.c:1.18 src/sys/arch/mips/sibyte/dev/sbtimer.c:1.19
--- src/sys/arch/mips/sibyte/dev/sbtimer.c:1.18	Sun Feb 20 07:47:39 2011
+++ src/sys/arch/mips/sibyte/dev/sbtimer.c	Thu Mar 10 17:40:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbtimer.c,v 1.18 2011/02/20 07:47:39 matt Exp $ */
+/* $NetBSD: sbtimer.c,v 1.19 2011/03/10 17:40:50 tsutsui Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,12 +33,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbtimer.c,v 1.18 2011/02/20 07:47:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbtimer.c,v 1.19 2011/03/10 17:40:50 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
 #include sys/systm.h
 #include sys/kernel.h
+#include sys/cpu.h
 
 #include mips/locore.h
 
@@ -175,6 +176,7 @@
 
 	cf.pc = pc;
 	cf.sr = status;
+	cf.intr = (curcpu()-ci_idepth  1);
 
 	hardclock(cf);
 



CVS commit: src/sys/arch/mips/sibyte/dev

2011-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb  1 03:16:54 UTC 2011

Modified Files:
src/sys/arch/mips/sibyte/dev: sbgbus.c sbjcn.c sbjcnvar.h sbmac.c
sbobio.c sbscd.c sbscn.c sbscnvar.h sbsmbus.c sbtimer.c sbwdog.c

Log Message:
Update to CFATTACH_DECL_NEW.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/sibyte/dev/sbgbus.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mips/sibyte/dev/sbjcn.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/dev/sbjcnvar.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/sibyte/dev/sbobio.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/sibyte/dev/sbscd.c \
src/sys/arch/mips/sibyte/dev/sbtimer.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/mips/sibyte/dev/sbscn.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/sibyte/dev/sbscnvar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/sibyte/dev/sbsmbus.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/sibyte/dev/sbwdog.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/sibyte/dev/sbgbus.c
diff -u src/sys/arch/mips/sibyte/dev/sbgbus.c:1.11 src/sys/arch/mips/sibyte/dev/sbgbus.c:1.12
--- src/sys/arch/mips/sibyte/dev/sbgbus.c:1.11	Mon Dec 14 00:46:08 2009
+++ src/sys/arch/mips/sibyte/dev/sbgbus.c	Tue Feb  1 03:16:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbgbus.c,v 1.11 2009/12/14 00:46:08 matt Exp $ */
+/* $NetBSD: sbgbus.c,v 1.12 2011/02/01 03:16:54 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,32 +33,31 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbgbus.c,v 1.11 2009/12/14 00:46:08 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbgbus.c,v 1.12 2011/02/01 03:16:54 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
 
+#include ioconf.h
+
 #include machine/locore.h
 #include machine/sb1250/sb1250_regs.h
 #include machine/sb1250/sb1250_genbus.h
 #include sbmips/dev/sbobio/sbobiovar.h
 #include sbmips/dev/sbgbus/sbgbusvar.h
 
-extern struct cfdriver sbgbus_cd;
-
-static int	sbgbus_match(struct device *, struct cfdata *, void *);
-static void	sbgbus_attach(struct device *, struct device *, void *);
+static int	sbgbus_match(device_t, cfdata_t, void *);
+static void	sbgbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(sbgbus, sizeof(struct device),
+CFATTACH_DECL_NEW(sbgbus, 0,
 sbgbus_match, sbgbus_attach, NULL, NULL);
 
-static int	sbgbussearch(struct device *, struct cfdata *,
-			 const int *, void *);
+static int	sbgbussearch(device_t, cfdata_t, const int *, void *);
 static int	sbgbusprint(void *, const char *);
 
 static int
-sbgbus_match(struct device *parent, struct cfdata *match, void *aux)
+sbgbus_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct sbobio_attach_args *sap = aux;
 
@@ -69,7 +68,7 @@
 }
 
 static void
-sbgbus_attach(struct device *parent, struct device *self, void *aux)
+sbgbus_attach(device_t parent, device_t self, void *aux)
 {
 
 	/* Configure children using indirect configuration. */
@@ -95,7 +94,7 @@
 }
 
 static int
-sbgbussearch(struct device *parent, struct cfdata *cf,
+sbgbussearch(device_t parent, cfdata_t cf,
 	 const int *ldesc, void *aux)
 {
 	struct sbgbus_attach_args sga;

Index: src/sys/arch/mips/sibyte/dev/sbjcn.c
diff -u src/sys/arch/mips/sibyte/dev/sbjcn.c:1.24 src/sys/arch/mips/sibyte/dev/sbjcn.c:1.25
--- src/sys/arch/mips/sibyte/dev/sbjcn.c:1.24	Mon Dec 14 00:46:08 2009
+++ src/sys/arch/mips/sibyte/dev/sbjcn.c	Tue Feb  1 03:16:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbjcn.c,v 1.24 2009/12/14 00:46:08 matt Exp $ */
+/* $NetBSD: sbjcn.c,v 1.25 2011/02/01 03:16:54 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -103,11 +103,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.24 2009/12/14 00:46:08 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.25 2011/02/01 03:16:54 matt Exp $);
 
 #define	SBJCN_DEBUG
 
 #include opt_ddb.h
+#include ioconf.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -163,8 +164,6 @@
 void	sbjcn_cnputc(dev_t dev, int c);
 void	sbjcn_cnpollc(dev_t dev, int on);
 
-extern struct cfdriver sbjcn_cd;
-
 dev_type_open(sbjcnopen);
 dev_type_close(sbjcnclose);
 dev_type_read(sbjcnread);
@@ -218,10 +217,10 @@
 void	sbjcn_kgdb_putc(void *, int);
 #endif /* KGDB */
 
-static int	sbjcn_match(struct device *, struct cfdata *, void *);
-static void	sbjcn_attach(struct device *, struct device *, void *);
+static int	sbjcn_match(device_t, cfdata_t, void *);
+static void	sbjcn_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(sbjcn, sizeof(struct sbjcn_softc),
+CFATTACH_DECL_NEW(sbjcn, sizeof(struct sbjcn_softc),
 sbjcn_match, sbjcn_attach, NULL, NULL);
 
 #define	READ_REG(rp)		(mips3_ld((volatile uint64_t *)(rp)))
@@ -236,7 +235,7 @@
 
 
 static int
-sbjcn_match(struct device *parent, struct cfdata *match, void *aux)
+sbjcn_match(device_t parent, cfdata_t match, void 

CVS commit: src/sys/arch/mips/sibyte/dev

2011-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb  1 06:13:08 UTC 2011

Modified Files:
src/sys/arch/mips/sibyte/dev: sbgbusvar.h sbjcn.c sbmac.c sbobio.c
sbscd.c sbscn.c sbsmbus.c sbtimer.c sbwdog.c

Log Message:
Use aprint_* and misc cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/dev/sbgbusvar.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/sibyte/dev/sbjcn.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/sibyte/dev/sbobio.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/sibyte/dev/sbscd.c \
src/sys/arch/mips/sibyte/dev/sbtimer.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mips/sibyte/dev/sbscn.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/sibyte/dev/sbsmbus.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/sibyte/dev/sbwdog.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/sibyte/dev/sbgbusvar.h
diff -u src/sys/arch/mips/sibyte/dev/sbgbusvar.h:1.2 src/sys/arch/mips/sibyte/dev/sbgbusvar.h:1.3
--- src/sys/arch/mips/sibyte/dev/sbgbusvar.h:1.2	Fri Feb  7 17:38:49 2003
+++ src/sys/arch/mips/sibyte/dev/sbgbusvar.h	Tue Feb  1 06:13:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbgbusvar.h,v 1.2 2003/02/07 17:38:49 cgd Exp $ */
+/* $NetBSD: sbgbusvar.h,v 1.3 2011/02/01 06:13:08 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -38,7 +38,7 @@
 struct sbgbus_attach_args {
 	/* from locators */
 	u_int		sga_chipsel;
-	u_int		sga_offset;
+	u_long		sga_offset;
 	u_int		sga_intr[2];
 
 	/* calculated by sbgbus */

Index: src/sys/arch/mips/sibyte/dev/sbjcn.c
diff -u src/sys/arch/mips/sibyte/dev/sbjcn.c:1.25 src/sys/arch/mips/sibyte/dev/sbjcn.c:1.26
--- src/sys/arch/mips/sibyte/dev/sbjcn.c:1.25	Tue Feb  1 03:16:54 2011
+++ src/sys/arch/mips/sibyte/dev/sbjcn.c	Tue Feb  1 06:13:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbjcn.c,v 1.25 2011/02/01 03:16:54 matt Exp $ */
+/* $NetBSD: sbjcn.c,v 1.26 2011/02/01 06:13:08 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -103,7 +103,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.25 2011/02/01 03:16:54 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.26 2011/02/01 06:13:08 matt Exp $);
 
 #define	SBJCN_DEBUG
 
@@ -237,9 +237,9 @@
 static int
 sbjcn_match(device_t parent, cfdata_t match, void *aux)
 {
-	struct sbscd_attach_args *sap = aux;
+	struct sbscd_attach_args *sa = aux;
 
-	if (sap-sa_locs.sa_type != SBSCD_DEVTYPE_JTAGCONS)
+	if (sa-sa_locs.sa_type != SBSCD_DEVTYPE_JTAGCONS)
 		return (0);
 
 	return 1;
@@ -249,13 +249,13 @@
 sbjcn_attach(device_t parent, device_t self, void *aux)
 {
 	struct sbjcn_softc *sc = device_private(self);
-	struct sbscd_attach_args *sap = aux;
+	struct sbscd_attach_args *sa = aux;
 
 	sc-sc_dev = self;
-	sc-sc_addr = sap-sa_base + sap-sa_locs.sa_offset;
+	sc-sc_addr = sa-sa_base + sa-sa_locs.sa_offset;
 
-	printf(\n);
-	sbjcn_attach_channel(sc, 0, sap-sa_locs.sa_intr[0]);
+	aprint_normal(\n);
+	sbjcn_attach_channel(sc, 0, sa-sa_locs.sa_intr[0]);
 }
 
 void
@@ -312,8 +312,9 @@
 	ch-ch_tty = tp;
 	ch-ch_rbuf = malloc(sbjcn_rbuf_size  1, M_DEVBUF, M_NOWAIT);
 	if (ch-ch_rbuf == NULL) {
-		printf(%s: channel %d: unable to allocate ring buffer\n,
-		sc-sc_dev.dv_xname, chan);
+		aprint_error_dev(sc-sc_dev,
+		channel %d: unable to allocate ring buffer\n,
+		chan);
 		return;
 	}
 	ch-ch_ebuf = ch-ch_rbuf + (sbjcn_rbuf_size  1);
@@ -327,9 +328,10 @@
 		maj = cdevsw_lookup_major(sbjcn_cdevsw);
 
 		cn_tab-cn_dev = makedev(maj,
-		(device_unit(sc-sc_dev)  1) + chan);
+		(device_unit(sc-sc_dev)  1) + chan);
 
-		printf(%s: channel %d: console\n, sc-sc_dev.dv_xname, chan);
+		aprint_normal_dev(sc-sc_dev, channel %d: %s\n,
+		chan, console);
 	}
 
 #ifdef KGDB
@@ -342,7 +344,8 @@
 		sbjcn_kgdb_attached = 1;
 
 		SET(ch-ch_hwflags, SBJCN_HW_KGDB);
-		printf(%s: channel %d: kgdb\n, sc-sc_dev.dv_xname, chan);
+		aprint_normal_dev(sc-sc_dev, channel %d: %s\n,
+		chan, kgdb);
 	}
 #endif
 
@@ -390,16 +393,18 @@
 	struct sbjcn_softc *sc = ch-ch_sc;
 	struct tty *tp = ch-ch_tty;
 
-	printf(%s: chan %d: %s %sclocal  %sdcd %sts_carr_on %sdtr %stx_stopped\n,
-	sc-sc_dev.dv_xname, ch-ch_num, str,
+	aprint_normal_dev(sc-sc_dev,
+	chan %d: %s %sclocal  %sdcd %sts_carr_on %sdtr %stx_stopped\n,
+	ch-ch_num, str,
 	ISSET(tp-t_cflag, CLOCAL) ? + : -,
 	ISSET(ch-ch_iports, ch-ch_i_dcd) ? + : -,
 	ISSET(tp-t_state, TS_CARR_ON) ? + : -,
 	ISSET(ch-ch_oports, ch-ch_o_dtr) ? + : -,
 	ch-ch_tx_stopped ? + : -);
 
-	printf(%s: chan %d: %s %scrtscts %scts %sts_ttstop  %srts %xrx_flags\n,
-	sc-sc_dev.dv_xname, ch-ch_num, str,
+	aprint_normal_dev(sc-sc_dev,
+	chan %d: %s %scrtscts %scts %sts_ttstop  %srts %xrx_flags\n,
+	ch-ch_num, str,
 	ISSET(tp-t_cflag, CRTSCTS) ? + : -,
 	ISSET(ch-ch_iports, ch-ch_i_cts) ? + : -,
 	ISSET(tp-t_state,