1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
.\" Copyright (c) 2000
.\" Matthew Jacob <mjacob@openbsd.org>. All rights reserved.
.\"
.\" 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.
.\"
.\" $OpenBSD: ses.4,v 1.8 2002/09/26 07:55:40 miod Exp $
.\"
.Dd February 22, 2000
.Dt SES 4
.Os
.Sh NAME
.Nm ses
.Nd SCSI Environmental Services Driver
.Sh SYNOPSIS
.Cd ses* at scsibus? target ? lun ?
.Sh DESCRIPTION
The
.Nm
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
Environmental Services device can be configured.
.Sh IOCTLS
The following
.Xr ioctl 2
calls apply to
.B SES
devices.
They are defined in the header file
.Fd <scsi/ses.h>
(\fIq.v.\fR).
.Pp
.Bl -tag -width SESIOC_GETENCSTAT
.It Dv SESIOC_GETNOBJ
Used to find out how many
.B SES
objects are driven by this particular device instance.
.It Dv SESIOC_GETOBJMAP
Read, from the kernel, an array of SES objects which contains
the object identifier, which subenclosure it is in, and the
.B SES
type of the object.
.It Dv SESIOC_GETENCSTAT
Get the overall enclosure status.
.It Dv SESIOC_SETENCSTAT
Set the overall enclosure status.
.It Dv SESIOC_GETOBJSTAT
Get the status of a particular object.
.It Dv SESIOC_SETOBJSTAT
Set the status of a particular object.
.It Dv SESIOC_GETTEXT
Get the associated help text for an object (not yet implemented).
.B SES
devices often have descriptive text for an object which can tell
you things like location (e.g., "left power supply").
.It Dv SESIOC_INIT
Initialize the enclosure.
.El
.Sh FILES
.Bl -tag -width /dev/sesNN -compact
.It Pa /dev/ses Ns Ar N
The \fINth\fR \fBSES\fR device.
.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.
.El
.Sh SEE ALSO
.Xr intro 4 ,
.Xr scsi 4 ,
.Xr getencstat 8 ,
.Xr sesd 8 ,
.Xr setencstat 8 ,
.Xr setobjstat 8
.Sh HISTORY
The
.Nm
driver was written for the
.Tn SCSI
subsystem by Matthew Jacob.
This is the functional equivalent of a similar driver available in
Solaris, Release 7.
|