xref: /netbsd/share/man/man4/ses.4 (revision 6550d01e)
1.\" $NetBSD: ses.4,v 1.9 2010/03/22 18:58:31 joerg 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.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27.\" POSSIBILITY OF SUCH DAMAGE.
28.\"
29.\"
30.Dd May 24, 2007
31.Dt SES 4
32.Os
33.Sh NAME
34.Nm ses
35.Nd SCSI Environmental Services Driver
36.Sh SYNOPSIS
37.Cd ses* at scsibus? target ? lun ?
38.Sh DESCRIPTION
39The
40.Nm ses
41driver provides support for all
42.Tn SCSI
43devices of the environmental services class that are attached to the system
44through a supported
45.Tn SCSI
46Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible
47Fault Tolerant Enclosures).
48The environmental services class generally are enclosure devices that
49provide environmental information such as number of power supplies (and
50state), temperature, device slots, and so on.
51.Pp
52A
53.Tn SCSI
54Host
55adapter must also be separately configured into the system
56before a
57.Tn SCSI
58Environmental Services device can be configured.
59.Sh IOCTLS
60The following
61.Xr ioctl 2
62calls apply to
63.Em SES
64devices.
65They are defined in the header file
66.In scsipi/ses.h
67(q.v.).
68.Pp
69.Bl -tag -width SESIOC_GETENCSTAT
70.It Dv SESIOC_GETNOBJ
71Used to find out how many
72.Em SES
73objects are driven by this particular device instance.
74.It Dv SESIOC_GETOBJMAP
75Read, from the kernel, an array of SES objects which contains
76the object identifier, which sub-enclosure it is in, and the
77.Em SES
78type of the object.
79.It Dv SESIOC_GETENCSTAT
80Get the overall enclosure status.
81.It Dv SESIOC_SETENCSTAT
82Set the overall enclosure status.
83.It Dv SESIOC_GETOBJSTAT
84Get the status of a particular object.
85.It Dv SESIOC_SETOBJSTAT
86Set the status of a particular object.
87.It Dv SESIOC_GETTEXT
88Get the associated help text for an object (not yet implemented).
89.Em SES
90devices often have descriptive text for an object which can tell
91you things like location (e.g, "left power supply").
92.It Dv SESIOC_INIT
93Initialize the enclosure.
94.El
95.Sh FILES
96.Bl -tag -width /dev/rsdXXXXX -compact
97.It Pa /dev/ses Ns Ar N
98The
99.Em Nth
100.Nm
101device.
102.El
103.Sh DIAGNOSTICS
104When the kernel is configured with
105.Tn DEBUG
106enabled, the first open to an SES device will spit out overall enclosure
107parameters to the console.
108.Sh SEE ALSO
109.Xr getencstat 8 ,
110.Xr sesd 8 ,
111.Xr setencstat 8 ,
112.Xr setobjstat 8
113.Sh HISTORY
114The
115.Nm
116driver was written for the
117.Tn SCSI
118subsystem by Matthew Jacob.
119This is the functional equivalent of a similar
120driver available in Solaris, Release 7.
121