CVS commit: src/share/man/man4

2019-05-09 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri May 10 05:59:47 UTC 2019

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

Log Message:
envsys(4): mention ioctl(2) commands left over from Nx 1.5/4.0 experimental API


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/share/man/man4/envsys.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/envsys.4
diff -u src/share/man/man4/envsys.4:1.53 src/share/man/man4/envsys.4:1.54
--- src/share/man/man4/envsys.4:1.53	Thu May 31 07:37:45 2018
+++ src/share/man/man4/envsys.4	Fri May 10 05:59:47 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: envsys.4,v 1.53 2018/05/31 07:37:45 wiz Exp $
+.\"	$NetBSD: envsys.4,v 1.54 2019/05/10 05:59:47 cnst Exp $
 .\"
 .\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -352,6 +352,23 @@ rfact (voltage sensors) or critical/warn
 .Er ENOTSUP
 will be returned.
 .El
+.Pp
+Additionally, the following
+.Xr ioctl 2
+commands are provided for compatibility purposes
+for applications written against the original experimental
+.Nm
+API available between
+.Nx 1.5
+and
+.Nx 4.0 ;
+they have been deprecated since
+.Nx 5.0 ,
+and may be removed at any time:
+.Bl -tag -width Ds
+.It Dv ENVSYS_GTREDATA Pq envsys_tre_data_t
+.It Dv ENVSYS_GTREINFO Pq envsys_basic_info_t
+.El
 .Sh NOTES
 When setting a critical/warning max or min limit with the
 .Dv ENVSYS_SETDICTIONARY



CVS commit: src/share/man/man4

2019-05-09 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Thu May  9 07:12:38 UTC 2019

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

Log Message:
bio(4): .In dev/biovar.h in SYNOPSIS; .Xr envsys 4 et al in both DESCR && SEE 
ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/bio.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/bio.4
diff -u src/share/man/man4/bio.4:1.17 src/share/man/man4/bio.4:1.18
--- src/share/man/man4/bio.4:1.17	Wed May  8 19:34:09 2019
+++ src/share/man/man4/bio.4	Thu May  9 07:12:38 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bio.4,v 1.17 2019/05/08 19:34:09 cnst Exp $
+.\"	$NetBSD: bio.4,v 1.18 2019/05/09 07:12:38 cnst Exp $
 .\"	$OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Niklas Hallqvist
@@ -28,7 +28,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 8, 2019
+.Dd May 9, 2019
 .Dt BIO 4
 .Os
 .Sh NAME
@@ -36,6 +36,8 @@
 .Nd Block IO ioctl tunnel pseudo-device
 .Sh SYNOPSIS
 .Cd "pseudo-device bio"
+.Pp
+.In dev/biovar.h
 .Sh DESCRIPTION
 The
 .Nm
@@ -182,14 +184,36 @@ extension of
 and is supported by
 .Xr arcmsr 4 .
 .El
+.Pp
+The
+.Xr bioctl 8
+utility can be used to perform the above controls from the userland.
+Additionally, since
+.Dv BIOCVOL
+volume status is normally duplicated into
+.Xr sysmon_envsys 9
+sensors of
+.Dv ENVSYS_DRIVE
+type, it is also available through
+.Xr envsys 4 ,
+and can be monitored with
+.Xr envstat 8
+and
+.Xr powerd 8 .
 .Sh FILES
-.Bl -tag -width /dev/bio -compact
+.Bl -tag -width Ds -compact
 .It Pa /dev/bio
 ioctl tunnel device
+.It Pa /etc/powerd/scripts/sensor_drive
+powerd script for drive sensors
 .El
 .Sh SEE ALSO
 .Xr ioctl 2 ,
-.Xr bioctl 8
+.Xr envsys 4 ,
+.Xr bioctl 8 ,
+.Xr envstat 8 ,
+.Xr powerd 8 ,
+.Xr sysmon_envsys 9
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2019-05-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 19:34:09 UTC 2019

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

Log Message:
bio(4): document the state of setstate more thoroughly


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/bio.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/bio.4
diff -u src/share/man/man4/bio.4:1.16 src/share/man/man4/bio.4:1.17
--- src/share/man/man4/bio.4:1.16	Wed May  8 07:41:23 2019
+++ src/share/man/man4/bio.4	Wed May  8 19:34:09 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bio.4,v 1.16 2019/05/08 07:41:23 wiz Exp $
+.\"	$NetBSD: bio.4,v 1.17 2019/05/08 19:34:09 cnst Exp $
 .\"	$OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Niklas Hallqvist
@@ -99,6 +99,10 @@ but doesn't require the disks to be in v
 applies to any physical disk connected to the controller.
 .Pp
 Note: this ioctl might not be supported on all hardware.
+It is a
+.Nx
+extension of
+.Nm .
 It is supported by
 .Xr arcmsr 4 ,
 .Xr ciss 4 ,
@@ -140,7 +144,8 @@ and
 .It Dv BIOCSETSTATE
 Alter the state of specified physical disk.
 Supported states are: create/remove hot-spare, create/remove pass through
-disk, start/stop consistency check in a volume, online disk and offline disk.
+disk, start/stop consistency check in a volume, online disk and offline disk,
+and a manual rebuild kick-off designation.
 .Pp
 Note: These options might not be supported on all hardware.
 Some of these options are supported by
@@ -148,13 +153,33 @@ Some of these options are supported by
 .Xr mfi 4 ,
 and
 .Xr mfii 4 .
+.Pp
+Online, offline and hotspare designations are supported by
+.Xr mfi 4
+and
+.Xr mfii 4 ,
+plus a rebuild designation is supported by
+.Xr mfii 4 ;
+all four of these state options are the original states from
+.Ox ,
+the other options, including hotspare unmarking, being
+.Nx
+extensions of
+.Nm .
+.Pp
+Hotspare, pass through and consistency check options are supported by
+.Xr arcmsr 4 .
 .It Dv BIOCVOLOPS
 For operations in volume sets.
 It's able to create and remove a volume
 set in a supported RAID controller.
 .Pp
 Note: this ioctl might not be supported on all hardware.
-It is supported by
+It is a
+.Nx
+extension of
+.Nm ,
+and is supported by
 .Xr arcmsr 4 .
 .El
 .Sh FILES



CVS commit: src/share/man/man4

2019-05-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 07:44:28 UTC 2019

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

Log Message:
cac(4): Xr bio(4) and friends, and mention when it was first introduced


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/cac.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/cac.4
diff -u src/share/man/man4/cac.4:1.13 src/share/man/man4/cac.4:1.14
--- src/share/man/man4/cac.4:1.13	Wed Apr 30 13:10:53 2008
+++ src/share/man/man4/cac.4	Wed May  8 07:44:28 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cac.4,v 1.13 2008/04/30 13:10:53 martin Exp $
+.\"	$NetBSD: cac.4,v 1.14 2019/05/08 07:44:28 cnst Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 17, 2000
+.Dd May 8, 2019
 .Dt CAC 4
 .Os
 .Sh NAME
@@ -45,6 +45,13 @@ controllers.
 Disk arrays are supported by the
 .Nm ld
 driver.
+Monitoring of volume status is supported through the
+.Xr bioctl 8
+and
+.Xr envstat 8
+utilities, as well as the
+.Xr powerd 8
+monitoring daemon.
 .Sh HARDWARE
 The
 .Nm
@@ -69,10 +76,21 @@ driver provides support for the followin
 .It Tn Compaq SMART-2SL
 .El
 .Sh SEE ALSO
+.Xr bio 4 ,
+.Xr envsys 4 ,
 .Xr intro 4 ,
