CVS commit: src/sys/dev/pci

2010-01-20 Thread Tonnerre Lombard
Module Name:src
Committed By:   tonnerre
Date:   Wed Jan 20 09:05:12 UTC 2010

Modified Files:
src/sys/dev/pci: azalia.c
src/sys/dev/pci/hdaudio: hdaudio_afg.c

Log Message:
Signedness bug/crash in azalia and hdaudio. Fixes PR 42604.
By Pierre Pronchery.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/azalia.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/hdaudio/hdaudio_afg.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/azalia.c
diff -u src/sys/dev/pci/azalia.c:1.71 src/sys/dev/pci/azalia.c:1.72
--- src/sys/dev/pci/azalia.c:1.71	Fri Jan  8 19:56:51 2010
+++ src/sys/dev/pci/azalia.c	Wed Jan 20 09:05:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: azalia.c,v 1.71 2010/01/08 19:56:51 dyoung Exp $	*/
+/*	$NetBSD: azalia.c,v 1.72 2010/01/20 09:05:12 tonnerre Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.71 2010/01/08 19:56:51 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.72 2010/01/20 09:05:12 tonnerre Exp $");
 
 #include 
 #include 
@@ -2238,7 +2238,7 @@
 
 	az = v;
 	co = &az->codecs[az->codecno];
-	if (mdev->index >= co->nmixers)
+	if (mdev->index < 0 || mdev->index >= co->nmixers)
 		return ENXIO;
 	*mdev = co->mixers[mdev->index].devinfo;
 	return 0;

Index: src/sys/dev/pci/hdaudio/hdaudio_afg.c
diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.18 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.19
--- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.18	Fri Jan  8 19:56:52 2010
+++ src/sys/dev/pci/hdaudio/hdaudio_afg.c	Wed Jan 20 09:05:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_afg.c,v 1.18 2010/01/08 19:56:52 dyoung Exp $ */
+/* $NetBSD: hdaudio_afg.c,v 1.19 2010/01/20 09:05:12 tonnerre Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd 
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.18 2010/01/08 19:56:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.19 2010/01/20 09:05:12 tonnerre Exp $");
 
 #include 
 #include 
@@ -3500,7 +3500,7 @@
 	struct hdaudio_audiodev *ad = opaque;
 	struct hdaudio_afg_softc *sc = ad->ad_sc;
 
-	if (di->index >= sc->sc_nmixers)
+	if (di->index < 0 || di->index >= sc->sc_nmixers)
 		return ENXIO;
 
 	*di = sc->sc_mixers[di->index].mx_di;



CVS commit: src/external/bsd/iscsi/dist/src/lib

2010-01-20 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Jan 20 10:33:08 UTC 2010

Modified Files:
src/external/bsd/iscsi/dist/src/lib: disk.c

Log Message:
implement REPORT LUNS for non-zero LUNs correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/disk.c

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/disk.c
diff -u src/external/bsd/iscsi/dist/src/lib/disk.c:1.4 src/external/bsd/iscsi/dist/src/lib/disk.c:1.5
--- src/external/bsd/iscsi/dist/src/lib/disk.c:1.4	Wed Jan 20 00:58:49 2010
+++ src/external/bsd/iscsi/dist/src/lib/disk.c	Wed Jan 20 10:33:08 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: disk.c,v 1.4 2010/01/20 00:58:49 yamt Exp $ */
+/* $NetBSD: disk.c,v 1.5 2010/01/20 10:33:08 yamt Exp $ */
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -765,15 +765,31 @@
 
 /* handle REPORT LUNs SCSI command */
 static int
