CVS commit: src/distrib/utils/sysinst/arch/sandpoint

2012-05-12 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat May 12 08:31:53 UTC 2012

Modified Files:
src/distrib/utils/sysinst/arch/sandpoint: md.c

Log Message:
Add KURO-BOX/T4 support to sysinst. Tested good with the target
machine.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/distrib/utils/sysinst/arch/sandpoint/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/distrib/utils/sysinst/arch/sandpoint/md.c
diff -u src/distrib/utils/sysinst/arch/sandpoint/md.c:1.39 src/distrib/utils/sysinst/arch/sandpoint/md.c:1.40
--- src/distrib/utils/sysinst/arch/sandpoint/md.c:1.39	Wed Jan 25 19:03:35 2012
+++ src/distrib/utils/sysinst/arch/sandpoint/md.c	Sat May 12 08:31:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.39 2012/01/25 19:03:35 phx Exp $ */
+/*	$NetBSD: md.c,v 1.40 2012/05/12 08:31:52 nisimura Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -77,7 +77,7 @@ md_init_set_status(int flags)
 	prodname = malloc(len);
 	sysctlbyname(mib_name, prodname, len, NULL, 0);
 
-	if (strcmp(prodname, kurobox) == 0)
+	if (strcmp(prodname, kurobox)==0 || strcmp(prodname, kurot4)==0)
 		/*
 		 * Running on a KuroBox family product, so enable KUROBOX
 		 */
@@ -175,7 +175,7 @@ md_cleanup_install(void)
 	 * Set the console speed in /etc/ttys depending on the board.
 	 * The default speed is 115200, which is patched when needed.
 	 */
-	if (strcmp(prodname, kurobox) == 0)
+	if (strcmp(prodname, kurobox)==0 || strcmp(prodname, kurot4)==0)
 		new_speed = 57600;			/* KuroBox */
 
 	else if (strcmp(prodname, dlink) == 0 ||	/* D-Link DSM-G600 */



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

2012-05-12 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat May 12 10:27:17 UTC 2012

Modified Files:
src/sys/arch/sandpoint/conf: KUROBOX

Log Message:
More no designations to reflect the target NAS hardware configuration.
Is provided as a reference for other NAS platforms.  Before-after
factor is the 91% fitness.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/conf/KUROBOX

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/sandpoint/conf/KUROBOX
diff -u src/sys/arch/sandpoint/conf/KUROBOX:1.4 src/sys/arch/sandpoint/conf/KUROBOX:1.5
--- src/sys/arch/sandpoint/conf/KUROBOX:1.4	Sat Jan 14 19:39:25 2012
+++ src/sys/arch/sandpoint/conf/KUROBOX	Sat May 12 10:27:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: KUROBOX,v 1.4 2012/01/14 19:39:25 phx Exp $
+#	$NetBSD: KUROBOX,v 1.5 2012/05/12 10:27:17 nisimura Exp $
 #
 # KuroBox/LinkStation support
 #
@@ -13,3 +13,23 @@ satmgr0 at eumb? unit 0			# satmgr at 0x
 
 no nhpow0
 no gpio*
+
+no s390rtc*
+no pcf8563rtc*
+no dsrtc*
+no strtc*
+no options 	STRTC_NO_WATCHDOG
+no options 	STRTC_NO_USERRAM
+
+no acardide*
+no viaide* 
+
+no ral*
+no skc*
+no sk*
+no stge*
+no wm*
+
+no inphy*
+no nsphy*
+no makphy*



CVS commit: src/sys/arch/sandpoint/sandpoint

2012-05-12 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat May 12 13:13:24 UTC 2012

Modified Files:
src/sys/arch/sandpoint/sandpoint: autoconf.c iic_eumb.c

Log Message:
Move I2C node adjustment stuff to autoconf.c from iic_eumb.c for
the ease of maintainance.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sandpoint/sandpoint/autoconf.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sandpoint/sandpoint/iic_eumb.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/sandpoint/sandpoint/autoconf.c
diff -u src/sys/arch/sandpoint/sandpoint/autoconf.c:1.24 src/sys/arch/sandpoint/sandpoint/autoconf.c:1.25
--- src/sys/arch/sandpoint/sandpoint/autoconf.c:1.24	Thu Jan 19 07:38:06 2012
+++ src/sys/arch/sandpoint/sandpoint/autoconf.c	Sat May 12 13:13:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.24 2012/01/19 07:38:06 nisimura Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.25 2012/05/12 13:13:24 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.24 2012/01/19 07:38:06 nisimura Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.25 2012/05/12 13:13:24 nisimura Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -54,6 +54,25 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v
 static struct btinfo_rootdevice *bi_rdev;
 static struct btinfo_bootpath *bi_path;
 static struct btinfo_net *bi_net;
+static struct btinfo_prodfamily *bi_pfam;
+
+struct i2cdev {
+	const char *family;
+	const char *name;
+	int addr;
+};
+
+static struct i2cdev rtcmodel[] = {
+{ dlink,strtc,  0x68 },
+{ iomega,   dsrtc,  0x68 },
+{ kurobox,  rs5c372rtc, 0x32 },
+{ kurot4,   rs5c372rtc, 0x32 },
+{ nhnas,pcf8563rtc, 0x51 },
+{ qnap, s390rtc,0x30 },
+{ synology, rs5c372rtc, 0x32 },
+};
+
+static void add_i2c_child_devices(device_t, const char *);
 
 /*
  * Determine i/o configuration for a machine.
@@ -65,6 +84,7 @@ cpu_configure(void)
 	bi_rdev = lookup_bootinfo(BTINFO_ROOTDEVICE);
 	bi_path = lookup_bootinfo(BTINFO_BOOTPATH);
 	bi_net = lookup_bootinfo(BTINFO_NET);
+	bi_pfam = lookup_bootinfo(BTINFO_PRODFAMILY);
 
 	if (config_rootfound(mainbus, NULL) == NULL)
 		panic(configure: mainbus not configured);
@@ -105,8 +125,7 @@ device_register(device_t dev, void *aux)
 			net_tag = pa-pa_tag;
 		}
 	}
-
-	if (device_class(dev) == DV_IFNET) {
+	else if (device_class(dev) == DV_IFNET) {
 		if (device_is_a(device_parent(dev), pci)) {
 			pa = aux;
 			tag = pa-pa_tag;
@@ -136,10 +155,41 @@ device_register(device_t dev, void *aux)
 			bi_net = NULL;	/* do it just once */
 		}
 	}