-.Xr ld 4
+.Xr ld 4 ,
+.Xr bioctl 8 ,
+.Xr envstat 8 ,
+.Xr powerd 8
 .Sh HISTORY
 The
 .Nm cac
 driver first appeared in
 .Nx 1.5 .
+Support for volume monitoring through
+.Xr bio 4
+and
+.Xr envsys 4
+was added in
+.Nx 5.0 .



CVS commit: src/share/man/man4

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 06:57:18 UTC 2019

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

Log Message:
bio(4): document which commands are supported by which drivers;


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/bio.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/bio.4
diff -u src/share/man/man4/bio.4:1.14 src/share/man/man4/bio.4:1.15
--- src/share/man/man4/bio.4:1.14	Wed May  8 02:49:10 2019
+++ src/share/man/man4/bio.4	Wed May  8 06:57:18 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bio.4,v 1.14 2019/05/08 02:49:10 cnst Exp $
+.\"	$NetBSD: bio.4,v 1.15 2019/05/08 06:57:18 cnst Exp $
 .\"	$OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Niklas Hallqvist
@@ -28,7 +28,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 7, 2019
+.Dd May 8, 2019
 .Dt BIO 4
 .Os
 .Sh NAME
@@ -99,6 +99,14 @@ but doesn't require the disks to be in v
 applies to any physical disk connected to the controller.
 .Pp
 Note: this ioctl might not be supported on all hardware.
+It is supported by
+.Xr arcmsr 4 ,
+.Xr ciss 4 ,
+.Xr mpt 4 .
+It is also supported by
+.Xr cac 4 ,
+but handled exactly the same as
+.Em BIOCDISK .
 .It Dv BIOCVOL
 Retrieve detailed information for the specified volume.
 Information returned can include status, size, RAID level, number of disks,
@@ -109,6 +117,11 @@ Supported states are: disable alarm, ena
 test alarm.
 .Pp
 Note: These options might not be supported on all hardware.
+It is supported by
+.Xr arcmsr 4 ,
+.Xr mfi 4
+and
+.Xr mfii 4 .
 .It Dv BIOCBLINK
 Blink an LED of the specified physical disk.
 Supported blink states are: blink LED, unblink LED and blink alarm LED.
@@ -118,18 +131,30 @@ Note: This option is only supported if t
 .\" or
 .\" .Xr safte 4
 and the hardware supports hardware blinking.
+It is supported by
+.Xr ciss 4 ,
+.Xr mfi 4
+and 
+.Xr mfii 4 .
 .It Dv BIOCSETSTATE
 Alter the state of specified physical disk.
 Supported states are: create/remove hot-spare, create/remove pass through
 disk, start/stop consistency check in a volume, online disk and offline disk.
 .Pp
 Note: These options might not be supported on all hardware.
+Some of these options are supported by
+.Xr arcmsr 4 ,
+.Xr mfi 4
+and
+.Xr mfii 4 .
 .It Dv BIOCVOLOPS
 For operations in volume sets.
 It's able to create and remove a volume
 set in a supported RAID controller.
 .Pp
 Note: this ioctl might not be supported on all hardware.
+It is supported by
+.Xr arcmsr 4 .
 .El
 .Sh FILES
 .Bl -tag -width /dev/bio -compact



CVS commit: src/sys/dev/ic

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 06:32:01 UTC 2019

Modified Files:
src/sys/dev/ic: mpt_netbsd.c

Log Message:
mpt(4): remove ENOTTY / noop implementation of bio(4) setstate

* All other bio(4) drivers either do or don't implement each command.

* This changes the returned error code, but it does not seem to matter,
  as some bio(4) drivers always return ENOTTY in the default case, whilst
  others always return EINVAL (e.g., both cac(4) and ciss(4) for setstate).


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/mpt_netbsd.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/ic/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.35 src/sys/dev/ic/mpt_netbsd.c:1.36
--- src/sys/dev/ic/mpt_netbsd.c:1.35	Mon Feb  5 22:14:26 2018
+++ src/sys/dev/ic/mpt_netbsd.c	Wed May  8 06:32:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpt_netbsd.c,v 1.35 2018/02/05 22:14:26 mrg Exp $	*/
+/*	$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.35 2018/02/05 22:14:26 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $");
 
 #include "bio.h"
 
@@ -113,7 +113,6 @@ static int	mpt_bio_ioctl_inq(mpt_softc_t
 static int	mpt_bio_ioctl_vol(mpt_softc_t *, struct bioc_vol *);
 static int	mpt_bio_ioctl_disk(mpt_softc_t *, struct bioc_disk *);
 static int	mpt_bio_ioctl_disk_novol(mpt_softc_t *, struct bioc_disk *);
-static int	mpt_bio_ioctl_setstate(mpt_softc_t *, struct bioc_setstate *);
 #endif
 
 void
@@ -1781,9 +1780,6 @@ mpt_bio_ioctl(device_t dev, u_long cmd, 
 	case BIOCDISK:
 		error = mpt_bio_ioctl_disk(mpt, addr);
 		break;
-	case BIOCSETSTATE:
-		error = mpt_bio_ioctl_setstate(mpt, addr);
-		break;
 	default:
 		error = EINVAL;
 		break;
@@ -2069,11 +2065,5 @@ fail:
 	if (ioc2) free(ioc2, M_DEVBUF);
 	return EINVAL;
 }
-
-static int
-mpt_bio_ioctl_setstate(mpt_softc_t *mpt, struct bioc_setstate *bs)
-{
-	return ENOTTY;
-}
 #endif
 



CVS commit: src/sys/dev/ic

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 05:40:51 UTC 2019

Modified Files:
src/sys/dev/ic: cac.c ciss.c

Log Message:
bio(4) drivers: remove noop fallthrough-to-default bio(4) cmd cases

* Makes it easier to do code/feature analysis by not having
  extra noop code/symbols spattered around.

* Only an issue in cac(4) and ciss(4); other drivers don't do this.

* No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/ic/cac.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/ciss.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/ic/cac.c
diff -u src/sys/dev/ic/cac.c:1.59 src/sys/dev/ic/cac.c:1.60
--- src/sys/dev/ic/cac.c:1.59	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/cac.c	Wed May  8 05:40:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cac.c,v 1.59 2018/09/03 16:29:31 riastradh Exp $	*/
+/*	$NetBSD: cac.c,v 1.60 2019/05/08 05:40:51 cnst Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.59 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.60 2019/05/08 05:40:51 cnst Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bio.h"
@@ -642,9 +642,6 @@ cac_ioctl(device_t dev, u_long cmd, void
 		/* No disk information yet */
 		break;
 
-	case BIOCBLINK:
-	case BIOCALARM:
-	case BIOCSETSTATE:
 	default:
 		error = EINVAL;
 	}