-report_luns(uint64_t *data, int64_t luns)
+report_luns(uint8_t *data, uint64_t luns)
 {
-	uint64_t	i;
-	int32_t		off;
+	uint64_t i;
+	uint32_t len;
 
-	for (i = 0, off = 8 ; i < (uint64_t)luns ; i++, off += sizeof(i)) {
-		data[(int)i] = ISCSI_HTONLL(i);
+	len = 8;
+	for (i = 0; i < luns; i++) {
+		uint8_t *p = &data[len];
+
+		if (i < 256) {
+			memset(p, 0, 8);
+			p[1] = (uint8_t)(i & 0xff);
+			len += 8;
+		} else if (i < 16384) {
+			memset(p, 0, 8);
+			p[0] = (uint8_t)(0x40 | ((i >> 8) & 0x3f));
+			p[1] = (uint8_t)(i & 0xff);
+			len += 8;
+		} else {
+			/* XXX */
+		}
 	}
-	return off;
+	*((uint32_t *)(void *)data) = ISCSI_HTONL(len - 8);
+	memset(&data[4], 0, 4);
+	return len;
 }
 
 /* handle persistent reserve in command */
@@ -1309,12 +1325,8 @@
 
 	case REPORT_LUNS:
 		iscsi_trace(TRACE_SCSI_CMD, "REPORT LUNS\n");
-		args->length = report_luns(
-(uint64_t *)(void *)&args->send_data[8],
-(off_t)disks.v[sess->d].luns);
-		*((uint32_t *)(void *)args->send_data) =
-ISCSI_HTONL(disks.v[sess->d].luns *
-sizeof(uint64_t));
+		args->length = report_luns(args->send_data,
+disks.v[sess->d].luns);
 		args->input = 8;
 		args->status = SCSI_SUCCESS;
 		break;



CVS commit: src/external/bsd/pcc

2010-01-20 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Jan 20 11:45:55 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile Makefile.inc
src/external/bsd/pcc/lib: Makefile
src/external/bsd/pcc/lib/crtstuff: Makefile
src/external/bsd/pcc/lib/libpcc: Makefile
src/external/bsd/pcc/libexec: Makefile
src/external/bsd/pcc/libexec/ccom: Makefile
src/external/bsd/pcc/libexec/cpp: Makefile
src/external/bsd/pcc/usr.bin/pcc: Makefile
Added Files:
src/external/bsd/pcc/lib: Makefile.inc
src/external/bsd/pcc/libexec: Makefile.inc
src/external/bsd/pcc/usr.bin: Makefile.inc

Log Message:
Clean up the build framework for pcc

  - use  to include <../Makefile.inc> files
  - add Makefile.inc files that pull in appropriate build settings
  - fix the LIBEXECDIR definition (should have trailing /)
  - make cc.1 install as pcc.1 to match the binary
  - use YHEADER= to build the yacc headers
  - general consistency tidy up


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/Makefile \
src/external/bsd/pcc/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/lib/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pcc/lib/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/lib/crtstuff/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/lib/libpcc/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/libexec/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pcc/libexec/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/libexec/ccom/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/libexec/cpp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/pcc/usr.bin/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/usr.bin/pcc/Makefile

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

Modified files:

Index: src/external/bsd/pcc/Makefile
diff -u src/external/bsd/pcc/Makefile:1.1 src/external/bsd/pcc/Makefile:1.2
--- src/external/bsd/pcc/Makefile:1.1	Sun Aug 24 05:47:05 2008
+++ src/external/bsd/pcc/Makefile	Wed Jan 20 11:45:54 2010
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2008/08/24 05:47:05 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.2 2010/01/20 11:45:54 plunky Exp $
 
 SUBDIR=		lib libexec usr.bin
 
 .include 
-
Index: src/external/bsd/pcc/Makefile.inc
diff -u src/external/bsd/pcc/Makefile.inc:1.1 src/external/bsd/pcc/Makefile.inc:1.2
--- src/external/bsd/pcc/Makefile.inc:1.1	Sun Aug 24 05:47:05 2008
+++ src/external/bsd/pcc/Makefile.inc	Wed Jan 20 11:45:54 2010
@@ -1,10 +1,11 @@
-#	$NetBSD: Makefile.inc,v 1.1 2008/08/24 05:47:05 gmcgarry Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2010/01/20 11:45:54 plunky Exp $
 
-MDIR=	${DIST}/arch/${TARGMACH}
-MIPDIR=	${DIST}/mip
+PCC_DIR:=${.PARSEDIR}
+PCC_DIST=${PCC_DIR}/dist/pcc
+PCC_LIBS=${PCC_DIR}/dist/pcc-libs
 
 TARGOS = netbsd
-# XXX Currently only handles i386
+
 .if ${MACHINE_ARCH} == "i386"
 TARGMACH = i386
 .elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
@@ -18,9 +19,11 @@
 libexecdir = /usr/libexec
 includedir = /usr/include
 
-CPPFLAGS+= -DLIBEXECDIR=\"${libexecdir}\" -DINCLUDEDIR=\"${includedir}\"
-CPPFLAGS+= -I${DIST}/os/${TARGOS} -I${MDIR} -Dmach_${TARGMACH} -Dos_${TARGOS}
-CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/..
+CPPFLAGS+=	-DLIBEXECDIR=\"${libexecdir}/\"
+CPPFLAGS+=	-DINCLUDEDIR=\"${includedir}/\"
+CPPFLAGS+=	-Dos_${TARGOS}
+CPPFLAGS+=	-Dmach_${TARGMACH}
+CPPFLAGS+=	-I${PCC_DIR}
 
 .if exists(${.CURDIR}/../../../Makefile.inc)
 .include "${.CURDIR}/../../../Makefile.inc"

Index: src/external/bsd/pcc/lib/Makefile
diff -u src/external/bsd/pcc/lib/Makefile:1.1 src/external/bsd/pcc/lib/Makefile:1.2
--- src/external/bsd/pcc/lib/Makefile:1.1	Sun Aug 24 05:47:05 2008
+++ src/external/bsd/pcc/lib/Makefile	Wed Jan 20 11:45:55 2010
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2008/08/24 05:47:05 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.2 2010/01/20 11:45:55 plunky Exp $
 
 SUBDIR=		crtstuff libpcc
 
 .include 
-

Index: src/external/bsd/pcc/lib/crtstuff/Makefile
diff -u src/external/bsd/pcc/lib/crtstuff/Makefile:1.1 src/external/bsd/pcc/lib/crtstuff/Makefile:1.2
--- src/external/bsd/pcc/lib/crtstuff/Makefile:1.1	Sun Aug 24 05:47:05 2008
+++ src/external/bsd/pcc/lib/crtstuff/Makefile	Wed Jan 20 11:45:55 2010
@@ -1,18 +1,15 @@
-#	$NetBSD: Makefile,v 1.1 2008/08/24 05:47:05 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.2 2010/01/20 11:45:55 plunky Exp $
 
-.include 
+.include 
 
-DIST=   ${NETBSDSRCDIR}/external/bsd/pcc/dist/pcc-libs
-SUBDIST=${DIST}/csu/netbsd
-.PATH:  ${SUBDIST}
-
-#CPPFLAGS+=-I${SUBDIST}
-
-#.include "../../Makefile.inc"
+.PATH: ${PCC_LIBS}/csu/${TARGOS}
 
 SRCS+=		crtbegin.c crtend.c
 OBJS+=		crtbegin.o crtend.o
 
+CPPFLAGS+=	-I${PCC_LIBS}/csu/${TARGOS}
+CPPFLAGS+=	-Wno-missing-prototypes
+
 realall: ${OBJS}
 
 crtbegin.o: crtbegin.c

Index: src/external/bsd/pcc/lib/libpcc/Makefile
diff -u src/external/bsd/pcc/lib/libpcc/Makefile:1.2 src/external/bsd/

CVS commit: src/external/bsd/iscsi/dist/src/lib

2010-01-20 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Jan 20 11:50:29 UTC 2010

Modified Files:
src/external/bsd/iscsi/dist/src/lib: target.c

Log Message:
- remove unnecessary and confusing initialization of sess->d.
- add an assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/target.c

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/target.c
diff -u src/external/bsd/iscsi/dist/src/lib/target.c:1.4 src/external/bsd/iscsi/dist/src/lib/target.c:1.5
--- src/external/bsd/iscsi/dist/src/lib/target.c:1.4	Wed Jan 20 00:58:49 2010
+++ src/external/bsd/iscsi/dist/src/lib/target.c	Wed Jan 20 11:50:28 2010
@@ -43,6 +43,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #ifdef HAVE_NETINET_TCP_H
@@ -1545,6 +1546,7 @@
 
 	ISCSI_LOCK(&g_session_q_mutex, return -1);
 	(void) memset(sess, 0x0, sizeof(*sess));
+	sess->d = -1;
 	if (iscsi_queue_insert(&g_session_q, sess) != 0) {
 		iscsi_err(__FILE__, __LINE__,
 "iscsi_queue_insert() failed\n");
@@ -1988,6 +1990,7 @@
 	tgt->main_pid = getpid();
 	for (i = 0; i < maxsessions; i++) {
 		g_session[i].id = i;
+		g_session[i].d = -1;
 		if (iscsi_queue_insert(&g_session_q, &g_session[i]) != 0) {
 			iscsi_err(__FILE__, __LINE__,
 "iscsi_queue_insert() failed\n");
@@ -1995,8 +1998,9 @@
 		}
 	}
 	for (j = 0 ; j < lunv->c ; j++) {
-		g_session[j].d = device_init(tgt, lunv, &lunv->v[j]);
-		if (g_session[j].d < 0) {
+		int d = device_init(tgt, lunv, &lunv->v[j]);
+
+		if (d < 0) {
 			iscsi_err(__FILE__, __LINE__,
 "device_init() failed\n");
 			return -1;
@@ -2131,6 +2135,7 @@
 			goto done;
 		}
 		ISCSI_UNLOCK(&g_session_q_mutex, return -1);
+		assert(sess->d == -1);
 #if 0
 		(void) memset(sess, 0x0, sizeof(*sess));
 #endif



CVS commit: src/share/man/man9

2010-01-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 20 12:09:39 UTC 2010

Modified Files:
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: bpf.9

Log Message:
add short description for bpf.9


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/bpf.9

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

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.305 src/share/man/man9/Makefile:1.306
--- src/share/man/man9/Makefile:1.305	Wed Jan 20 00:39:30 2010
+++ src/share/man/man9/Makefile	Wed Jan 20 12:09:39 2010
@@ -1,10 +1,10 @@
-#   $NetBSD: Makefile,v 1.305 2010/01/20 00:39:30 dyoung Exp $
+#   $NetBSD: Makefile,v 1.306 2010/01/20 12:09:39 pooka Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
 MAN=	accept_filter.9 accf_data.9 accf_http.9 \
 	altq.9 arc4random.9 arp.9 audio.9 autoconf.9 \
-	bcdtobin.9 bcmp.9 bcopy.9 bluetooth.9 boothowto.9 \
+	bcdtobin.9 bcmp.9 bcopy.9 bluetooth.9 boothowto.9 bpf.9 \
 	buffercache.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 bzero.9 \
 	callback.9 callout.9 cardbus.9 cnmagic.9 condvar.9 config.9 \
 	cons.9 copy.9 coredump_write.9 \

Added files:

Index: src/share/man/man9/bpf.9
diff -u /dev/null src/share/man/man9/bpf.9:1.1
--- /dev/null	Wed Jan 20 12:09:39 2010
+++ src/share/man/man9/bpf.9	Wed Jan 20 12:09:39 2010
@@ -0,0 +1,75 @@
+.\" $NetBSD: bpf.9,v 1.1 2010/01/20 12:09:39 pooka Exp $
+.\"
+.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 20, 2010
+.Dt BPF 9
+.Os
+.Sh NAME
+.Nm bpf
+.Nd Berkeley Packet Filter kernel interface
+.Sh SYNOPSIS
+.In sys/mbuf.h
+.In net/bpf.h
+.Sh DESCRIPTION
+.Nm
+is called via an operations vector described by the following struct:
+.Pp
+.Bd -literal
+struct bpf_ops {
+void (*bpf_attach)(struct ifnet *, u_int, u_int, struct bpf_if **);
+void (*bpf_detach)(struct ifnet *);
+void (*bpf_change_type)(struct ifnet *, u_int, u_int);
+
+void (*bpf_tap)(struct bpf_if *, u_char *, u_int);
+void (*bpf_mtap)(struct bpf_if *, struct mbuf *);
+void (*bpf_mtap2)(struct bpf_if *, void *, u_int, struct mbuf *);
+void (*bpf_mtap_af)(struct bpf_if *, uint32_t, struct mbuf *);
+void (*bpf_mtap_et)(struct bpf_if *, uint16_t, struct mbuf *);
+void (*bpf_mtap_sl_in)(struct bpf_if *, u_char *, struct mbuf **);
+void (*bpf_mtap_sl_out)(struct bpf_if *, u_char *, struct mbuf *);
+};
+.Ed
+.Pp
+This vector is found from
+.Vt struct bpf_ops *
+.Va bpf_ops ,
+and is either a stub implementation or a real implementation depending
+on if bpf is absent or present in the kernel, respectively.
+.Sh CODE REFERENCES
+This section describes places within the
+.Nx
+source tree where the implementation can be found.
+All pathnames are relative to
+.Pa /usr/src .
+.Pp
+The
+.Nm
+implementation is located in
+.Pa sys/net/bpf.c ,
+the stub implementation is in
+.Pa sys/net/bpf_stub.c
+and the interface is defined in
+.Pa sys/net/bpf.h .



CVS commit: src/doc

2010-01-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 20 12:12:09 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
bpf.4 did not change.  point entry to the newly-born bpf.9


To generate a diff of this commit:
cvs rdiff -u -r1.1348 -r1.1349 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1348 src/doc/CHANGES:1.1349
--- src/doc/CHANGES:1.1348	Wed Jan 20 07:31:59 2010
+++ src/doc/CHANGES	Wed Jan 20 12:12:09 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1348 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1349 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -531,6 +531,6 @@
 		check_pkg_signatures to validate the installed packages
 		against the vulnerabilities database and the expected
 		checksums for their files.  [jmmv 20100119]
-	bpf(4): Make bpf interface with an ops vector backed by stubs
+	bpf(9): Make bpf interface with an ops vector backed by stubs
 		if bpf is not present in the kernel.  The client
 		linkage is now always the same.  [pooka 20100119]



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

2010-01-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 20 12:14:00 UTC 2010

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

Log Message:
add bpf.9 manpage


To generate a diff of this commit:
cvs rdiff -u -r1.1367 -r1.1368 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1367 src/distrib/sets/lists/comp/mi:1.1368
--- src/distrib/sets/lists/comp/mi:1.1367	Wed Jan 20 07:27:09 2010
+++ src/distrib/sets/lists/comp/mi	Wed Jan 20 12:14:00 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1367 2010/01/20 07:27:09 wiz Exp $
+#	$NetBSD: mi,v 1.1368 2010/01/20 12:14:00 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -8461,6 +8461,7 @@
 ./usr/share/man/cat9/boothowto.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/boottime.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bounds_check_with_label.0	comp-sys-catman		.cat
+./usr/share/man/cat9/bpf.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bread.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/breada.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/breadn.0			comp-sys-catman		.cat
@@ -14006,6 +14007,7 @@
 ./usr/share/man/html9/boothowto.html		comp-sys-htmlman	html
 ./usr/share/man/html9/boottime.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bounds_check_with_label.html	comp-sys-htmlman	html
+./usr/share/man/html9/bpf.html			comp-sys-htmlman	html
 ./usr/share/man/html9/bread.html		comp-sys-htmlman	html
 ./usr/share/man/html9/breada.html		comp-sys-htmlman	html
 ./usr/share/man/html9/breadn.html		comp-sys-htmlman	html
@@ -19662,6 +19664,7 @@
 ./usr/share/man/man9/boothowto.9		comp-sys-man		.man
 ./usr/share/man/man9/boottime.9			comp-sys-man		.man
 ./usr/share/man/man9/bounds_check_with_label.9	comp-sys-man		.man
+./usr/share/man/man9/bpf.9			comp-sys-man		.man
 ./usr/share/man/man9/bread.9			comp-sys-man		.man
 ./usr/share/man/man9/breada.9			comp-sys-man		.man
 ./usr/share/man/man9/breadn.9			comp-sys-man		.man



CVS commit: src/crypto/dist/heimdal/lib

2010-01-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 20 12:54:17 UTC 2010

Modified Files:
src/crypto/dist/heimdal/lib/asn1: gen_locl.h lex.h
src/crypto/dist/heimdal/lib/com_err: compile_et.c compile_et.h
src/crypto/dist/heimdal/lib/roken: get_window_size.c getarg.c strlcat.c
strlcpy.c strupr.c warnerr.c
src/crypto/dist/heimdal/lib/vers: print_version.c

Log Message:
Don't include src/include heimdal/roken.h on tools build because
it's "an OS dependent, generated file" configured for the target NetBSD
as noted in itself.  Instead, include 
(which is included from generated  and required
for TRUE and fALSE definitions) and "nbtool_config.h" on tools build.

Fixes PR toolchain/41435 and makes cross build on Cygwin-1.7 work.
No particular comments in the PR.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/lib/asn1/gen_locl.h \
src/crypto/dist/heimdal/lib/asn1/lex.h
cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/heimdal/lib/com_err/compile_et.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/lib/com_err/compile_et.h
cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/heimdal/lib/roken/get_window_size.c \
src/crypto/dist/heimdal/lib/roken/getarg.c \
src/crypto/dist/heimdal/lib/roken/warnerr.c
cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/heimdal/lib/roken/strlcat.c \
src/crypto/dist/heimdal/lib/roken/strlcpy.c \
src/crypto/dist/heimdal/lib/roken/strupr.c
cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/heimdal/lib/vers/print_version.c

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

Modified files:

Index: src/crypto/dist/heimdal/lib/asn1/gen_locl.h
diff -u src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.2 src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.3
--- src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.2	Sat Mar 22 08:37:04 2008
+++ src/crypto/dist/heimdal/lib/asn1/gen_locl.h	Wed Jan 20 12:54:17 2010
@@ -32,7 +32,7 @@
  */
 
 /* $Heimdal: gen_locl.h 18008 2006-09-05 12:29:18Z lha $
-   $NetBSD: gen_locl.h,v 1.2 2008/03/22 08:37:04 mlelstv Exp $ */
+   $NetBSD: gen_locl.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
 
 #ifndef __GEN_LOCL_H__
 #define __GEN_LOCL_H__
@@ -49,7 +49,11 @@
 #include 
 #include 
 #include 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include 
+#else
 #include 
+#endif
 #include "hash.h"
 #include "symbol.h"
 #include "asn1-common.h"
Index: src/crypto/dist/heimdal/lib/asn1/lex.h
diff -u src/crypto/dist/heimdal/lib/asn1/lex.h:1.2 src/crypto/dist/heimdal/lib/asn1/lex.h:1.3
--- src/crypto/dist/heimdal/lib/asn1/lex.h:1.2	Sat Mar 22 08:37:04 2008
+++ src/crypto/dist/heimdal/lib/asn1/lex.h	Wed Jan 20 12:54:17 2010
@@ -32,9 +32,14 @@
  */
 
 /* $Heimdal: lex.h 15617 2005-07-12 06:27:42Z lha $
-   $NetBSD: lex.h,v 1.2 2008/03/22 08:37:04 mlelstv Exp $ */
+   $NetBSD: lex.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#include 
+#else
 #include 
+#endif
 
 void error_message (const char *, ...)
 __attribute__ ((format (printf, 1, 2)));

Index: src/crypto/dist/heimdal/lib/com_err/compile_et.c
diff -u src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.6 src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.7
--- src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.6	Wed Feb 18 01:18:57 2009
+++ src/crypto/dist/heimdal/lib/com_err/compile_et.c	Wed Jan 20 12:54:17 2010
@@ -36,9 +36,8 @@
 #include 
 
 __RCSID("$Heimdal: compile_et.c 15426 2005-06-16 19:21:42Z lha $"
-"$NetBSD: compile_et.c,v 1.6 2009/02/18 01:18:57 uebayasi Exp $");
+"$NetBSD: compile_et.c,v 1.7 2010/01/20 12:54:17 tsutsui Exp $");
 
-#include 
 #include 
 #include "parse.h"
 

Index: src/crypto/dist/heimdal/lib/com_err/compile_et.h
diff -u src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.2 src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.3
--- src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.2	Sat Mar 22 08:37:06 2008
+++ src/crypto/dist/heimdal/lib/com_err/compile_et.h	Wed Jan 20 12:54:17 2010
@@ -32,7 +32,7 @@
  */
 
 /* $Heimdal: compile_et.h 15426 2005-06-16 19:21:42Z lha $
-   $NetBSD: compile_et.h,v 1.2 2008/03/22 08:37:06 mlelstv Exp $ */
+   $NetBSD: compile_et.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
 
 #ifndef __COMPILE_ET_H__
 #define __COMPILE_ET_H__
@@ -47,7 +47,11 @@
 #include 
 #include 
 #include 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include 
+#else
 #include 
+#endif
 
 extern long base_id;
 extern int number;

Index: src/crypto/dist/heimdal/lib/roken/get_window_size.c
diff -u src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.3 src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.4
--- src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.3	Sat Mar 22 08:37:21 2008
+++ src/crypto/dist/heimdal/lib/roken/get_window_size.c	Wed Jan 20 12:54:17 2010
@@ -34,7 +34,7 @@
 #ifdef HAVE_CONFIG_H
 #include 
 __RCSID("$Heimdal: get_window_size.c 21005 2007-06-08 01:54:35Z lha $"
-"$NetBSD: get_window_size.c,v 1.3 

CVS commit: src/usr.sbin/mtree

2010-01-20 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Jan 20 13:50:27 UTC 2010

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
Document -t (modify mtime).  Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/mtree/mtree.8

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/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.51 src/usr.sbin/mtree/mtree.8:1.52
--- src/usr.sbin/mtree/mtree.8:1.51	Thu Apr  9 09:53:37 2009
+++ src/usr.sbin/mtree/mtree.8	Wed Jan 20 13:50:27 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.51 2009/04/09 09:53:37 apb Exp $
+.\"	$NetBSD: mtree.8,v 1.52 2010/01/20 13:50:27 uebayasi Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -56,7 +56,7 @@
 .\"
 .\" @(#)mtree.8	8.2 (Berkeley) 12/11/93
 .\"
-.Dd April 9, 2009
+.Dd Jan 20, 2010
 .Dt MTREE 8
 .Os
 .Sh NAME
@@ -258,6 +258,9 @@
 .Sy cksum
 was specified.
 The checksum is seeded with the specified value.
+.It Fl t
+Modify the modified time of existing files, the device type of devices, and
+symbolic link targets, to match the specification.
 .It Fl U
 Same as
 .Fl u



CVS commit: src/usr.sbin/mtree

2010-01-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan 20 14:00:48 UTC 2010

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
Fix date.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/mtree/mtree.8

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/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.52 src/usr.sbin/mtree/mtree.8:1.53
--- src/usr.sbin/mtree/mtree.8:1.52	Wed Jan 20 13:50:27 2010
+++ src/usr.sbin/mtree/mtree.8	Wed Jan 20 14:00:48 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.52 2010/01/20 13:50:27 uebayasi Exp $
+.\"	$NetBSD: mtree.8,v 1.53 2010/01/20 14:00:48 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -56,7 +56,7 @@
 .\"
 .\" @(#)mtree.8	8.2 (Berkeley) 12/11/93
 .\"
-.Dd Jan 20, 2010
+.Dd January 20, 2010
 .Dt MTREE 8
 .Os
 .Sh NAME



CVS commit: src/crypto/dist/heimdal/lib/roken

2010-01-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 20 15:03:51 UTC 2010

Modified Files:
src/crypto/dist/heimdal/lib/roken: get_window_size.c getarg.c

Log Message:
Backout previous which breaks build on NetBSD. Pointed out by w...@.

Probably we have to add a check for HAVE_STRUCT_WINSIZE
in src/tools/configure as src/crypto/dist/heimdal/configure does.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/heimdal/lib/roken/get_window_size.c \
src/crypto/dist/heimdal/lib/roken/getarg.c

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

Modified files:

Index: src/crypto/dist/heimdal/lib/roken/get_window_size.c
diff -u src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.4 src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.5
--- src/crypto/dist/heimdal/lib/roken/get_window_size.c:1.4	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/roken/get_window_size.c	Wed Jan 20 15:03:50 2010
@@ -34,7 +34,7 @@
 #ifdef HAVE_CONFIG_H
 #include 
 __RCSID("$Heimdal: get_window_size.c 21005 2007-06-08 01:54:35Z lha $"
-"$NetBSD: get_window_size.c,v 1.4 2010/01/20 12:54:17 tsutsui Exp $");
+"$NetBSD: get_window_size.c,v 1.5 2010/01/20 15:03:50 tsutsui Exp $");
 #endif
 
 #include 
@@ -59,11 +59,7 @@
 #include 
 #endif
 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include "roken-common.h"
-#else
 #include "roken.h"
-#endif
 
 int ROKEN_LIB_FUNCTION
 get_window_size(int fd, struct winsize *wp)
Index: src/crypto/dist/heimdal/lib/roken/getarg.c
diff -u src/crypto/dist/heimdal/lib/roken/getarg.c:1.4 src/crypto/dist/heimdal/lib/roken/getarg.c:1.5
--- src/crypto/dist/heimdal/lib/roken/getarg.c:1.4	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/roken/getarg.c	Wed Jan 20 15:03:50 2010
@@ -34,21 +34,13 @@
 #ifdef HAVE_CONFIG_H
 #include 
 __RCSID("$Heimdal: getarg.c 21005 2007-06-08 01:54:35Z lha $"
-"$NetBSD: getarg.c,v 1.4 2010/01/20 12:54:17 tsutsui Exp $");
+"$NetBSD: getarg.c,v 1.5 2010/01/20 15:03:50 tsutsui Exp $");
 #endif
 
 #include 
 #include 
 #include 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#ifdef HAVE_TERMIOS_H	/* XXX for struct winsize */
-#include 
-#endif
-#include "roken-common.h"
-#else
 #include "roken.h"
-#endif
 #include "getarg.h"
 
 #define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)



CVS commit: src/sys/arch/sparc64/sparc64

2010-01-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 20 15:45:52 UTC 2010

Modified Files:
src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
Add the mac address as device property "mac-address" to all devices that
look like a network interface.
Also add a boolean "without-seeprom" to all apparently on-board network
interface (which usually have no eeprom of their own on Suns), this
latter can be used to enable driver hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc64/sparc64/autoconf.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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.163 src/sys/arch/sparc64/sparc64/autoconf.c:1.164
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.163	Sun Jan 10 13:52:06 2010
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Wed Jan 20 15:45:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.163 2010/01/10 13:52:06 martin Exp $ */
+/*	$NetBSD: autoconf.c,v 1.164 2010/01/20 15:45:52 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.163 2010/01/10 13:52:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.164 2010/01/20 15:45:52 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -76,6 +76,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -906,17 +907,45 @@
 		return;
 
 	if (ofnode != 0) {
-		char devtype[32];
+		uint8_t eaddr[ETHER_ADDR_LEN];
+		char tmpstr[32];
 		uint64_t nwwn = 0, pwwn = 0;
 		prop_dictionary_t dict;
+		prop_data_t blob;
 		prop_number_t pwwnd = NULL, nwwnd = NULL;
 
 		device_setofnode(dev, ofnode);
 		dev_path_exact_match(dev, ofnode);
 
+		if (OF_getprop(ofnode, "name", tmpstr, sizeof(tmpstr)) <= 0)
+			tmpstr[0] = 0;
+
+		/*
+		 * If this is a network interface, note the
+		 * mac address.
+		 */
+		if (strcmp(tmpstr, "network") == 0
+		   || strcmp(tmpstr, "ethernet") == 0
+		   || OF_getprop(ofnode, "mac-address", &eaddr, sizeof(eaddr))
+		  == sizeof(eaddr)) {
+			prom_getether(ofnode, eaddr);
+			dict = device_properties(dev);
+			blob = prop_data_create_data(eaddr, ETHER_ADDR_LEN);
+			prop_dictionary_set(dict, "mac-address", blob);
+			prop_object_release(blob);
+		}
+		/*
+		 * Is it a network interface with FCode? (others are called
+		 * "ethernet" by the firmware)
+		 */
+		if (strcmp(tmpstr, "network") == 0) {
+			dict = device_properties(dev);
+			prop_dictionary_set_bool(dict, "without-seeprom", true);
+		}
+
 		/* is this a FC node? */
-		if (OF_getprop(ofnode, "device_type", devtype,
-		sizeof(devtype)) > 0 && strcmp(devtype, "scsi-fcp") == 0) {
+		if (OF_getprop(ofnode, "device_type", tmpstr,
+		sizeof(tmpstr)) > 0 && strcmp(tmpstr, "scsi-fcp") == 0) {
 
 			dict = device_properties(dev);
 



CVS commit: src/lib/libm/src

2010-01-20 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Jan 20 16:31:35 UTC 2010

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
PR/42630 asin(2.0) and acos(2.0) doesn't return NaN.
reported by NARUSE, Yui -san, Thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/k_standard.c

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

Modified files:

Index: src/lib/libm/src/k_standard.c
diff -u src/lib/libm/src/k_standard.c:1.12 src/lib/libm/src/k_standard.c:1.13
--- src/lib/libm/src/k_standard.c:1.12	Thu Jul 21 16:58:39 2005
+++ src/lib/libm/src/k_standard.c	Wed Jan 20 16:31:35 2010
@@ -12,7 +12,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.12 2005/07/21 16:58:39 christos Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.13 2010/01/20 16:31:35 tnozaki Exp $");
 #endif
 
 #include "math.h"
@@ -118,9 +118,12 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "asin" : "asinf";
 		exc.retval = zero;
-		if(_LIB_VERSION == _POSIX_)
+		if(_LIB_VERSION == _POSIX_) {
+#ifndef __vax__
+		  exc.retval = NAN;
+#endif
 		  errno = EDOM;
-		else if (!matherr(&exc)) {
+		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 			(void) WRITE2("asin: DOMAIN error\n", 19);
 		  }
@@ -135,9 +138,12 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "atan2" : "atan2f";
 		exc.retval = zero;
-		if(_LIB_VERSION == _POSIX_)
+		if(_LIB_VERSION == _POSIX_) {
+#ifndef __vax__
+		  exc.retval = NAN;
+#endif
 		  errno = EDOM;
-		else if (!matherr(&exc)) {
+		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 			(void) WRITE2("atan2: DOMAIN error\n", 20);
 		  }



CVS commit: src/sys/arch/powerpc/oea

2010-01-20 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan 20 16:36:55 UTC 2010

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c

Log Message:
pass some OF properties as device properties for network devices
namely local-mac-address and shared-pins needed by gem


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/oea/ofw_autoconf.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/powerpc/oea/ofw_autoconf.c
diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.10 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.11
--- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.10	Wed Mar 18 10:22:34 2009
+++ src/sys/arch/powerpc/oea/ofw_autoconf.c	Wed Jan 20 16:36:55 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_autoconf.c,v 1.10 2009/03/18 10:22:34 cegger Exp $ */
+/* $NetBSD: ofw_autoconf.c,v 1.11 2010/01/20 16:36:55 macallan Exp $ */
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
  * Copyright (C) 1995, 1996 TooLs GmbH.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.10 2009/03/18 10:22:34 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.11 2010/01/20 16:36:55 macallan Exp $");
 
 #include 
 #include 
@@ -249,6 +249,12 @@
 prop_dictionary_set_bool(dict, "is_console", 0);
 copy_disp_props(dev, node, dict);
 			}
+			if (pci_class == PCI_CLASS_NETWORK) {
+of_to_dataprop(dict, node, "local-mac-address",
+"mac-address");
+of_to_dataprop(dict, node, "shared-pins",
+"shared-pins");
+			}
 		}
 	}
 



CVS commit: src/lib/libm/src

2010-01-20 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 20 16:49:43 UTC 2010

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
let the previous fix apply to acos rather than atan2,
and get rid of #ifdef vax


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libm/src/k_standard.c

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

Modified files:

Index: src/lib/libm/src/k_standard.c
diff -u src/lib/libm/src/k_standard.c:1.13 src/lib/libm/src/k_standard.c:1.14
--- src/lib/libm/src/k_standard.c:1.13	Wed Jan 20 16:31:35 2010
+++ src/lib/libm/src/k_standard.c	Wed Jan 20 16:49:42 2010
@@ -12,7 +12,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.13 2010/01/20 16:31:35 tnozaki Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.14 2010/01/20 16:49:42 drochner Exp $");
 #endif
 
 #include "math.h"
@@ -103,9 +103,10 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "acos" : "acosf";
 		exc.retval = zero;
-		if (_LIB_VERSION == _POSIX_)
+		if (_LIB_VERSION == _POSIX_) {
+		  exc.retval = zero/zero;
 		  errno = EDOM;
-		else if (!matherr(&exc)) {
+		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 		(void) WRITE2("acos: DOMAIN error\n", 19);
 		  }
@@ -119,9 +120,7 @@
 		exc.name = type < 100 ? "asin" : "asinf";
 		exc.retval = zero;
 		if(_LIB_VERSION == _POSIX_) {
-#ifndef __vax__
-		  exc.retval = NAN;
-#endif
+		  exc.retval = zero/zero;
 		  errno = EDOM;
 		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
@@ -138,12 +137,9 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "atan2" : "atan2f";
 		exc.retval = zero;
-		if(_LIB_VERSION == _POSIX_) {
-#ifndef __vax__
-		  exc.retval = NAN;
-#endif
+		if(_LIB_VERSION == _POSIX_)
 		  errno = EDOM;
-		} else if (!matherr(&exc)) {
+		else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 			(void) WRITE2("atan2: DOMAIN error\n", 20);
 		  }



CVS commit: src/sys/arch/ofppc/ofppc

2010-01-20 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Jan 20 17:12:08 UTC 2010

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

Log Message:
Have to include rtas.h for NRTAS definition.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/ofppc/ofppc/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/ofppc/ofppc/machdep.c
diff -u src/sys/arch/ofppc/ofppc/machdep.c:1.108 src/sys/arch/ofppc/ofppc/machdep.c:1.109
--- src/sys/arch/ofppc/ofppc/machdep.c:1.108	Sat Jan 16 21:05:28 2010
+++ src/sys/arch/ofppc/ofppc/machdep.c	Wed Jan 20 17:12:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.108 2010/01/16 21:05:28 phx Exp $	*/
+/*	$NetBSD: machdep.c,v 1.109 2010/01/20 17:12:08 phx Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2010/01/16 21:05:28 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2010/01/20 17:12:08 phx Exp $");
 
 #include 
 #include 
@@ -62,6 +62,7 @@
 #include 
 #include 
 #endif
+#include "rtas.h"
 
 struct pmap ofw_pmap;
 char bootpath[256];



CVS commit: src/sys/lib/libkern/arch/mips

2010-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 20 18:13:40 UTC 2010

Modified Files:
src/sys/lib/libkern/arch/mips: Makefile.inc

Log Message:
Remove kern_assert.c - it's not needed here cuz it's already pulled in
by sys/lib/libkern/Makefile.libkern

OK pooka@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/lib/libkern/arch/mips/Makefile.inc

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

Modified files:

Index: src/sys/lib/libkern/arch/mips/Makefile.inc
diff -u src/sys/lib/libkern/arch/mips/Makefile.inc:1.22 src/sys/lib/libkern/arch/mips/Makefile.inc:1.23
--- src/sys/lib/libkern/arch/mips/Makefile.inc:1.22	Wed Jan 20 03:36:26 2010
+++ src/sys/lib/libkern/arch/mips/Makefile.inc	Wed Jan 20 18:13:40 2010
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile.inc,v 1.22 2010/01/20 03:36:26 pooka Exp $
+#	$NetBSD: Makefile.inc,v 1.23 2010/01/20 18:13:40 pgoyette Exp $
 #
 #	There are likely more that we will notice when we go native
 
 NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c
 NO_SRCS+= __main.c
 
-SRCS+=	kern_assert.c memchr.c memcmp.c random.c scanc.c \
+SRCS+=	memchr.c memcmp.c random.c scanc.c \
 	skpc.c strcat.c strcpy.c strcasecmp.c \
 	strncasecmp.c strncmp.c strncpy.c strtoul.c
 



CVS commit: src/sys/dev

2010-01-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Jan 20 18:55:17 UTC 2010

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

Log Message:
Get out of cgd_detach() early on error.  Do not call disk_destroy(9)
on error, that leaves the cgd_softc in an inconsistent state.

Fixes a crash during shutdown reported by Patrick Welche.  Thanks
to Patrick for reporting and for testing the fix.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.66 src/sys/dev/cgd.c:1.67
--- src/sys/dev/cgd.c:1.66	Tue Jan 12 23:49:34 2010
+++ src/sys/dev/cgd.c	Wed Jan 20 18:55:17 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.66 2010/01/12 23:49:34 dyoung Exp $ */
+/* $NetBSD: cgd.c,v 1.67 2010/01/20 18:55:17 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.66 2010/01/12 23:49:34 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.67 2010/01/20 18:55:17 dyoung Exp $");
 
 #include 
 #include 
@@ -193,23 +193,21 @@
 static int
 cgd_detach(device_t self, int flags)
 {
-	int	ret = 0;
-	int	pmask = 1 << RAW_PART;
+	int ret;
+	const int pmask = 1 << RAW_PART;
 	struct cgd_softc *sc = device_private(self);
-	struct dk_softc *dksc;
+	struct dk_softc *dksc = &sc->sc_dksc;
 
-	dksc = &sc->sc_dksc;
-	if ((dksc->sc_flags & DKF_INITED) != 0)
-	{
-		if (DK_BUSY(&sc->sc_dksc, pmask))
-			ret = EBUSY;
-		else
-			ret = cgd_ioctl_clr(sc, curlwp);
-	}
+	if (DK_BUSY(dksc, pmask))
+		return EBUSY;
 
-	disk_destroy(&sc->sc_dksc.sc_dkdev);
+	if ((dksc->sc_flags & DKF_INITED) != 0 &&
+	(ret = cgd_ioctl_clr(sc, curlwp)) != 0)
+		return ret;
 
-	return ret;
+	disk_destroy(&dksc->sc_dkdev);
+
+	return 0;
 }
 
 void



CVS commit: src/sys/dev

2010-01-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Jan 20 19:00:47 UTC 2010

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

Log Message:
Cosmetic: get out of cgdioctl() early.  Instead of

int ret;

switch (...) {
case ...:
ret = ...;
break;
}
return ret;

write:

switch (...) {
case ...:
return ...;
}


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.67 src/sys/dev/cgd.c:1.68
--- src/sys/dev/cgd.c:1.67	Wed Jan 20 18:55:17 2010
+++ src/sys/dev/cgd.c	Wed Jan 20 19:00:47 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.67 2010/01/20 18:55:17 dyoung Exp $ */
+/* $NetBSD: cgd.c,v 1.68 2010/01/20 19:00:47 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.67 2010/01/20 18:55:17 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.68 2010/01/20 19:00:47 dyoung Exp $");
 
 #include 
 #include 
@@ -496,7 +496,6 @@
 	struct	cgd_softc *cs;
 	struct	dk_softc *dksc;
 	struct	disk *dk;
-	int	ret;
 	int	part = DISKPART(dev);
 	int	pmask = 1 << part;
 
@@ -515,18 +514,12 @@
 	switch (cmd) {
 	case CGDIOCSET:
 		if (dksc->sc_flags & DKF_INITED)
-			ret = EBUSY;
-		else
-			ret = cgd_ioctl_set(cs, data, l);
-		break;
+			return EBUSY;
+		return cgd_ioctl_set(cs, data, l);
 	case CGDIOCCLR:
-
 		if (DK_BUSY(&cs->sc_dksc, pmask))
-			ret = EBUSY;
-		else
-			ret = cgd_ioctl_clr(cs, l);
-		break;
-
+			return EBUSY;
+		return cgd_ioctl_clr(cs, l);
 	case DIOCCACHESYNC:
 		/*
 		 * XXX Do we really need to care about having a writable
@@ -538,15 +531,10 @@
 		/*
 		 * We pass this call down to the underlying disk.
 		 */
-		ret = VOP_IOCTL(cs->sc_tvn, cmd, data, flag, l->l_cred);
-		break;
-
+		return VOP_IOCTL(cs->sc_tvn, cmd, data, flag, l->l_cred);
 	default:
-		ret = dk_ioctl(di, dksc, dev, cmd, data, flag, l);
-		break;
+		return dk_ioctl(di, dksc, dev, cmd, data, flag, l);
 	}
-
-	return ret;
 }
 
 static int



CVS commit: src/usr.bin/unifdef

2010-01-20 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Wed Jan 20 19:02:42 UTC 2010

Modified Files:
src/usr.bin/unifdef: unifdef.c

Log Message:
- Fix bug where -o outfile fails when outfile does not exist.  Pointed
  out by Tony Finch.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/unifdef/unifdef.c

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

Modified files:

Index: src/usr.bin/unifdef/unifdef.c
diff -u src/usr.bin/unifdef/unifdef.c:1.16 src/usr.bin/unifdef/unifdef.c:1.17
--- src/usr.bin/unifdef/unifdef.c:1.16	Sat Jan 16 21:26:59 2010
+++ src/usr.bin/unifdef/unifdef.c	Wed Jan 20 19:02:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: unifdef.c,v 1.16 2010/01/16 21:26:59 christos Exp $	*/
+/*	$NetBSD: unifdef.c,v 1.17 2010/01/20 19:02:42 ginsbach Exp $	*/
 
 /*
  * Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@
 #endif
 #ifdef __IDSTRING
 __IDSTRING(Berkeley, "@(#)unifdef.c	8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.16 2010/01/16 21:26:59 christos Exp $");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.17 2010/01/20 19:02:42 ginsbach Exp $");
 __IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $");
 #endif
 #endif /* not lint */
@@ -342,13 +342,13 @@
 	if (ofilename == NULL) {
 		output = stdout;
 	} else {
-		if (stat(ofilename, &osb) != 0)
-			err(2, "can't stat %s", ofilename);
-		if (fstat(fileno(input), &isb) != 0)
-			err(2, "can't fstat %s", filename);
+		if (stat(ofilename, &osb) == 0) {
+			if (fstat(fileno(input), &isb) != 0)
+err(2, "can't fstat %s", filename);
 
-		overwriting = (osb.st_dev == isb.st_dev &&
-		osb.st_ino == osb.st_ino);
+			overwriting = (osb.st_dev == isb.st_dev &&
+			osb.st_ino == osb.st_ino);
+		}
 		if (overwriting) {
 			int ofd;
 



CVS commit: src/crypto/dist/heimdal/lib

2010-01-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 20 19:54:07 UTC 2010

Modified Files:
src/crypto/dist/heimdal/lib/asn1: gen_locl.h lex.h
src/crypto/dist/heimdal/lib/com_err: compile_et.c compile_et.h
src/crypto/dist/heimdal/lib/roken: strlcat.c strlcpy.c strupr.c
warnerr.c
src/crypto/dist/heimdal/lib/vers: print_version.c

Log Message:
Backout previous.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/heimdal/lib/asn1/gen_locl.h \
src/crypto/dist/heimdal/lib/asn1/lex.h
cvs rdiff -u -r1.7 -r1.8 src/crypto/dist/heimdal/lib/com_err/compile_et.c
cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/heimdal/lib/com_err/compile_et.h
cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/heimdal/lib/roken/strlcat.c \
src/crypto/dist/heimdal/lib/roken/strlcpy.c \
src/crypto/dist/heimdal/lib/roken/strupr.c
cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/heimdal/lib/roken/warnerr.c
cvs rdiff -u -r1.9 -r1.10 src/crypto/dist/heimdal/lib/vers/print_version.c

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

Modified files:

Index: src/crypto/dist/heimdal/lib/asn1/gen_locl.h
diff -u src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.3 src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.4
--- src/crypto/dist/heimdal/lib/asn1/gen_locl.h:1.3	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/asn1/gen_locl.h	Wed Jan 20 19:54:07 2010
@@ -32,7 +32,7 @@
  */
 
 /* $Heimdal: gen_locl.h 18008 2006-09-05 12:29:18Z lha $
-   $NetBSD: gen_locl.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
+   $NetBSD: gen_locl.h,v 1.4 2010/01/20 19:54:07 tsutsui Exp $ */
 
 #ifndef __GEN_LOCL_H__
 #define __GEN_LOCL_H__
@@ -49,11 +49,7 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include 
-#else
 #include 
-#endif
 #include "hash.h"
 #include "symbol.h"
 #include "asn1-common.h"
Index: src/crypto/dist/heimdal/lib/asn1/lex.h
diff -u src/crypto/dist/heimdal/lib/asn1/lex.h:1.3 src/crypto/dist/heimdal/lib/asn1/lex.h:1.4
--- src/crypto/dist/heimdal/lib/asn1/lex.h:1.3	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/asn1/lex.h	Wed Jan 20 19:54:07 2010
@@ -32,14 +32,9 @@
  */
 
 /* $Heimdal: lex.h 15617 2005-07-12 06:27:42Z lha $
-   $NetBSD: lex.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
+   $NetBSD: lex.h,v 1.4 2010/01/20 19:54:07 tsutsui Exp $ */
 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#include 
-#else
 #include 
-#endif
 
 void error_message (const char *, ...)
 __attribute__ ((format (printf, 1, 2)));

Index: src/crypto/dist/heimdal/lib/com_err/compile_et.c
diff -u src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.7 src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.8
--- src/crypto/dist/heimdal/lib/com_err/compile_et.c:1.7	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/com_err/compile_et.c	Wed Jan 20 19:54:07 2010
@@ -36,8 +36,9 @@
 #include 
 
 __RCSID("$Heimdal: compile_et.c 15426 2005-06-16 19:21:42Z lha $"
-"$NetBSD: compile_et.c,v 1.7 2010/01/20 12:54:17 tsutsui Exp $");
+"$NetBSD: compile_et.c,v 1.8 2010/01/20 19:54:07 tsutsui Exp $");
 
+#include 
 #include 
 #include "parse.h"
 

Index: src/crypto/dist/heimdal/lib/com_err/compile_et.h
diff -u src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.3 src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.4
--- src/crypto/dist/heimdal/lib/com_err/compile_et.h:1.3	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/com_err/compile_et.h	Wed Jan 20 19:54:07 2010
@@ -32,7 +32,7 @@
  */
 
 /* $Heimdal: compile_et.h 15426 2005-06-16 19:21:42Z lha $
-   $NetBSD: compile_et.h,v 1.3 2010/01/20 12:54:17 tsutsui Exp $ */
+   $NetBSD: compile_et.h,v 1.4 2010/01/20 19:54:07 tsutsui Exp $ */
 
 #ifndef __COMPILE_ET_H__
 #define __COMPILE_ET_H__
@@ -47,11 +47,7 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include 
-#else
 #include 
-#endif
 
 extern long base_id;
 extern int number;

Index: src/crypto/dist/heimdal/lib/roken/strlcat.c
diff -u src/crypto/dist/heimdal/lib/roken/strlcat.c:1.6 src/crypto/dist/heimdal/lib/roken/strlcat.c:1.7
--- src/crypto/dist/heimdal/lib/roken/strlcat.c:1.6	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/roken/strlcat.c	Wed Jan 20 19:54:07 2010
@@ -34,14 +34,10 @@
 #ifdef HAVE_CONFIG_H
 #include 
 #endif
-#ifdef HAVE_NBTOOL_CONFIG_H
-#include "roken-common.h"
-#else
 #include "roken.h"
-#endif
 
 __RCSID("$Heimdal: strlcat.c 14773 2005-04-12 11:29:18Z lha $"
-"$NetBSD: strlcat.c,v 1.6 2010/01/20 12:54:17 tsutsui Exp $");
+"$NetBSD: strlcat.c,v 1.7 2010/01/20 19:54:07 tsutsui Exp $");
 
 #ifndef HAVE_STRLCAT
 
Index: src/crypto/dist/heimdal/lib/roken/strlcpy.c
diff -u src/crypto/dist/heimdal/lib/roken/strlcpy.c:1.6 src/crypto/dist/heimdal/lib/roken/strlcpy.c:1.7
--- src/crypto/dist/heimdal/lib/roken/strlcpy.c:1.6	Wed Jan 20 12:54:17 2010
+++ src/crypto/dist/heimdal/lib/roken/strlcpy.c	Wed Jan 20 19:54:07 2010
@@ -34,14 +34,10 @@
 #ifd

CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan 20 20:20:59 UTC 2010

Added Files:
src/sys/arch/evbmips/conf [matt-nb5-mips64]: MALTA64.MP

Log Message:
Test kernel for MIPS kernel preemption work.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/evbmips/conf/MALTA64.MP

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

Added files:

Index: src/sys/arch/evbmips/conf/MALTA64.MP
diff -u /dev/null src/sys/arch/evbmips/conf/MALTA64.MP:1.1.2.1
--- /dev/null	Wed Jan 20 20:20:59 2010
+++ src/sys/arch/evbmips/conf/MALTA64.MP	Wed Jan 20 20:20:59 2010
@@ -0,0 +1,8 @@
+# $NetBSD: MALTA64.MP,v 1.1.2.1 2010/01/20 20:20:59 matt Exp $
+#
+include "arch/evbmips/conf/MALTA64"
+
+options 	MULTIPROCESSOR
+options 	LOCKDEBUG
+
+pseudo-device	lockstat



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include

2010-01-20 Thread Erik Berls
Module Name:src
Committed By:   cyber
Date:   Wed Jan 20 20:40:45 UTC 2010

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: locore.h

Log Message:
Correct argument to assembly dsrl32 $Lx -> %Lx


To generate a diff of this commit:
cvs rdiff -u -r1.78.36.1.2.9 -r1.78.36.1.2.10 \
src/sys/arch/mips/include/locore.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/mips/include/locore.h
diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.9 src/sys/arch/mips/include/locore.h:1.78.36.1.2.10
--- src/sys/arch/mips/include/locore.h:1.78.36.1.2.9	Wed Jan 20 06:58:35 2010
+++ src/sys/arch/mips/include/locore.h	Wed Jan 20 20:40:45 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.78.36.1.2.9 2010/01/20 06:58:35 matt Exp $ */
+/* $NetBSD: locore.h,v 1.78.36.1.2.10 2010/01/20 20:40:45 cyber Exp $ */
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -231,7 +231,7 @@
 		".set noat		\n\t"
 		"dsll32	%M1,%M1,0	\n\t"
 		"dsll32	%L1,%L1,0	\n\t"
-		"dsrl32	$L1,%L1,0	\n\t"
+		"dsrl32	%L1,%L1,0	\n\t"
 		"or	%1,%M1,%L1	\n\t"
 		"lw	%0, 0(%1)	\n\t"
 		".set pop"
@@ -264,7 +264,7 @@
 		".set noat		\n\t"
 		"dsll32	%M0,%M0,0	\n\t"
 		"dsll32	%L0,%L0,0	\n\t"
-		"dsrl32	$L0,%L0,0	\n\t"
+		"dsrl32	%L0,%L0,0	\n\t"
 		"or	%0,%M0,%L0	\n\t"
 		"sw	%1, 0(%0)	\n\t"
 		".set pop"



CVS commit: [matt-nb5-mips64] src/sys/arch/mips

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan 20 20:48:12 UTC 2010

Modified Files:
src/sys/arch/mips/conf [matt-nb5-mips64]: files.rmixl
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_com.c rmixl_cpu.c
rmixl_cpucore.c rmixl_cpunode.c rmixl_obio.c

Log Message:
cleanup attachments so that other mips cpus can use the same scheme.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/conf/files.rmixl
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_com.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_cpu.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_cpucore.c \
src/sys/arch/mips/rmi/rmixl_cpunode.c
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/arch/mips/rmi/rmixl_obio.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/conf/files.rmixl
diff -u src/sys/arch/mips/conf/files.rmixl:1.1.2.8 src/sys/arch/mips/conf/files.rmixl:1.1.2.9
--- src/sys/arch/mips/conf/files.rmixl:1.1.2.8	Sat Jan 16 23:50:04 2010
+++ src/sys/arch/mips/conf/files.rmixl	Wed Jan 20 20:48:12 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rmixl,v 1.1.2.8 2010/01/16 23:50:04 cliff Exp $
+#	$NetBSD: files.rmixl,v 1.1.2.9 2010/01/20 20:48:12 matt Exp $
 #
 # Configuration info for RMI XLP, XLR, XLS
 #
@@ -9,34 +9,34 @@
 
 # node is parent of one or more core
 device	cpunode { [ core = -1] }
-attach	cpunode at mainbus
-file	arch/mips/rmi/rmixl_cpunode.c		cpunode
+attach	cpunode at mainbus with cpunode_rmixl
+file	arch/mips/rmi/rmixl_cpunode.c		cpunode_rmixl
 
 # core is parent of one or more cpu
 device	cpucore { [ thread = -1] }
-attach	cpucore at cpunode
-file	arch/mips/rmi/rmixl_cpucore.c		cpucore
+attach	cpucore at cpunode with cpucore_rmixl
+file	arch/mips/rmi/rmixl_cpucore.c		cpucore_rmixl
 
 # each cpu is a RMI 'thread' or 'vCPU'
 device	cpu
-attach	cpu at cpucore
-file	arch/mips/rmi/rmixl_cpu.c		cpu
+attach	cpu at cpucore with cpu_rmixl
+file	arch/mips/rmi/rmixl_cpu.c		cpu_rmixl
 
 # OBIO: offsets are from System Bridge Controller base
 define obio { [addr=-1], [size=0], [intr=-1], [mult=1] }
 device	obio: obio
-attach	obio at cpunode
-file	arch/mips/rmi/rmixl_obio.c		obio needs-count
-filearch/mips/rmi/rmixl_obio_eb_space.c	obio
-filearch/mips/rmi/rmixl_obio_el_space.c	obio
+attach	obio at cpunode with obio_rmixl
+file	arch/mips/rmi/rmixl_obio.c		obio_rmixl
+filearch/mips/rmi/rmixl_obio_eb_space.c	obio_rmixl
+filearch/mips/rmi/rmixl_obio_el_space.c	obio_rmixl
 filearch/mips/rmi/rmixl_pcie_cfg_space.c	pci
 filearch/mips/rmi/rmixl_pcie_ecfg_space.c	pci
 filearch/mips/rmi/rmixl_pcie_io_space.c	pci
 filearch/mips/rmi/rmixl_pcie_mem_space.c	pci
 
 # NS16550 compatible serial ports
-attach com at obio with rmixl_com
-file	arch/mips/rmi/rmixl_com.c		rmixl_com
+attach com at obio with com_rmixl
+file	arch/mips/rmi/rmixl_com.c		com_rmixl
 defparam opt_com.hCONSADDR CONSFREQ CONSPEED CONMODE
 
 # PCI

Index: src/sys/arch/mips/rmi/rmixl_com.c
diff -u src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.9 src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.10
--- src/sys/arch/mips/rmi/rmixl_com.c:1.1.2.9	Mon Dec 14 07:18:55 2009
+++ src/sys/arch/mips/rmi/rmixl_com.c	Wed Jan 20 20:48:12 2010
@@ -1,4 +1,4 @@
-/* $Id: rmixl_com.c,v 1.1.2.9 2009/12/14 07:18:55 cliff Exp $ */
+/* $Id: rmixl_com.c,v 1.1.2.10 2010/01/20 20:48:12 matt Exp $ */
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -101,7 +101,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_com.c,v 1.1.2.9 2009/12/14 07:18:55 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_com.c,v 1.1.2.10 2010/01/20 20:48:12 matt Exp $");
 
 #include 
 #include 
@@ -133,14 +133,14 @@
 static int rmixl_com_match(device_t, cfdata_t , void *);
 static void rmixl_com_attach(device_t, device_t, void *);
 
-CFATTACH_DECL_NEW(rmixl_com, sizeof(struct rmixl_com_softc),
+CFATTACH_DECL_NEW(com_rmixl, sizeof(struct rmixl_com_softc),
 rmixl_com_match, rmixl_com_attach, NULL, NULL);
 
 #ifndef	COM_REGMAP
 #error	COM_REGMAP not defined!
 #endif
 
-volatile uint32_t *com0addr = (uint32_t *)
+volatile int32_t *com0addr = (int32_t *)
 	MIPS_PHYS_TO_KSEG1(RMIXL_IO_DEV_PBASE + RMIXL_IO_DEV_UART_1);
 
 extern int comcnfreq;

Index: src/sys/arch/mips/rmi/rmixl_cpu.c
diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.1 src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.2
--- src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.1	Sat Jan 16 23:47:30 2010
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Wed Jan 20 20:48:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpu.c,v 1.1.2.1 2010/01/16 23:47:30 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpu.c,v 1.1.2.2 2010/01/20 20:48:12 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,25 +38,29 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.1 2010/01/16 23:47:30 cliff Exp $");
+_

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan 20 22:15:27 UTC 2010

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c

Log Message:
Mark RMIXL cpus as CPU_MIPS_I_DCACHE_COHERENT.
Print out whether the L1 cache is coherent or not.


To generate a diff of this commit:
cvs rdiff -u -r1.205.4.1.2.1.2.28 -r1.205.4.1.2.1.2.29 \
src/sys/arch/mips/mips/mips_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/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.28 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.29
--- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.28	Wed Jan 20 09:04:35 2010
+++ src/sys/arch/mips/mips/mips_machdep.c	Wed Jan 20 22:15:27 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.28 2010/01/20 09:04:35 matt Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.29 2010/01/20 22:15:27 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.28 2010/01/20 09:04:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.29 2010/01/20 22:15:27 matt Exp $");
 
 #include "opt_cputype.h"
 #include "opt_compat_netbsd32.h"
@@ -443,7 +443,7 @@
 
 	{ MIPS_PRID_CID_RMI, MIPS_XLS616, -1,	-1, -1, 0,
 	  MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR |
-	  CPU_MIPS_HAVE_MxCR,
+	  CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR,
 	  MIPS_CP0FL_USE |MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | MIPS_CP0FL_EBASE |
 	  MIPS_CP0FL_CONFIGn(0) | MIPS_CP0FL_CONFIGn(1) | MIPS_CP0FL_CONFIGn(7),
 	  CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(4,4)|MIPS_CIDFL_RMI_L2(1MB),
@@ -451,7 +451,7 @@
 
 	{ MIPS_PRID_CID_RMI, MIPS_XLS416, -1,	-1, -1, 0,
 	  MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR |
-	  CPU_MIPS_HAVE_MxCR,
+	  CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR,
 	  MIPS_CP0FL_USE |MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | MIPS_CP0FL_EBASE |
 	  MIPS_CP0FL_CONFIGn(0) | MIPS_CP0FL_CONFIGn(1) | MIPS_CP0FL_CONFIGn(7),
 	  CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(4,4)|MIPS_CIDFL_RMI_L2(1MB),
@@ -459,7 +459,7 @@
 
 	{ MIPS_PRID_CID_RMI, MIPS_XLS408, -1,	-1, -1, 0,
 	  MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR |
-	  CPU_MIPS_HAVE_MxCR,
+	  CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR,
 	  MIPS_CP0FL_USE |MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | MIPS_CP0FL_EBASE |
 	  MIPS_CP0FL_CONFIGn(0) | MIPS_CP0FL_CONFIGn(1) | MIPS_CP0FL_CONFIGn(7),
 	  CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(2,4)|MIPS_CIDFL_RMI_L2(1MB),
@@ -467,19 +467,19 @@
 
 	{ MIPS_PRID_CID_RMI, MIPS_XLS408LITE, -1, -1, -1, 0,
 	  MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR |
-	  CPU_MIPS_HAVE_MxCR,
+	  CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR,
 	  MIPS_CP0FL_USE |MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | MIPS_CP0FL_EBASE |
 	  MIPS_CP0FL_CONFIGn(0) | MIPS_CP0FL_CONFIGn(1) | MIPS_CP0FL_CONFIGn(7),
 	  CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(2,4)|MIPS_CIDFL_RMI_L2(1MB),
-	  "XLS408LITE"		},
+	  "XLS408lite"		},
 
 	{ MIPS_PRID_CID_RMI, MIPS_XLS404LITE, -1, -1, -1, 0,
 	  MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR |
-	  CPU_MIPS_HAVE_MxCR,
+	  CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR,
 	  MIPS_CP0FL_USE |MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | MIPS_CP0FL_EBASE |
 	  MIPS_CP0FL_CONFIGn(0) | MIPS_CP0FL_CONFIGn(1) | MIPS_CP0FL_CONFIGn(7),
 	  CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(1,4)|MIPS_CIDFL_RMI_L2(512KB),
-	  "XLS404LITE"		},
+	  "XLS404lite"		},
 
 	{ 0, 0, 0,0, 0, 0,
 	  0, 0, 0,NULL			}
@@ -1178,22 +1178,24 @@
 		aprint_normal(", %d%cB max page size\n", i, sufx[0]);
 		if (mci->mci_picache_size)
 			aprint_normal_dev(dev,
-			"%dKB/%dB %s L1 Instruction cache\n",
+			"%dKB/%dB %s L1 instruction cache\n",
 			mci->mci_picache_size / 1024,
 			mci->mci_picache_line_size, waynames[mci->mci_picache_ways]);
 		if (mci->mci_pdcache_size)
 			aprint_normal_dev(dev,
-			"%dKB/%dB %s %s L1 Data cache\n",
+			"%dKB/%dB %s %s %sL1 data cache\n",
 			mci->mci_pdcache_size / 1024, mci->mci_pdcache_line_size,
 			waynames[mci->mci_pdcache_ways],
-			wtnames[mci->mci_pdcache_write_through]);
+			wtnames[mci->mci_pdcache_write_through],
+			((opts->mips_cpu_flags & CPU_MIPS_D_CACHE_COHERENT)
+? "coherent " : ""));
 		if (mci->mci_sdcache_line_size)
 			aprint_normal_dev(dev,
 			"%dKB/%dB %s %s L2 %s cache\n",
 			mci->mci_sdcache_size / 1024, mci->mci_sdcache_line_size,
 			waynames[mci->mci_sdcache_ways],
 			wtnames[mci->mci_sdcache_write_through],
-			mci->mci_scache_unified ? "Unified" : "Data");
+			mci->mci_scache_unified ? "unified" : "data");
 		break;
 	}
 #endif /* MIPS3 */



CVS commit: src/etc

2010-01-20 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Wed Jan 20 22:19:20 UTC 2010

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

Log Message:
Default fetch_pkg_vulnerabilities to NO and complain if it is set to that
value when packages are found (so that the user knows he is not getting the
vulnerability checks).

Why?  People is complaining.  (And somehow, the argument that NetBSD doesn't
do any network operation by default convinces me that it should continue to
do so.)

But still, I will be adding a question to sysinst to enable/disable this.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/etc/daily
cvs rdiff -u -r1.12 -r1.13 src/etc/defaults/daily.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/daily
diff -u src/etc/daily:1.73 src/etc/daily:1.74
--- src/etc/daily:1.73	Tue Jan 19 22:08:11 2010
+++ src/etc/daily	Wed Jan 20 22:19:20 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.73 2010/01/19 22:08:11 jmmv Exp $
+#	$NetBSD: daily,v 1.74 2010/01/20 22:19:20 jmmv Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -245,10 +245,13 @@
 : ${pkgdb_dir:=/var/db/pkg}
 
 if pkg_info -K ${pkgdb_dir} -q -E '*'; then
+	echo ""
+	echo "Fetching package vulnerabilities database:"
 	if checkyesno fetch_pkg_vulnerabilities; then
-		echo ""
-		echo "Fetching package vulnerabilities database:"
 		pkg_admin -K ${pkgdb_dir} fetch-pkg-vulnerabilities -u
+	else
+		echo "fetch_pkg_vulnerabilities is set to NO in daily.conf(5)."
+		echo "You should set it to YES to enable vulnerability checks."
 	fi
 fi
 

Index: src/etc/defaults/daily.conf
diff -u src/etc/defaults/daily.conf:1.12 src/etc/defaults/daily.conf:1.13
--- src/etc/defaults/daily.conf:1.12	Tue Jan 19 22:08:11 2010
+++ src/etc/defaults/daily.conf	Wed Jan 20 22:19:20 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: daily.conf,v 1.12 2010/01/19 22:08:11 jmmv Exp $
+#	$NetBSD: daily.conf,v 1.13 2010/01/20 22:19:20 jmmv Exp $
 #
 # /etc/defaults/daily.conf --
 #	default configuration of /etc/daily.conf
@@ -29,6 +29,6 @@
 run_security=YES
 run_skeyaudit=YES
 pkgdb_dir=/var/db/pkg
-fetch_pkg_vulnerabilities=YES
+fetch_pkg_vulnerabilities=NO
 
 send_empty_security=NO



CVS commit: src/share/man/man8

2010-01-20 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Wed Jan 20 22:24:18 UTC 2010

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
Ask the user to enable fetch_pkg_vulnerabilities in /etc/daily.conf right
after installation.  Automatic changes from sysinst will come later.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.42 src/share/man/man8/afterboot.8:1.43
--- src/share/man/man8/afterboot.8:1.42	Sat Oct 24 12:18:05 2009
+++ src/share/man/man8/afterboot.8	Wed Jan 20 22:24:18 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.42 2009/10/24 12:18:05 reed Exp $
+.\"	$NetBSD: afterboot.8,v 1.43 2010/01/20 22:24:18 jmmv Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -59,7 +59,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 18, 2009
+.Dd January 20, 2010
 .Dt AFTERBOOT 8
 .Os
 .Sh NAME
@@ -94,6 +94,20 @@
 All significant and easily fixed problems will be reported at
 .Pa http://www.NetBSD.org/support/security/ .
 It is recommended that you check this page regularly.
+.Pp
+Additionally, you should set
+.Dq fetch_pkg_vulnerabilities=YES
+in
+.Pa /etc/daily.conf
+to allow your system to automatically update the local database of known
+vulnerable packages to the latest version available on-line.
+The system will later check, on a daily basis, if any of your installed
+packages are vulnerable based on the contents of this database.
+See
+.Xr daily.conf 5
+and
+.Xr security.conf 5
+for more details.
 .Ss Login
 Login as
 .Dq Ic root .



CVS commit: src/sys/arch/sparc/sparc

2010-01-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 20 22:54:23 UTC 2010

Modified Files:
src/sys/arch/sparc/sparc: autoconf.c

Log Message:
Add the mac-address as device property for all network devices


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/arch/sparc/sparc/autoconf.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/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.237 src/sys/arch/sparc/sparc/autoconf.c:1.238
--- src/sys/arch/sparc/sparc/autoconf.c:1.237	Fri Nov 27 03:23:14 2009
+++ src/sys/arch/sparc/sparc/autoconf.c	Wed Jan 20 22:54:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.237 2009/11/27 03:23:14 rmind Exp $ */
+/*	$NetBSD: autoconf.c,v 1.238 2010/01/20 22:54:22 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.237 2009/11/27 03:23:14 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.238 2010/01/20 22:54:22 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -77,6 +77,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -1487,6 +1488,7 @@
 static const char *bus_compatible(const char *);
 static int instance_match(struct device *, void *, struct bootpath *);
 static void nail_bootdev(struct device *, struct bootpath *);
+static void set_network_props(struct device *, void *);
 
 static struct {
 	const char	*name;
@@ -1567,6 +1569,46 @@
 	return (class);
 }
 
+static void
+set_network_props(struct device *dev, void *aux)
+{
+	struct mainbus_attach_args *ma;
+	struct sbus_attach_args *sa;
+	struct iommu_attach_args *iom;
+	struct pci_attach_args *pa;
+	uint8_t eaddr[ETHER_ADDR_LEN];
+	prop_dictionary_t dict;
+	prop_data_t blob;
+	int ofnode;
+
+	ofnode = 0;
+	switch (bus_class(device_parent(dev))) {
+	case BUSCLASS_MAINBUS:
+		ma = aux;
+		ofnode = ma->ma_node;
+		break;
+	case BUSCLASS_SBUS:
+		sa = aux;
+		ofnode = sa->sa_node;
+		break;
+	case BUSCLASS_IOMMU:
+		iom = aux;
+		ofnode = iom->iom_node;
+		break;
+	case BUSCLASS_PCI:
+		pa = aux;
+		ofnode = PCITAG_NODE(pa->pa_tag);
+		break;
+	}
+	if (!ofnode) return;
+
+	prom_getether(ofnode, eaddr);
+	dict = device_properties(dev);
+	blob = prop_data_create_data(eaddr, ETHER_ADDR_LEN);
+	prop_dictionary_set(dict, "mac-address", blob);
+	prop_object_release(blob);
+}
+
 int
 instance_match(struct device *dev, void *aux, struct bootpath *bp)
 {
@@ -1742,6 +1784,9 @@
 	} else if (device_is_a(dev, "le") ||
 		   device_is_a(dev, "hme") ||
 		   device_is_a(dev, "be")) {
+
+		set_network_props(dev, aux);
+
 		/*
 		 * LANCE, Happy Meal, or BigMac ethernet device
 		 */



CVS commit: src/usr.bin/calendar/calendars

2010-01-20 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Wed Jan 20 22:56:59 UTC 2010

Modified Files:
src/usr.bin/calendar/calendars: calendar.birthday

Log Message:
add Buzz Aldrin, second man on the moon


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/calendar/calendars/calendar.birthday

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/calendar/calendars/calendar.birthday
diff -u src/usr.bin/calendar/calendars/calendar.birthday:1.19 src/usr.bin/calendar/calendars/calendar.birthday:1.20
--- src/usr.bin/calendar/calendars/calendar.birthday:1.19	Sat Jan  9 01:24:18 2010
+++ src/usr.bin/calendar/calendars/calendar.birthday	Wed Jan 20 22:56:59 2010
@@ -18,6 +18,7 @@
 01/17	Benjamin Franklin born in Boston, 1706
 01/19	Edgar Allan Poe born in Boston, 1809
 01/19	Robert Edward Lee born in Stratford Estate, Virginia, 1807
+01/20   Buzz Aldrin born, 1930
 01/20	George Burns born, 1898
 01/21	Vladimir Lenin died, 1924
 01/21	Thomas Jonathan "Stonewall" Jackson born in Clarksburg, VA, 1824



CVS commit: src/sys/dev/pci

2010-01-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 20 22:58:37 UTC 2010

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

Log Message:
Remove sparc specific code and HME_USE_LOCAL_MAC_ADDRESS hack, instead
use the "mac-address" device property if present.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/if_hme_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/dev/pci/if_hme_pci.c
diff -u src/sys/dev/pci/if_hme_pci.c:1.30 src/sys/dev/pci/if_hme_pci.c:1.31
--- src/sys/dev/pci/if_hme_pci.c:1.30	Sun May 17 01:33:25 2009
+++ src/sys/dev/pci/if_hme_pci.c	Wed Jan 20 22:58:37 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hme_pci.c,v 1.30 2009/05/17 01:33:25 tsutsui Exp $	*/
+/*	$NetBSD: if_hme_pci.c,v 1.31 2010/01/20 22:58:37 martin Exp $	*/
 
 /*
  * Copyright (c) 2000 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.30 2009/05/17 01:33:25 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.31 2010/01/20 22:58:37 martin Exp $");
 
 #include 
 #include 
@@ -55,17 +55,6 @@
 #include 
 
 #include 
-#ifdef __sparc__
-#include 
-#endif
-
-#ifndef HME_USE_LOCAL_MAC_ADDRESS
-#ifdef __sparc__
-#define HME_USE_LOCAL_MAC_ADDRESS	0	/* use system-wide address */
-#else
-#define HME_USE_LOCAL_MAC_ADDRESS	1
-#endif
-#endif
 
 struct hme_pci_softc {
 	struct	hme_softc	hsc_hme;	/* HME device */
@@ -92,7 +81,6 @@
 	return (0);
 }
 
-#if HME_USE_LOCAL_MAC_ADDRESS
 static inline int
 hmepromvalid(uint8_t* buf)
 {
@@ -118,7 +106,6 @@
 	}
 	return vpdoff;
 }
-#endif
 
 void
 hmeattach_pci(device_t parent, device_t self, void *aux)
@@ -130,8 +117,8 @@
 	pcireg_t csr;
 	const char *intrstr;
 	int type;
-#if HME_USE_LOCAL_MAC_ADDRESS
 	struct pci_attach_args	ebus_pa;
+	prop_data_t		eaddrprop;
 	pcireg_t		ebus_cl, ebus_id;
 	uint8_t			*enaddr;
 	bus_space_tag_t		romt;
@@ -150,7 +137,6 @@
 	};
 #define PROMDATA_PTR_VPD	0x08
 #define PROMDATA_DATA2		0x0a
