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"
8 tran_getcap, tran_setcap \- get/set SCSI transport capability
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);
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);
28 Solaris architecture specific (Solaris DDI).
36 Pointer to the \fBscsi_address\fR(9S) structure.
45 Pointer to the string capability identifier.
54 Defines the new state of the capability.
63 Specifies whether all targets or only the specified target is affected.
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).
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.
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.
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.
96 A device may support only a subset of the defined capabilities.
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.
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.
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