Index: src/sys/dev/ic/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.39 src/sys/dev/ic/ciss.c:1.40
--- src/sys/dev/ic/ciss.c:1.39	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/ciss.c	Wed May  8 05:40:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $	*/
+/*	$NetBSD: ciss.c,v 1.40 2019/05/08 05:40:51 cnst Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.40 2019/05/08 05:40:51 cnst Exp $");
 
 #include "bio.h"
 
@@ -1390,8 +1390,6 @@ ciss_ioctl(device_t dev, u_long cmd, voi
 		}
 		break;
 
-	case BIOCALARM:
-	case BIOCSETSTATE:
 	default:
 		error = EINVAL;
 	}



CVS commit: src/sbin/bioctl

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 03:29:59 UTC 2019

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

Log Message:
bioctl(8): Xr ataraid(4), mpii(4) && mfii(4);


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/bioctl/bioctl.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/bioctl/bioctl.8
diff -u src/sbin/bioctl/bioctl.8:1.23 src/sbin/bioctl/bioctl.8:1.24
--- src/sbin/bioctl/bioctl.8:1.23	Mon Jul  3 21:33:41 2017
+++ src/sbin/bioctl/bioctl.8	Wed May  8 03:29:59 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bioctl.8,v 1.23 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: bioctl.8,v 1.24 2019/05/08 03:29:59 cnst Exp $
 .\"	$OpenBSD: bioctl.8,v 1.43 2007/03/20 06:12:11 jmc Exp $
 .\"
 .\" Copyright (c) 2007, 2008 Juan Romero Pardines
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 11, 2016
+.Dd May 7, 2019
 .Dt BIOCTL 8
 .Os
 .Sh NAME
@@ -145,11 +145,14 @@ To remove the volume 0 previously create
 .Pp
 .Dl $ bioctl arcmsr0 remove volume 0 0:15.0
 .Sh SEE ALSO
+.Xr ataraid 4 ,
 .Xr arcmsr 4 ,
 .Xr bio 4 ,
 .Xr cac 4 ,
 .Xr ciss 4 ,
 .Xr mfi 4 ,
+.Xr mfii 4 ,
+.Xr mpii 4 ,
 .Xr mpt 4
 .Sh HISTORY
 The



CVS commit: src/share/man/man4

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 03:12:48 UTC 2019

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

Log Message:
mpii(4): Xr bio(4) and mention first appearance in Nx;


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/mpii.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/mpii.4
diff -u src/share/man/man4/mpii.4:1.4 src/share/man/man4/mpii.4:1.5
--- src/share/man/man4/mpii.4:1.4	Tue Dec  4 08:02:14 2018
+++ src/share/man/man4/mpii.4	Wed May  8 03:12:48 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mpii.4,v 1.4 2018/12/04 08:02:14 wiz Exp $
+.\"	$NetBSD: mpii.4,v 1.5 2019/05/08 03:12:48 cnst Exp $
 .\"	OpenBSD: mpii.4,v 1.8 2010/10/01 12:27:36 mikeb Exp
 .\"
 .\" Copyright (c) 2010 Marco Peereboom 
@@ -16,7 +16,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd December 3, 2018
+.Dd May 7, 2019
 .Dt MPII 4
 .Os
 .Sh NAME
@@ -86,6 +86,7 @@ event will be sent to the
 .Pa /etc/powerd/scripts/sensor_drive
 script when such condition happens.
 .Sh SEE ALSO
+.Xr bio 4 ,
 .Xr intro 4 ,
 .Xr pci 4 ,
 .Xr scsi 4 ,
@@ -98,6 +99,9 @@ The
 .Nm
 driver first appeared in
 .Ox 4.7 .
+.Nx
+support was added in
+.Nx 6.0 .
 .Sh AUTHORS
 .An -nosplit
 The



CVS commit: src/share/man/man4

2019-05-07 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed May  8 02:49:10 UTC 2019

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

Log Message:
bio(4): enlist ataraid(4), mpii(4) and mfii(4) in bio(4);


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/bio.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/bio.4
diff -u src/share/man/man4/bio.4:1.13 src/share/man/man4/bio.4:1.14
--- src/share/man/man4/bio.4:1.13	Mon Jul  3 21:30:58 2017
+++ src/share/man/man4/bio.4	Wed May  8 02:49:10 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bio.4,v 1.13 2017/07/03 21:30:58 wiz Exp $
+.\"	$NetBSD: bio.4,v 1.14 2019/05/08 02:49:10 cnst Exp $
 .\"	$OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Niklas Hallqvist
@@ -28,7 +28,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd Sep 27, 2014
+.Dd May 7, 2019
 .Dt BIO 4
 .Os
 .Sh NAME
@@ -56,17 +56,23 @@ The following device drivers register wi
 .Nm
 for volume management:
 .Pp
-.Bl -tag -width ciss(4)XX -offset indent -compact
+.Bl -tag -width ataraid(4)XX -offset indent -compact
 .\" .It Xr ami 4
 .\" American Megatrends Inc. MegaRAID PATA/SATA/SCSI RAID controller
 .It Xr arcmsr 4
 Areca Technology Corporation SATA RAID controller
+.It Xr ataraid 4
+Software BIOS RAID
 .It Xr cac 4
 Compaq RAID array controller
 .It Xr ciss 4
 Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller
 .It Xr mfi 4
 LSI Logic & Dell MegaRAID SAS RAID controller
+.It Xr mfii 4
+LSI Logic MegaRAID SAS Fusion RAID controller
+.It Xr mpii 4
+LSI Logic Fusion-MPT Message Passing Interface II
 .It Xr mpt 4
 LSI Fusion-MPT RAID controller
 .El



CVS commit: src/doc

2010-03-18 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri Mar 19 04:19:28 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
document aiboost(4) removal and replacement with aibs(4) in doc/CHANGES


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1370 src/doc/CHANGES:1.1371
--- src/doc/CHANGES:1.1370	Sat Mar 13 16:35:08 2010
+++ src/doc/CHANGES	Fri Mar 19 04:19:28 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1370 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1371 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -567,3 +567,5 @@
 	openldap: Update to 2.4.21.  [lukem 20100308]
 	atari: Add support for the SMC Elite Ultra Ethernet with
 		the SMC_TT VME-ISA bridge. [tsutsui 20100313]
+	aibs(4): Remove aiboost(4) as obsolete and redundant
+		since the introduction of aibs(4).	[cnst 20100319]



CVS commit: src

2010-03-18 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri Mar 19 04:04:28 UTC 2010

Modified Files:
src/share/man/man4: Makefile acpi.4
src/sys/arch/i386/conf: ALL
src/sys/dev: DEVNAMES
src/sys/dev/acpi: files.acpi
src/usr.sbin/envstat: envstat.8
Removed Files:
src/share/man/man4: aiboost.4
src/sys/dev/acpi: aiboost.c

Log Message:
Remove aiboost(4) as obsolete and redundant since the introduction of aibs(4).

  http://mail-index.netbsd.org/tech-kern/2010/03/06/msg007458.html

Reviewed by , , , .


To generate a diff of this commit:
cvs rdiff -u -r1.511 -r1.512 src/share/man/man4/Makefile
cvs rdiff -u -r1.42 -r1.43 src/share/man/man4/acpi.4
cvs rdiff -u -r1.2 -r0 src/share/man/man4/aiboost.4
cvs rdiff -u -r1.249 -r1.250 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.258 -r1.259 src/sys/dev/DEVNAMES
cvs rdiff -u -r1.30 -r0 src/sys/dev/acpi/aiboost.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/files.acpi
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/envstat/envstat.8

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

Modified files:

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.511 src/share/man/man4/Makefile:1.512
--- src/share/man/man4/Makefile:1.511	Thu Mar 11 10:38:37 2010
+++ src/share/man/man4/Makefile	Fri Mar 19 04:04:27 2010
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.511 2010/03/11 10:38:37 enami Exp $
+#	$NetBSD: Makefile,v 1.512 2010/03/19 04:04:27 cnst Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \
 	adbbt.4 adbkbd.4 adbms.4 \
 	adc.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \
 	ahcisata.4 ahd.4 \
-	aiboost.4 aibs.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \
+	aibs.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \
 	amr.4 aps.4 \
 	an.4 arcmsr.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \
 	ath.4 atphy.4 atppc.4 attimer.4 atw.4 \
@@ -144,6 +144,7 @@
 MLINKS+=drm.4 viadrm.4
 
 MLINKS+=acpiec.4 acpiecdt.4
+MLINKS+=aibs.4 aiboost.4
 MLINKS+=ata.4 atabus.4
 MLINKS+=audio.4 audioctl.4
 MLINKS+=audio.4 mixer.4

Index: src/share/man/man4/acpi.4
diff -u src/share/man/man4/acpi.4:1.42 src/share/man/man4/acpi.4:1.43
--- src/share/man/man4/acpi.4:1.42	Sat Mar  6 06:25:51 2010
+++ src/share/man/man4/acpi.4	Fri Mar 19 04:04:27 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpi.4,v 1.42 2010/03/06 06:25:51 jruoho Exp $
+.\" $NetBSD: acpi.4,v 1.43 2010/03/19 04:04:27 cnst Exp $
 .\"
 .\" Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -41,7 +41,6 @@
 .Cd "acpilid*  at acpi?"
 .Cd "acpismbus* at acpi?"
 .Cd "acpitz*   at acpi?"
-.Cd "aiboost*  at acpi?"
 .Cd "aibs* at acpi?"
 .Cd "asus* at acpi?"
 .Cd "attimer*  at acpi?"
@@ -200,8 +199,6 @@
 .It acpitz
 .Tn ACPI
 thermal zones.
-.It aiboost
-ASUS AI Booster Hardware monitor.
 .It aibs
 ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor.
 .It asus
@@ -394,7 +391,6 @@
 .Xr acpilid 4 ,
 .Xr acpismbus 4 ,
 .Xr acpitz 4 ,
-.Xr aiboost 4 ,
 .Xr aibs 4 ,
 .Xr apm 4 ,
 .Xr attimer 4 ,

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.249 src/sys/arch/i386/conf/ALL:1.250
--- src/sys/arch/i386/conf/ALL:1.249	Sat Mar  6 21:12:04 2010
+++ src/sys/arch/i386/conf/ALL	Fri Mar 19 04:04:27 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.249 2010/03/06 21:12:04 plunky Exp $
+# $NetBSD: ALL,v 1.250 2010/03/19 04:04:27 cnst Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"ALL-$Revision: 1.249 $"
+#ident 		"ALL-$Revision: 1.250 $"
 
 maxusers	64		# estimated number of users
 
@@ -374,7 +374,6 @@
 acpiwmi*	at acpi?		# ACPI WMI Mapper
 
 # Mainboard devices
-aiboost*	at acpi?		# ASUS AI Booster Hardware Monitor
 aibs*		at acpi?		# ASUSTeK AI Booster hardware monitor
 asus*		at acpi?		# ASUS hotkeys
 attimer*	at acpi?		# AT Timer

Index: src/sys/dev/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.258 src/sys/dev/DEVNAMES:1.259
--- src/sys/dev/DEVNAMES:1.258	Thu Mar 11 10:38:37 2010
+++ src/sys/dev/DEVNAMES	Fri Mar 19 04:04:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.258 2010/03/11 10:38:37 enami Exp $
+#	$NetBSD: DEVNAMES,v 1.259 2010/03/19 04:04:27 cnst Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -61,7 +61,6 @@
 ahsc			amiga
 ahsc			amigappc
 ai			MI
-aiboost			MI
 aibs			MI
 aic			MI
 akbd			mac68k

Index: src/sys/dev/acpi/files.acpi
diff -u src/sys/dev/acpi/files.acpi:1.67 src/sys/dev/acpi/files.acpi:1.68
--- src/sys/dev/acpi/files.acpi:1.67	Tue Feb  9 03:19:51 2010
+++ src/sys/dev/acpi/files.acpi	Fri Mar 19 04:04:28 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.acpi,v 1.67 2010/02/09 03:19:51 cnst Exp $
+#	$NetBSD: files.acpi,v 1.68 2010/03

CVS commit: src/sys/dev/isa

2010-03-18 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri Mar 19 02:17:41 UTC 2010

Modified Files:
src/sys/dev/isa: wbsio.c

Log Message:
support W83667HG (0xa5) in wbsio(4); its hw mon is already supported by lm(4) 
as W83627DHG (0xc1)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/isa/wbsio.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/isa/wbsio.c
diff -u src/sys/dev/isa/wbsio.c:1.1 src/sys/dev/isa/wbsio.c:1.2
--- src/sys/dev/isa/wbsio.c:1.1	Sun Feb 21 05:16:29 2010
+++ src/sys/dev/isa/wbsio.c	Fri Mar 19 02:17:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wbsio.c,v 1.1 2010/02/21 05:16:29 cnst Exp $	*/
+/*	$NetBSD: wbsio.c,v 1.2 2010/03/19 02:17:41 cnst Exp $	*/
 /*	$OpenBSD: wbsio.c,v 1.5 2009/03/29 21:53:52 sthen Exp $	*/
 /*
  * Copyright (c) 2008 Mark Kettenis 
@@ -50,6 +50,7 @@
 #define WBSIO_ID_W83627DHG	0xa0
 #define WBSIO_ID_W83627SF	0x59
 #define WBSIO_ID_W83637HF	0x70
+#define WBSIO_ID_W83667HG	0xa5
 #define WBSIO_ID_W83697HF	0x60
 
 /* Logical Device Number (LDN) Assignments */