-#endif	/* HME_USE_LOCAL_MAC_ADDRESS */
 
 	sc->sc_dev = self;
 
@@ -220,7 +206,18 @@
 		return;
 	}
 
-#if HME_USE_LOCAL_MAC_ADDRESS
+
+	/*
+	 * Check if we got a mac-address property passed
+	 */
+	eaddrprop = prop_dictionary_get(device_properties(self), "mac-address");
+
+	if (eaddrprop != NULL && prop_data_size(eaddrprop) == ETHER_ADDR_LEN) {
+		memcpy(&sc->sc_enaddr, prop_data_data_nocopy(eaddrprop),
+			ETHER_ADDR_LEN);
+		goto got_eaddr;
+	}
+
 	/*
 	 * Dig out VPD (vital product data) and acquire Ethernet address.
 	 * The VPD of hme resides in the Boot PROM (PCI FCode) attached
@@ -291,15 +288,13 @@
 		bus_space_unmap(romt, romh, romsize);
 	}
 
-	if (enaddr)
+	if (enaddr) {
 		memcpy(sc->sc_enaddr, enaddr, ETHER_ADDR_LEN);
-	else
-#endif	/* HME_USE_LOCAL_MAC_ADDRESS */
-#ifdef __sparc__
-		prom_getether(PCITAG_NODE(pa->pa_tag), sc->sc_enaddr);
-#else
-		printf("%s: no Ethernet address found\n", device_xname(self));
-#endif
+		goto got_eaddr;
+	}
+
+	aprint_error_dev(self, "no Ethernet address found\n");
+got_eaddr:
 
 	/*
 	 * Map and establish our interrupt.



CVS commit: src/sys/kern

2010-01-20 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Wed Jan 20 23:40:42 UTC 2010

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

Log Message:
pool_cache_invalidate: comment out invalidation of per-CPU caches (nobody 
depends
on it, at the moment) until we decide how to fix it (xcall(9) cannot be used 
from
interrupt context).  XXX: Perhaps implement XC_HIGHPRI.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/kern/subr_pool.c

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

Modified files:

Index: src/sys/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.181 src/sys/kern/subr_pool.c:1.182
--- src/sys/kern/subr_pool.c:1.181	Sun Jan  3 09:42:22 2010
+++ src/sys/kern/subr_pool.c	Wed Jan 20 23:40:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.181 2010/01/03 09:42:22 mlelstv Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.182 2010/01/20 23:40:42 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.181 2010/01/03 09:42:22 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.182 2010/01/20 23:40:42 rmind Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pool.h"
@@ -2315,6 +2315,7 @@
 pool_cache_invalidate(pool_cache_t pc)
 {
 	pcg_t *full, *empty, *part;
+#if 0
 	uint64_t where;
 
 	if (ncpu < 2 || !mp_online) {
@@ -2333,7 +2334,7 @@
 		where = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, pc, NULL);
 		xc_wait(where);
 	}
-
+#endif
 	mutex_enter(&pc->pc_lock);
 	full = pc->pc_fullgroups;
 	empty = pc->pc_emptygroups;



CVS commit: src/sys/arch/hpcmips

2010-01-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jan 21 01:23:15 UTC 2010

Modified Files:
src/sys/arch/hpcmips/hpcmips: machdep.c
src/sys/arch/hpcmips/include: cpu.h
src/sys/arch/hpcmips/tx: tx39.c
src/sys/arch/hpcmips/vr: vr.c

Log Message:
Move arch-local variable to a better namespace to make build again.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hpcmips/hpcmips/machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpcmips/include/cpu.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hpcmips/tx/tx39.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/hpcmips/vr/vr.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/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.107 src/sys/arch/hpcmips/hpcmips/machdep.c:1.108
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.107	Wed Dec 16 23:19:07 2009
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Thu Jan 21 01:23:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.107 2009/12/16 23:19:07 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.108 2010/01/21 01:23:14 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -108,7 +108,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2009/12/16 23:19:07 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2010/01/21 01:23:14 pooka Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -192,7 +192,7 @@
 #endif
 
 /* the following is used externally (sysctl_hw) */
