1tran_getcap(9E)               Driver Entry Points              tran_getcap(9E)
2
3
4

NAME

6       tran_getcap, tran_setcap - get/set SCSI transport capability
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       int prefixtran_getcap(struct scsi_address *ap, char *cap, int whom);
14
15
16       int prefixtran_setcap(struct scsi_address *ap, char *cap, int value,
17            int whom);
18
19

INTERFACE LEVEL

21       Solaris architecture specific (Solaris DDI).
22

PARAMETERS

24       ap        Pointer to the scsi_address(9S) structure.
25
26
27       cap       Pointer to the string capability identifier.
28
29
30       value     Defines the new state of the capability.
31
32
33       whom      Specifies whether all targets or only the specified target is
34                 affected.
35
36

DESCRIPTION

38       The tran_getcap() and tran_setcap() vectors  in  the  scsi_hba_tran(9S)
39       structure  must  be  initialized  during the HBA driver's attach(9E) to
40       point to HBA entry points to be  called  when  a  target  driver  calls
41       scsi_ifgetcap(9F) and scsi_ifsetcap(9F).
42
43
44       tran_getcap()  is  called to get the current value of a capability spe‐
45       cific to features provided by the HBA hardware or driver.  The name  of
46       the capability cap is the NULL terminated capability string.
47
48
49       If  whom is non-zero, the request is for the current value of the capa‐
50       bility defined for the target specified by the  scsi_address(9S) struc‐
51       ture  pointed  to  by ap; if whom is 0, all targets are affected; else,
52       the target specified by the scsi_address structure pointed to by ap  is
53       affected.
54
55
56       tran_setcap()  is  called to set the value of the capability cap to the
57       value of value. If whom is non-zero, the capability should be  set  for
58       the  target  specified  by the scsi_address(9S) structure pointed to by
59       ap; if whom is 0, all targets are affected; else, the target  specified
60       by  the scsi_address structure pointed to by ap is affected. It is rec‐
61       ommended that HBA drivers do not support setting capabilities  for  all
62       targets, that is, whom is 0.
63
64
65       A device may support only a subset of the defined capabilities.
66
67
68       Refer to scsi_ifgetcap(9F) for the list of defined capabilities.
69
70
71       HBA  drivers should use scsi_hba_lookup_capstr(9F) to match cap against
72       the canonical capability strings.
73

RETURN VALUES

75       tran_setcap() must return  1 if the capability was successfully set  to
76       the new value, 0 if the HBA  driver does not support changing the capa‐
77       bility, and  −1 if the capability was not defined.
78
79
80       tran_getcap() must return the current value of a capability or   −1  if
81       the capability was not defined.
82

SEE ALSO

84       attach(9E),       scsi_hba_attach(9F),      scsi_hba_lookup_capstr(9F),
85       scsi_ifgetcap(9F), scsi_address(9S), scsi_hba_tran(9S)
86
87
88       Writing Device Drivers
89
90
91
92SunOS 5.11                        30 Aug 1995                  tran_getcap(9E)
Impressum