@@ -185,6 +186,9 @@
 	case WBSIO_ID_W83637HF:
 		desc = "W83637HF";
 		break;
+	case WBSIO_ID_W83667HG:
+		desc = "W83667HG";
+		break;
 	case WBSIO_ID_W83697HF:
 		desc = "W83697HF";
 		break;



CVS commit: src/doc

2010-02-20 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Sun Feb 21 05:21:25 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
mention wbsio(4) in doc/CHANGES


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1360 src/doc/CHANGES:1.1361
--- src/doc/CHANGES:1.1360	Thu Feb 11 14:10:22 2010
+++ src/doc/CHANGES	Sun Feb 21 05:21:25 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1360 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1361 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -552,3 +552,5 @@
 		OpenBSD. [msaitoh 20100209]
 	aibs(4): New driver for ASUSTeK AI Booster (ACPI ASOC ATK0110)
 		hardware monitor with limit support.	[cnst 20100209]
+	wbsio(4): New driver for Winbond Super I/O attachment of
+		lm(4) on any port.	[cnst 20100221]



CVS commit: src

2010-02-20 Thread Constantine A. Murenin
f/XEN3_DOM0:1.29
--- src/sys/arch/i386/conf/XEN3_DOM0:1.28	Mon Feb  8 21:45:32 2010
+++ src/sys/arch/i386/conf/XEN3_DOM0	Sun Feb 21 05:16:29 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.28 2010/02/08 21:45:32 pgoyette Exp $
+#	$NetBSD: XEN3_DOM0,v 1.29 2010/02/21 05:16:29 cnst Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -281,9 +281,14 @@
 #dbcool* at iic? addr 0x2D		# Tyan S2881
 #dbcool* at iic? addr 0x2E		# Tyan S2882-D
 
+# Winbond LPC Super I/O
+#wbsio*	at isa? port 0x2e
+#wbsio*	at isa? port 0x4e
+
 # LM7[89] and compatible hardware monitors
 # Use flags to select temp sensor type (see lm(4) man page for details)
 #lm0	at isa?	port 0x290 flags 0x0	# other common: 0x280, 0x310, 0xc00
+#lm*	at wbsio?
 
 # VIA VT82C686A/VT8231 Hardware Monitor and Power Management TImer
 #viaenv* 	at pci? dev ? function ?

Index: src/sys/dev/isa/files.isa
diff -u src/sys/dev/isa/files.isa:1.158 src/sys/dev/isa/files.isa:1.159
--- src/sys/dev/isa/files.isa:1.158	Tue Jan 19 12:41:41 2010
+++ src/sys/dev/isa/files.isa	Sun Feb 21 05:16:29 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.isa,v 1.158 2010/01/19 12:41:41 pooka Exp $
+#	$NetBSD: files.isa,v 1.159 2010/02/21 05:16:29 cnst Exp $
 #
 # Config file and device description for machine-independent ISA code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -451,9 +451,15 @@
 attach	smsc at isa with smsc
 file	dev/isa/smsc.c			smsc			needs-flag
 