-char	cpu_name[40];			/* set CPU depend xx_init() */
+char	hpcmips_cpuname[40];		/* set CPU depend xx_init() */
 
 struct cpu_info cpu_info_store;		/* only one CPU */
 int	cpuspeed = 1;			/* approx # instr per usec. */
@@ -551,7 +551,7 @@
 	 * Good {morning,afternoon,evening,night}.
 	 */
 	printf("%s%s", copyright, version);
-	sprintf(cpu_model, "%s (%s)", platid_name(&platid), cpu_name);
+	sprintf(cpu_model, "%s (%s)", platid_name(&platid), hpcmips_cpuname);
 	printf("%s\n", cpu_model);
 	format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
 	printf("total memory = %s\n", pbuf);

Index: src/sys/arch/hpcmips/include/cpu.h
diff -u src/sys/arch/hpcmips/include/cpu.h:1.12 src/sys/arch/hpcmips/include/cpu.h:1.13
--- src/sys/arch/hpcmips/include/cpu.h:1.12	Thu Jan 31 17:56:34 2002
+++ src/sys/arch/hpcmips/include/cpu.h	Thu Jan 21 01:23:15 2010
@@ -1,6 +1,6 @@
-/*	$NetBSD: cpu.h,v 1.12 2002/01/31 17:56:34 uch Exp $	*/
+/*	$NetBSD: cpu.h,v 1.13 2010/01/21 01:23:15 pooka Exp $	*/
 
 #include 
 #ifndef _LOCORE
