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

2021-05-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 13 08:47:21 UTC 2021

Modified Files:
src/sys/arch/mac68k/obio: iwm_fd.c

Log Message:
We do not match machines whose SWIM does not support the IWM register
set used by this driver (SWIM II/III, SWIM behind IOP, AV models' DMA
based controllers).  Unfortunately, this distinction does not run
cleanly along MACH_CLASS* lines, and we have to look at MACH_MAC{model} tags.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/mac68k/obio/iwm_fd.c

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

Modified files:

Index: src/sys/arch/mac68k/obio/iwm_fd.c
diff -u src/sys/arch/mac68k/obio/iwm_fd.c:1.59 src/sys/arch/mac68k/obio/iwm_fd.c:1.60
--- src/sys/arch/mac68k/obio/iwm_fd.c:1.59	Sat Apr 24 23:36:41 2021
+++ src/sys/arch/mac68k/obio/iwm_fd.c	Thu May 13 08:47:21 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: iwm_fd.c,v 1.59 2021/04/24 23:36:41 thorpej Exp $	*/
+/*	$NetBSD: iwm_fd.c,v 1.60 2021/05/13 08:47:21 hauke Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998 Hauke Fath.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.59 2021/04/24 23:36:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.60 2021/05/13 08:47:21 hauke Exp $");
 
 #include "locators.h"
 
@@ -65,11 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1
 #include 
 #include 
 
-/**
- **	Private functions
- **/
-static int map_iwm_base(vm_offset_t);
-
 /* Autoconfig */
 int	iwm_match(device_t, cfdata_t, void *);
 void	iwm_attach(device_t, device_t, void *);
@@ -78,6 +73,10 @@ int	fd_match(device_t, cfdata_t, void *)
 void	fd_attach(device_t, device_t, void *);
 int	fd_print(void *, const char *);
 
+/**
+ **	Private functions
+ **/
+
 /* Disklabel stuff */
 static void fdGetDiskLabel(fd_softc_t *, dev_t);
 static void fdPrintDiskLabel(struct disklabel *);
@@ -164,7 +163,7 @@ int iwmDebugging = 0 /* | M_TRACE_OP
  ** Module-global Variables
  **/
 