+# Winbond LPC Super I/O
+device	wbsio {}
+attach	wbsio at isa
+file	dev/isa/wbsio.c			wbsio
+
 # LM78 temp/fanspeed monitor
 attach	lm at isa with lm_isa
-file	dev/isa/lm_isa.c		lm_isa
+attach	lm at wbsio with lm_wbsio
+file	dev/isa/lm_isa.c		lm_isa | lm_wbsio
 
 # iTE Super I/O with hardware monitor
 device	itesio: sysmon_envsys, sysmon_wdog
@@ -521,4 +527,3 @@
 # ISA PnP devices often use `device' declarations listed in this file.
 #
 include	"dev/isapnp/files.isapnp"
-

Index: src/sys/dev/isa/lm_isa.c
diff -u src/sys/dev/isa/lm_isa.c:1.22 src/sys/dev/isa/lm_isa.c:1.23
--- src/sys/dev/isa/lm_isa.c:1.22	Sun Oct 12 23:07:32 2008
+++ src/sys/dev/isa/lm_isa.c	Sun Feb 21 05:16:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lm_isa.c,v 1.22 2008/10/12 23:07:32 pgoyette Exp $ */
+/*	$NetBSD: lm_isa.c,v 1.23 2010/02/21 05:16:29 cnst Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lm_isa.c,v 1.22 2008/10/12 23:07:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm_isa.c,v 1.23 2010/02/21 05:16:29 cnst Exp $");
 
 #include 
 #include 
@@ -63,6 +63,9 @@
 CFATTACH_DECL_NEW(lm_isa, sizeof(struct lm_isa_softc),
 lm_isa_match, lm_isa_attach, lm_isa_detach, NULL);
 
+CFATTACH_DECL_NEW(lm_wbsio, sizeof(struct lm_isa_softc),
+lm_isa_match, lm_isa_attach, lm_isa_detach, NULL);
+
 int
 lm_isa_match(device_t parent, cfdata_t match, void *aux)
 {

Added files:

Index: src/share/man/man4/wbsio.4
diff -u /dev/null src/share/man/man4/wbsio.4:1.1
--- /dev/null	Sun Feb 21 05:16:30 2010
+++ src/share/man/man4/wbsio.4	Sun Feb 21 05:16:29 2010
@@ -0,0 +1,58 @@
+.\"	$NetBSD: wbsio.4,v 1.1 2010/02/21 05:16:29 cnst Exp $
+.\"	$OpenBSD: wbsio.4,v 1.2 2008/02/17 16:48:47 jmc Exp $
+.\"
+.\" Copyright (c) 2008 Mark Kettenis 
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd February 16, 2010
+.Dt WBSIO 4
+.Os
+.Sh NAME
+.Nm wbsio
+.Nd Winbond LPC Super I/O
+.Sh SYNOPSIS
+.Cd "wbsio* at isa? port 0x2e"
+.Cd "wbsio* at isa? port 0x4e"
+.Cd "lm* at wbsio?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Winbond LPC Super I/O ICs.
+Only the hardware monitoring function is currently supported.
+.Pp
+Support for the hardware monitor function is provided through the
+.Xr lm 4
+driver.
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr isa 4 ,
+.Xr lm 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.3 .
+.Nx
+support was added in
+.Nx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Mark Kettenis Aq kette...@openbsd.org .
+It was adapted to
+.Nx
+by
+.An Constantine A. Murenin Aq c...@netbsd.org .

Index: src/sys/dev/isa/wbsio.c
diff -u /dev/null src/sys/dev/isa/wbsio.c:1.1
--- /dev/null	S

CVS commit: src/share/man/man9

2010-02-17 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed Feb 17 22:04:14 UTC 2010

Modified Files:
src/share/man/man9: kprintf.9

Log Message:
grammar in kprintf.9 (s/or/and/ and add some commas);   ok wiz, pgoyette


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/kprintf.9

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

Modified files:

Index: src/share/man/man9/kprintf.9
diff -u src/share/man/man9/kprintf.9:1.28 src/share/man/man9/kprintf.9:1.29
--- src/share/man/man9/kprintf.9:1.28	Fri Sep  4 23:29:03 2009
+++ src/share/man/man9/kprintf.9	Wed Feb 17 22:04:14 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: kprintf.9,v 1.28 2009/09/04 23:29:03 apb Exp $
+.\" $NetBSD: kprintf.9,v 1.29 2010/02/17 22:04:14 cnst Exp $
 .\"
 .\" Copyright (c) 1998, 2002, 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -217,9 +217,10 @@
 which work like their counterparts without the suffixes, except that
 they take a
 .Ft device_t
-or
-.Ft struct ifnet *
-respectively as first argument and prefix the log message with the
+and
+.Ft struct ifnet * ,
+respectively, as first argument,
+and prefix the log message with the
 corresponding device or interface name.
 .Pp
 The



CVS commit: src/usr.sbin/envstat

2010-02-11 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri Feb 12 05:02:40 UTC 2010

Modified Files:
src/usr.sbin/envstat: envstat.c

Log Message:
remove the fourth (empty) column from the -T printouts; ok pgoyette


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/envstat/envstat.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.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.74 src/usr.sbin/envstat/envstat.c:1.75
--- src/usr.sbin/envstat/envstat.c:1.74	Tue Feb  9 05:32:51 2010
+++ src/usr.sbin/envstat/envstat.c	Fri Feb 12 05:02:40 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.74 2010/02/09 05:32:51 cnst Exp $ */
+/* $NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.74 2010/02/09 05:32:51 cnst Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $");
 #endif /* not lint */
 
 #include 
@@ -749,9 +749,14 @@
 
 	if (!sensors || (!header_passes && sensors) ||
 	(header_passes == 10 && sensors)) {
-		(void)printf("%s%*s  %9s %8s %8s %8s %8s %4s\n",
-		mydevname ? "" : "  ", (int)maxlen,
-		"", a, b, c, d, e, units);
+		if (statistics)
+			(void)printf("%s%*s  %9s %8s %8s %8s %6s\n",
+			mydevname ? "" : "  ", (int)maxlen,
+			"", a, b, c, d, units);
+		else
+			(void)printf("%s%*s  %9s %8s %8s %8s %8s %4s\n",
+			mydevname ? "" : "  ", (int)maxlen,
+			"", a, b, c, d, e, units);
 		if (sensors && header_passes == 10)
 			header_passes = 0;
 	}
@@ -838,7 +843,7 @@
 PRINTTEMP(stats->max);
 PRINTTEMP(stats->min);
 PRINTTEMP(stats->avg);