-extern char cpu_name[];
+extern char hpcmips_cpuname[];
 #endif

Index: src/sys/arch/hpcmips/tx/tx39.c
diff -u src/sys/arch/hpcmips/tx/tx39.c:1.40 src/sys/arch/hpcmips/tx/tx39.c:1.41
--- src/sys/arch/hpcmips/tx/tx39.c:1.40	Wed Mar 18 10:22:29 2009
+++ src/sys/arch/hpcmips/tx/tx39.c	Thu Jan 21 01:23:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39.c,v 1.40 2009/03/18 10:22:29 cegger Exp $ */
+/*	$NetBSD: tx39.c,v 1.41 2010/01/21 01:23:15 pooka Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.40 2009/03/18 10:22:29 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.41 2010/01/21 01:23:15 pooka Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -119,12 +119,13 @@
 	switch (model) {
 	default:
 		/* Unknown TOSHIBA TX39-series */
-		sprintf(cpu_name, "Unknown TOSHIBA TX39-series %x", model);
+		sprintf(hpcmips_cpuname,
+		"Unknown TOSHIBA TX39-series %x", model);
 		break;
 	case TMPR3912:
 		tx39clock_cpuspeed(&cpuclock, &cpuspeed);
 
-		sprintf(cpu_name, "TOSHIBA TMPR3912 %d.%02d MHz",
+		sprintf(hpcmips_cpuname, "TOSHIBA TMPR3912 %d.%02d MHz",
 		cpuclock / 100, (cpuclock % 100) / 1);
 		tc->tc_chipset = __TX391X;
 		break;
@@ -132,7 +133,7 @@
 		tx39clock_cpuspeed(&cpuclock, &cpuspeed);
 		rev = tx_conf_read(tc, TX3922_REVISION_REG);
 
-		sprintf(cpu_name, "TOSHIBA TMPR3922 rev. %x.%x "
+		sprintf(hpcmips_cpuname, "TOSHIBA TMPR3922 rev. %x.%x "
 		"%d.%02d MHz", (rev >> 4) & 0xf, rev & 0xf, 
 		cpuclock / 100, (cpuclock % 100) / 1);
 		tc->tc_chipset = __TX392X;

Index: src/sys/arch/hpcmips/vr/vr.c
diff -u src/sys/arch/hpcmips/vr/vr.c:1.54 src/sys/arch/hpcmips/vr/vr.c:1.55
--- src/sys/arch/hpcmips/vr/vr.c:1.54	Wed Aug 19 12:49:24 2009
+++ src/sys/arch/hpcmips/vr/vr.c	Thu Jan 21 01:23:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vr.c,v 1.54 2009/08/19 12:49:24 jun Exp $	*/
+/*	$NetBSD: vr.c,v 1.55 2010/01/21 01:23:15 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.54 2009/08/19 12:49:24 jun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.55 2010/01/21 01:23:15 pooka Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -302,14 +302,14 @@
 	platform.reboot		= vr_reboot;
 
 #if NVRB

CVS commit: src/usr.bin/calendar/calendars

2010-01-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Thu Jan 21 01:59:09 UTC 2010

Modified Files:
src/usr.bin/calendar/calendars: calendar.birthday

Log Message:
Use TAB as a separator to be consistent with the rest of this file.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/calendar/calendars/calendar.birthday

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/calendar/calendars/calendar.birthday
diff -u src/usr.bin/calendar/calendars/calendar.birthday:1.20 src/usr.bin/calendar/calendars/calendar.birthday:1.21
--- src/usr.bin/calendar/calendars/calendar.birthday:1.20	Wed Jan 20 22:56:59 2010
+++ src/usr.bin/calendar/calendars/calendar.birthday	Thu Jan 21 01:59:09 2010
@@ -18,7 +18,7 @@
 01/17	Benjamin Franklin born in Boston, 1706
 01/19	Edgar Allan Poe born in Boston, 1809
 01/19	Robert Edward Lee born in Stratford Estate, Virginia, 1807
-01/20   Buzz Aldrin born, 1930
+01/20	Buzz Aldrin born, 1930
 01/20	George Burns born, 1898
 01/21	Vladimir Lenin died, 1924
 01/21	Thomas Jonathan "Stonewall" Jackson born in Clarksburg, VA, 1824



CVS commit: src/sys/dev

2010-01-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Jan 21 02:14:42 UTC 2010

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

Log Message:
Take care not to dereference a NULL softc.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/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/sys/dev/md.c
diff -u src/sys/dev/md.c:1.61 src/sys/dev/md.c:1.62
--- src/sys/dev/md.c:1.61	Thu Oct 22 20:15:45 2009
+++ src/sys/dev/md.c	Thu Jan 21 02:14:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.61 2009/10/22 20:15:45 snj Exp $	*/
+/*	$NetBSD: md.c,v 1.62 2010/01/21 02:14:42 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.61 2009/10/22 20:15:45 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.62 2010/01/21 02:14:42 dyoung Exp $");
 
 #include "opt_md.h"
 #include "opt_tftproot.h"
@@ -324,7 +324,7 @@
 
 	sc = device_lookup_private(&md_cd, MD_UNIT(dev));
 
-	if (sc->sc_type == MD_UNCONFIGURED)
+	if (sc == NULL || sc->sc_type == MD_UNCONFIGURED)
 		return ENXIO;
 
 	return (physio(mdstrategy, NULL, dev, B_READ, minphys, uio));
@@ -337,7 +337,7 @@
 
 	sc = device_lookup_private(&md_cd, MD_UNIT(dev));
 
-	if (sc->sc_type == MD_UNCONFIGURED)
+	if (sc == NULL || sc->sc_type == MD_UNCONFIGURED)
 		return ENXIO;
 
 	return (physio(mdstrategy, NULL, dev, B_WRITE, minphys, uio));
@@ -356,7 +356,7 @@
 
 	sc = device_lookup_private(&md_cd, MD_UNIT(bp->b_dev));
 
-	if (sc->sc_type == MD_UNCONFIGURED) {
+	if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) {
 		bp->b_error = ENXIO;
 		goto done;
 	}
@@ -409,7 +409,8 @@
 	struct md_softc *sc;
 	struct md_conf *umd;
 
-	sc = device_lookup_private(&md_cd, MD_UNIT(dev));
+	if ((sc = device_lookup_private(&md_cd, MD_UNIT(dev))) == NULL)
+		return ENXIO;
 
 	/* If this is not the raw partition, punt! */
 	if (DISKPART(dev) != RAW_PART)



CVS commit: src/sys/dev

2010-01-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Jan 21 02:19:55 UTC 2010

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

Log Message:
All that the activation hook radioactivate() did was to change
sc_dying, and nothing in the driver examines sc_dying, so get rid of
radioactivate() and sc_dying.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/radio.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/radio.c
diff -u src/sys/dev/radio.c:1.23 src/sys/dev/radio.c:1.24
--- src/sys/dev/radio.c:1.23	Sun Dec  6 22:42:48 2009
+++ src/sys/dev/radio.c	Thu Jan 21 02:19:55 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: radio.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $ */
+/* $NetBSD: radio.c,v 1.24 2010/01/21 02:19:55 dyoung Exp $ */
 /* $OpenBSD: radio.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */
 /* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */
 
@@ -30,7 +30,7 @@
 /* This is the /dev/radio driver from OpenBSD */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.24 2010/01/21 02:19:55 dyoung Exp $");
 
 #include 
 #include 
@@ -48,17 +48,15 @@
 	void		*hw_hdl;	/* hardware driver handle */
 	device_t 	sc_dev;		/* hardware device struct */
 	const struct radio_hw_if *hw_if; /* hardware interface */
-	char		sc_dying;	/* device detached */
 };
 
 static int	radioprobe(device_t, cfdata_t, void *);
 static void	radioattach(device_t, device_t, void *);
 static int	radioprint(void *, const char *);
 static int	radiodetach(device_t, int);
-static int	radioactivate(device_t, enum devact);
 
 CFATTACH_DECL_NEW(radio, sizeof(struct radio_softc),
-radioprobe, radioattach, radiodetach, radioactivate);
+radioprobe, radioattach, radiodetach, NULL);
 
 static dev_type_open(radioopen);
 static dev_type_close(radioclose);