-	if (bi_rdev != NULL  device_class(dev) == DV_DISK
+	else if (bi_rdev != NULL  device_class(dev) == DV_DISK
 	 device_is_a(dev, bi_rdev-devname)
 	 device_unit(dev) == (bi_rdev-cookie  8)) {
 		booted_device = dev;
 		booted_partition = bi_rdev-cookie  0xff;
 	}
+	else if (device_is_a(dev, ociic)  bi_pfam != NULL) {
+		add_i2c_child_devices(dev, bi_pfam-name);
+	}
+}
+
+static void
+add_i2c_child_devices(device_t self, const char *family)
+{
+	struct i2cdev *rtc;
+	prop_dictionary_t pd;
+	prop_array_t pa;
+	int i;
+
+	rtc = NULL;
+	for (i = 0; i  (int)(sizeof(rtcmodel)/sizeof(rtcmodel[0])); i++) {
+		if (strcmp(family, rtcmodel[i].family) == 0) {
+			rtc = rtcmodel[i];
+			goto found;
+		}
+	}
+	return;
+
+ found:
+	pd = prop_dictionary_create();
+	pa = prop_array_create();
+	prop_dictionary_set_cstring_nocopy(pd, name, rtc-name);
+	prop_dictionary_set_uint32(pd, addr, rtc-addr);
+	prop_array_add(pa, pd);
+	prop_dictionary_set(device_properties(self), i2c-child-devices, pa);
+	prop_object_release(pd);
+	prop_object_release(pa);
 }

Index: src/sys/arch/sandpoint/sandpoint/iic_eumb.c
diff -u src/sys/arch/sandpoint/sandpoint/iic_eumb.c:1.18 src/sys/arch/sandpoint/sandpoint/iic_eumb.c:1.19
--- src/sys/arch/sandpoint/sandpoint/iic_eumb.c:1.18	Fri May 11 21:12:34 2012
+++ src/sys/arch/sandpoint/sandpoint/iic_eumb.c	Sat May 12 13:13:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: iic_eumb.c,v 1.18 2012/05/11 21:12:34 nisimura Exp $ */
+/* $NetBSD: iic_eumb.c,v 1.19 2012/05/12 13:13:24 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2010,2011 Frank Wille.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iic_eumb.c,v 1.18 2012/05/11 21:12:34 nisimura Exp $);
+__KERNEL_RCSID(0, $NetBSD: iic_eumb.c,v 1.19 2012/05/12 13:13:24 nisimura Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -37,7 +37,6 @@ __KERNEL_RCSID(0, $NetBSD: iic_eumb.c,v
 #include sys/bus.h
 #include dev/i2c/motoi2cvar.h
 #include sandpoint/sandpoint/eumbvar.h
-#include machine/bootinfo.h
 
 struct iic_eumb_softc {
 	device_t		sc_dev;
@@ -52,24 +51,6 @@ CFATTACH_DECL_NEW(iic_eumb, sizeof(struc
 
 static int found;
 
-struct i2cdev {
-	const char *family;
-	const char *name;
-	int addr;
-};
-

CVS commit: src/sys/dev/pci

2012-05-12 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sat May 12 13:40:21 UTC 2012

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

Log Message:
No longer wrongly advertise ad-hoc (IBSS) mode as being supported.

Fixes kern/46101

No objection from current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/if_wpi.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_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.50 src/sys/dev/pci/if_wpi.c:1.51
--- src/sys/dev/pci/if_wpi.c:1.50	Mon Jan 30 19:41:21 2012
+++ src/sys/dev/pci/if_wpi.c	Sat May 12 13:40:21 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpi.c,v 1.50 2012/01/30 19:41:21 drochner Exp $*/
+/*  $NetBSD: if_wpi.c,v 1.51 2012/05/12 13:40:21 khorben Exp $*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.50 2012/01/30 19:41:21 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.51 2012/05/12 13:40:21 khorben Exp $);
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -310,7 +310,9 @@ wpi_attach(device_t parent __unused, dev
 
 	/* set device capabilities */
 	ic-ic_caps =
+#ifdef netyet
 		IEEE80211_C_IBSS |   /* IBSS mode support */
+#endif
 		IEEE80211_C_WPA |/* 802.11i */
 		IEEE80211_C_MONITOR |/* monitor mode supported */
 		IEEE80211_C_TXPMGT | /* tx power management */



