8525 some more manpage spelling errors
[unleashed.git] / usr / src / man / man9e / tran_getcap.9e
blobcc70777dfe7420c9c54e4b423aa7838e46215ea6
1 '\" te
2 .\"  Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH TRAN_GETCAP 9E "Aug 30, 1995"
7 .SH NAME
8 tran_getcap, tran_setcap \- get/set SCSI transport capability
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/scsi/scsi.h>
16 \fBint prefix\fR\fBtran_getcap\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBchar *\fR\fIcap\fR, \fBint\fR \fIwhom\fR);
17 .fi
19 .LP
20 .nf
21 \fBint prefix\fR\fBtran_setcap\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBchar *\fR\fIcap\fR, \fBint\fR \fIvalue\fR,
22      \fBint\fR \fIwhom\fR);
23 .fi
25 .SH INTERFACE LEVEL
26 .sp
27 .LP
28 Solaris architecture specific (Solaris DDI).
29 .SH PARAMETERS
30 .sp
31 .ne 2
32 .na
33 \fB\fIap\fR \fR
34 .ad
35 .RS 10n
36 Pointer to the \fBscsi_address\fR(9S) structure.
37 .RE
39 .sp
40 .ne 2
41 .na
42 \fB\fIcap\fR \fR
43 .ad
44 .RS 10n
45 Pointer to the string capability identifier.
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fIvalue\fR \fR
52 .ad
53 .RS 10n
54 Defines the new state of the capability.
55 .RE
57 .sp
58 .ne 2
59 .na
60 \fB\fIwhom\fR \fR
61 .ad
62 .RS 10n
63 Specifies whether all targets or only the specified target is affected.
64 .RE
66 .SH DESCRIPTION
67 .sp
68 .LP
69 The \fBtran_getcap()\fR and \fBtran_setcap()\fR vectors in the
70 \fBscsi_hba_tran\fR(9S) structure must be initialized during the \fBHBA
71 \fRdriver's \fBattach\fR(9E) to point to \fBHBA \fRentry points to be called
72 when a target driver calls \fBscsi_ifgetcap\fR(9F) and \fBscsi_ifsetcap\fR(9F).
73 .sp
74 .LP
75 \fBtran_getcap()\fR is called to get the current value of a capability specific
76 to features provided by the \fBHBA \fRhardware or driver.  The name of the
77 capability \fIcap\fR is the \fINULL\fR terminated capability string.
78 .sp
79 .LP
80 If \fIwhom\fR is non-zero, the request is for the current value of the
81 capability defined for the target specified by the  \fBscsi_address\fR(9S)
82 structure pointed to by \fIap\fR; if \fIwhom\fR is \fB0\fR, all targets are
83 affected; else, the target specified by the \fBscsi_address\fR structure
84 pointed to by \fIap\fR is affected.
85 .sp
86 .LP
87 \fBtran_setcap()\fR is called to set the value of the capability \fIcap\fR to
88 the value of \fIvalue\fR. If \fIwhom\fR is non-zero, the capability should be
89 set for the target specified by the \fBscsi_address\fR(9S) structure pointed to
90 by \fIap\fR; if \fIwhom\fR is \fB0\fR, all targets are affected; else, the
91 target specified by the \fBscsi_address\fR structure pointed to by \fIap\fR is
92 affected. It is recommended that \fBHBA \fRdrivers do not support setting
93 capabilities for all targets, that is, \fIwhom\fR is \fB0\fR.
94 .sp
95 .LP
96 A device may support only a subset of the defined capabilities.
97 .sp
98 .LP
99 Refer to \fBscsi_ifgetcap\fR(9F) for the list of defined capabilities.
102 \fBHBA \fRdrivers should use \fBscsi_hba_lookup_capstr\fR(9F) to match
103 \fIcap\fR against the canonical capability strings.
104 .SH RETURN VALUES
107 \fBtran_setcap()\fR must return  \fB1\fR if the capability was successfully set
108 to the new value, \fB0\fR if the \fBHBA \fR driver does not support changing
109 the capability, and  \fB\(mi1\fR if the capability was not defined.
112 \fBtran_getcap()\fR must return the current value of a capability or
113 \fB\(mi1\fR if the capability was not defined.
114 .SH SEE ALSO
117 \fBattach\fR(9E), \fBscsi_hba_attach\fR(9F), \fBscsi_hba_lookup_capstr\fR(9F),
118 \fBscsi_ifgetcap\fR(9F), \fBscsi_address\fR(9S), \fBscsi_hba_tran\fR(9S)
121 \fIWriting Device Drivers\fR