@@ -195,17 +193,3 @@
 
 	return (0);
 }
-
-static int
-radioactivate(device_t self, enum devact act)
-{
-	struct radio_softc *sc = device_private(self);
-
-	switch (act) {
-	case DVACT_DEACTIVATE:
-		sc->sc_dying = 1;
-		return 0;
-	default:
-		return EOPNOTSUPP;
-	}
-}



CVS commit: src/sys/dev/ata

2010-01-20 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Jan 21 02:53:51 UTC 2010

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

Log Message:
Cosmetic: join some lines.  Get out early on errors, change

switch (...) {
...
error = ...;
break;
}
return error;

to

switch (...) {
...
return ...;
}


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/ata/ata.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/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.110 src/sys/dev/ata/ata.c:1.111
--- src/sys/dev/ata/ata.c:1.110	Fri Jan  8 19:48:11 2010
+++ src/sys/dev/ata/ata.c	Thu Jan 21 02:53:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.110 2010/01/08 19:48:11 dyoung Exp $	*/
+/*	$NetBSD: ata.c,v 1.111 2010/01/21 02:53:51 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.110 2010/01/08 19:48:11 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.111 2010/01/21 02:53:51 dyoung Exp $");
 
 #include "opt_ata.h"
 
@@ -1409,8 +1409,7 @@
 
 /* management of the /dev/atabus* devices */
 int