CVS commit: src/usr.bin/fold

2012-05-12 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May 12 14:42:12 UTC 2012

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

Log Message:
Clarify description of -s switch.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/fold/fold.1

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

Modified files:

Index: src/usr.bin/fold/fold.1
diff -u src/usr.bin/fold/fold.1:1.14 src/usr.bin/fold/fold.1:1.15
--- src/usr.bin/fold/fold.1:1.14	Thu Sep 15 09:40:57 2011
+++ src/usr.bin/fold/fold.1	Sat May 12 14:42:12 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fold.1,v 1.14 2011/09/15 09:40:57 wiz Exp $
+.\	$NetBSD: fold.1,v 1.15 2012/05/12 14:42:12 reed Exp $
 .\
 .\ Copyright (c) 1980, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)fold.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd September 15, 2011
+.Dd May 12, 2012
 .Dt FOLD 1
 .Os
 .Sh NAME
@@ -56,6 +56,8 @@ in bytes rather than column positions.
 Fold line after the last blank character within the first
 .Ar width
 column positions (or bytes).
+If a blank character does not exist within the width, then
+a longer line will still be split at the width.
 .It Fl w Ar width
 Specifies
 .Ar width



CVS commit: src/usr.bin

2012-05-12 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Sat May 12 14:52:58 UTC 2012

Modified Files:
src/usr.bin/colcrt: colcrt.1
src/usr.bin/colrm: colrm.1
src/usr.bin/expand: expand.1
src/usr.bin/fold: fold.1
src/usr.bin/last: last.1
src/usr.bin/mkstr: mkstr.1
src/usr.bin/soelim: soelim.1
src/usr.bin/tset: tset.1

Log Message:
Change or add history. I checked the 1bsd archives and this first
appeared in 1BSD (before it was known as 1BSD). I looked at code and
later sccs history to confirm.  In the case of rewritten code, we are
not consistent in manpages indicating that history.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/colcrt/colcrt.1
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/colrm/colrm.1
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/expand/expand.1
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/fold/fold.1
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/last/last.1
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/mkstr/mkstr.1
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/soelim/soelim.1
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/tset/tset.1

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

Modified files:

Index: src/usr.bin/colcrt/colcrt.1
diff -u src/usr.bin/colcrt/colcrt.1:1.8 src/usr.bin/colcrt/colcrt.1:1.9
--- src/usr.bin/colcrt/colcrt.1:1.8	Thu Aug  7 11:13:24 2003
+++ src/usr.bin/colcrt/colcrt.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: colcrt.1,v 1.8 2003/08/07 11:13:24 agc Exp $
+.\	$NetBSD: colcrt.1,v 1.9 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -83,7 +83,7 @@ tbl exum2.n \| nroff \-ms \| colcrt \-
 The
 .Nm
 command appeared in
-.Bx 3.0 .
+.Bx 1 .
 .Sh BUGS
 Should fold underlines onto blanks even with the
 .Ql Fl

Index: src/usr.bin/colrm/colrm.1
diff -u src/usr.bin/colrm/colrm.1:1.7 src/usr.bin/colrm/colrm.1:1.8
--- src/usr.bin/colrm/colrm.1:1.7	Thu Aug  7 11:13:25 2003
+++ src/usr.bin/colrm/colrm.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: colrm.1,v 1.7 2003/08/07 11:13:25 agc Exp $
+.\	$NetBSD: colrm.1,v 1.8 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -73,4 +73,6 @@ Backspace characters decrement the colum
 The
 .Nm
 command appeared in
-.Bx 3.0 .
+.Bx 1 .
+It was completely rewritten for
+.Bx 4.4 .

Index: src/usr.bin/expand/expand.1
diff -u src/usr.bin/expand/expand.1:1.11 src/usr.bin/expand/expand.1:1.12
--- src/usr.bin/expand/expand.1:1.11	Sun Dec 21 02:33:13 2008
+++ src/usr.bin/expand/expand.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: expand.1,v 1.11 2008/12/21 02:33:13 christos Exp $
+.\	$NetBSD: expand.1,v 1.12 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -84,4 +84,4 @@ resultant file by replacing two or more 
 The
 .Nm
 command appeared in
-.Bx 3.0 .
+.Bx 1 .

Index: src/usr.bin/fold/fold.1
diff -u src/usr.bin/fold/fold.1:1.15 src/usr.bin/fold/fold.1:1.16
--- src/usr.bin/fold/fold.1:1.15	Sat May 12 14:42:12 2012
+++ src/usr.bin/fold/fold.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fold.1,v 1.15 2012/05/12 14:42:12 reed Exp $
+.\	$NetBSD: fold.1,v 1.16 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -77,6 +77,11 @@ The
 .Nm
 utility conforms to
 .St -p1003.1-2008 .
+.Sh HISTORY
+The
+.Nm 
+utility appeared in
+.Bx 1 .
 .Sh BUGS
 If underlining is present it may be messed up by folding.
 .Pp

Index: src/usr.bin/last/last.1
diff -u src/usr.bin/last/last.1:1.19 src/usr.bin/last/last.1:1.20
--- src/usr.bin/last/last.1:1.19	Wed Oct 19 00:27:40 2011
+++ src/usr.bin/last/last.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: last.1,v 1.19 2011/10/19 00:27:40 reed Exp $
+.\	$NetBSD: last.1,v 1.20 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -158,4 +158,4 @@ login data base
 .Sh HISTORY
 .Nm
 appeared in