-ilen += 9;
+ilen += 2;
 			} else {
 PRINTTEMP(sensor->critmax_value);
 PRINTTEMP(sensor->warnmax_value);
@@ -859,7 +864,7 @@
 /* show statistics if flag set */
 (void)printf("%8u %8u %8u ",
 stats->max, stats->min, stats->avg);
-ilen += 9;
+ilen += 2;
 			} else {
 if (sensor->critmax_value) {
 	(void)printf("%*u ", (int)ilen,
@@ -974,7 +979,7 @@
 stats->max / 100.0,
 stats->min / 100.0,
 stats->avg / 100.0);
-ilen += 9;
+ilen += 2;
 			}
 
 			(void)printf("%*s", (int)ilen - 4, stype);



CVS commit: src/share/man/man4

2010-02-11 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Fri Feb 12 02:16:59 UTC 2010

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

Log Message:
envstat output is now so wide that it better be indented by only 2 instead of 6n


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/aibs.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/aibs.4
diff -u src/share/man/man4/aibs.4:1.4 src/share/man/man4/aibs.4:1.5
--- src/share/man/man4/aibs.4:1.4	Tue Feb  9 22:59:41 2010
+++ src/share/man/man4/aibs.4	Fri Feb 12 02:16:59 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: aibs.4,v 1.4 2010/02/09 22:59:41 wiz Exp $
+.\"	$NetBSD: aibs.4,v 1.5 2010/02/12 02:16:59 cnst Exp $
 .\"	$OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $
 .\"
 .\" Copyright (c) 2009 Constantine A. Murenin 
@@ -98,7 +98,7 @@
 and can be monitored with
 .Xr envstat 8 .
 For example, on an ASUS V3-P5G965 barebone:
-.Bd -literal -offset indent
+.Bd -literal -offset 2n
 $ envstat -d aibs0
  Current  CritMax  WarnMax  WarnMin  CritMin Unit
 Vcore Voltage: 1.1521.600  0.850V



CVS commit: src/sys/dev/acpi

2010-02-10 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Thu Feb 11 06:54:57 UTC 2010

Modified Files:
src/sys/dev/acpi: atk0110.c

Log Message:
remove unnecessary AIBS_MONLIMITS ifdefs, no binary change;  ok pgoyette


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/atk0110.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/acpi/atk0110.c
diff -u src/sys/dev/acpi/atk0110.c:1.3 src/sys/dev/acpi/atk0110.c:1.4
--- src/sys/dev/acpi/atk0110.c:1.3	Tue Feb  9 03:32:57 2010
+++ src/sys/dev/acpi/atk0110.c	Thu Feb 11 06:54:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: atk0110.c,v 1.3 2010/02/09 03:32:57 cnst Exp $	*/
+/*	$NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $	*/
 /*	$OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.3 2010/02/09 03:32:57 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $");
 
 #include 
 #include 
@@ -43,7 +43,6 @@
  */
 
 #define AIBS_MORE_SENSORS
-#define AIBS_MONLIMITS
 
 struct aibs_sensor {
 	envsys_data_t	s;
@@ -66,10 +65,8 @@
 static void aibs_attach(device_t, device_t, void *);
 static int aibs_detach(device_t, int);
 static void aibs_refresh(struct sysmon_envsys *, envsys_data_t *);
-#ifdef AIBS_MONLIMITS
 static void aibs_get_limits(struct sysmon_envsys *, envsys_data_t *,
 sysmon_envsys_lim_t *);
-#endif
 
 static void aibs_attach_sif(device_t, enum envsys_units);
 
@@ -109,9 +106,7 @@
 	sc->sc_sme->sme_name = device_xname(self);
 	sc->sc_sme->sme_cookie = sc;
 	sc->sc_sme->sme_refresh = aibs_refresh;
-#ifdef AIBS_MONLIMITS
 	sc->sc_sme->sme_get_limits = aibs_get_limits;
-#endif
 
 	aibs_attach_sif(self, ENVSYS_SVOLTS_DC);
 	aibs_attach_sif(self, ENVSYS_STEMP);
@@ -247,10 +242,8 @@
 		as[i].l = oi[2].Integer.Value;
 		as[i].h = oi[3].Integer.Value;
 		as[i].s.units = st;
-#ifdef AIBS_MONLIMITS
 		as[i].s.flags |= ENVSYS_FMONLIMITS;
 		as[i].s.monitor = true;
-#endif
 		aprint_verbose_dev(self, "%c%i: "
 		"0x%08"PRIx64" %20s %5"PRIi64" / %5"PRIi64"  "
 		"0x%"PRIx64"\n",
@@ -360,7 +353,6 @@
 	s->flags &= ~ENVSYS_FMONNOTSUPP;
 }
 
-#ifdef AIBS_MONLIMITS
 static void
 aibs_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata,
 sysmon_envsys_lim_t *limits)
@@ -420,4 +412,3 @@
 		break;
 	}
 }
-#endif /* AIBS_MONLIMITS */



CVS commit: src/doc

2010-02-09 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Wed Feb 10 01:40:25 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
mention aibs(4);  suggested: pgoyette;


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1357 src/doc/CHANGES:1.1358
--- src/doc/CHANGES:1.1357	Tue Feb  9 01:48:29 2010
+++ src/doc/CHANGES	Wed Feb 10 01:40:24 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1357 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1358 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -548,3 +548,5 @@
 		kern.mbuf.nmbclusters. [joerg 20100208]
 	mfi(4): Add support for LSI's newer (GEN2) RAID controller from
 		OpenBSD. [msaitoh 20100209]
+	aibs(4): New driver for ASUSTeK AI Booster (ACPI ASOC ATK0110)
+		hardware monitor with limit support.	[cnst 20100209]



CVS commit: src/share/man/man4

2010-02-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Tue Feb  9 07:32:09 UTC 2010

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

Log Message:
fix the example code to be closer to compilation and update for aibs(4)


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/share/man/man4/envsys.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/envsys.4
diff -u src/share/man/man4/envsys.4:1.45 src/share/man/man4/envsys.4:1.46
--- src/share/man/man4/envsys.4:1.45	Sat Dec 19 00:15:28 2009
+++ src/share/man/man4/envsys.4	Tue Feb  9 07:32:09 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: envsys.4,v 1.45 2009/12/19 00:15:28 snj Exp $
+.\"	$NetBSD: envsys.4,v 1.46 2010/02/09 07:32:09 cnst Exp $
 .\"
 .\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -353,7 +353,7 @@
 of
 .Ql sensor0
 in the
-.Ql aiboost0
+.Ql aibs0
 device with the
 .Dv ENVSYS_SETDICTIONARY
 .Xr ioctl 2 :
@@ -364,26 +364,26 @@
 	prop_dictionary_t global_dict, sensor_dict;
 	prop_array_t array;
 	prop_object_t obj;
-	int fd;
+	int fd, error;
 
 	global_dict = prop_dictionary_create();
 	sensor_dict = prop_dictionary_create();
 	array = prop_array_create();
 
-	if (!prop_dictionary_set(global_dict, "aiboost0", array))
+	if (!prop_dictionary_set(global_dict, "aibs0", array))
 		err(EINVAL, "prop_dictionary_set global");
 
 	obj = prop_string_create_cstring_nocopy("sensor0");
 	if (obj == NULL ||
-	!prop_dictionary_set(dict, "index", obj))
+	!prop_dictionary_set(sensor_dict, "index", obj))
 		err(EINVAL, "sensor index");
 
 	prop_object_release(obj);
 
 	/* new description */
-	obj = prop_string_create_cstring_nocopy("CPU temp");
+	obj = prop_string_create_cstring_nocopy("CPU core voltage");
 	if (obj == NULL ||
-	!prop_dictionary_set(dict, "description", obj))
+	!prop_dictionary_set(sensor_dict, "description", obj))
 		err(EINVAL, "new description");
 
 	prop_object_release(obj);
@@ -392,7 +392,7 @@
 		err(EINVAL, "prop_array_add");
 
 	if ((fd = open(_DEV_SYSMON, O_RDWR)) == \-1)