-atabusopen(dev_t dev, int flag, int fmt,
-struct lwp *l)
+atabusopen(dev_t dev, int flag, int fmt, struct lwp *l)
 {
 	struct atabus_softc *sc;
 	int error;
@@ -1432,8 +1431,7 @@
 
 
 int
-atabusclose(dev_t dev, int flag, int fmt,
-struct lwp *l)
+atabusclose(dev_t dev, int flag, int fmt, struct lwp *l)
 {
 	struct atabus_softc *sc =
 	device_lookup_private(&atabus_cd, minor(dev));
@@ -1446,8 +1444,7 @@
 }
 
 int
-atabusioctl(dev_t dev, u_long cmd, void *addr, int flag,
-struct lwp *l)
+atabusioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {
 	struct atabus_softc *sc =
 	device_lookup_private(&atabus_cd, minor(dev));
@@ -1474,8 +1471,7 @@
 		s = splbio();
 		ata_reset_channel(sc->sc_chan, AT_WAIT | AT_POLL);
 		splx(s);
-		error = 0;
-		break;
+		return 0;
 	case ATABUSIOSCAN:
 	{
 #if 0
@@ -1515,14 +1511,12 @@
 KASSERT(chp->ch_drive[drive].drv_softc == NULL);
 			}
 		}
-		error = 0;
-		break;
+		return 0;
 	}
 	default:
-		error = ENOTTY;
+		return ENOTTY;
 	}
-	return (error);
-};
+}
 
 static bool
 atabus_suspend(device_t dv, pmf_qual_t qual)



CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/include

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:07:56 UTC 2010

Modified Files:
src/sys/arch/sbmips/include [matt-nb5-mips64]: types.h

Log Message:
sbmips needs 64bit paddr_t


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.28.1 src/sys/arch/sbmips/include/types.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/sbmips/include/types.h
diff -u src/sys/arch/sbmips/include/types.h:1.7 src/sys/arch/sbmips/include/types.h:1.7.28.1
--- src/sys/arch/sbmips/include/types.h:1.7	Sun Jan 20 18:09:09 2008
+++ src/sys/arch/sbmips/include/types.h	Thu Jan 21 04:07:56 2010
@@ -1,4 +1,6 @@
-/* $NetBSD: types.h,v 1.7 2008/01/20 18:09:09 joerg Exp $ */
+/* $NetBSD: types.h,v 1.7.28.1 2010/01/21 04:07:56 matt Exp $ */
+
+#define	_MIPS_PADDR_T_64BIT
 
 #include 
 



CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/include

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:08:18 UTC 2010

Modified Files:
src/sys/arch/sbmips/include [matt-nb5-mips64]: bus.h

Log Message:
add some whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/sbmips/include/bus.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/sbmips/include/bus.h
diff -u src/sys/arch/sbmips/include/bus.h:1.1.2.1 src/sys/arch/sbmips/include/bus.h:1.1.2.2
--- src/sys/arch/sbmips/include/bus.h:1.1.2.1	Thu Jan 14 00:37:26 2010
+++ src/sys/arch/sbmips/include/bus.h	Thu Jan 21 04:08:18 2010
@@ -1,7 +1,8 @@
-/* $NetBSD: bus.h,v 1.1.2.1 2010/01/14 00:37:26 matt Exp $ */
+/* $NetBSD: bus.h,v 1.1.2.2 2010/01/21 04:08:18 matt Exp $ */
 
 #ifndef _SBMIPS_BUS_H_
 #define	_SBMIPS_BUS_H_
+
 #define _MIPS_NEED_BUS_DMA_BOUNCE
 
 #include 



CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/include

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:09:05 UTC 2010

Added Files:
src/sys/arch/sbmips/include [matt-nb5-mips64]: pci_machdep.h

Log Message:
Needed for pci support.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/sbmips/include/pci_machdep.h

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

Added files:

Index: src/sys/arch/sbmips/include/pci_machdep.h
diff -u /dev/null src/sys/arch/sbmips/include/pci_machdep.h:1.1.2.1
--- /dev/null	Thu Jan 21 04:09:05 2010
+++ src/sys/arch/sbmips/include/pci_machdep.h	Thu Jan 21 04:09:05 2010
@@ -0,0 +1,6 @@
+/* $NetBSD: pci_machdep.h,v 1.1.2.1 2010/01/21 04:09:05 matt Exp $ */
+
+/* Before including  */
+#define	__HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
+
+#include 



CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/include

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:09:18 UTC 2010

Modified Files:
src/sys/arch/sbmips/include [matt-nb5-mips64]: systemsw.h

Log Message:
Minor type cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.7.28.1 -r1.7.28.2 src/sys/arch/sbmips/include/systemsw.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/sbmips/include/systemsw.h
diff -u src/sys/arch/sbmips/include/systemsw.h:1.7.28.1 src/sys/arch/sbmips/include/systemsw.h:1.7.28.2
--- src/sys/arch/sbmips/include/systemsw.h:1.7.28.1	Mon Nov 23 18:46:50 2009
+++ src/sys/arch/sbmips/include/systemsw.h	Thu Jan 21 04:09:18 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: systemsw.h,v 1.7.28.1 2009/11/23 18:46:50 matt Exp $ */
+/* $NetBSD: systemsw.h,v 1.7.28.2 2010/01/21 04:09:18 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -53,11 +53,10 @@
 };
 extern struct systemsw systemsw;
 
-int	system_set_clockfns(void *, void (*)(void *));
-int	system_set_todrfns(void *, void (*)(void *, time_t), void (*)(void *));
-
-#define	cpu_intr_establish(n,s,f,a)	((*systemsw.s_intr_establish)(n,s,f,a))
+bool	system_set_clockfns(void *, void (*)(void *));
 
 void	sb1250_icu_init(void);
 
+#define	cpu_intr_establish(n,s,f,a)	((*systemsw.s_intr_establish)(n,s,f,a))
+
 #endif /* _SBMIPS_SYSTEMSW_H_ */



CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/sbmips

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:09:59 UTC 2010

Modified Files:
src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: systemsw.c

Log Message:
Minor type cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.14.28.2 -r1.14.28.3 src/sys/arch/sbmips/sbmips/systemsw.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/sbmips/sbmips/systemsw.c
diff -u src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.2 src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.3
--- src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.2	Tue Dec  8 01:55:07 2009
+++ src/sys/arch/sbmips/sbmips/systemsw.c	Thu Jan 21 04:09:59 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: systemsw.c,v 1.14.28.2 2009/12/08 01:55:07 cyber Exp $ */
+/* $NetBSD: systemsw.c,v 1.14.28.3 2010/01/21 04:09:59 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: systemsw.c,v 1.14.28.2 2009/12/08 01:55:07 cyber Exp $");
+__KERNEL_RCSID(0, "$NetBSD: systemsw.c,v 1.14.28.3 2010/01/21 04:09:59 matt Exp $");
 
 #include 
 #include 
@@ -65,15 +65,15 @@
 	NULL,			/* intr_establish */
 };
 
-int
+bool
 system_set_clockfns(void *arg, void (*init)(void *))
 {
 
 	if (systemsw.s_clock_init != clock_init_triv)
-		return 1;
+		return true;
 	systemsw.s_clock_arg = arg;
 	systemsw.s_clock_init = init;
-	return 0;
+	return false;
 }
 
 static void



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/sibyte/pci

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:22:33 UTC 2010

Added Files:
src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbbrz.c sbbrz_bus_io.c
sbbrz_bus_mem.c sbbrz_pci.c sbbrzvar.h sbldthb.c sbpcihb.c

Log Message:
Compile-tested only initial PCI support (from 10 years ago!) for sbmips
finally committed to cvs.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/mips/sibyte/pci/sbbrz.c \
src/sys/arch/mips/sibyte/pci/sbbrz_bus_io.c \
src/sys/arch/mips/sibyte/pci/sbbrz_bus_mem.c \
src/sys/arch/mips/sibyte/pci/sbbrz_pci.c \
src/sys/arch/mips/sibyte/pci/sbbrzvar.h \
src/sys/arch/mips/sibyte/pci/sbldthb.c \
src/sys/arch/mips/sibyte/pci/sbpcihb.c

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

Added files:

Index: src/sys/arch/mips/sibyte/pci/sbbrz.c
diff -u /dev/null src/sys/arch/mips/sibyte/pci/sbbrz.c:1.1.2.1
--- /dev/null	Thu Jan 21 04:22:33 2010
+++ src/sys/arch/mips/sibyte/pci/sbbrz.c	Thu Jan 21 04:22:33 2010
@@ -0,0 +1,218 @@
+/* $NetBSD: sbbrz.c,v 1.1.2.1 2010/01/21 04:22:33 matt Exp $ */
+
+/*
+ * Copyright 2000, 2001
+ * Broadcom Corporation. All rights reserved.
+ * 
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions.  Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ * 
+ * 1) Any source code used, modified or distributed must reproduce and
+ *retain this copyright notice and list of conditions as they appear in
+ *the source file.
+ * 
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ *Broadcom Corporation. Neither the "Broadcom Corporation" name nor any
+ *trademark or logo of Broadcom Corporation may be used to endorse or
+ *promote products derived from this software without the prior written
+ *permission of Broadcom Corporation.
+ * 
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ *WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ *NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ *FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ *LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* from: $NetBSD: apecs.c,v 1.38 2000/06/29 08:58:45 mrg Exp */
+
+/*-
+ * Copyright (c) 2000, 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *	This product includes software developed by the NetBSD
+ *	Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *contributors may be used to endorse or promote products derived
+ *from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyr

CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/conf

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 04:23:29 UTC 2010

Modified Files:
src/sys/arch/sbmips/conf [matt-nb5-mips64]: GENERIC

Log Message:
Increase SYMTAB_SPACE
Add pci support


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.70.8.1 src/sys/arch/sbmips/conf/GENERIC

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/sbmips/conf/GENERIC
diff -u src/sys/arch/sbmips/conf/GENERIC:1.70 src/sys/arch/sbmips/conf/GENERIC:1.70.8.1
--- src/sys/arch/sbmips/conf/GENERIC:1.70	Sat Oct 25 10:08:25 2008
+++ src/sys/arch/sbmips/conf/GENERIC	Thu Jan 21 04:23:29 2010
@@ -1,10 +1,10 @@
-# $NetBSD: GENERIC,v 1.70 2008/10/25 10:08:25 he Exp $
+# $NetBSD: GENERIC,v 1.70.8.1 2010/01/21 04:23:29 matt Exp $
 
 include 	"arch/sbmips/conf/std.sbmips"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.70 $"
+#ident 		"GENERIC-$Revision: 1.70.8.1 $"
 
 #options 	LOCKDEBUG	# XXX XXX XXX XXX
 #options 	DEBUG		# extra kernel debugging support
@@ -35,7 +35,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 #makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=32	# size for embedded symbol table
+options 	SYMTAB_SPACE=33	# size for embedded symbol table
 
 # Compatibility options
 options 	COMPAT_43	# compatibility with 4.3BSD binaries
@@ -138,8 +138,20 @@
 
 cpu*		at zbbus? busid ?
 sbscd*		at zbbus? busid ?
+sbbrz*		at zbbus? busid ?
 sbobio*		at zbbus? busid ?
 
+pci*		at sbbrz? bus ?
+
+sbpcihb*	at pci? dev ?
+sbldthb*	at pci? dev ?
+
+pci*		at sbpcihb? bus ?
+pci*		at sbldthb? bus ?
+
+bge*		at pci? dev ?
+#vga*		at pci? dev ?
+
 #sbicu*		at sbscd? offset ?
 sbwdog*		at sbscd? offset ? intr ?
 sbtimer0	at sbscd? offset ? intr ? flags 0x01		# clock



CVS commit: src/sys/kern

2010-01-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jan 21 04:40:23 UTC 2010

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

Log Message:
Remove unnecessary call to kauth_cred_free().

This resolves an occassional crash I'd been experiencing as reported on
current-users@

Fix suggested by and OK elad@


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.139 src/sys/kern/uipc_syscalls.c:1.140
--- src/sys/kern/uipc_syscalls.c:1.139	Tue Dec 29 04:23:43 2009
+++ src/sys/kern/uipc_syscalls.c	Thu Jan 21 04:40:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.139 2009/12/29 04:23:43 elad Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.140 2010/01/21 04:40:22 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.139 2009/12/29 04:23:43 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.140 2010/01/21 04:40:22 pgoyette Exp $");
 
 #include "opt_pipe.h"
 
@@ -233,7 +233,6 @@
 	sounlock(so);
 	if (error) {
 		/* an error occurred, free the file descriptor and mbuf */
-		kauth_cred_free(so2->so_cred);
 		m_freem(nam);
 		mutex_enter(&fp2->f_lock);
 		fp2->f_count++;



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/sibyte/pci

2010-01-20 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Jan 21 04:53:06 UTC 2010

Modified Files:
src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbbrz.c

Log Message:
Drop 3rd and 4th clauses on a TNF license.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/sibyte/pci/sbbrz.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/pci/sbbrz.c
diff -u src/sys/arch/mips/sibyte/pci/sbbrz.c:1.1.2.1 src/sys/arch/mips/sibyte/pci/sbbrz.c:1.1.2.2
--- src/sys/arch/mips/sibyte/pci/sbbrz.c:1.1.2.1	Thu Jan 21 04:22:33 2010
+++ src/sys/arch/mips/sibyte/pci/sbbrz.c	Thu Jan 21 04:53:06 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sbbrz.c,v 1.1.2.1 2010/01/21 04:22:33 matt Exp $ */
+/* $NetBSD: sbbrz.c,v 1.1.2.2 2010/01/21 04:53:06 snj Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -50,13 +50,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED



CVS commit: src/sys/dev/rasops

2010-01-20 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jan 21 05:32:18 UTC 2010

Modified Files:
src/sys/dev/rasops: rasops.c rasops.h

Log Message:
make RI_CENTER and RI_FULLCLEAR work with a shadow framebuffer


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/rasops/rasops.h

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

Modified files:

Index: src/sys/dev/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.60 src/sys/dev/rasops/rasops.c:1.61
--- src/sys/dev/rasops/rasops.c:1.60	Sat Mar 14 21:04:22 2009
+++ src/sys/dev/rasops/rasops.c	Thu Jan 21 05:32:18 2010
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.60 2009/03/14 21:04:22 dsl Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.61 2010/01/21 05:32:18 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.60 2009/03/14 21:04:22 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.61 2010/01/21 05:32:18 macallan Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -283,13 +283,19 @@
 
 	/* Now centre our window if needs be */
 	ri->ri_origbits = ri->ri_bits;