-.Bx 3.0 .
+.Bx 1 .

Index: src/usr.bin/mkstr/mkstr.1
diff -u src/usr.bin/mkstr/mkstr.1:1.11 src/usr.bin/mkstr/mkstr.1:1.12
--- src/usr.bin/mkstr/mkstr.1:1.11	Thu Aug  7 11:15:16 2003
+++ src/usr.bin/mkstr/mkstr.1	Sat May 12 14:52:57 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mkstr.1,v 1.11 2003/08/07 11:15:16 agc Exp $
+.\	$NetBSD: mkstr.1,v 1.12 2012/05/12 14:52:57 reed Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -122,7 +122,7 @@ oops:
 .Sh HISTORY
 .Nm
 appeared in
-.Bx 3.0 .
+.Bx 1 .
 .Sh BUGS
 .Nm
 was intended for the limited architecture of the PDP-11 family.

Index: src/usr.bin/soelim/soelim.1
diff -u src/usr.bin/soelim/soelim.1:1.9 src/usr.bin/soelim/soelim.1:1.10

CVS commit: src/usr.bin/fold

2012-05-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May 12 15:17:15 UTC 2012

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

Log Message:
Remove trailing whitespace.


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

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

Modified files:

Index: src/usr.bin/fold/fold.1
diff -u src/usr.bin/fold/fold.1:1.16 src/usr.bin/fold/fold.1:1.17
--- src/usr.bin/fold/fold.1:1.16	Sat May 12 14:52:57 2012
+++ src/usr.bin/fold/fold.1	Sat May 12 15:17:15 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fold.1,v 1.16 2012/05/12 14:52:57 reed Exp $
+.\	$NetBSD: fold.1,v 1.17 2012/05/12 15:17:15 wiz Exp $
 .\
 .\ Copyright (c) 1980, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -78,8 +78,8 @@ The
 utility conforms to
 .St -p1003.1-2008 .
 .Sh HISTORY
-The
-.Nm 
+The
+.Nm
 utility appeared in
 .Bx 1 .
 .Sh BUGS



CVS commit: src/sys/kern

2012-05-12 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat May 12 18:42:08 UTC 2012

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

Log Message:
remove a bogus optimization introduced in the previous change.
fixes hangs in the rump/rumpvfs/t_etfs test.


To generate a diff of this commit:
cvs rdiff -u -r1.434 -r1.435 src/sys/kern/vfs_subr.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/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.434 src/sys/kern/vfs_subr.c:1.435
--- src/sys/kern/vfs_subr.c:1.434	Sun Apr 29 22:54:00 2012
+++ src/sys/kern/vfs_subr.c	Sat May 12 18:42:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.434 2012/04/29 22:54:00 chs Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.435 2012/05/12 18:42:08 chs Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.434 2012/04/29 22:54:00 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.435 2012/05/12 18:42:08 chs Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -290,9 +290,6 @@ vflushbuf(struct vnode *vp, int flags)
 	mutex_enter(vp-v_interlock);
 	(void) VOP_PUTPAGES(vp, 0, 0, pflags);
 