-		err(EXIT_FAILURE, "open")
+		err(EXIT_FAILURE, "open");
 
 	/* we are done, send the dictionary */
 	error = prop_dictionary_send_ioctl(global_dict,



CVS commit: src/share/man/man4

2010-02-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Tue Feb  9 05:37:25 UTC 2010

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

Log Message:
use the latest envstat in the example output for aibs(4)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/aibs.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/aibs.4
diff -u src/share/man/man4/aibs.4:1.1 src/share/man/man4/aibs.4:1.2
--- src/share/man/man4/aibs.4:1.1	Tue Feb  9 03:19:50 2010
+++ src/share/man/man4/aibs.4	Tue Feb  9 05:37:25 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: aibs.4,v 1.1 2010/02/09 03:19:50 cnst Exp $
+.\"	$NetBSD: aibs.4,v 1.2 2010/02/09 05:37:25 cnst Exp $
 .\"	$OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $
 .\"
 .\" Copyright (c) 2009 Constantine A. Murenin 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd December 30, 2009
+.Dd February 8, 2010
 .Dt AIBS 4
 .Os
 .Sh NAME
@@ -100,26 +100,15 @@
 For example, on an ASUS V3-P5G965 barebone:
 .Bd -literal -offset indent
 $ envstat -d aibs0
-  Current  CritMax  CritMin  CritCap Unit
-Vcore Voltage:  1.1521.6000.850 V
- +3.3 Voltage:  3.3123.6302.970 V
-   +5 Voltage:  5.0175.5004.500 V
-  +12 Voltage: 12.302   13.800   10.200 V
-  CPU Temperature: 24.000   95.000   degC
-   MB Temperature: 57.000   95.000   degC
-CPU FAN Speed:865 RPM
-CHASSIS FAN Speed:  0 RPM
-.Pp
-$ envstat -W -d aibs0
-  Current  WarnMax  WarnMin  WarnCap Unit
-Vcore Voltage:  1.152   V
- +3.3 Voltage:  3.312   V
-   +5 Voltage:  5.017   V
-  +12 Voltage: 12.302   V
-  CPU Temperature: 24.000   80.000   degC
-   MB Temperature: 57.000   60.000   degC
-CPU FAN Speed:865 7200  600   RPM
-CHASSIS FAN Speed:  0 7200  700   RPM
+ Current  CritMax  WarnMax  WarnMin  CritMin Unit
+Vcore Voltage: 1.1521.600  0.850V
+ +3.3 Voltage: 3.3123.630  2.970V
+   +5 Voltage: 5.0175.500  4.500V
+  +12 Voltage:12.302   13.800 10.200V
+  CPU Temperature:27.000   95.000   80.000   degC
+   MB Temperature:58.000   95.000   60.000   degC
+CPU FAN Speed:   878  7200  600   RPM
+CHASSIS FAN Speed: 0  7200  700   RPM
 .Ed
 .Pp
 Generally, sensors provided by the
@@ -230,6 +219,7 @@
 .Nx
 by
 .An Constantine A. Murenin Aq http://cnst.su/ ,
+Raouf Boutaba Research Group,
 David R. Cheriton School of Computer Science,
 University of Waterloo.
 .Pp



CVS commit: src/usr.sbin/envstat

2010-02-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Tue Feb  9 05:32:51 UTC 2010

Modified Files:
src/usr.sbin/envstat: envstat.c

Log Message:
fix a typo resulting in warn-max being shown in two columns (one time instead 
of crit-min); ok pgoyette


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/usr.sbin/envstat/envstat.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.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.73 src/usr.sbin/envstat/envstat.c:1.74
--- src/usr.sbin/envstat/envstat.c:1.73	Sat Jan 30 02:56:39 2010
+++ src/usr.sbin/envstat/envstat.c	Tue Feb  9 05:32:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.73 2010/01/30 02:56:39 pgoyette Exp $ */
+/* $NetBSD: envstat.c,v 1.74 2010/02/09 05:32:51 cnst Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.73 2010/01/30 02:56:39 pgoyette Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.74 2010/02/09 05:32:51 cnst Exp $");
 #endif /* not lint */
 
 #include 
@@ -843,7 +843,7 @@
 PRINTTEMP(sensor->critmax_value);
 PRINTTEMP(sensor->warnmax_value);
 PRINTTEMP(sensor->warnmin_value);
-PRINTTEMP(sensor->warnmax_value);
+PRINTTEMP(sensor->critmin_value);
 			}
 			(void)printf("%*s", (int)ilen - 4, stype);
 #undef PRINTTEMP



CVS commit: src/sys/dev/acpi

2010-02-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Tue Feb  9 03:32:57 UTC 2010

Modified Files:
src/sys/dev/acpi: atk0110.c

Log Message:
* s/misformed/malformed/;

* don't change .status to anything other than SVALID and SINVALID in refresh();

suggested by 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/atk0110.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/acpi/atk0110.c
diff -u src/sys/dev/acpi/atk0110.c:1.2 src/sys/dev/acpi/atk0110.c:1.3
--- src/sys/dev/acpi/atk0110.c:1.2	Tue Feb  9 03:26:44 2010
+++ src/sys/dev/acpi/atk0110.c	Tue Feb  9 03:32:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: atk0110.c,v 1.2 2010/02/09 03:26:44 cnst Exp $	*/
+/*	$NetBSD: atk0110.c,v 1.3 2010/02/09 03:32:57 cnst Exp $	*/
 /*	$OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.2 2010/02/09 03:26:44 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.3 2010/02/09 03:32:57 cnst Exp $");
 
 #include 
 #include 
@@ -188,7 +188,7 @@
 #ifdef AIBS_MORE_SENSORS
 		n = bp->Package.Count - 1;
 #endif
-		aprint_error_dev(self, "%s: misformed package: %i/%i"
+		aprint_error_dev(self, "%s: malformed package: %i/%i"
 		", assume %i\n", name, on, bp->Package.Count - 1, n);
 	}
 	if (n < 1) {
@@ -296,7 +296,6 @@
 	const char		*name;
 	struct aibs_sensor	*as;
 	ACPI_INTEGER		v;
-	ACPI_INTEGER		l, h;
 
 	switch (st) {
 	case ENVSYS_STEMP:
@@ -318,9 +317,6 @@
 		return;
 	for (i = 0; as[i].s.sensor != s->sensor; i++)
 		;
-	l = as[i].l;
-	h = as[i].h;
-
 	p.Type = ACPI_TYPE_INTEGER;
 	p.Integer.Value = as[i].i;
 	mp.Count = 1;
@@ -346,48 +342,22 @@
 		if (v == 0) {
 			s->state = ENVSYS_SINVALID;
 			s->flags |= ENVSYS_FMONNOTSUPP;
-		} else {
-			if (v > h)
-s->state = ENVSYS_SCRITOVER;
-			else if (v > l)
-s->state = ENVSYS_SWARNOVER;
-			else
-s->state = ENVSYS_SVALID;
-			s->flags &= ~ENVSYS_FMONNOTSUPP;
+			return;
 		}
 		break;
 	case ENVSYS_SFANRPM:
 		s->value_cur = v;
-		/* some boards have strange limits for fans */
-		if (l == 0) {
-			if (v < h)
-s->state = ENVSYS_SWARNUNDER;
-			else
-s->state = ENVSYS_SVALID;
-		} else {
-			if (l > v)
-s->state = ENVSYS_SWARNUNDER;
-			else if (v > h)
-s->state = ENVSYS_SWARNOVER;
-			else
-s->state = ENVSYS_SVALID;
-		}
-		s->flags &= ~ENVSYS_FMONNOTSUPP;
 		break;
 	case ENVSYS_SVOLTS_DC:
 		s->value_cur = v * 1000;
-		if (l > v)
-			s->state = ENVSYS_SCRITUNDER;
-		else if (v > h)
-			s->state = ENVSYS_SCRITOVER;
-		else
-			s->state = ENVSYS_SVALID;
-		s->flags &= ~ENVSYS_FMONNOTSUPP;
 		break;
 	default:
 		/* NOTREACHED */
 		break;
 	}