+	ri->ri_hworigbits = ri->ri_hwbits;
 
 	if ((ri->ri_flg & RI_CENTER) != 0) {
 		ri->ri_bits += (((ri->ri_width * bpp >> 3) -
 		ri->ri_emustride) >> 1) & ~3;
 		ri->ri_bits += ((ri->ri_height - ri->ri_emuheight) >> 1) *
 		ri->ri_stride;
-
+		if (ri->ri_hwbits != NULL) {
+			ri->ri_hwbits += (((ri->ri_width * bpp >> 3) -
+			ri->ri_emustride) >> 1) & ~3;
+			ri->ri_hwbits += ((ri->ri_height - ri->ri_emuheight) >> 1) *
+			ri->ri_stride;
+		}
 		ri->ri_yorigin = (int)(ri->ri_bits - ri->ri_origbits)
 		   / ri->ri_stride;
 		ri->ri_xorigin = (((int)(ri->ri_bits - ri->ri_origbits)
@@ -827,7 +833,7 @@
 		num = ri->ri_height;
 		dp = (int32_t *)ri->ri_origbits;
 		if (ri->ri_hwbits)
-			hp = (int32_t *)ri->ri_hwbits;
+			hp = (int32_t *)ri->ri_hworigbits;
 		delta = 0;
 	} else {
 		np = ri->ri_emustride >> 5;

Index: src/sys/dev/rasops/rasops.h
diff -u src/sys/dev/rasops/rasops.h:1.22 src/sys/dev/rasops/rasops.h:1.23
--- src/sys/dev/rasops/rasops.h:1.22	Mon Apr 28 20:23:56 2008
+++ src/sys/dev/rasops/rasops.h	Thu Jan 21 05:32:18 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops.h,v 1.22 2008/04/28 20:23:56 martin Exp $ */
+/* 	$NetBSD: rasops.h,v 1.23 2010/01/21 05:32:18 macallan Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -94,6 +94,7 @@
 	int	ri_xscale;	/* fontwidth * pelbytes */
 	int	ri_yscale;	/* fontheight * stride */
 	u_char  *ri_origbits;	/* where screen bits actually start */
+	u_char  *ri_hworigbits;	/* where hw bits actually start */
 	int	ri_xorigin;	/* where ri_bits begins (x) */
 	int	ri_yorigin;	/* where ri_bits begins (y) */
 	int32_t	ri_devcmap[16]; /* color -> framebuffer data */



CVS commit: [matt-nb5-mips64] src/sys/arch

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 06:59:12 UTC 2010

Modified Files:
src/sys/arch/mips/conf [matt-nb5-mips64]: files.sibyte
src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbbrz_pci.c
src/sys/arch/sbmips/include [matt-nb5-mips64]: pci_machdep.h

Log Message:
Add rest of pci framework functions.
Disable pciide compat intr establish for sbmips


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.124.1 src/sys/arch/mips/conf/files.sibyte
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/sbmips/include/pci_machdep.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/mips/conf/files.sibyte
diff -u src/sys/arch/mips/conf/files.sibyte:1.5 src/sys/arch/mips/conf/files.sibyte:1.5.124.1
--- src/sys/arch/mips/conf/files.sibyte:1.5	Sat Oct 25 15:05:00 2003
+++ src/sys/arch/mips/conf/files.sibyte	Thu Jan 21 06:59:11 2010
@@ -22,9 +22,11 @@
 attach	sbbrz at zbbus
 file	arch/mips/sibyte/pci/sbbrz.c		sbbrz
 file	arch/mips/sibyte/pci/sbbrz_pci.c	sbbrz
+file	arch/mips/sibyte/pci/sbbrz_bus_io.c	sbbrz
+file	arch/mips/sibyte/pci/sbbrz_bus_mem.c	sbbrz
 
 # Instantiated SB-1250 PCI Host bridge
-device	sbpcihb
+device	sbpcihb: pcibus
 attach	sbpcihb at pci
 file	arch/mips/sibyte/pci/sbpcihb.c		sbpcihb
 

Index: src/sys/arch/mips/sibyte/pci/sbbrz_pci.c
diff -u src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.1 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.2
--- src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.1	Thu Jan 21 04:22:33 2010
+++ src/sys/arch/mips/sibyte/pci/sbbrz_pci.c	Thu Jan 21 06:59:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sbbrz_pci.c,v 1.1.2.1 2010/01/21 04:22:33 matt Exp $ */
+/* $NetBSD: sbbrz_pci.c,v 1.1.2.2 2010/01/21 06:59:12 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -64,7 +64,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.1.2.1 2010/01/21 04:22:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.1.2.2 2010/01/21 06:59:12 matt Exp $");
 
 #include 
 #include 
@@ -78,37 +78,64 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
-void		sbbrz_attach_hook(device_t, device_t,
+void		sbbrz_pci_attach_hook(device_t, device_t,
 		struct pcibus_attach_args *);
-static int	sbbrz_bus_maxdevs(void *, int);
-static pcitag_t	sbbrz_make_tag(void *, int, int, int);
-static void	sbbrz_decompose_tag(void *, pcitag_t, int *, int *, int *);
-static pcireg_t	sbbrz_conf_read(void *, pcitag_t, int);
-static void	sbbrz_conf_write(void *, pcitag_t, int, pcireg_t);
+static int	sbbrz_pci_bus_maxdevs(void *, int);
+static pcitag_t	sbbrz_pci_make_tag(void *, int, int, int);
+static void	sbbrz_pci_decompose_tag(void *, pcitag_t, int *, int *, int *);
+
+static pcireg_t	sbbrz_pci_conf_read(void *, pcitag_t, int);
+static void	sbbrz_pci_conf_write(void *, pcitag_t, int, pcireg_t);
+#ifdef PCI_NETBSD_CONFIGURE
+static void	sbbrz_pci_conf_interrupt(void *, int, int, int, int, int *);
+#endif
+
+static int	sbbrz_pci_intr_map(struct pci_attach_args *,
+		pci_intr_handle_t *);
+static const char *
+		sbbrz_pci_intr_string(void *, pci_intr_handle_t);
+static const struct evcnt *
+		sbbrz_pci_intr_evcnt(void *, pci_intr_handle_t);
+static void *	sbbrz_pci_intr_establish(void *, pci_intr_handle_t,
+		int, int (*)(void *), void *);
+static void	sbbrz_pci_intr_disestablish(void *, void *);
+
 
 void
 sbbrz_pci_init(pci_chipset_tag_t pc, void *v)
 {
 
 	pc->pc_conf_v = v;
-	pc->pc_attach_hook = sbbrz_attach_hook;
-	pc->pc_bus_maxdevs = sbbrz_bus_maxdevs;
-	pc->pc_make_tag = sbbrz_make_tag;
-	pc->pc_decompose_tag = sbbrz_decompose_tag;
-	pc->pc_conf_read = sbbrz_conf_read;
-	pc->pc_conf_write = sbbrz_conf_write;
+	pc->pc_attach_hook = sbbrz_pci_attach_hook;
+	pc->pc_bus_maxdevs = sbbrz_pci_bus_maxdevs;
+	pc->pc_make_tag = sbbrz_pci_make_tag;
+	pc->pc_decompose_tag = sbbrz_pci_decompose_tag;
+	pc->pc_conf_read = sbbrz_pci_conf_read;
+	pc->pc_conf_write = sbbrz_pci_conf_write;
+	pc->pc_intr_map = sbbrz_pci_intr_map;
+	pc->pc_intr_string = sbbrz_pci_intr_string;
+	pc->pc_intr_evcnt = sbbrz_pci_intr_evcnt;
+	pc->pc_intr_establish = sbbrz_pci_intr_establish;
+	pc->pc_intr_disestablish = sbbrz_pci_intr_disestablish;
+#ifdef PCI_NETBSD_CONFIGURE
+	pc->pc_conf_interrupt = sbbrz_pci_conf_interrupt;
+#endif
+#ifdef __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
+	pc->pc_pciide_compat_intr_establish = sbbrz_pciide_compat_intr_establish;
+#endif
 }
 
 void
-sbbrz_attach_hook(device_t parent, device_t self,
+sbbrz_pci_attach_hook(device_t parent, device_t self,
 struct pcibus_attach_args *pba)
 {
 }
 
 int
-sbbrz_bus_maxdevs(void *cpv, int busno)
+sbbrz_pci_bus_maxdevs(void *cpv, int busno)
 {
 	uint64_t regval;
 	int host;
@@ -125,14 +152,14 @@
 }
 
 pcitag_t
-sbbrz_make_tag(void *cpv, int b, int d, int f)
+sbbrz_pci_make_tag(void *cpv, int b, int d

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 07:43:59 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Support the SB1250 LDT HB.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.18.1 src/sys/dev/pci/ppb.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/ppb.c
diff -u src/sys/dev/pci/ppb.c:1.39 src/sys/dev/pci/ppb.c:1.39.18.1
--- src/sys/dev/pci/ppb.c:1.39	Sat May  3 05:44:06 2008
+++ src/sys/dev/pci/ppb.c	Thu Jan 21 07:43:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.39 2008/05/03 05:44:06 cegger Exp $	*/
+/*	$NetBSD: ppb.c,v 1.39.18.1 2010/01/21 07:43:59 matt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.39 2008/05/03 05:44:06 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.39.18.1 2010/01/21 07:43:59 matt Exp $");
 
 #include 
 #include 
@@ -68,6 +68,13 @@
 	PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_PCI)
 		return 1;
 
+#ifdef _MIPS_PADDR_T_64BIT
+/* The LDT HB acts just like a PPB.  */
+if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_SIBYTE &&
+PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SIBYTE_BCM1250_LDTHB)
+return 1;
+#endif
+
 	return 0;
 }
 



CVS commit: [matt-nb5-mips64] src/sys/arch

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 07:46:01 UTC 2010

Modified Files:
src/sys/arch/mips/conf [matt-nb5-mips64]: files.sibyte
src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbpcihb.c
src/sys/arch/sbmips/conf [matt-nb5-mips64]: GENERIC
Removed Files:
src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbldthb.c

Log Message:
sbldthb is dead.  ppb.c will now take care of it.
sbpcihb is now brain dead.  only print whether we are in host or device mode


To generate a diff of this commit:
cvs rdiff -u -r1.5.124.1 -r1.5.124.2 src/sys/arch/mips/conf/files.sibyte
cvs rdiff -u -r1.1.2.1 -r0 src/sys/arch/mips/sibyte/pci/sbldthb.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/sibyte/pci/sbpcihb.c
cvs rdiff -u -r1.70.8.1 -r1.70.8.2 src/sys/arch/sbmips/conf/GENERIC

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/conf/files.sibyte
diff -u src/sys/arch/mips/conf/files.sibyte:1.5.124.1 src/sys/arch/mips/conf/files.sibyte:1.5.124.2
--- src/sys/arch/mips/conf/files.sibyte:1.5.124.1	Thu Jan 21 06:59:11 2010
+++ src/sys/arch/mips/conf/files.sibyte	Thu Jan 21 07:46:01 2010
@@ -26,15 +26,10 @@
 file	arch/mips/sibyte/pci/sbbrz_bus_mem.c	sbbrz
 
 # Instantiated SB-1250 PCI Host bridge
-device	sbpcihb: pcibus
+device	sbpcihb
 attach	sbpcihb at pci
 file	arch/mips/sibyte/pci/sbpcihb.c		sbpcihb
 
-# SB-1250 LDT Host bridge (acts like ppb)
-device	sbldthb: pcibus
-attach	sbldthb at pci
-file	arch/mips/sibyte/pci/sbldthb.c		sbldthb
-
 # sbscd children
 
 device	sbtimer

Index: src/sys/arch/mips/sibyte/pci/sbpcihb.c
diff -u src/sys/arch/mips/sibyte/pci/sbpcihb.c:1.1.2.1 src/sys/arch/mips/sibyte/pci/sbpcihb.c:1.1.2.2
--- src/sys/arch/mips/sibyte/pci/sbpcihb.c:1.1.2.1	Thu Jan 21 04:22:33 2010
+++ src/sys/arch/mips/sibyte/pci/sbpcihb.c	Thu Jan 21 07:46:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sbpcihb.c,v 1.1.2.1 2010/01/21 04:22:33 matt Exp $ */
+/* $NetBSD: sbpcihb.c,v 1.1.2.2 2010/01/21 07:46:01 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -54,99 +54,36 @@
 
 static int	sbpcihb_match(device_t, cfdata_t, void *);
 static void	sbpcihb_attach(device_t, device_t, void *);
-static int	sbpcihb_print(void *, const char *);
 
 CFATTACH_DECL_NEW(sbpcihb, 0,
 sbpcihb_match, sbpcihb_attach, NULL, NULL);
 
-bool sbpcihbfound;
-
 static int
 sbpcihb_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct pci_attach_args *pa = aux;
+	int bus, device;
 
-	if (sbpcihbfound) {
-		return(0);
-	}
+	pci_decompose_tag(pa->pa_pc, pa->pa_tag, &bus, &device, NULL);
 
 	/* Check for a vendor/device match.  */
-	if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_SIBYTE &&
-	PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SIBYTE_BCM1250_PCIHB)
-		return (1);
+	if (bus == 0 && device == 0
+	&& PCI_VENDOR(pa->pa_id) == PCI_VENDOR_SIBYTE
+	&& PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SIBYTE_BCM1250_PCIHB)
+		return 1;
 
-	return (0);
+	return 0;
 }
 
 static void
 sbpcihb_attach(device_t parent, device_t self, void *aux)
 {
 	uint64_t regval;
-	int host;
-
-	sbpcihbfound = true;
+	bool host;
 
 	/* Tell the user whether it's host or device mode. */
-printf("\n\tA_SCD_SYSTEM_CFG: %x\n", A_SCD_SYSTEM_CFG);
 	regval = mips3_ld((void *)MIPS_PHYS_TO_KSEG0(A_SCD_SYSTEM_CFG));
 	host = (regval & M_SYS_PCI_HOST) != 0;
-printf("\tregval: %"PRIx64"\n", regval);
-printf("\thost: %x\n", host);
 
 	aprint_normal(": %s mode\n", host ? "host" : "device");
-
-#if 1
-struct pci_attach_args *pa = aux;
-pci_chipset_tag_t pc = pa->pa_pc;
-struct pcibus_attach_args pba;
-pcireg_t busdata;
-char devinfo[256];
-
-pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
-aprint_normal(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class));
-
-printf("\tpc: %p\n", pc);
-printf("\tpa: %p\n", pa);
-printf("\tpa->pa_tag: %"PRIxPTR"\n", (uintptr_t)(pa->pa_tag));
-printf("\tPPB_REG_BUSINFO %x\n", PPB_REG_BUSINFO);
-busdata = pci_conf_read(pc, pa->pa_tag, PPB_REG_BUSINFO);
-printf("\tbusdata is: %"PRIx32"\n", busdata);
-
-if (PPB_BUSINFO_PRIMARY(busdata) == 0 &&
-PPB_BUSINFO_SECONDARY(busdata) == 0) {
-aprint_normal_dev(self, "not configured by system firmware\n");
-return;
-}
-
-/*
- * Attach the PCI bus than hangs off of it.
- *
- * XXX Don't pass-through Memory Read Multiple.  Should we?
- * XXX Consult the spec...
- */
-//  pba.pba_busname = "pci";/* XXX should be pci_ppb attachment */
-pba.pba_iot = pa->pa_iot;
-pba.pba_memt = pa->pa_memt;
-pba.pba_dmat = pa->pa_dmat; /* XXXLDT??? */
-pba.pba_pc = pc;/* XXXLDT??? */
-pba.pba_flags = pa->pa_flags & ~PCI_FLAGS_MRM_OKAY; /* XXXLDT??? */
-pba.pba_bus = PPB_BUSINFO_