-/* The IWM base address */
+/* The controller base address */
 u_long IWMBase;
 
 /*
@@ -273,30 +272,71 @@ struct dkdriver fd_dkDriver = {
  * to match against. After all, that's what the obio concept is 
  * about: Onboard components that are present depending (only) 
  * on machine type.
+ *
+ * While here, map the machine-dependent physical IO address of IWM
+ * to VM address.
+ *
+ * We do not match, nor return an IWMBase address for machines whose
+ * SWIM does not support the IWM register set used by this driver
+ * (SWIM II/III, SWIM behind IOP, AV models' DMA based controllers).
+ * Unfortunately, this distinction does not run cleanly along
+ * MACH_CLASS* lines, and we will have to look at MACH_MAC{model} tags.
+ *
+ * See also "What chips are in what Macs?" at
+ * <http://bitsavers.org/pdf/apple/mac/mess/Mac_Technical_Notes.html>,
  */
 int
 iwm_match(device_t parent, cfdata_t match, void *aux)
 {
-	int matched;
+	int matched = 0;
 	extern u_long IOBase;		/* from mac68k/machdep.c */
 	extern u_long IWMBase;
-	
-	if (0 == map_iwm_base(IOBase)) {
-		/* 
-		 * Unknown machine HW:
-		 * The SWIM II/III chips that are present in post-Q700
-		 * '040 Macs have dropped the IWM register structure.
-		 * We know next to nothing about the SWIM.
-		 */
-		matched = 0;
-		if (TRACE_CONFIG)
-			printf("IWM or SWIM not found: Unknown location (SWIM II?).\n");
-	} else {
+
+	IWMBase = 0L;
+
+	switch (current_mac_model->class) {
+	case MACH_CLASSPB:	/* Not: 5x0, 190x */
+		if (current_mac_model->machineid == MACH_MACPB500 ||
+		current_mac_model->machineid == MACH_MACPB190 ||
+		current_mac_model->machineid == MACH_MACPB190CS)
+			break;
+		/* FALLTHROUGH */
+	case MACH_CLASSLC:	/* Only: LC II, Classic II */
+		if (current_mac_model->machineid != MACH_MACLCII &&
+		current_mac_model->machineid != MACH_MACCLASSICII)
+			break;
+		/* FALLTHROUGH */
+	case MACH_CLASSII:	/* All */
+	case MACH_CLASSIIci:	/* All */
+	case MACH_CLASSIIsi:	/* All */
+	case MACH_CLASSIIvx:	/* All */
+	case MACH_CLASSDUO:	/* All */
+		IWMBase = IOBase + 0x16000;
 		matched = 1;
-		if (TRACE_CONFIG) {
-			printf("iwm: IWMBase mapped to 0x%lx in VM.\n", 
-			IWMBase);
+		break;
+	case MACH_CLASSQ:	/* Only: 700 */
+		if (current_mac_model->machineid == MACH_MACQ700) {
+			IWMBase = IOBase + 0x1E000;
+			matched = 1;
+			break;
 		}
+		/* FALLTHROUGH */
+	case MACH_CLASSQ2:	/* None */
+	case MACH_CLASSP580:	/* None */
+	case MACH_CLASSIIfx:	/* None */
+	case MACH_CLASSAV:	/* None */
+	default:
+		IWMBase = 0L;
+		matched = 0;
+		break;
+	}
+
+	if (TRACE_CONFIG) {
+		if (matched == 0)
+			printf("IWM or original SWIM not found.\n");
+		else
+			printf("IWMBase mapped to VM addr 0x%lx.\n",
+			IWMBase);
 	}
 	return matched;
 }
@@ -337,7 +377,7 @@ iwm_attach(device_t parent, device_t sel
 		if (TRA

CVS commit: src/doc

2017-11-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Nov 26 12:48:44 UTC 2017

Modified Files:
src/doc: 3RDPARTY

Log Message:
mDNSResponder: Update current version, and the home page link which
has been dead for ~nine years.


To generate a diff of this commit:
cvs rdiff -u -r1.1485 -r1.1486 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1485 src/doc/3RDPARTY:1.1486
--- src/doc/3RDPARTY:1.1485	Fri Nov 17 16:21:44 2017
+++ src/doc/3RDPARTY	Sun Nov 26 12:48:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1485 2017/11/17 16:21:44 rin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1486 2017/11/26 12:48:44 hauke Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -848,10 +848,10 @@ Uses libc's ohash
 
 Package:	mDNSResponder
 Version:	320.16
-Current Vers:	541
+Current Vers:	878
 Maintainer:	Apple
-Archive Site:	http://www.opensource.apple.com/tarballs/mDNSResponder/
-Home Page:	http://developer.apple.com/opensource/internet/bonjour.html
+Archive Site:	https://www.opensource.apple.com/tarballs/mDNSResponder/
+Home Page:	https://developer.apple.com/bonjour/
 Mailing List:	bonjour-...@lists.apple.com
 License:	Apache2 (mdnsd), BSD 3-clause (libdns_sd),
 		BSD 3-clause like (dns-sd)



CVS commit: src/sys/dev/isa

2017-08-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Aug 14 11:49:30 UTC 2017

Modified Files:
src/sys/dev/isa: itesio_isa.c itesio_isavar.h

Log Message:
Enable the IT8628E shipped with my gigabyte GA-N3150N-D3V board.

XXX These IT suoer IO chips appear to be all fairly alike. Maybe add a
comprehensive list of IDs to recognize them, then deal with the
fallout?


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/itesio_isa.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isa/itesio_isavar.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/isa/itesio_isa.c
diff -u src/sys/dev/isa/itesio_isa.c:1.25 src/sys/dev/isa/itesio_isa.c:1.26
--- src/sys/dev/isa/itesio_isa.c:1.25	Thu Apr 23 23:23:00 2015
+++ src/sys/dev/isa/itesio_isa.c	Mon Aug 14 11:49:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: itesio_isa.c,v 1.25 2015/04/23 23:23:00 pgoyette Exp $ */
+/*	$NetBSD: itesio_isa.c,v 1.26 2017/08/14 11:49:30 hauke Exp $ */
 /*	Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $	*/
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.25 2015/04/23 23:23:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.26 2017/08/14 11:49:30 hauke Exp $");
 
 #include 
 #include 
@@ -136,6 +136,7 @@ itesio_isa_match(device_t parent, cfdata
 	bus_space_unmap(ia->ia_iot, ioh, 2);
 
 	switch (cr) {
+	case ITESIO_ID8628:
 	case ITESIO_ID8705:
 	case ITESIO_ID8712:
 	case ITESIO_ID8716:

Index: src/sys/dev/isa/itesio_isavar.h
diff -u src/sys/dev/isa/itesio_isavar.h:1.9 src/sys/dev/isa/itesio_isavar.h:1.10
--- src/sys/dev/isa/itesio_isavar.h:1.9	Thu Nov 15 04:45:01 2012
+++ src/sys/dev/isa/itesio_isavar.h	Mon Aug 14 11:49:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: itesio_isavar.h,v 1.9 2012/11/15 04:45:01 msaitoh Exp $	*/
+/*	$NetBSD: itesio_isavar.h,v 1.10 2017/08/14 11:49:30 hauke Exp $	*/
 /*	$OpenBSD: itvar.h,v 1.2 2003/11/05 20:57:10 grange Exp $	*/
 
 /*
@@ -57,6 +57,7 @@
 #define ITESIO_CHIPID2	0x21	/* Chip ID 2 */
 #define ITESIO_DEVREV	0x22	/* Device Revision */
 
+#define ITESIO_ID8628	0x8628
 #define ITESIO_ID8705	0x8705
 #define ITESIO_ID8712	0x8712
 #define ITESIO_ID8716	0x8716



CVS commit: src/usr.sbin/pf/etc/defaults

2017-05-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri May 26 15:40:27 UTC 2017

Modified Files:
src/usr.sbin/pf/etc/defaults: pf.boot.conf

Log Message:
Enable carp packets early during boot, to avoid gratuitous failovers.

Okayed by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/pf/etc/defaults/pf.boot.conf

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/pf/etc/defaults/pf.boot.conf
diff -u src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.3 src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.4
--- src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.3	Sun Sep  2 15:28:43 2007
+++ src/usr.sbin/pf/etc/defaults/pf.boot.conf	Fri May 26 15:40:27 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: pf.boot.conf,v 1.3 2007/09/02 15:28:43 tron Exp $
+#	$NetBSD: pf.boot.conf,v 1.4 2017/05/26 15:40:27 hauke Exp $
 #
 # /etc/defaults/pf.boot.conf --
 #	initial configuration for pf(4)
@@ -28,3 +28,6 @@ pass out inet6 proto ipv6-icmp all icmp6
 pass in inet6 proto ipv6-icmp all icmp6-type neighbradv
 pass out inet6 proto ipv6-icmp all icmp6-type routersol
 pass in inet6 proto ipv6-icmp all icmp6-type routeradv
+
+# Enable carp, to avoid spurious failovers.
+pass proto carp



CVS commit: src/sys/dev/usb

2017-05-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May  4 14:07:34 UTC 2017

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

Log Message:
Recognize the Ralink RT5370 adapter. It has been in usbdevs for a while.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_run.c

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

Modified files:

Index: src/sys/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.21 src/sys/dev/usb/if_run.c:1.22
--- src/sys/dev/usb/if_run.c:1.21	Fri Nov 25 12:56:29 2016
+++ src/sys/dev/usb/if_run.c	Thu May  4 14:07:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.21 2016/11/25 12:56:29 skrll Exp $	*/
+/*	$NetBSD: if_run.c,v 1.22 2017/05/04 14:07:34 hauke Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.21 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.22 2017/05/04 14:07:34 hauke Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -257,6 +257,7 @@ static const struct usb_devno run_devs[]
 	USB_ID(RALINK,		RT3072),
 	USB_ID(RALINK,		RT3370),
 	USB_ID(RALINK,		RT3572),
+	USB_ID(RALINK,		RT5370),
 	USB_ID(RALINK,		RT5572),
 	USB_ID(RALINK,		RT8070),
 	USB_ID(SAMSUNG,		RT2870_1),



CVS commit: src/etc

2017-01-16 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 16 09:39:26 UTC 2017

Modified Files:
src/etc: protocols

Log Message:
Add carp as an alias for vrrp - after all, we do not ship vrrp, but we
do ship carp(4).

Restore the pfsync entry that was added with 1.20, then wiped out by
the 1.21 import. Please merge any wholesale imports properly.

Remove http://www.sethwklein.net/projects/iana-etc/ which 404s.

Should fix PR bin/51568


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/protocols

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

Modified files:

Index: src/etc/protocols
diff -u src/etc/protocols:1.28 src/etc/protocols:1.29
--- src/etc/protocols:1.28	Wed Nov 18 16:16:36 2015
+++ src/etc/protocols	Mon Jan 16 09:39:26 2017
@@ -1,5 +1,5 @@
-# $NetBSD: protocols,v 1.28 2015/11/18 16:16:36 christos Exp $
-# See also: protocols(5), http://www.sethwklein.net/projects/iana-etc/
+# $NetBSD: protocols,v 1.29 2017/01/16 09:39:26 hauke Exp $
+# See also: protocols(5)
 #
 #Last Updated
 #2015-10-06
@@ -204,7 +204,7 @@ ipcomp   108 IPComp   # IP Paylo
 snp  109 SNP  # Sitara Networks Protocol[Manickam_R_Sridhar]
 compaq-peer  110 Compaq-Peer  # Compaq Peer Protocol[Victor_Volpe]
 ipx-in-ip111 IPX-in-IP# IPX in IP   [CJ_Lee]
-vrrp 112 VRRP # Virtual Router Redundancy   [RFC5798]
+vrrp 112 VRRP carp# Virtual Router Redundancy   [RFC5798]
 #   Protocol
 pgm  113 PGM  # PGM Reliable Transport  [Tony_Speakman]
 #   Protocol
@@ -243,7 +243,9 @@ shim6140 Shim6# Shim6 Pr
 wesp 141 WESP # Wrapped Encapsulating   [RFC5840]
 #   Security Payload
 rohc 142 ROHC # Robust Header Compression   [RFC5858]
-#143-252Unassigned  [Internet_Assigned_Numbers_Authority]
+#143-239Unassigned  [Internet_Assigned_Numbers_Authority]
+pfsync   240 PFSYNC   # PF Synchronization
+#241-252Unassigned  [Internet_Assigned_Numbers_Authority]
 #  253  Use for experimentation andY[RFC3692]
 #   testing
 #  254  Use for experimentation andY[RFC3692]



CVS commit: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt

2017-01-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jan 13 08:41:46 UTC 2017

Modified Files:
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt: tpm_nvread.c

Log Message:
Add missing  for open(2) flags.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.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/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c
diff -u src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.2
--- src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.1.1.1	Sat Jan 28 02:57:29 2012
+++ src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c	Fri Jan 13 08:41:46 2017
@@ -19,6 +19,7 @@
  * http://www.opensource.org/licenses/cpl1.0.php.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/dev/usb

2016-11-10 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 10 15:38:51 UTC 2016

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

Log Message:
Add entry for Intel Centrino Advanced-N 6235 bluetooth piggy-back
Add entry for Validity Sensors, Inc. VFS491


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

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

Modified files:

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.723 src/sys/dev/usb/usbdevs:1.724
--- src/sys/dev/usb/usbdevs:1.723	Fri Nov  4 20:39:33 2016
+++ src/sys/dev/usb/usbdevs	Thu Nov 10 15:38:51 2016
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.723 2016/11/04 20:39:33 mlelstv Exp $
+$NetBSD: usbdevs,v 1.724 2016/11/10 15:38:51 hauke Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1856,6 +1856,7 @@ product INTEL TESTBOARD		0x9890	82930 te
 
 product INTEL2 RMH		0x0020	Rate Matching Hub
 product INTEL2 RMH2		0x0024	Rate Matching Hub
+product INTEL2 N_6235_BT	0x07da	Advanced-N 6235 Combo Bluetooth
 
 /* Intersil products */
 product INTERSIL PRISM_GT	0x1000	PrismGT USB 2.0 WLAN
@@ -3331,6 +3332,7 @@ product VALIDITY VFS451		0x0007	VFS451 F
 product VALIDITY VFS300		0x0008	VFS300 Fingerprint Reader
 product VALIDITY VFS5011	0x0011	VFS5011 Fingerprint Reader
 product VALIDITY VFS471		0x003c	VFS471 Fingerprint Reader
+product VALIDITY VFS491		0x003d	VFS491 Fingerprint Reader
 
 /* VidzMedia products */
 product VIDZMEDIA MONSTERTV	0x4fb1	MonsterTV P2H



CVS commit: src/usr.sbin/ypserv/ypinit

2013-07-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jul 19 11:44:51 UTC 2013

Modified Files:
src/usr.sbin/ypserv/ypinit: Makefile.yp

Log Message:
Commit the patches in Wolfgang Stukenbrock's PR bin/41896.

(1) Do not serve UIDs below MINUID in master.passwd.* maps,
just like in passwd.* maps.

(2) Since stdethers(8) and stdhosts(8) strip comments, we do
not have to do it here, much less inconsistently.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/ypserv/ypinit/Makefile.yp

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/ypserv/ypinit/Makefile.yp
diff -u src/usr.sbin/ypserv/ypinit/Makefile.yp:1.21 src/usr.sbin/ypserv/ypinit/Makefile.yp:1.22
--- src/usr.sbin/ypserv/ypinit/Makefile.yp:1.21	Sat Oct  7 16:54:38 2006
+++ src/usr.sbin/ypserv/ypinit/Makefile.yp	Fri Jul 19 11:44:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.yp,v 1.21 2006/10/07 16:54:38 elad Exp $
+#	$NetBSD: Makefile.yp,v 1.22 2013/07/19 11:44:51 hauke Exp $
 #
 # This is the YP Makefile, used to create and push YP maps.
 #
@@ -112,12 +112,14 @@ passwd.time: ${DIR}/master.passwd
 			${MAKEDBM} - passwd.byuid; \
 		fi; \
 		${CAT} ${.ALLSRC} | \
-		${AWK} 'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
-		{ print $$1, $$0 }' - | ${SORT} | \
+		${AWK} -v minuid=${MINUID} \
+		'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
+		{ if (minuid = $$3) print $$1, $$0 }' - | ${SORT} | \
 		${MAKEDBM_S} - master.passwd.byname; \
 		${CAT} ${.ALLSRC} | \
-		${AWK} 'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
-		{ print $$3, $$0 }' - | ${SORT} | \
+		${AWK} -v minuid=${MINUID} \
+		'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
+		{ if (minuid = $$3) print $$3, $$0 }' - | ${SORT} | \
 		${MAKEDBM_S} - master.passwd.byuid; \
 		${TOUCH} ${.TARGET}; \
 		${ECHO} updated passwd; \
@@ -198,7 +200,7 @@ ${MAP}.time: ${AMDDIR}/${MAP} __makedbme
 
 ethers.time: ${DIR}/ethers
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDETHERS} ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDETHERS} ${.ALLSRC} | \
 		${AWK} 'BEGIN { FS=\t; OFS=\t; } { print $$1, $$0 }' | \
 		${SORT} | ${MAKEDBM} - ethers.byaddr; \
 		${STDETHERS} ${.ALLSRC} | \
@@ -257,7 +259,7 @@ group.time: ${DIR}/group
 #
 hosts.time: ${DIR}/hosts
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDHOSTS} ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDHOSTS} ${.ALLSRC} | \
 		${AWK} '{for (i = 2; i = NF; i++) print $$i, $$0 }' | \
 		${SORT} | ${MAKEDBM} - hosts.byname; \
 		${STDHOSTS} ${.ALLSRC} | \
@@ -279,7 +281,7 @@ hosts.time: ${DIR}/hosts
 
 ipnodes.time: ${DIR}/hosts
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDHOSTS} -n ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDHOSTS} -n ${.ALLSRC} | \
 		${AWK} '{for (i = 2; i = NF; i++) print $$i, $$0 }' | \
 		${SORT} | ${MAKEDBM} - ipnodes.byname; \
 		${STDHOSTS} -n ${.ALLSRC} | \



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