-	if (LIST_EMPTY(vp-v_dirtyblkhd) || (flags  FSYNC_DATAONLY))
-		return 0;
-
 loop:
 	mutex_enter(bufcache_lock);
 	for (bp = LIST_FIRST(vp-v_dirtyblkhd); bp; bp = nbp) {



CVS commit: src/usr.bin/quota

2012-05-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat May 12 19:53:22 UTC 2012

Modified Files:
src/usr.bin/quota: quota.1 quota.c

Log Message:
Remove traces of -D option, which no longer does anything.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/quota/quota.1
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/quota/quota.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/quota/quota.1
diff -u src/usr.bin/quota/quota.1:1.17 src/usr.bin/quota/quota.1:1.18
--- src/usr.bin/quota/quota.1:1.17	Mon Feb 13 19:53:25 2012
+++ src/usr.bin/quota/quota.1	Sat May 12 19:53:21 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: quota.1,v 1.17 2012/02/13 19:53:25 dholland Exp $
+.\	$NetBSD: quota.1,v 1.18 2012/05/12 19:53:21 dholland Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -40,19 +40,19 @@
 .Nd display disk usage and limits
 .Sh SYNOPSIS
 .Nm
-.Op Fl Dghu
+.Op Fl ghu
 .Op Fl v | Fl q
 .Nm
-.Op Fl Dhu
+.Op Fl hu
 .Op Fl v | Fl q
 .Ar user
 .Nm
-.Op Fl Dgh
+.Op Fl gh
 .Op Fl v | Fl q
 .Ar group
 .Nm
 .Fl d
-.Op Fl Dgh
+.Op Fl gh
 .Op Fl v | Fl q
 .Sh DESCRIPTION
 .Nm
@@ -62,8 +62,6 @@ By default only the user quotas are prin
 Options:
 .Pp
 .Bl -tag -width Ds
-.It Fl D
-Debug: print plist sent to and received from kernel.
 .It Fl d
 Query the kernel for default user or group quota instead of a specific
 user or group.

Index: src/usr.bin/quota/quota.c
diff -u src/usr.bin/quota/quota.c:1.48 src/usr.bin/quota/quota.c:1.49
--- src/usr.bin/quota/quota.c:1.48	Sun Feb  5 14:14:44 2012
+++ src/usr.bin/quota/quota.c	Sat May 12 19:53:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota.c,v 1.48 2012/02/05 14:14:44 dholland Exp $	*/
+/*	$NetBSD: quota.c,v 1.49 2012/05/12 19:53:22 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)quota.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: quota.c,v 1.48 2012/02/05 14:14:44 dholland Exp $);
+__RCSID($NetBSD: quota.c,v 1.49 2012/05/12 19:53:22 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -104,7 +104,6 @@ static int	qflag = 0;
 static int	vflag = 0;
 static int	hflag = 0;
 static int	dflag = 0;
-static int	Dflag = 0;
 static uid_t	myuid;
 static int needheading;
 
@@ -117,7 +116,7 @@ main(int argc, char *argv[])
 	int ch;
 
 	myuid = getuid();
-	while ((ch = getopt(argc, argv, Ddhugvq)) != -1) {
+	while ((ch = getopt(argc, argv, dhugvq)) != -1) {
 		switch(ch) {
 		case 'g':
 			gflag++;
@@ -137,9 +136,6 @@ main(int argc, char *argv[])
 		case 'd':
 			dflag++;
 			break;
-		case 'D':
-			Dflag++;
-			break;
 		default:
 			usage();
 		}
@@ -525,7 +521,7 @@ getprivs(id_t id, int idtype)
 err(1, Out of memory);
 			}
 			if (getvfsquota(fst[i].f_mntonname, qup-qvs, version,
-			id, idtype, dflag, Dflag) != 1)
+			id, idtype, dflag, 0) != 1)
 continue;
 		} else
 			continue;



CVS commit: [jmcneill-usbmp] src/sys/dev/usb

2012-05-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat May 12 21:28:59 UTC 2012

Modified Files:
src/sys/dev/usb [jmcneill-usbmp]: ugen.c

Log Message:
port this to usbmp and also make it largely MPSAFE, but not yet enough
for D_MPSAFE to be added.  should be merge-ready now, but needs testing.


To generate a diff of this commit:
cvs rdiff -u -r1.114.2.4 -r1.114.2.5 src/sys/dev/usb/ugen.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/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.114.2.4 src/sys/dev/usb/ugen.c:1.114.2.5
--- src/sys/dev/usb/ugen.c:1.114.2.4	Sun Apr 29 23:05:01 2012
+++ src/sys/dev/usb/ugen.c	Sat May 12 21:28:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.114.2.4 2012/04/29 23:05:01 mrg Exp $	*/
+/*	$NetBSD: ugen.c,v 1.114.2.5 2012/05/12 21:28:58 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.114.2.4 2012/04/29 23:05:01 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ugen.c,v 1.114.2.5 2012/05/12 21:28:58 mrg Exp $);
 
 #include opt_compat_netbsd.h
 
@@ -108,12 +108,17 @@ struct ugen_endpoint {
 		void *dmabuf;
 		u_int16_t sizes[UGEN_NISORFRMS];
 	} isoreqs[UGEN_NISOREQS];
+	/* Keep this last; we don't overwrite it in ugen_set_config() */
+	kcondvar_t		cv;
 };
 
 struct ugen_softc {
 	device_t sc_dev;		/* base device */
 	usbd_device_handle sc_udev;
 
+	kmutex_t		sc_lock;
+	kcondvar_t		sc_detach_cv;
+
 	char sc_is_open[USB_MAX_ENDPOINTS];
 	struct ugen_endpoint sc_endpoints[USB_MAX_ENDPOINTS][2];
 #define OUT 0
@@ -201,6 +206,9 @@ ugen_attach(device_t parent, device_t se
 	aprint_naive(\n);
 	aprint_normal(\n);
 
+	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_USB);
+	cv_init(sc-sc_detach_cv, ugendet);
+
 	devinfop = usbd_devinfo_alloc(uaa-device, 0);
 	aprint_normal_dev(self, %s\n, devinfop);
 	usbd_devinfo_free(devinfop);
@@ -233,6 +241,7 @@ ugen_attach(device_t parent, device_t se
 
 			sce = sc-sc_endpoints[i][dir];
 			selinit(sce-rsel);
+			cv_init(sce-cv, ugensce);
 		}
 	}
 
