1.\" $NetBSD: ses.4,v 1.4 2002/01/21 17:56:20 wiz Exp $ 2.\" Copyright (c) 2001 The NetBSD Foundation, Inc. 3.\" All rights reserved 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Matthew Jacob. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. All advertising materials mentioning features or use of this software 17.\" must display the following acknowledgement: 18.\" This product includes software developed by the NetBSD 19.\" Foundation, Inc. and its contributors. 20.\" 4. Neither the name of The NetBSD Foundation nor the names of its 21.\" contributors may be used to endorse or promote products derived 22.\" from this software without specific prior written permission. 23.\" 24.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 25.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 28.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34.\" POSSIBILITY OF SUCH DAMAGE. 35.\" 36.\" 37.Dd March 21, 2001 38.Dt SES 4 39.Os 40.Sh NAME 41.Nm ses 42.Nd SCSI Environmental Services Driver 43.Sh SYNOPSIS 44.Cd ses* at scsibus? target ? lun ? 45.Sh DESCRIPTION 46The 47.Nm ses 48driver provides support for all 49.Tn SCSI 50devices of the environmental services class that are attached to the system 51through a supported 52.Tn SCSI 53Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible 54Fault Tolerant Enclosures). 55The environmental services class generally are enclosure devices that 56provide environmental information such as number of power supplies (and 57state), temperature, device slots, and so on. 58.Pp 59A 60.Tn SCSI 61Host 62adapter must also be separately configured into the system 63before a 64.Tn SCSI 65Environmental Services device can be configured. 66.Sh IOCTLS 67The following 68.Xr ioctl 2 69calls apply to 70.B SES 71devices. 72They are defined in the header file 73.Aq Pa scsi/ses.h 74(q.v.). 75.Pp 76.Bl -tag -width SESIOC_GETENCSTAT 77.It Dv SESIOC_GETNOBJ 78Used to find out how many 79.B SES 80objects are driven by this particular device instance. 81.It Dv SESIOC_GETOBJMAP 82Read, from the kernel, an array of SES objects which contains 83the object identifier, which sub-enclosure it is in, and the 84.B SES 85type of the object. 86.It Dv SESIOC_GETENCSTAT 87Get the overall enclosure status. 88.It Dv SESIOC_SETENCSTAT 89Set the overall enclosure status. 90.It Dv SESIOC_GETOBJSTAT 91Get the status of a particular object. 92.It Dv SESIOC_SETOBJSTAT 93Set the status of a particular object. 94.It Dv SESIOC_GETTEXT 95Get the associated help text for an object (not yet implemented). 96.B SES 97devices often have descriptive text for an object which can tell 98you things like location (e.g, "left power supply"). 99.It Dv SESIOC_INIT 100Initialize the enclosure. 101.El 102.Sh FILES 103.Bl -tag -width /dev/rsdXXXXX -compact 104.It Pa /dev/ses Ns Ar N 105The 106.Em Nth 107.Nm 108device. 109.El 110.Sh DIAGNOSTICS 111When the kernel is configured with 112.Tn DEBUG 113enabled, the first open to an SES device will spit out overall enclosure 114parameters to the console. 115.Sh SEE ALSO 116.Xr getencstat 8 , 117.Xr sesd 8 , 118.Xr setencstat 8 , 119.Xr setobjstat 8 120.Sh HISTORY 121The 122.Nm 123driver was written for the 124.Tn SCSI 125subsystem by Matthew Jacob. This is the functional equivalent of a similar 126driver available in Solaris, Release 7. 127