2012-12-07 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Dec  7 08:04:02 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: sbc.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mac68k/dev/sbc.c

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

Modified files:

Index: src/sys/arch/mac68k/dev/sbc.c
diff -u src/sys/arch/mac68k/dev/sbc.c:1.54 src/sys/arch/mac68k/dev/sbc.c:1.55
--- src/sys/arch/mac68k/dev/sbc.c:1.54	Mon Nov 23 00:11:44 2009
+++ src/sys/arch/mac68k/dev/sbc.c	Fri Dec  7 08:04:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbc.c,v 1.54 2009/11/23 00:11:44 rmind Exp $	*/
+/*	$NetBSD: sbc.c,v 1.55 2012/12/07 08:04:02 hauke Exp $	*/
 
 /*
  * Copyright (C) 1996 Scott Reynolds.  All rights reserved.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbc.c,v 1.54 2009/11/23 00:11:44 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbc.c,v 1.55 2012/12/07 08:04:02 hauke Exp $);
 
 #include opt_ddb.h
 
@@ -274,7 +274,6 @@ sbc_pdma_in(struct ncr5380_softc *ncr_sc
 	}
 
 #define R4	*(u_int32_t *)data = *long_data, data += 4;
-#define R1	*(u_int8_t *)data = *byte_data, data += 1;
 	for (; resid = 128; resid -= 128) {
 		if (sbc_ready(ncr_sc))
 			goto interrupt;
@@ -286,11 +285,10 @@ sbc_pdma_in(struct ncr5380_softc *ncr_sc
 	while (resid) {
 		if (sbc_ready(ncr_sc))
 			goto interrupt;
-		R1;
+		*(u_int8_t *)data = *byte_data, data += 1;
 		resid--;
 	}
 #undef R4
-#undef R1
 
 interrupt:
 	nofault = NULL;
@@ -546,12 +544,10 @@ sbc_drq_intr(void *p)
 		if (count  count  4) {
 			data = (u_int8_t *)dh-dh_addr;
 			drq = (volatile u_int8_t *)sc-sc_drq_addr;
-
-#define R1		*data++ = *drq++
 			while (count) {
-R1; count--;
+*data++ = *drq++;
+count--;
 			}
-#undef R1
 			dh-dh_addr += resid;
 			dh-dh_len -= resid;
 		}
@@ -576,12 +572,10 @@ sbc_drq_intr(void *p)
 #undef R4
 			data = (u_int8_t *)long_data;
 			drq = (volatile u_int8_t *)long_drq;
-
-#define R1		*data++ = *drq++
 			while (count) {
-R1; count--;
+*data++ = *drq++;
+count--;
 			}
-#undef R1
 			dh-dh_len -= dcount;
 			dh-dh_addr += dcount;
 		}



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

2012-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec  6 13:28:17 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: mac68k5380.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mac68k/dev/mac68k5380.c

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

Modified files:

Index: src/sys/arch/mac68k/dev/mac68k5380.c
diff -u src/sys/arch/mac68k/dev/mac68k5380.c:1.47 src/sys/arch/mac68k/dev/mac68k5380.c:1.48
--- src/sys/arch/mac68k/dev/mac68k5380.c:1.47	Sat Oct 27 17:17:59 2012
+++ src/sys/arch/mac68k/dev/mac68k5380.c	Thu Dec  6 13:28:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mac68k5380.c,v 1.47 2012/10/27 17:17:59 chs Exp $	*/
+/*	$NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $	*/
 
 /*
  * Copyright (c) 1995 Allen Briggs
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mac68k5380.c,v 1.47 2012/10/27 17:17:59 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -409,9 +409,8 @@ extern	int			*nofault, m68k_fault_addr;
 			data = (u_int8_t *) pending_5380_data;
 			drq = (volatile u_int8_t *) ncr_5380_with_drq;
 			while (count) {
-#define R1	*data++ = *drq++
-R1; count--;
-#undef R1
+*data++ = *drq++;
+count--;
 			}
 			pending_5380_data += resid;
 			pending_5380_count -= resid;
@@ -440,9 +439,8 @@ extern	int			*nofault, m68k_fault_addr;
 		data = (u_int8_t *) long_data;
 		drq = (volatile u_int8_t *) long_drq;
 		while (count) {
-#define R1	*data++ = *drq++
-			R1; count--;
-#undef R1
+			*data++ = *drq++;
+			count--;
 		}
 		pending_5380_count -= dcount;
 		pending_5380_data += dcount;



CVS commit: src

2012-02-01 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Feb  1 08:45:03 UTC 2012

Modified Files:
src/doc: CHANGES
src/share/man/man4/man4.mac68k: cpi.4

Log Message:
Document added timecounter support to the CSI Hurdler Centronics
Parallel Interface cpi(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1663 -r1.1664 src/doc/CHANGES
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.mac68k/cpi.4

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.1663 src/doc/CHANGES:1.1664
--- src/doc/CHANGES:1.1663	Wed Feb  1 05:49:45 2012
+++ src/doc/CHANGES	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1663 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1664 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1231,3 +1231,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	kernel: Add a new library, libquota, for control of and access to
 		disk quotas, extending the file-system-independent interface
 		added with the bouyer-quota2 branch. [dholland 20120201]
+	mac68k: Add timecounter support to the CSI Hurdler Centronics
+		Parallel Interface cpi(4) driver. [hauke 20120201]

Index: src/share/man/man4/man4.mac68k/cpi.4
diff -u src/share/man/man4/man4.mac68k/cpi.4:1.4 src/share/man/man4/man4.mac68k/cpi.4:1.5
--- src/share/man/man4/man4.mac68k/cpi.4:1.4	Mon Mar 23 16:14:01 2009
+++ src/share/man/man4/man4.mac68k/cpi.4	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpi.4,v 1.4 2009/03/23 16:14:01 joerg Exp $
+.\	$NetBSD: cpi.4,v 1.5 2012/02/01 08:45:03 hauke Exp $
 .\
 .\ Copyright (c) 2008 Hauke Fath.  All rights reserved.
 .\
@@ -30,13 +30,27 @@
 .Nd parallel printer driver for Creative Systems Inc. Hurdler CPI Nubus card
 .\
 .Sh SYNOPSIS
-.Cd cpi* at nubus?
+.Cd cpi* at nubus? flags 0x1
 .\
 .Sh DESCRIPTION
-The
 .Nm
 interface provides access to parallel printer ports.
 .\
+.Sh CONFIGURATION
+The
+.Nm
+driver supports the following
+.Sy flags
+for use in
+.Xr config 1
+files:
+.Pp
+.Bl -tag -compact -width bits 16-23:
+.It bit 0 :
+use the CIO counters 1 and 2 as a 32 bit 
+.Xr timecounter 9 .
+.El
+.\
 .Sh HARDWARE
 The
 .Nm
@@ -72,7 +86,8 @@ The Z8536 INT line (pin 24) is wired to 
 .Xr autoconf 4 ,
 .Xr lpt 4 ,
 .Xr nubus 4 ,
-.Xr printcap 5
+.Xr printcap 5 ,
+.Xr timecounter 9
 .Pp
 .Tn IEEE Standard 1284-1994
 .\ .Sh STANDARDS



CVS commit: src/sys/netatalk

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 09:53:44 UTC 2012

Modified Files:
src/sys/netatalk: aarp.c ddp_output.c

Log Message:
Fix AppleTalk name registration, as discussed on the port-macppc list
http://mail-index.netbsd.org/port-macppc/2010/07/09/msg001119.html
and in PR kern/44412, by looping back ddp broadcasts.

Patch submitted by David Riley against netbsd-5, adaptation for
-current and minor KNF touchup by me.

Needs to be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netatalk/ddp_output.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/netatalk/aarp.c
diff -u src/sys/netatalk/aarp.c:1.35 src/sys/netatalk/aarp.c:1.36
--- src/sys/netatalk/aarp.c:1.35	Sun May  8 13:51:31 2011
+++ src/sys/netatalk/aarp.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $	*/
+/*	$NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $);
 
 #include opt_mbuftrace.h
 
@@ -222,11 +222,19 @@ aarpwhohas(struct ifnet *ifp, const stru
 		ea-aarp_tpa = sat-sat_addr.s_node;
 	}
 
+	/* If we are talking to ourselves, use the loopback interface. */
+	if (AA_SAT(aa)-sat_addr.s_net == sat-sat_addr.s_net 
+	AA_SAT(aa)-sat_addr.s_node == sat-sat_addr.s_node)
+		ifp = lo0ifp;
+
 #ifdef NETATALKDEBUG
