xref: /dragonfly/share/man/man4/ses.4 (revision b40e316c)
1.\" Copyright (c) 2000
2.\"	Matthew Jacob <mjacob@FreeBSD.org>.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\"
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: src/share/man/man4/ses.4,v 1.2.2.6 2001/08/17 13:08:39 ru Exp $
27.\" $DragonFly: src/share/man/man4/ses.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
28.\"
29.Dd January 29, 2000
30.Dt SES 4
31.Os
32.Sh NAME
33.Nm ses
34.Nd SCSI Environmental Services driver
35.Sh SYNOPSIS
36.Cd device ses
37.Sh DESCRIPTION
38The
39.Nm
40driver provides support for all
41.Tn SCSI
42devices of the environmental services class that are attached to the system
43through a supported
44.Tn SCSI
45Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible
46Fault Tolerant Enclosures).
47The environmental services class generally are enclosure devices that
48provide environmental information such as number of power supplies (and
49state), temperature, device slots, and so on.
50.Pp
51A
52.Tn SCSI
53Host
54adapter must also be separately configured into the system
55before a
56.Tn SCSI
57Environmental Services device can be configured.
58.Sh KERNEL CONFIGURATION
59It is only necessary to explicitly configure one
60.Nm
61device; data structures are dynamically allocated as devices are found
62on the
63.Tn SCSI
64bus.
65.Pp
66A separate option,
67.Va SES_ENABLE_PASSTHROUGH ,
68may be specified to allow the
69.Nm
70driver to perform functions on devices of other classes that claim to
71also support
72.Nm
73functionality.
74.Sh IOCTLS
75The following
76.Xr ioctl 2
77calls apply to
78.Nm
79devices.
80They are defined in the header file
81.Aq Pa cam/scsi/scsi_ses.h
82(\fIq.v.\fR).
83.Pp
84.Bl -tag -width SESIOC_GETENCSTAT
85.It Dv SESIOC_GETNOBJ
86Used to find out how many
87.Nm
88objects are driven by this particular device instance.
89.It Dv SESIOC_GETOBJMAP
90Read, from the kernel, an array of SES objects which contains
91the object identifier, which subenclosure it is in, and the
92.Nm
93type of the object.
94.It Dv SESIOC_GETENCSTAT
95Get the overall enclosure status.
96.It Dv SESIOC_SETENCSTAT
97Set the overall enclosure status.
98.It Dv SESIOC_GETOBJSTAT
99Get the status of a particular object.
100.It Dv SESIOC_SETOBJSTAT
101Set the status of a particular object.
102.It Dv SESIOC_GETTEXT
103Get the associated help text for an object (not yet implemented).
104.Nm
105devices often have descriptive text for an object which can tell
106you things like location (e.g, "left power supply").
107.It Dv SESIOC_INIT
108Initialize the enclosure.
109.El
110.Sh EXAMPLE USAGE
111The files contained in
112.Aq Pa usr/share/examples/ses
113show simple mechanisms for how to use these interfaces, as well as a
114very stupid simple monitoring daemon.
115.Sh FILES
116.Bl -tag -width /dev/rsdXXXXX -compact
117.It Pa /dev/ses Ns Ar N
118The
119.Em Nth
120.Nm SES
121device.
122.El
123.Sh DIAGNOSTICS
124When the kernel is configured with
125.Tn DEBUG
126enabled, the first open to an SES device will spit out overall enclosure
127parameters to the console.
128.Sh HISTORY
129The
130.Nm
131driver was written for the
132.Tn CAM
133.Tn SCSI
134subsystem by Matthew Jacob.
135This is a functional equivalent of a similar
136driver available in Solaris, Release 7.
137