scsi_ifgetcap(9F)
NAME
scsi_ifgetcap, scsi_ifsetcap − get/set SCSI transport capability
SYNOPSIS
#include <sys/scsi/scsi.h>
int scsi_ifgetcap(struct scsi_address ∗ap, char ∗cap, int whom);
int scsi_ifsetcap(struct scsi_address ∗ap, char ∗cap, int value, int whom);
ARGUMENTS
ap Pointer to the scsi_address structure.
cap Pointer to the string capability identifier.
value Defines the new state of the capability.
whom Determines if all targets or only the specified target is affected.
INTERFACE LEVEL
SPARC architecture specific (SPARC DDI).
DESCRIPTION
The target drivers use scsi_ifsetcap() to set the capabilities of the host adapter driver. A cap is a name-value pair whose name is a null terminated character string and whose value is an integer. The current value of a capability can be retrieved using scsi_ifgetcap(). If whom is 0 all targets are affected, else the target specified by the scsi_address structure pointed to by ap is affected.
A target device may support only a subset of the capabilities listed below. It is the responsibility of the target driver to make sure that these functions are called with a cap supported by the target.
The following capabilities have been defined:
“dma_max” Maximum dma transfer size supported by host adapter.
“msg_out” Message out capability supported by host adapter: 0 disables, 1 enables.
“disconnect” Disconnect capability supported by host adapter: 0 disables, 1 enables.
“synchronous” Synchronous data transfer capability supported by host adapter: 0 disables, 1 enables.
“wide_xfer” Wide transfer capability supported by host adapter: 0 disables, 1 enables.
“parity” Parity checking by host adapter: 0 disables, 1 enables.
“initiator-id” The host’s bus address is returned.
“untagged-qing” The host adapter capability to support internal queueing of commands without tagged queueing: 0 disables, 1 enables.
“tagged-qing” The host adapter capability to support tagged queuing: 0 disables, 1 enables.
RETURN VALUES
scsi_ifsetcap() returns 1 if the capability was successfully set to the new value, 0 if the capability is not variable, and −1 if the capability was not defined.
scsi_ifgetcap() returns the current value of a capability or −1 if the capability was not defined.
CONTEXT
These functions can be called from user or interrupt context.
SEE ALSO
SunOS 5.1 Writing Device Drivers
SunOS 5.1/SPARC — Last change: 16 Sep 1992