-	printf(aarp: sending request via %u.%u seaking %u.%u\n,
-	ntohs(AA_SAT(aa)-sat_addr.s_net), AA_SAT(aa)-sat_addr.s_node,
-	ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node);
-#endif	/* NETATALKDEBUG */
+	printf(aarp: sending request via %u.%u through %s seeking %u.%u\n,
+	ntohs(AA_SAT(aa)-sat_addr.s_net),
+	AA_SAT(aa)-sat_addr.s_node,
+	ifp-if_xname,
+	ntohs(sat-sat_addr.s_net),
+	sat-sat_addr.s_node);
+#endif /* NETATALKDEBUG */
 
 	sa.sa_len = sizeof(struct sockaddr);
 	sa.sa_family = AF_UNSPEC;

Index: src/sys/netatalk/ddp_output.c
diff -u src/sys/netatalk/ddp_output.c:1.15 src/sys/netatalk/ddp_output.c:1.16
--- src/sys/netatalk/ddp_output.c:1.15	Sun Jul 17 20:54:53 2011
+++ src/sys/netatalk/ddp_output.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $	 */
+/*	$NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $	 */
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,20 +126,40 @@ ddp_route(struct mbuf *m, struct route *
 	struct elaphdr *elh;
 	struct at_ifaddr *aa = NULL;
 	struct ifnet   *ifp = NULL;
-	u_short net;
+	uint16_tnet;
+	uint8_t node;
+	uint8_t loopback = 0;
 
 	if ((rt = rtcache_validate(ro)) != NULL  (ifp = rt-rt_ifp) != NULL) {
+		const struct sockaddr_at *dst = satocsat(rtcache_getdst(ro));
+		uint16_t dnet = dst-sat_addr.s_net;
+		uint8_t dnode = dst-sat_addr.s_node;
 		net = satosat(rt-rt_gateway)-sat_addr.s_net;
+		node = satosat(rt-rt_gateway)-sat_addr.s_node;
+
 		TAILQ_FOREACH(aa, at_ifaddr, aa_list) {
-			if (aa-aa_ifp == ifp 
-			ntohs(net) = ntohs(aa-aa_firstnet) 
+			if (ntohs(net) = ntohs(aa-aa_firstnet) 
 			ntohs(net) = ntohs(aa-aa_lastnet)) {
+/* Are we talking to ourselves? */
+if (dnet == aa-aa_addr.sat_addr.s_net 
+dnode == aa-aa_addr.sat_addr.s_node) {
+	/* If to us, redirect to lo0. */
+	ifp = lo0ifp;
+}
+/* Or is it a broadcast? */
+else if (dnet == aa-aa_addr.sat_addr.s_net 
+	dnode == 255) {
+	/* If broadcast, loop back a copy. */
+	loopback = 1;
+}
 break;
 			}
 		}
 	}
 	if (aa == NULL) {
+#ifdef NETATALKDEBUG
 		printf(%s: no address found\n, __func__);
+#endif
 		m_freem(m);
 		return EINVAL;
 	}
@@ -161,7 +181,8 @@ ddp_route(struct mbuf *m, struct route *
 		ntohs(aa-aa_firstnet) 
 		ntohs(satocsat(rtcache_getdst(ro))-sat_addr.s_net) =
 		ntohs(aa-aa_lastnet)) {
-			elh-el_dnode = satocsat(rtcache_getdst(ro))-sat_addr.s_node;
+			elh-el_dnode =
+			satocsat(rtcache_getdst(ro))-sat_addr.s_node;
 		} else {
 			elh-el_dnode =
 			satosat(rt-rt_gateway)-sat_addr.s_node;
@@ -182,5 +203,13 @@ ddp_route(struct mbuf *m, struct route *
 #endif
 
 	/* XXX */
+	if (loopback  rtcache_getdst(ro)-sa_family == AF_APPLETALK) {
+		struct mbuf *copym = m_copypacket(m, M_DONTWAIT);
+		
+#ifdef NETATALKDEBUG
+		printf(Looping back (not AARP).\n);
+#endif
+		looutput(lo0ifp, 

CVS commit: src/sys

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 22:13:20 UTC 2012

Modified Files:
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mac68k/nubus: cpi_nubus.c cpi_nubusvar.h
src/sys/dev/ic: z8536reg.h

Log Message:
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/nubus/cpi_nubus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/nubus/cpi_nubusvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/z8536reg.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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.204 src/sys/arch/mac68k/conf/GENERIC:1.205
--- src/sys/arch/mac68k/conf/GENERIC:1.204	Sun Dec 18 05:49:29 2011
+++ src/sys/arch/mac68k/conf/GENERIC	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.204 2011/12/18 05:49:29 dholland Exp $
+# $NetBSD: GENERIC,v 1.205 2012/01/31 22:13:20 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/mac68k/conf/std.mac68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.204 $
+#ident 		GENERIC-$Revision: 1.205 $
 
 maxusers	16		# estimated number of users
 
@@ -234,7 +234,8 @@ wsmouse* at ams?
 # Centronics printer port
 
 # CSI Hurdler Centronics Parallel Interface
-cpi*	at nubus?
+# CPI_CTC12_IS_TIMECOUNTER	0x01	Run counters 1+2 as timecounter	
+cpi*	at nubus? flags 0x1
 
 
 # Serial Devices

Index: src/sys/arch/mac68k/nubus/cpi_nubus.c
diff -u src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5 src/sys/arch/mac68k/nubus/cpi_nubus.c:1.6
--- src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5	Fri May 13 22:35:50 2011
+++ src/sys/arch/mac68k/nubus/cpi_nubus.c	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $	*/
+/*	$NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2008 Hauke Fath
@@ -25,8 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $);
-
+__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $);
 #include sys/param.h
 #include sys/systm.h
 #include sys/proc.h
@@ -40,6 +39,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #include sys/ioctl.h
 #include sys/tty.h
 #include sys/time.h
+#include sys/timetc.h
 #include sys/kernel.h
 #include sys/syslog.h
 #include sys/errno.h
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define M_TRACE_WRITE	0x0010
 #define M_TRACE_IOCTL	0x0020
 #define M_TRACE_STATUS	0x0040
+#define M_TRACE_TCNTR	0x0080
 #define M_TRACE_ALL	0x
 #define M_TRACE_NONE	0x
 
@@ -81,12 +82,12 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define TRACE_WRITE	(cpi_debug_mask  M_TRACE_WRITE)
 #define TRACE_IOCTL	(cpi_debug_mask  M_TRACE_IOCTL)
 #define TRACE_STATUS	(cpi_debug_mask  M_TRACE_STATUS)
+#define TRACE_TCNTR	(cpi_debug_mask  M_TRACE_TCNTR)
 #define TRACE_ALL	(cpi_debug_mask  M_TRACE_ALL)
 #define TRACE_NONE	(cpi_debug_mask  M_TRACE_NONE)
 
-uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_WRITE */ ;
-
-#else
+uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_TCNTR | M_TRACE_WRITE */ ;
+#else /* CPI_DEBUG */
 #define TRACE_CONFIG	0
 #define TRACE_OPEN	0
 #define TRACE_CLOSE	0
@@ -94,11 +95,10 @@ uint32_t cpi_debug_mask = M_TRACE_NONE /
 #define TRACE_WRITE	0
 #define TRACE_IOCTL	0
 #define TRACE_STATUS	0
+#define TRACE_TCNTR	0
 #define TRACE_ALL	0
 #define TRACE_NONE	0
-#endif
-
-#undef USE_CIO_TIMERS		/* TBD */
+#endif /* CPI_DEBUG */
 
 /* autoconf interface */
 int cpi_nubus_match(device_t, cfdata_t, void *);
@@ -126,14 +126,13 @@ static void cpi_wakeup(void *);
 static int cpi_flush(struct cpi_softc *);
 static void cpi_intr(void *);
 
-#ifdef USE_CIO_TIMERS
-static void cpi_initclock(struct cpi_softc *);
-static u_int cpi_get_timecount(struct timecounter *);
-#endif
-
-static inline void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
+static void cpi_tc_initclock(struct cpi_softc *);
+static uint cpi_get_timecount(struct timecounter *);
+static uint z8536_read_counter1(bus_space_tag_t, bus_space_handle_t);
+static uint z8536_read_counter2(bus_space_tag_t, bus_space_handle_t);
+static void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
 uint8_t, uint8_t);
-static inline uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
+static uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
 uint8_t);
 
 
@@ -191,19 +190,6 @@ const uint8_t cio_init[] = {
 	Z8536_DPPRC, 	0x00,
 	Z8536_SIOCRC, 	0x00,
 
-#ifdef USE_CIO_TIMERS
-	/*
-	 * Counter/Timers 1+2 are joined to form a free-running
-	 * 32 bit timecounter
-	 */
-	Z8536_CTMSR1

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

2012-01-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 24 15:24:55 UTC 2012

Modified Files:
src/sys/arch/macppc/macppc: disksubr.c

Log Message:
Add support for BSD disklabels, scanning the beginning of the disk
in four-byte strides, like disklabel(8) does it.

Since the netbsd-6 branch is around the corner, this is a
minimally-intrusive addition.

Note there is no write support, for good reasons.
Note also that disksubr.c is in dire need of re-structuring.


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

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

Modified files:

Index: src/sys/arch/macppc/macppc/disksubr.c
diff -u src/sys/arch/macppc/macppc/disksubr.c:1.47 src/sys/arch/macppc/macppc/disksubr.c:1.48
--- src/sys/arch/macppc/macppc/disksubr.c:1.47	Mon Mar 16 23:11:12 2009
+++ src/sys/arch/macppc/macppc/disksubr.c	Tue Jan 24 15:24:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.47 2009/03/16 23:11:12 dsl Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -106,7 +106,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.47 2009/03/16 23:11:12 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -137,6 +137,8 @@ static const char *read_mac_label(dev_t,
 		struct disklabel *, struct cpu_disklabel *);
 static const char *read_dos_label(dev_t, void (*)(struct buf *),
 		struct disklabel *, struct cpu_disklabel *);
+static const char *read_bsd_label(dev_t, void (*)(struct buf *),
+		struct disklabel *, struct cpu_disklabel *);
 static int get_netbsd_label(dev_t, void (*)(struct buf *),
 		struct disklabel *, struct cpu_disklabel *);
 
@@ -387,6 +389,78 @@ done:
 	return msg;
 }
 
+/*
+ * Scan the disk buffer in four byte strides for a native BSD
+ * disklabel (different ports have variably-sized bootcode before
+ * the label)
+ */
+static const char *
+read_bsd_label(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
+struct cpu_disklabel *osdep)
+{
+	struct disklabel *dlp;
+	struct buf *bp;
+	const char *msg;
+	struct disklabel *blk_start, *blk_end;
+	int size, match;
+	
+	msg = NULL;
+
+	/* 
+	 * Read in the first #(NUM_PARTS + 1) blocks of the disk.
+	 * The native Macintosh partition table starts at 
+	 * sector #1, but we want #0 too for the BSD label.
+	 */
+	size = roundup((NUM_PARTS + 1)  DEV_BSHIFT, lp-d_secsize);
+	bp = geteblk(size);
+
+	bp-b_dev = dev;
+	bp-b_blkno = 0;
+	bp-b_resid = 0;
+	bp-b_bcount = size;
+	bp-b_flags |= B_READ;
+	bp-b_cylinder = 1 / lp-d_secpercyl;
+	(*strat)(bp);
+
+	match = 0;
+	
+	if (biowait(bp)) {
+		msg = I/O error reading BSD disklabel;
+	} else {
+		/*
+		 * Hunt the label, starting at the beginning of the disk.
+		 * When we find an inconsistent label, report and continue.
+		 */
+		blk_start = (struct disklabel *)bp-b_data;
+		blk_end = (struct disklabel *)((char *)bp-b_data +
+		(NUM_PARTS  DEV_BSHIFT) - sizeof(struct disklabel));
+
+		for (dlp = blk_start; dlp = blk_end; 
+		 dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
+			if (dlp-d_magic == DISKMAGIC 
+			dlp-d_magic2 == DISKMAGIC) {
+/* Sanity check */
+if (dlp-d_npartitions = MAXPARTITIONS  
+dkcksum(dlp) == 0) {
+	*lp = *dlp;
+	match = -1;
+	break;
+#ifdef DIAGNOSTIC
+} else {
+	printf(read_bsd_label() found 
+	damaged disklabel starting at 
+	0x0%p, ignore\n, dlp);
+#endif /* DIAGNOSTIC */
+}
+			}
+		}
+		if (!match)
+			msg = BSD disklabel not found;
+	}
+	brelse(bp, 0);
+	return msg;
+}
+
 /* Read MS-DOS partition table.
  *
  * XXX -
@@ -597,8 +671,9 @@ readdisklabel(dev_t dev, void (*strat)(s
 			if (!msg)
 osdep-cd_start = 0;
 		} else {
-			msg = no disk label -- NetBSD or Macintosh;
-			osdep-cd_start = 0;	/* XXX for now */
+			msg = read_bsd_label(dev, strat, lp, osdep);
+			if (!msg)
+osdep-cd_start = 0;	/* XXX for now */
 		}
 	}
 



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

2012-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 23 13:55:03 UTC 2012

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
In the light of PR kern/29702, add swwdog(4) pseudo device.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/arch/macppc/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/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.296 src/sys/arch/macppc/conf/GENERIC:1.297
--- src/sys/arch/macppc/conf/GENERIC:1.296	Wed Jan 11 17:16:35 2012
+++ src/sys/arch/macppc/conf/GENERIC	Mon Jan 23 13:55:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.296 2012/01/11 17:16:35 macallan Exp $
+# $NetBSD: GENERIC,v 1.297 2012/01/23 13:55:02 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/macppc/conf/std.macppc
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.296 $
+#ident 		GENERIC-$Revision: 1.297 $
 
 maxusers	32
 
@@ -605,7 +605,8 @@ pseudo-device	bridge			# simple inter-ne
 pseudo-device	agr			# IEEE 802.3ad link aggregation
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	openfirm		# /dev/openfirm
-pseudo-device	wsmux			# mouse and keyboard multiplexor
+pseudo-device	wsmux			# mouse and keyboard multiplexer
+pseudo-device	swwdog			# software watchdog driver - swwdog(4)
 pseudo-device	clockctl		# user control of clock subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	nsmb			# SMB requester



CVS commit: src/etc/etc.mac68k

2011-10-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct  4 10:55:53 UTC 2011

Modified Files:
src/etc/etc.mac68k: MAKEDEV.conf

Log Message:
Create the sysmon device node for the software watchdog


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.mac68k/MAKEDEV.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/etc.mac68k/MAKEDEV.conf
diff -u src/etc/etc.mac68k/MAKEDEV.conf:1.10 src/etc/etc.mac68k/MAKEDEV.conf:1.11
--- src/etc/etc.mac68k/MAKEDEV.conf:1.10	Sat Sep 13 13:11:38 2008
+++ src/etc/etc.mac68k/MAKEDEV.conf	Tue Oct  4 10:55:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.10 2008/09/13 13:11:38 tsutsui Exp $
+# $NetBSD: MAKEDEV.conf,v 1.11 2011/10/04 10:55:53 hauke Exp $
 
 all_md)
 	makedev wscons std_mac68k sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 tty0 tty1
@@ -11,6 +11,7 @@ all_md)
 	makedev scsibus0 scsibus1 scsibus2 scsibus3
 	makedev ses0 ses1 ses2 ses3
 	makedev cfs