@@ -256,7 +265,7 @@ ugen_set_config(struct ugen_softc *sc, i
 	u_int8_t niface, nendpt;
 	int ifaceno, endptno, endpt;
 	usbd_status err;
-	int dir;
+	int dir, i;
 
 	DPRINTFN(1,(ugen_set_config: %s to configno %d, sc=%p\n,
 		device_xname(sc-sc_dev), configno, sc));
@@ -284,7 +293,15 @@ ugen_set_config(struct ugen_softc *sc, i
 	err = usbd_interface_count(dev, niface);
 	if (err)
 		return (err);
-	memset(sc-sc_endpoints, 0, sizeof sc-sc_endpoints);
+
+	/* Clear out the old info, but leave the cv initialised. */
+	for (i = 0; i  USB_MAX_ENDPOINTS; i++) {
+		for (dir = OUT; dir = IN; dir++) {
+			sce = sc-sc_endpoints[i][dir];
+			memset(sce, 0, offsetof(struct ugen_endpoint, cv));
+		}
+	}
+
 	for (ifaceno = 0; ifaceno  niface; ifaceno++) {
 		DPRINTFN(1,(ugen_set_config: ifaceno %d\n, ifaceno));
 		err = usbd_device2interface_handle(dev, ifaceno, iface);
@@ -537,7 +554,6 @@ ugen_do_read(struct ugen_softc *sc, int 
 	u_int32_t n, tn;
 	usbd_xfer_handle xfer;
 	usbd_status err;
-	int s;
 	int error = 0;
 
 	DPRINTFN(5, (%s: ugenread: %d\n, device_xname(sc-sc_dev), endpt));
@@ -562,15 +578,17 @@ ugen_do_read(struct ugen_softc *sc, int 
 	switch (sce-edesc-bmAttributes  UE_XFERTYPE) {
 	case UE_INTERRUPT:
 		/* Block until activity occurred. */
-		s = splusb();
+		mutex_enter(sc-sc_lock);
 		while (sce-q.c_cc == 0) {
 			if (flag  IO_NDELAY) {
-splx(s);
+mutex_exit(sc-sc_lock);
 return (EWOULDBLOCK);
 			}
 			sce-state |= UGEN_ASLP;
 			DPRINTFN(5, (ugenread: sleep on %p\n, sce));
-			error = tsleep(sce, PZERO | PCATCH, ugenri, mstohz(sce-timeout));
+			/* ugenri */
+			error = cv_timedwait_sig(sce-cv, sc-sc_lock,
+			mstohz(sce-timeout));
 			DPRINTFN(5, (ugenread: woke, error=%d\n, error));
 			if (sc-sc_dying)
 error = EIO;
@@ -579,7 +597,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 break;
 			}
 		}
-		splx(s);
+		mutex_exit(sc-sc_lock);
 
 		/* Transfer as many chunks as possible. */
 		while (sce-q.c_cc  0  uio-uio_resid  0  !error) {
@@ -603,9 +621,9 @@ ugen_do_read(struct ugen_softc *sc, int 
  uio-uio_resid, sce-ra_wb_used));
 			xfer = sce-ra_wb_xfer;
 
-			s = splusb();
+			mutex_enter(sc-sc_lock);
 			if (sce-ra_wb_used == 0  flag  IO_NDELAY) {
-splx(s);
+mutex_exit(sc-sc_lock);
 return (EWOULDBLOCK);
 			}
 			while (uio-uio_resid  0  !error) {
@@ -614,8 +632,9 @@ ugen_do_read(struct ugen_softc *sc, int 
 	DPRINTFN(5,
 		 (ugenread: sleep on %p\n,
 		  sce));
-	error = tsleep(sce, PZERO | PCATCH,
-		   ugenrb, mstohz(sce-timeout));
+	/* ugenrb */
+	error = cv_timedwait_sig(sce-cv,
+	sc-sc_lock, mstohz(sce-timeout));
 	DPRINTFN(5,
 		 (ugenread: woke, error=%d\n,
 		  error));
@@ -667,7 +686,7 @@ ugen_do_read(struct ugen_softc *sc, int 
 		sce-state |= UGEN_RA_WB_STOP;
 }
 			}
-			

CVS commit: [jmcneill-usbmp] src/sys/dev/usb

2012-05-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat May 12 21:30:07 UTC 2012

Modified Files:
src/sys/dev/usb [jmcneill-usbmp]: TODO.usbmp

Log Message:
update:
- ugen is done, needs testing
- umass has an issue
- uhid is done
- 2 network cards have been tested


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/dev/usb/TODO.usbmp

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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.1.2.12 src/sys/dev/usb/TODO.usbmp:1.1.2.13
--- src/sys/dev/usb/TODO.usbmp:1.1.2.12	Mon Apr 30 02:41:02 2012
+++ src/sys/dev/usb/TODO.usbmp	Sat May 12 21:30:07 2012
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.1.2.12 2012/04/30 02:41:02 mrg Exp $
+$NetBSD: TODO.usbmp,v 1.1.2.13 2012/05/12 21:30:07 mrg Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -33,12 +33,12 @@ wake/wakeup conversion:
   ubt.c
   ucom.c
   ucycom.c
-  ugen.c
+  ugen.c		- done
   uhid.c		- done
   uhso.c
   uirda.c
   ulpt.c
-  umass.c		- done, partially done
+  umass.c		- done, partially done -- need to check umass_scsipi.c change
   urio.c
   uscanner.c
   usscanner.c
@@ -55,7 +55,7 @@ convert uhidev users to MPSAFE:
 
   uhid(4)
   - needs some locking here (not completely tested changes)
-  - MERGE ISSUE
+  - done
 
   ukbd(4)
   ums(4)
@@ -73,7 +73,7 @@ wakeup/tsleep drivers:
   - if_zyd.c
   - ucom.c
   - ucycom.c
-  - ugen.c
+  - ugen.c		- done
   - uirda.c
   - ulpt.c
   - umass_isdata.c
@@ -87,7 +87,7 @@ wakeup/tsleep drivers:
 missing D_MPSAFE drivers:
   - ucom
   - ucycom
-  - ugen
+  - ugen		- partially ready
   - uhso
   - ulpt
   - urio
@@ -154,7 +154,7 @@ driver testing:		STATUS
   - utoppy
   - uyap
   - udsbr
-  - ugen		MERGE ISSUE
+  - ugen		mostly done, testing is a MERGE ISSUE
   - pseye
   - uvideo
   - auvitek		? (must take kernel lock for scsipi)
@@ -178,6 +178,3 @@ ucom attachments:
   - ukyopon
   - u3g
   - ugensa
-
-
-test two metwork cards.  MERGE ISSUE



CVS commit: src/usr.sbin/repquota

2012-05-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May 12 21:42:38 UTC 2012

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

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/repquota/repquota.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/repquota/repquota.8
diff -u src/usr.sbin/repquota/repquota.8:1.16 src/usr.sbin/repquota/repquota.8:1.17
--- src/usr.sbin/repquota/repquota.8:1.16	Sat May 12 19:47:26 2012
+++ src/usr.sbin/repquota/repquota.8	Sat May 12 21:42:38 2012
@@ -29,9 +29,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)repquota.8	8.1 (Berkeley) 6/6/93
-.\	$NetBSD: repquota.8,v 1.16 2012/05/12 19:47:26 dholland Exp $
+.\	$NetBSD: repquota.8,v 1.17 2012/05/12 21:42:38 wiz Exp $
 .\
-.Dd February 13, 2012
+.Dd May 12, 2012
 .Dt REPQUOTA 8
 .Os
 .Sh NAME



CVS commit: src/usr.bin/quota

2012-05-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May 12 21:43:09 UTC 2012

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

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/quota/quota.1

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

Modified files:

Index: src/usr.bin/quota/quota.1
diff -u src/usr.bin/quota/quota.1:1.18 src/usr.bin/quota/quota.1:1.19
--- src/usr.bin/quota/quota.1:1.18	Sat May 12 19:53:21 2012
+++ src/usr.bin/quota/quota.1	Sat May 12 21:43:09 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: quota.1,v 1.18 2012/05/12 19:53:21 dholland Exp $
+.\	$NetBSD: quota.1,v 1.19 2012/05/12 21:43:09 wiz Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\	from: @(#)quota.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd March 6, 2011
+.Dd May 12, 2012
 .Dt QUOTA 1
 .Os
 .Sh NAME



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

2012-05-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 13 00:47:16 UTC 2012

Modified Files:
src/sys/arch/x68k/dev: fd.c

Log Message:
- use sys/bus.h rather than machine/bus.h
- no need to include uvm_extern.h
- include ioconf.h for struct cfdriver foo_cd


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/x68k/dev/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/x68k/dev/fd.c
diff -u src/sys/arch/x68k/dev/fd.c:1.98 src/sys/arch/x68k/dev/fd.c:1.99
--- src/sys/arch/x68k/dev/fd.c:1.98	Sat May 12 15:29:22 2012
+++ src/sys/arch/x68k/dev/fd.c	Sun May 13 00:47:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.98 2012/05/12 15:29:22 tsutsui Exp $	*/
+/*	$NetBSD: fd.c,v 1.99 2012/05/13 00:47:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,13 +64,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.98 2012/05/12 15:29:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.99 2012/05/13 00:47:16 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_m68k_arch.h
 
 #include sys/param.h
 #include sys/systm.h
+#include sys/bus.h
 #include sys/callout.h
 #include sys/kernel.h
 #include sys/conf.h
@@ -89,11 +90,8 @@ __KERNEL_RCSID(0, $NetBSD: fd.c,v 1.98 
 #include sys/fdio.h
 #include sys/rnd.h
 
-#include uvm/uvm_extern.h
-
 #include dev/cons.h
 
-#include machine/bus.h
 #include machine/cpu.h
 
 #include arch/x68k/dev/intiovar.h
@@ -102,6 +100,7 @@ __KERNEL_RCSID(0, $NetBSD: fd.c,v 1.98 
 #include arch/x68k/dev/opmvar.h /* for CT1 access */
 
 #include locators.h
+#include ioconf.h
 
 #ifdef FDDEBUG
 #define DPRINTF(x)  if (fddebug) printf x
@@ -168,8 +167,6 @@ int fdprint(void *, const char *);
 CFATTACH_DECL_NEW(fdc, sizeof(struct fdc_softc),
 fdcprobe, fdcattach, NULL, NULL);
 
-extern struct cfdriver fdc_cd;
-
 /*
  * Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how
  * we tell them apart.
@@ -252,8 +249,6 @@ void fdattach(device_t, device_t, void *
 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc),
 fdprobe, fdattach, NULL, NULL);
 
-extern struct cfdriver fd_cd;
-
 dev_type_open(fdopen);
 dev_type_close(fdclose);
 dev_type_read(fdread);



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

2012-05-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 13 03:00:41 UTC 2012

Modified Files:
src/sys/arch/x68k/dev: fd.c

Log Message:
KNF and cosmetics.  No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x68k/dev/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/x68k/dev/fd.c
diff -u src/sys/arch/x68k/dev/fd.c:1.99 src/sys/arch/x68k/dev/fd.c:1.100
--- src/sys/arch/x68k/dev/fd.c:1.99	Sun May 13 00:47:16 2012
+++ src/sys/arch/x68k/dev/fd.c	Sun May 13 03:00:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.99 2012/05/13 00:47:16 tsutsui Exp $	*/
+/*	$NetBSD: fd.c,v 1.100 2012/05/13 03:00:40 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.99 2012/05/13 00:47:16 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.100 2012/05/13 03:00:40 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_m68k_arch.h
@@ -144,7 +144,7 @@ struct fdc_softc {
 
 	bus_dma_tag_t sc_dmat;		/* intio DMA tag */
 	bus_dmamap_t sc_dmamap;		/* DMA map */
-	u_int8_t *sc_addr;			/* physical address */
+	uint8_t *sc_addr;		/* physical address */
 	struct dmac_channel_stat *sc_dmachan; /* intio DMA channel */
 	struct dmac_dma_xfer *sc_xfer;	/* DMA transfer */
 	int sc_read;
@@ -153,7 +153,7 @@ struct fdc_softc {
 	TAILQ_HEAD(drivehead, fd_softc) sc_drives;
 	enum fdc_state sc_state;
 	int sc_errors;			/* number of retries so far */
-	u_char sc_status[7];		/* copy of registers */
+	uint8_t sc_status[7];		/* copy of registers */
 } fdc_softc;
 
 int fdcintr(void *);
@@ -233,8 +233,8 @@ struct fd_softc {
 	int sc_ops;		/* I/O ops since last switch */
 	struct bufq_state *sc_q;/* pending I/O requests */
 	int sc_active;		/* number of active I/O operations */
-	u_char *sc_copybuf;	/* for secsize =3 */
-	u_char sc_part;		/* for secsize =3 */
+	uint8_t *sc_copybuf;	/* for secsize =3 */
+	uint8_t sc_part;	/* for secsize =3 */
 #define	SEC_P10	0x02		/* first part */
 #define	SEC_P01	0x01		/* second part */
 #define	SEC_P11	0x03		/* both part */
@@ -275,7 +275,7 @@ void fd_motor_off(void *);
 void fd_motor_on(void *);
 #endif
 int fdcresult(struct fdc_softc *);
-int out_fdc(bus_space_tag_t, bus_space_handle_t, u_char);
+int out_fdc(bus_space_tag_t, bus_space_handle_t, uint8_t);
 void fdcstart(struct fdc_softc *);
 void fdcstatus(device_t, int, const char *);
 void fdctimeout(void *);
@@ -300,16 +300,16 @@ fdc_dmastart(struct fdc_softc *fdc, int 
 	int error;
 
 	DPRINTF((fdc_dmastart: %s, addr = %p, count = %ld\n,
-		 read ? read : write, (void *) addr, count));
+	read ? read : write, (void *)addr, count));
 
 	error = bus_dmamap_load(fdc-sc_dmat, fdc-sc_dmamap, addr, count,
-0, BUS_DMA_NOWAIT);
+	0, BUS_DMA_NOWAIT);
 	if (error) {
-		panic (fdc_dmastart: cannot load dmamap);
+		panic(fdc_dmastart: cannot load dmamap);
 	}
 
 	bus_dmamap_sync(fdc-sc_dmat, fdc-sc_dmamap, 0, count,
-			read?BUS_DMASYNC_PREREAD:BUS_DMASYNC_PREWRITE);
+	read ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
 
 	/*
 	 * Note 1:
@@ -324,13 +324,10 @@ fdc_dmastart(struct fdc_softc *fdc, int 
 	 * XXX: No proper API to get DMA address of FDC register for DMAC.
 	 */
 	fdc-sc_xfer = dmac_prepare_xfer(fdc-sc_dmachan, fdc-sc_dmat,
-	 fdc-sc_dmamap,
-	 (read?
-	  DMAC_OCR_DIR_DTM:DMAC_OCR_DIR_MTD),
-	 (DMAC_SCR_MAC_COUNT_UP|
-	  DMAC_SCR_DAC_NO_COUNT),
-	 (u_int8_t*) (fdc-sc_addr +
-		  fddata * 2 + 1));
+	fdc-sc_dmamap,
+	read ? DMAC_OCR_DIR_DTM : DMAC_OCR_DIR_MTD,
+	DMAC_SCR_MAC_COUNT_UP | DMAC_SCR_DAC_NO_COUNT,
+	fdc-sc_addr + fddata * 2 + 1);
 
 	fdc-sc_read = read;
 	dmac_start_xfer(fdc-sc_dmachan-ch_softc, fdc-sc_xfer);
@@ -353,6 +350,7 @@ fdcdmaintr(void *arg)
 static int
 fdcdmaerrintr(void *dummy)
 {
+
 	DPRINTF((fdcdmaerrintr\n));
 
 	return 0;
@@ -380,7 +378,7 @@ fdcprobe(device_t parent, cfdata_t cf, v
 		return 0;
 
 	ia-ia_size = 0x2000;
-	if (intio_map_allocate_region (parent, ia, INTIO_MAP_TESTONLY))
+	if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
 		return 0;
 
 	/* builtin device; always there */
@@ -407,7 +405,7 @@ fdprint(void *aux, const char *fdc)
 {
 	struct fdc_attach_args *fa = aux;
 
-	if (!fdc)
+	if (fdc == NULL)
 		aprint_normal( drive %d, fa-fa_drive);
 	return QUIET;
 }
@@ -441,18 +439,16 @@ fdcattach(device_t parent, device_t self
 
 	/* Initialize DMAC channel */
 	fdc-sc_dmachan = dmac_alloc_channel(parent, ia-ia_dma, fdc,
-	 ia-ia_dmaintr, fdcdmaintr, fdc,
-	 ia-ia_dmaintr+1, fdcdmaerrintr,
-	 fdc);
+	ia-ia_dmaintr, fdcdmaintr, fdc,
+	ia-ia_dmaintr + 1, fdcdmaerrintr, fdc);
 	if (bus_dmamap_create(fdc-sc_dmat, FDC_MAXIOSIZE, 1, DMAC_MAXSEGSZ,
-			  0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
-			  fdc-sc_dmamap)) {
+	0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW,