xref: /freebsd/share/man/man4/ses.4 (revision 4b66483fd8b6ec9417916966c646abfeac99278c)
161de7bccSMatt Jacob.\" Copyright (c) 2000
2eddc45e7SJeroen Ruigrok van der Werven.\"	Matthew Jacob <mjacob@FreeBSD.org>.  All rights reserved.
361de7bccSMatt Jacob.\"
461de7bccSMatt Jacob.\" Redistribution and use in source and binary forms, with or without
561de7bccSMatt Jacob.\" modification, are permitted provided that the following conditions
661de7bccSMatt Jacob.\" are met:
761de7bccSMatt Jacob.\" 1. Redistributions of source code must retain the above copyright
861de7bccSMatt Jacob.\"    notice, this list of conditions and the following disclaimer.
961de7bccSMatt Jacob.\"
1061de7bccSMatt Jacob.\" 2. Redistributions in binary form must reproduce the above copyright
1161de7bccSMatt Jacob.\"    notice, this list of conditions and the following disclaimer in the
1261de7bccSMatt Jacob.\"    documentation and/or other materials provided with the distribution.
1361de7bccSMatt Jacob.\"
1461de7bccSMatt Jacob.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1561de7bccSMatt Jacob.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1661de7bccSMatt Jacob.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1761de7bccSMatt Jacob.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1861de7bccSMatt Jacob.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1961de7bccSMatt Jacob.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2061de7bccSMatt Jacob.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2161de7bccSMatt Jacob.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2261de7bccSMatt Jacob.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2361de7bccSMatt Jacob.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2461de7bccSMatt Jacob.\" SUCH DAMAGE.
2561de7bccSMatt Jacob.\"
2661de7bccSMatt Jacob.\" $FreeBSD$
2761de7bccSMatt Jacob.\"
2861de7bccSMatt Jacob.Dd January 29, 2000
2961de7bccSMatt Jacob.Dt SES 4
3061de7bccSMatt Jacob.Os FreeBSD
3161de7bccSMatt Jacob.Sh NAME
3261de7bccSMatt Jacob.Nm ses
3361de7bccSMatt Jacob.Nd SCSI Environmental Services Driver
3461de7bccSMatt Jacob.Sh SYNOPSIS
3561de7bccSMatt Jacob.Cd device ses
3661de7bccSMatt Jacob.Sh DESCRIPTION
3761de7bccSMatt JacobThe
384b66483fSRuslan Ermilov.Nm
3961de7bccSMatt Jacobdriver provides support for all
4061de7bccSMatt Jacob.Tn SCSI
4161de7bccSMatt Jacobdevices of the environmental services class that are attached to the system
4261de7bccSMatt Jacobthrough a supported
4361de7bccSMatt Jacob.Tn SCSI
4461de7bccSMatt JacobHost Adapter, as well as emulated support for SAF-TE (SCSI Accessible
4561de7bccSMatt JacobFault Tolerant Enclosures).
4661de7bccSMatt JacobThe environmental services class generally are enclosure devices that
4761de7bccSMatt Jacobprovide environmental information such as number of power supplies (and
4861de7bccSMatt Jacobstate), temperature, device slots, and so on.
4961de7bccSMatt Jacob.Pp
5061de7bccSMatt JacobA
5161de7bccSMatt Jacob.Tn SCSI
5261de7bccSMatt JacobHost
5361de7bccSMatt Jacobadapter must also be separately configured into the system
5461de7bccSMatt Jacobbefore a
5561de7bccSMatt Jacob.Tn SCSI
5661de7bccSMatt JacobSCSI Environmental Services device can be configured.
5761de7bccSMatt Jacob.Sh KERNEL CONFIGURATION
5861de7bccSMatt JacobIt is only necessary to explicitly configure one
594b66483fSRuslan Ermilov.Nm
6061de7bccSMatt Jacobdevice; data structures are dynamically allocated as devices are found
6161de7bccSMatt Jacobon the
6261de7bccSMatt Jacob.Tn SCSI
6361de7bccSMatt Jacobbus.
6461de7bccSMatt Jacob.Pp
6561de7bccSMatt JacobA separate option,
6661de7bccSMatt Jacob.B SES_ENABLE_PASSTHROUGH ,
6761de7bccSMatt Jacobmay be specified to allow the
6861de7bccSMatt Jacob.Nm
6961de7bccSMatt Jacobdriver to perform functions on devices of other classes that claim to
7061de7bccSMatt Jacobalso support
7161de7bccSMatt Jacob.B SES
7261de7bccSMatt Jacobfunctionality.
7361de7bccSMatt Jacob.Sh IOCTLS
7461de7bccSMatt JacobThe following
7561de7bccSMatt Jacob.Xr ioctl 2
7661de7bccSMatt Jacobcalls apply to
7761de7bccSMatt Jacob.B SES
7861de7bccSMatt Jacobdevices.
7961de7bccSMatt JacobThey are defined in the header file
8061de7bccSMatt Jacob.Aq Pa cam/scsi/scsi_ses.h
8161de7bccSMatt Jacob(\fIq.v.\fR).
8261de7bccSMatt Jacob.Pp
8361de7bccSMatt Jacob.Bl -tag -width SESIOC_GETENCSTAT
8461de7bccSMatt Jacob.It Dv SESIOC_GETNOBJ
8561de7bccSMatt JacobUsed to find out how many
8661de7bccSMatt Jacob.B SES
8761de7bccSMatt Jacobobjects are driven by this particular device instance.
8861de7bccSMatt Jacob.It Dv SESIOC_GETOBJMAP
8961de7bccSMatt JacobRead, from the kernel, an array of SES objects which contains
9061de7bccSMatt Jacobthe object identifier, which subenclosure it is in, and the
9161de7bccSMatt Jacob.B SES
9261de7bccSMatt Jacobtype of the object.
9361de7bccSMatt Jacob.It Dv SESIOC_GETENCSTAT
9461de7bccSMatt JacobGet the overall enclosure status.
9561de7bccSMatt Jacob.It Dv SESIOC_SETENCSTAT
9661de7bccSMatt JacobSet the overall enclosure status.
9761de7bccSMatt Jacob.It Dv SESIOC_GETOBJSTAT
9861de7bccSMatt JacobGet the status of a particular object.
9961de7bccSMatt Jacob.It Dv SESIOC_SETOBJSTAT
10061de7bccSMatt JacobSet the status of a particular object.
10161de7bccSMatt Jacob.It Dv SESIOC_GETTEXT
10261de7bccSMatt JacobGet the associated help text for an object (not yet implemented).
10361de7bccSMatt Jacob.B SES
10461de7bccSMatt Jacobdevices often have descriptive text for an object which can tell
10561de7bccSMatt Jacobyou things like location (e.g, "left power supply").
10661de7bccSMatt Jacob.It Dv SESIOC_INIT
10761de7bccSMatt JacobInitialize the enclosure.
1081e8b4cd2SMike Pritchard.Sh EXAMPLE USAGE
10961de7bccSMatt JacobThe files contained in
11061de7bccSMatt Jacob.Aq Pa usr/share/examples/ses
11161de7bccSMatt Jacobshow simple mechanisms for how to use these interfaces, as well as a
11261de7bccSMatt Jacobvery stupid simple monitoring daemon.
11361de7bccSMatt Jacob.Sh FILES
11461de7bccSMatt Jacob.Bl -tag -width /dev/rsdXXXXX -compact
11561de7bccSMatt Jacob.It Pa /dev/ses Ns Ar N
1161e8b4cd2SMike PritchardThe
1171e8b4cd2SMike Pritchard.Em Nth
1181e8b4cd2SMike Pritchard.Nm SES
1191e8b4cd2SMike Pritcharddevice.
12061de7bccSMatt Jacob.Sh DIAGNOSTICS
12161de7bccSMatt JacobWhen the kernel is configured with
12261de7bccSMatt Jacob.Tn DEBUG
12361de7bccSMatt Jacobenabled, the first open to an SES device will spit out overall enclosure
12461de7bccSMatt Jacobparameters to the console.
12561de7bccSMatt Jacob.Sh HISTORY
12661de7bccSMatt JacobThe
12761de7bccSMatt Jacob.Nm
12861de7bccSMatt Jacobdriver was written for the
12961de7bccSMatt Jacob.Tn CAM
13061de7bccSMatt Jacob.Tn SCSI
1316d249eeeSSheldon Hearnsubsystem by Matthew Jacob.
1326d249eeeSSheldon HearnThis is a functional equivalent of a similar
1331e8b4cd2SMike Pritcharddriver available in Solaris, Release 7.
134