+	makedev sysmon
 	;;
 
 std_mac68k)



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

2011-10-03 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Oct  3 19:22:59 UTC 2011

Modified Files:
src/sys/arch/mac68k/conf: GENERIC SMALLRAM majors.mac68k

Log Message:
Add the MI software watchdog to GENERIC (not to SMALLRAM, as usual).


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mac68k/conf/SMALLRAM
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mac68k/conf/majors.mac68k

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

Modified files:

Index: src/sys/arch/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.201 src/sys/arch/mac68k/conf/GENERIC:1.202
--- src/sys/arch/mac68k/conf/GENERIC:1.201	Thu Jun 30 20:09:32 2011
+++ src/sys/arch/mac68k/conf/GENERIC	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.201 2011/06/30 20:09:32 wiz Exp $
+# $NetBSD: GENERIC,v 1.202 2011/10/03 19:22:59 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/mac68k/conf/std.mac68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.201 $
+#ident 		GENERIC-$Revision: 1.202 $
 
 maxusers	16		# estimated number of users
 
@@ -350,6 +350,7 @@ pseudo-device	ite		1	# ite emulation for
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	clockctl		# user control of clock subsystem
 pseudo-device	putter			# for puffs and pud
+pseudo-device	swwdog			# software watchdog driver
 
 # random number generator pseudo-device
 pseudo-device	rnd			# /dev/random and in-kernel generator