+	if (s->state == 0 || s->state == ENVSYS_SINVALID)
+		s->state = ENVSYS_SVALID;
+	s->flags &= ~ENVSYS_FMONNOTSUPP;
 }
 
 #ifdef AIBS_MONLIMITS



CVS commit: src/sys/dev/acpi

2010-02-08 Thread Constantine A. Murenin
Module Name:src
Committed By:   cnst
Date:   Tue Feb  9 03:26:45 UTC 2010

Modified Files:
src/sys/dev/acpi: atk0110.c

Log Message:
use ACPI_INTEGER and PRIx64, and check success of sensor_attach;suggested 
by jruoho (Jukka Ruohonen)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/atk0110.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/acpi/atk0110.c
diff -u src/sys/dev/acpi/atk0110.c:1.1 src/sys/dev/acpi/atk0110.c:1.2
--- src/sys/dev/acpi/atk0110.c:1.1	Tue Feb  9 03:19:51 2010
+++ src/sys/dev/acpi/atk0110.c	Tue Feb  9 03:26:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: atk0110.c,v 1.1 2010/02/09 03:19:51 cnst Exp $	*/
+/*	$NetBSD: atk0110.c,v 1.2 2010/02/09 03:26:44 cnst Exp $	*/
 /*	$OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.1 2010/02/09 03:19:51 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.2 2010/02/09 03:26:44 cnst Exp $");
 
 #include 
 #include 
@@ -47,9 +47,9 @@
 
 struct aibs_sensor {
 	envsys_data_t	s;
-	int64_t		i;
-	int64_t		l;
-	int64_t		h;
+	ACPI_INTEGER	i;
+	ACPI_INTEGER	l;
+	ACPI_INTEGER	h;
 };
 
 struct aibs_softc {
@@ -252,11 +252,14 @@
 		as[i].s.monitor = true;
 #endif
 		aprint_verbose_dev(self, "%c%i: "
-		"0x%08llx %20s %5lli / %5lli  0x%llx\n",
+		"0x%08"PRIx64" %20s %5"PRIi64" / %5"PRIi64"  "
+		"0x%"PRIx64"\n",
 		name[0], i,
-		as[i].i, as[i].s.desc, as[i].l, as[i].h,
+		as[i].i, as[i].s.desc, (int64_t)as[i].l, (int64_t)as[i].h,
 		oi[4].Integer.Value);
-		sysmon_envsys_sensor_attach(sc->sc_sme, &as[i].s);
+		if (sysmon_envsys_sensor_attach(sc->sc_sme, &as[i].s))
+			aprint_error_dev(self, "%c%i: unable to attach\n",
+			name[0], i);
 	}
 
 	AcpiOsFree(b.Pointer);
@@ -292,8 +295,8 @@
 	int			i;
 	const char		*name;
 	struct aibs_sensor	*as;
-	int64_t			v;
-	int64_t			l, h;
+	ACPI_INTEGER		v;
+	ACPI_INTEGER		l, h;
 
 	switch (st) {
 	case ENVSYS_STEMP:
@@ -398,7 +401,7 @@
 	enum envsys_units	st = s->units;
 	int			i;
 	struct aibs_sensor	*as;
-	int64_t			l, h;
+	ACPI_INTEGER		l, h;
 
 	switch (st) {
 	case ENVSYS_STEMP:



CVS commit: src

2010-02-08 Thread Constantine A. Murenin
diff -u /dev/null src/share/man/man4/aibs.4:1.1
--- /dev/null	Tue Feb  9 03:19:51 2010
+++ src/share/man/man4/aibs.4	Tue Feb  9 03:19:50 2010
@@ -0,0 +1,246 @@
+.\"	$NetBSD: aibs.4,v 1.1 2010/02/09 03:19:50 cnst Exp $
+.\"	$OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $
+.\"
+.\" Copyright (c) 2009 Constantine A. Murenin 
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd December 30, 2009
+.Dt AIBS 4
+.Os
+.Sh NAME
+.Nm aibs
+.Nd "ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor"
+.Sh SYNOPSIS
+.Cd "aibs* at acpi?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the voltage, temperature and fan sensors
+available through the
+.Tn ATK0110
+.Tn ASOC
+.Tn ACPI
+device
+on
+.Tn ASUSTeK
+motherboards.
+The number of sensors of each type,
+as well as the description of each sensor,
+varies according to the motherboard.
+.Pp
+The driver supports an arbitrary set of sensors,
+provides descriptions regarding what each sensor is used for,
+and reports whether each sensor is within the specifications
+as defined by the motherboard manufacturer through
+.Tn ACPI .
+.Pp
+The
+.Nm
+driver supports
+.Xr envsys 4
+sensor states as follows:
+.Bl -bullet
+.It
+Voltage sensors can have a state of
+.Dv valid ,
+.Dv critunder
+or
+.Dv critover ;
+temperature sensors can have a state of
+.Dv valid ,
+.Dv warnover ,
+.Dv critover
+or
+.Dv invalid ;
+and fan sensors can have a state of
+.Dv valid ,
+.Dv warnunder
+or
+.Dv warnover .
+.It
+Temperature sensors that have a reading of 0
+are marked
+.Dv invalid ,
+whereas all other sensors are always assumed valid.
+.It
+Voltage sensors have a lower and an upper limit
+.Dv ( critunder
+and
+.Dv critover ) ,
+temperature sensors have two upper limits
+.Dv ( warnover
+and
+.Dv critover ) ,
+whereas fan sensors may either have only the lower limit
+.Dv ( warnunder ) ,
+or, depending on the
+.Tn DSDT ,
+one lower and one upper limit
+.Dv ( warnunder
+and
+.Dv warnover ) .
+.El
+.Pp
+Sensor values and limits are made available through the
+.Xr envsys 4
+interface,
+and can be monitored with
+.Xr envstat 8 .
+For example, on an ASUS V3-P5G965 barebone:
+.Bd -literal -offset indent
+$ envstat -d aibs0
+  Current  CritMax  CritMin  CritCap Unit
+Vcore Voltage:  1.1521.6000.850 V
+ +3.3 Voltage:  3.3123.6302.970 V
+   +5 Voltage:  5.0175.5004.500 V
+  +12 Voltage: 12.302   13.800   10.200 V
+  CPU Temperature: 24.000   95.000   degC
+   MB Temperature: 57.000   95.000   degC
+CPU FAN Speed:865 RPM
+CHASSIS FAN Speed:  0 RPM
+.Pp
+$ envstat -W -d aibs0
+  Current  WarnMax  WarnMin  WarnCap Unit
+Vcore Voltage:  1.152   V
+ +3.3 Voltage:  3.312   V
+   +5 Voltage:  5.017   V
+  +12 Voltage: 12.302   V
+  CPU Temperature: 24.000   80.000   degC
+   MB Temperature: 57.000   60.000   degC
+CPU FAN Speed:865 7200  600   RPM
+CHASSIS FAN Speed:  0 7200  700   RPM
+.Ed
+.Pp
+Generally, sensors provided by the
+.Nm
+driver may also be supported by a variety of other drivers,
+such as
+.Xr lm 4
+or
+.Xr itesio 4 .
+The precise collection of
+.Nm
+sensors is comprised of the sensors
+specifically utilised in the motherboard
+design, which may be supported through
+a combination of one or more physical hardware monitoring chips.
+.Pp
+The
+.Nm
+driver, however, provides the following advantages
+when compared to the native hardware monitoring drivers:
+.Bl -bullet
+.It
+Sensor values from
+.Nm
+are expected to be more reliable.
+For example, voltage sensors in many hardware monitoring chips
+can only sense voltage from 0 to 2 or 4 volts, and the excessive
+voltage is removed by the resistors, which may vary wit