2000-01-29 22:04:59 +00:00
|
|
|
.\" Copyright (c) 2000
|
2000-10-26 15:30:44 +00:00
|
|
|
.\" Matthew Jacob <mjacob@FreeBSD.org>. All rights reserved.
|
2000-01-29 22:04:59 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\"
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2019-11-18 14:12:33 +00:00
|
|
|
.Dd November 12, 2019
|
2000-01-29 22:04:59 +00:00
|
|
|
.Dt SES 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
2000-01-29 22:04:59 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ses
|
2001-04-18 15:54:10 +00:00
|
|
|
.Nd SCSI Environmental Services driver
|
2000-01-29 22:04:59 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd device ses
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
2000-01-29 22:04:59 +00:00
|
|
|
driver provides support for all
|
|
|
|
.Tn SCSI
|
|
|
|
devices of the environmental services class that are attached to the system
|
|
|
|
through a supported
|
|
|
|
.Tn SCSI
|
|
|
|
Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible
|
|
|
|
Fault Tolerant Enclosures).
|
|
|
|
The environmental services class generally are enclosure devices that
|
|
|
|
provide environmental information such as number of power supplies (and
|
|
|
|
state), temperature, device slots, and so on.
|
|
|
|
.Pp
|
|
|
|
A
|
|
|
|
.Tn SCSI
|
|
|
|
Host
|
|
|
|
adapter must also be separately configured into the system
|
|
|
|
before a
|
|
|
|
.Tn SCSI
|
2001-07-13 20:11:43 +00:00
|
|
|
Environmental Services device can be configured.
|
2000-01-29 22:04:59 +00:00
|
|
|
.Sh KERNEL CONFIGURATION
|
|
|
|
It is only necessary to explicitly configure one
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
2000-01-29 22:04:59 +00:00
|
|
|
device; data structures are dynamically allocated as devices are found
|
|
|
|
on the
|
|
|
|
.Tn SCSI
|
|
|
|
bus.
|
|
|
|
.Pp
|
|
|
|
A separate option,
|
2000-12-29 09:18:45 +00:00
|
|
|
.Va SES_ENABLE_PASSTHROUGH ,
|
2000-01-29 22:04:59 +00:00
|
|
|
may be specified to allow the
|
|
|
|
.Nm
|
|
|
|
driver to perform functions on devices of other classes that claim to
|
|
|
|
also support
|
2000-12-29 09:18:45 +00:00
|
|
|
.Nm
|
2000-01-29 22:04:59 +00:00
|
|
|
functionality.
|
|
|
|
.Sh IOCTLS
|
|
|
|
The following
|
|
|
|
.Xr ioctl 2
|
|
|
|
calls apply to
|
2000-12-29 09:18:45 +00:00
|
|
|
.Nm
|
2000-01-29 22:04:59 +00:00
|
|
|
devices.
|
|
|
|
They are defined in the header file
|
2019-11-18 14:12:33 +00:00
|
|
|
.In cam/scsi/scsi_enc.h
|
2000-01-29 22:04:59 +00:00
|
|
|
(\fIq.v.\fR).
|
2019-11-18 14:12:33 +00:00
|
|
|
.Bl -tag -width ENCIOC_GETENCSTAT
|
|
|
|
.It Dv ENCIOC_GETNELM
|
2000-01-29 22:04:59 +00:00
|
|
|
Used to find out how many
|
2000-12-29 09:18:45 +00:00
|
|
|
.Nm
|
2019-11-18 14:12:33 +00:00
|
|
|
elements are driven by this particular device instance.
|
|
|
|
.It Dv ENCIOC_GETELMMAP
|
|
|
|
Read, from the kernel, an array of SES elements which contains
|
|
|
|
the element identifier, which subenclosure it is in, and the
|
2000-12-29 09:18:45 +00:00
|
|
|
.Nm
|
2019-11-18 14:12:33 +00:00
|
|
|
type of the element.
|
|
|
|
.It Dv ENCIOC_GETENCSTAT
|
2000-01-29 22:04:59 +00:00
|
|
|
Get the overall enclosure status.
|
2019-11-18 14:12:33 +00:00
|
|
|
.It Dv ENCIOC_SETENCSTAT
|
2000-01-29 22:04:59 +00:00
|
|
|
Set the overall enclosure status.
|
2019-11-18 14:12:33 +00:00
|
|
|
.It Dv ENCIOC_GETELMSTAT
|
|
|
|
Get the status of a particular element.
|
|
|
|
.It Dv ENCIOC_SETELMSTAT
|
|
|
|
Set the status of a particular element.
|
|
|
|
.It Dv ENCIOC_GETTEXT
|
|
|
|
Get the associated help text for an element (not yet implemented).
|
2000-12-29 09:18:45 +00:00
|
|
|
.Nm
|
2019-11-18 14:12:33 +00:00
|
|
|
devices often have descriptive text for an element which can tell
|
2012-05-12 03:25:46 +00:00
|
|
|
you things like location (e.g., "left power supply").
|
2019-11-18 14:12:33 +00:00
|
|
|
.It Dv ENCIOC_INIT
|
2000-01-29 22:04:59 +00:00
|
|
|
Initialize the enclosure.
|
2019-11-18 14:12:33 +00:00
|
|
|
.It Dv ENCIOC_GETELMDESC
|
|
|
|
Get the element's descriptor string.
|
|
|
|
.It Dv ENCIOC_GETELMDEVNAMES
|
|
|
|
Get the device names, if any, associated with this element.
|
|
|
|
.It Dv ENCIOC_GETSTRING
|
|
|
|
Used to read the SES String In Diagnostic Page.
|
|
|
|
The contents of this page are device-specific.
|
|
|
|
.It Dv ENCIOC_SETSTRING
|
|
|
|
Used to set the SES String Out Diagnostic Page.
|
|
|
|
The contents of this page are device-specific.
|
|
|
|
.It Dv ENCIOC_GETENCNAME
|
|
|
|
Used to get the name of the enclosure.
|
|
|
|
.It Dv ENCIOC_GETENCID
|
|
|
|
Used to get the Enclosure Logical Identifier.
|
2000-12-29 09:18:45 +00:00
|
|
|
.El
|
2000-03-24 01:57:57 +00:00
|
|
|
.Sh EXAMPLE USAGE
|
2000-01-29 22:04:59 +00:00
|
|
|
The files contained in
|
2018-12-16 04:06:53 +00:00
|
|
|
.In /usr/share/examples/ses
|
2000-01-29 22:04:59 +00:00
|
|
|
show simple mechanisms for how to use these interfaces, as well as a
|
|
|
|
very stupid simple monitoring daemon.
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /dev/rsdXXXXX -compact
|
|
|
|
.It Pa /dev/ses Ns Ar N
|
2000-03-24 01:57:57 +00:00
|
|
|
The
|
|
|
|
.Em Nth
|
|
|
|
.Nm SES
|
|
|
|
device.
|
2000-12-29 09:18:45 +00:00
|
|
|
.El
|
2000-01-29 22:04:59 +00:00
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
When the kernel is configured with
|
|
|
|
.Tn DEBUG
|
|
|
|
enabled, the first open to an SES device will spit out overall enclosure
|
|
|
|
parameters to the console.
|
2015-09-05 10:29:47 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr sesutil 8
|
2000-01-29 22:04:59 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2019-11-18 14:12:33 +00:00
|
|
|
driver was originally written for the
|
2000-01-29 22:04:59 +00:00
|
|
|
.Tn CAM
|
|
|
|
.Tn SCSI
|
2019-11-18 14:12:33 +00:00
|
|
|
subsystem by Matthew Jacob and first released in
|
|
|
|
.Fx 4.3 .
|
|
|
|
It was a functional equivalent of a similar
|
2000-03-24 01:57:57 +00:00
|
|
|
driver available in Solaris, Release 7.
|
2019-11-18 14:12:33 +00:00
|
|
|
It was largely rewritten by Alexander Motin, Justin Gibbs, and Will Andrews for
|
|
|
|
.Fx 9.2 .
|