Index: src/sys/arch/mac68k/conf/SMALLRAM
diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.38 src/sys/arch/mac68k/conf/SMALLRAM:1.39
--- src/sys/arch/mac68k/conf/SMALLRAM:1.38	Sun Mar  6 17:08:27 2011
+++ src/sys/arch/mac68k/conf/SMALLRAM	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: SMALLRAM,v 1.38 2011/03/06 17:08:27 bouyer Exp $
+#	$NetBSD: SMALLRAM,v 1.39 2011/10/03 19:22:59 hauke Exp $
 #
 # This is an example of how to configure a small, efficient kernel for
 # a system with limited RAM. Even so it's capable of doing quite a
@@ -133,4 +133,5 @@ no pseudo-device	agr
 no pseudo-device	accf_data
 no pseudo-device	accf_http
 no pseudo-device	putter
+no pseudo-device	swwdog
 no pseudo-device	ksyms

Index: src/sys/arch/mac68k/conf/majors.mac68k
diff -u src/sys/arch/mac68k/conf/majors.mac68k:1.22 src/sys/arch/mac68k/conf/majors.mac68k:1.23
--- src/sys/arch/mac68k/conf/majors.mac68k:1.22	Thu Jun 30 20:09:32 2011
+++ src/sys/arch/mac68k/conf/majors.mac68k	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.mac68k,v 1.22 2011/06/30 20:09:32 wiz Exp $
+#	$NetBSD: majors.mac68k,v 1.23 2011/10/03 19:22:59 hauke Exp $
 #
 # Device majors for mac68k
 #
@@ -49,6 +49,7 @@ device-major	cgd		char 51  block 23	cgd
 device-major	ksyms		char 52			ksyms
 device-major	wsfont		char 53			wsfont
 device-major	cpi		char 54			cpi
+device-major	sysmon		char 55			sysmon_wdog
 
 device-major	nsmb		char 98			nsmb
 



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

2011-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 19 15:18:29 UTC 2011

Modified Files:
src/sys/arch/sparc/stand/ofwboot: boot.h

