Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
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.
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.
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]
#include <sys/scsi/scsi.h> int prefixtran_getcap(struct scsi_address *ap, char *cap, int whom);
int prefixtran_setcap(struct scsi_address *ap, char *cap, int value, int whom);
Pointer to the scsi_address(9S) structure.
Pointer to the string capability identifier.
Defines the new state of the capability.
Specifies whether all targets or only the specified target is affected.
tran_getcap() is called to get the current value of a capability specific to features provided by the HBA hardware or driver. The name of the capability cap is the NULL terminated capability string.
If whom is non-zero, the request is for the current value of the capability defined for the target specified by the scsi_address(9S) structure pointed to by ap; if whom is 0, all targets are affected; else, the target specified by the scsi_address structure pointed to by ap is affected.
tran_setcap() is called to set the value of the capability cap to the value of value. If whom is non-zero, the capability should be set for the target specified by the scsi_address(9S) structure pointed to by ap; if whom is 0, all targets are affected; else, the target specified by the scsi_address structure pointed to by ap is affected. It is recommended that HBA drivers do not support setting capabilities for all targets, that is, whom is 0.
A device may support only a subset of the defined capabilities.
Refer to scsi_ifgetcap(9F) for the list of defined capabilities.
HBA drivers should use scsi_hba_lookup_capstr(9F) to match cap against the canonical capability strings.
tran_getcap() must return the current value of a capability or -1 if the capability was not defined.
Writing Device Drivers