Log Message:
Fix a tyop.
The intentions were good...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/boot.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/sparc/stand/ofwboot/boot.h
diff -u src/sys/arch/sparc/stand/ofwboot/boot.h:1.7 src/sys/arch/sparc/stand/ofwboot/boot.h:1.8
--- src/sys/arch/sparc/stand/ofwboot/boot.h:1.7	Thu May 19 03:09:47 2011
+++ src/sys/arch/sparc/stand/ofwboot/boot.h	Thu May 19 15:18:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.h,v 1.7 2011/05/19 03:09:47 christos Exp $	*/
+/*	$NetBSD: boot.h,v 1.8 2011/05/19 15:18:29 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 extern void	loadfile_set_allocator(int);
 
 /* alloc.c */
-extern vois	freeall(void);
+extern void	freeall(void);
 
 /* ofdev.c */
 char *filename(char*, char*);



CVS commit: src/sys/dist/pf/net

2011-05-11 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed May 11 12:22:34 UTC 2011

Modified Files:
src/sys/dist/pf/net: pf_table.c

Log Message:
Commit the patch from
http://mail-index.netbsd.org/current-users/2010/09/12/msg014289.html,
fixing a panic: pool 'pfrktable' is IPL_NONE, but called from
interrupt context that occurred on NetBSD/sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dist/pf/net/pf_table.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/dist/pf/net/pf_table.c
diff -u src/sys/dist/pf/net/pf_table.c:1.16 src/sys/dist/pf/net/pf_table.c:1.17
--- src/sys/dist/pf/net/pf_table.c:1.16	Mon Apr 12 13:57:38 2010
+++ src/sys/dist/pf/net/pf_table.c	Wed May 11 12:22:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pf_table.c,v 1.16 2010/04/12 13:57:38 ahoka Exp $	*/
+/*	$NetBSD: pf_table.c,v 1.17 2011/05/11 12:22:34 hauke Exp $	*/
 /*	$OpenBSD: pf_table.c,v 1.70 2007/05/23 11:53:45 markus Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pf_table.c,v 1.16 2010/04/12 13:57:38 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pf_table.c,v 1.17 2011/05/11 12:22:34 hauke Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -200,9 +200,9 @@
 {
 #ifdef __NetBSD__
 	pool_init(pfr_ktable_pl, sizeof(struct pfr_ktable), 0, 0, 0,
-	pfrktable, pool_allocator_nointr, IPL_NONE);
+	pfrktable, pool_allocator_nointr, IPL_NET);
 	pool_init(pfr_kentry_pl, sizeof(struct pfr_kentry), 0, 0, 0,
-	pfrkentry, pool_allocator_nointr, IPL_NONE);
+	pfrkentry, pool_allocator_nointr, IPL_NET);
 	pool_init(pfr_kentry_pl2, sizeof(struct pfr_kentry), 0, 0, 0,
 	pfrkentry2, NULL, IPL_SOFTNET);
 #else



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:11:55 UTC 2011

Modified Files:
src/bin/ksh: siglist.sh

Log Message:
The Solaris 7 /usr/{,xpg4/}bin/sorts expect whitespace between the -k
option and its argument.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/siglist.sh

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

Modified files:

Index: src/bin/ksh/siglist.sh
diff -u src/bin/ksh/siglist.sh:1.8 src/bin/ksh/siglist.sh:1.9
--- src/bin/ksh/siglist.sh:1.8	Sat Oct 25 22:18:15 2008
+++ src/bin/ksh/siglist.sh	Sun Jan 23 17:11:55 2011
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: siglist.sh,v 1.8 2008/10/25 22:18:15 apb Exp $
+#	$NetBSD: siglist.sh,v 1.9 2011/01/23 17:11:55 hauke Exp $
 #
 # Script to generate a sorted, complete list of signals, suitable
 # for inclusion in trap.c as array initializer.
@@ -26,7 +26,7 @@
 	{ QwErTy .signal = SIG\1 , .name = \1, .mess = \2 },\
 #endif/')  $in
 $CPP $in   $out
-${SED} -n 's/{ QwErTy/{/p'  $out | ${AWK} '{print NR, $0}' | sort -k5n -k1n |
+${SED} -n 's/{ QwErTy/{/p'  $out | ${AWK} '{print NR, $0}' | sort -k 5n -k 1n |
 ${SED} 's/^[0-9]* //' |
 ${AWK} 'BEGIN { last=0; nsigs=0; }
 	{



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:15:16 UTC 2011

Modified Files:
src/bin/ksh: lex.c

Log Message:
The previous commit removed a { }�block, and unintendedly introduced a
C99ism (inlined variable declaration), which hurts when pdksh is used
for bootstrapping pkgsrc. Move the two declarations to the beginning
of the block.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/lex.c

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

Modified files:

Index: src/bin/ksh/lex.c
diff -u src/bin/ksh/lex.c:1.13 src/bin/ksh/lex.c:1.14
--- src/bin/ksh/lex.c:1.13	Mon Oct 27 19:52:28 2008
+++ src/bin/ksh/lex.c	Sun Jan 23 17:15:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $	*/
+/*	$NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $	*/
 
 /*
  * lexical analysis and source input
@@ -6,7 +6,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $);
+__RCSID($NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $);
 #endif
 
 
@@ -245,6 +245,9 @@
 
 		  Subst:
 			switch (c) {
+			  Lex_state *s;
+			  Lex_state *base;
+
 			  case '\\':
 c = getsc();
 switch (c) {
@@ -341,8 +344,8 @@
  * posix mode was not in effect.
  */
 statep-ls_sbquote.indquotes = 0;
-Lex_state *s = statep;
-Lex_state *base = state_info.base;
+s = statep;
+base = state_info.base;
 while (1) {
 	for (; s != base; s--) {
 		if (s-ls_state == SDQUOTE) {



CVS commit: src/sbin/wdogctl

2010-12-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec 23 14:29:52 UTC 2010

Modified Files:
src/sbin/wdogctl: wdogctl.8

Log Message:
First release that shipped wdogctl(8) was 1.6, not 1.5.1.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/wdogctl/wdogctl.8

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

Modified files:

Index: src/sbin/wdogctl/wdogctl.8
diff -u src/sbin/wdogctl/wdogctl.8:1.19 src/sbin/wdogctl/wdogctl.8:1.20
--- src/sbin/wdogctl/wdogctl.8:1.19	Mon May 18 12:29:31 2009
+++ src/sbin/wdogctl/wdogctl.8	Thu Dec 23 14:29:52 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: wdogctl.8,v 1.19 2009/05/18 12:29:31 wiz Exp $
+.\	$NetBSD: wdogctl.8,v 1.20 2010/12/23 14:29:52 hauke Exp $
 .\
 .\ Copyright (c) 2000 Zembu Labs, Inc.
 .\ All rights reserved.
@@ -175,7 +175,7 @@
 The
 .Nm
 command first appeared in
-.Nx 1.5.1 .
+.Nx 1.6 .
 .Sh AUTHORS
 The
 .Nm



CVS commit: src/share/man/man4

2010-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Dec  6 11:54:04 UTC 2010

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

Log Message:
Sync the device names with reality; while we are here, polish a few
sentences, and mention the spif driver works on sun4u/sparc64.


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

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

Modified files:

Index: src/share/man/man4/spif.4
diff -u src/share/man/man4/spif.4:1.4 src/share/man/man4/spif.4:1.5
--- src/share/man/man4/spif.4:1.4	Sat Mar 15 11:40:38 2008
+++ src/share/man/man4/spif.4	Mon Dec  6 11:54:04 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: spif.4,v 1.4 2008/03/15 11:40:38 plunky Exp $
+.\ $NetBSD: spif.4,v 1.5 2010/12/06 11:54:04 hauke Exp $
 .\ $OpenBSD: spif.4,v 1.12 2003/11/09 16:06:07 jmc Exp $
 .\
 .\ Copyright (c) 1999 Jason L. Wright (ja...@thought.net)
@@ -32,18 +32,16 @@
 .Nm spif
 .Nd SBus (spiffy) Serial/Parallel Interface
 .Sh SYNOPSIS
-.Cd spif* at sbus? slot ? offset ? Pq sun4c/sun4m
-.Cd stty* at spif? Pq sun4c/sun4m
-.Cd sbpp* at spif? Pq sun4c/sun4m
+.Cd spif* at sbus? slot ? offset ? Pq sun4c/sun4m/sun4u
+.Cd stty* at spif? Pq sun4c/sun4m/sun4u
+.Cd sbpp* at spif? Pq sun4c/sun4m/sun4u
 .Sh DESCRIPTION
 The
 .Nm spif
 driver provides support for the Sun Serial/Parallel Interface card
-(Sun part number 501-1931)
-based around the
+(Sun part number 501-1931), which is based on the
 Cirrus Logic CD180 octal serial controller
-and the
-Cirrus Logic PPC2 parallel port controller.
+and the Cirrus Logic PPC2 parallel port controller.
 .Pp
 The device minor numbers for this driver are encoded as follows:
 .Bd -literal
@@ -67,10 +65,10 @@
 Each of the serial ports has an 8 byte FIFO for receive and transmit as
 well as automatic hardware (RTS/CTS) flow control.
 .Sh FILES
-.Bl -tag -width /dev/tty[jkl][0-7] -compact
-.It /dev/tty[jkl][0-7]
+.Bl -tag -width /dev/ttyS[0123][0-7] -compact
+.It /dev/ttyS[0123][0-7]
 Serial ports
-.It /dev/sbpp[0-3]
+.It /dev/bppS[0-3]
 Parallel ports
 .El
 .Sh DIAGNOSTICS
@@ -88,8 +86,10 @@
 .Sh HISTORY
 The
 .Nm spif
-driver was first supported in
+adapter was first supported in
 .Ox 2.5 .
+The driver was ported to
+.Nx 3.0 .
 .Sh AUTHORS
 .An -nosplit
 The driver was written by



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

2010-11-30 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Nov 30 16:05:56 UTC 2010

Modified Files:
src/sys/arch/mac68k/obio: iwm.s

Log Message:
Fix an embarassing tyop. gcc should run aspell over the comments...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/obio/iwm.s

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

Modified files:

Index: src/sys/arch/mac68k/obio/iwm.s
diff -u src/sys/arch/mac68k/obio/iwm.s:1.5 src/sys/arch/mac68k/obio/iwm.s:1.6
--- src/sys/arch/mac68k/obio/iwm.s:1.5	Mon May 26 17:58:37 2008
+++ src/sys/arch/mac68k/obio/iwm.s	Tue Nov 30 16:05:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: iwm.s,v 1.5 2008/05/26 17:58:37 hauke Exp $	*/
+/*	$NetBSD: iwm.s,v 1.6 2010/11/30 16:05:55 hauke Exp $	*/
 
 /*
  * Copyright (c) 1996-99 Hauke Fath.  All rights reserved.
@@ -514,7 +514,7 @@
 /*
  * iwmTrack00 -- move head to track 00 for drive calibration.
  *
- * XXX Drive makes funny noises during resore. Tune delay/retry count?
+ * XXX Drive makes funny noises during restore. Tune delay/retry count?
  *
  * Parameters:	-
  * Returns:	%d0		result code



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:48:20 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: SMALLRAM

Log Message:
One more page in the Big Book Of Things That We Can do Without --
COMPAT* options, puffs support.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mac68k/conf/SMALLRAM

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

Modified files:

Index: src/sys/arch/mac68k/conf/SMALLRAM
diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.36 src/sys/arch/mac68k/conf/SMALLRAM:1.37
--- src/sys/arch/mac68k/conf/SMALLRAM:1.36	Mon Dec  7 08:57:38 2009
+++ src/sys/arch/mac68k/conf/SMALLRAM	Wed Nov 24 13:48:20 2010
@@ -1,12 +1,12 @@
-#	$NetBSD: SMALLRAM,v 1.36 2009/12/07 08:57:38 pooka Exp $
+#	$NetBSD: SMALLRAM,v 1.37 2010/11/24 13:48:20 hauke Exp $
 #
 # This is an example of how to configure a small, efficient kernel for
 # a system with limited RAM. Even so it's capable of doing quite a
 # bit. The hypothetical system used for this example is a Macintosh
 # IIx or Macintosh IIcx with 8 MB of RAM and an 80 MB disk. One or
 # more DP5380- based NuBus Ethernet cards, onboard video and one or
-# more NuBus video cards are configured. Basic SLIP and PPP support is
-# available.
+# more NuBus video cards are configured. Basic SLIP and PPP support
+# as well as packet filtering are available.
 #
 # This configuration is suitable for experimenting with NetBSD as a
 # router with one or more Ethernet cards, and up to two PPP
@@ -38,7 +38,10 @@
 no options 	COMPAT_15
 no options 	COMPAT_16
 no options 	COMPAT_20
+no options 	COMPAT_30
+no options 	COMPAT_40
 no options 	COMPAT_43
+no options 	COMPAT_50
 
 no options 	COMPAT_AOUT_M68K
 no options 	EXEC_AOUT
@@ -53,6 +56,7 @@
 no file-system 	KERNFS
 no file-system 	NULLFS
 no file-system 	OVERLAY
+no file-system	PUFFS
 no file-system 	PROCFS
 no file-system 	UMAPFS
 no file-system 	UNION
@@ -127,4 +131,5 @@
 no pseudo-device	agr
 no pseudo-device	accf_data
 no pseudo-device	accf_http
+no pseudo-device	putter
 no pseudo-device	ksyms



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:53:34 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: INSTALL

Log Message:
Catch up on COMPAT* options -- it's been a while...


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mac68k/conf/INSTALL

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

Modified files:

Index: src/sys/arch/mac68k/conf/INSTALL
diff -u src/sys/arch/mac68k/conf/INSTALL:1.46 src/sys/arch/mac68k/conf/INSTALL:1.47
--- src/sys/arch/mac68k/conf/INSTALL:1.46	Tue Nov 23 11:14:01 2010
+++ src/sys/arch/mac68k/conf/INSTALL	Wed Nov 24 13:53:34 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.46 2010/11/23 11:14:01 hannken Exp $
+#	$NetBSD: INSTALL,v 1.47 2010/11/24 13:53:34 hauke Exp $
 #
 # INSTALL
 
@@ -48,6 +48,10 @@
 options 	COMPAT_14	# NetBSD 1.4,
 options 	COMPAT_15	# NetBSD 1.5,
 options 	COMPAT_16	# NetBSD 1.6,
+options 	COMPAT_20	# NetBSD 2.0,
+options 	COMPAT_30	# NetBSD 3.0,
+options 	COMPAT_40	# NetBSD 4.0,
+options 	COMPAT_50	# NetBSD 5.0 compatibility.
 options 	COMPAT_43	# and 4.3BSD
 options		COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:54:50 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: GENERIC

Log Message:
Consistency in commenting COMPAT_nn options.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/arch/mac68k/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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.198 src/sys/arch/mac68k/conf/GENERIC:1.199
--- src/sys/arch/mac68k/conf/GENERIC:1.198	Tue Nov 23 11:14:01 2010
+++ src/sys/arch/mac68k/conf/GENERIC	Wed Nov 24 13:54:49 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.198 2010/11/23 11:14:01 hannken Exp $
+# $NetBSD: GENERIC,v 1.199 2010/11/24 13:54:49 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.198 $
+#ident 		GENERIC-$Revision: 1.199 $
 
 maxusers	16		# estimated number of users
 
@@ -83,7 +83,7 @@
 options 	COMPAT_16	# NetBSD 1.6,
 options 	COMPAT_20	# NetBSD 2.0,
 options 	COMPAT_30	# NetBSD 3.0,
-options 	COMPAT_40	# NetBSD 4.0 compatibility.
+options 	COMPAT_40	# NetBSD 4.0,
 options 	COMPAT_50	# NetBSD 5.0 compatibility.
 options 	COMPAT_43	# and 4.3BSD
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.