1SMP_WRITE_GPIO(8) SMP_UTILS SMP_WRITE_GPIO(8)
2
3
4
6 smp_write_gpio - invoke WRITE GPIO REGISTER (ENHANCED) SMP function
7
9 smp_write_gpio [--count=CO] [--data=H,H...] [--help] [--hex]
10 [--index=IN] [--interface=PARAMS] [--raw] [--sa=SAS_ADDR] [--type=TY]
11 [--verbose] [--version] SMP_DEVICE[,N]
12
14 Sends a SAS Serial Management Protocol (SMP) WRITE GPIO REGISTER or a
15 WRITE GPIO REGISTER ENHANCED function request to an SMP target. The SMP
16 target is identified by the SMP_DEVICE and the SAS_ADDR. Depending on
17 the interface, the SAS_ADDR may be deduced from the SMP_DEVICE. The mpt
18 interface uses SMP_DEVICE to identify a HBA (an SMP initiator) and
19 needs the additional ,N to differentiate between HBAs if there are mul‐
20 tiple present.
21
22 This function is defined in SFF-8485 ( see www.sffcommittee.com )
23 together with its corresponding READ GPIO REGISTER (ENHANCED) SMP func‐
24 tion. The other SMP functions are defined in SAS documents at
25 www.t10.org . SFF-8485 defines a curious device called a "virtual SMP
26 port" that lives in a host bus adapter (HBA) and allows SMP to manipu‐
27 late the sideband signals in wide internal cables. To stop other ini‐
28 tiators in a multi-initiator domain from accessing those sideband sig‐
29 nals, the virtual SMP (target) port is not indicated in a DISCOVER
30 response.
31
32 For notes on the SMP WRITE GPIO REGISTER ENHANCED function see the sec‐
33 tion on the ENHANCED FUNCTION below.
34
36 Mandatory arguments to long options are mandatory for short options as
37 well.
38
39 -c, --count=CO
40 where CO is the register count. This is the number of (4 byte)
41 registers to send. The default value is 1.
42
43 -d, --data=H,H...
44 this option supplies a comma separated list of hexadecimal bytes
45 (0 to ff inclusive) that will be used as write data in the WRITE
46 GPIO REGISTER request. The number of bytes supplied should be
47 four times --count=C The first 4 bytes will become the first
48 register written.
49
50 -d, --data=-
51 reads string of hexadecimal bytes from stdin. Spaces, tabs and
52 line feeds additionally are permitted as separators.
53
54 -E, --enhanced
55 sends a WRITE GPIO REGISTER ENHANCED function request (default:
56 send a WRITE GPIO REGISTER function request).
57
58 -h, --help
59 output the usage message then exit.
60
61 -H, --hex
62 output the response (less the CRC field) in hexadecimal.
63
64 -i, --index=IN
65 where IN is the register index. This value is origin zero and
66 its default value is 0. The request will send --count=CO regis‐
67 ters starting from --index=IN of the given --type=TY.
68
69 -I, --interface=PARAMS
70 interface specific parameters. In this case "interface" refers
71 to the path through the operating system to the SMP initiator.
72 See the smp_utils man page for more information.
73
74 -r, --raw
75 send the response (less the CRC field) to stdout in binary. All
76 error messages are sent to stderr.
77
78 -s, --sa=SAS_ADDR
79 specifies the SAS address of the SMP target device. Typically
80 this is an expander. This option may not be needed if the
81 SMP_DEVICE has the target's SAS address within it. The SAS_ADDR
82 is in decimal but most SAS addresses are shown in hexadecimal.
83 To give a number in hexadecimal either prefix it with '0x' or
84 put a trailing 'h' on it.
85
86 -t, --type=TY
87 where TY is the register type. The default value is 0
88 (GPIO_CFG). The request will send --count=CO registers starting
89 from --index=IN of the given --type=TY.
90
91 -v, --verbose
92 increase the verbosity of the output. Can be used multiple
93 times.
94
95 -V, --version
96 print the version string and then exit.
97
99 In the technical review of SAS-2 prior to standardization in this t10
100 document: 08-212r8.pdf (page 871 or 552) there is a comment that the
101 READ GPIO REGISTER and WRITE GPIO REGISTER function headers (i.e. first
102 4 bytes) do not comply with all the other SMP functions in SAS-2.
103
104 There is a suggestion that enhanced variants be introduced in the next
105 version of the SFF-8485 document. If that ever happened then it has not
106 been made public. In SAS-2.1 both the READ and WRITE GPIO REGISTER
107 functions have been made obsolete and the corresponding ENHANCED func‐
108 tion numbers are "restricted" for SFF-8485.
109
110 If the --enhanced option is given then the ENHANCED function number is
111 sent; the register type, index and count fields (1 byte each) are
112 increased by two byte positions leaving enough space for a compliant
113 SAS-2 SMP header to be built.
114
116 The SMP WRITE GPIO REGISTER function is defined in SFF-8485 (see
117 www.sffcommittee.com ) together with its corresponding READ GPIO REGIS‐
118 TER SMP function.
119
121 Written by Douglas Gilbert.
122
124 Report bugs to <dgilbert at interlog dot com>.
125
127 Copyright © 2006-2011 Douglas Gilbert
128 This software is distributed under a FreeBSD license. There is NO war‐
129 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
130 POSE.
131
133 smp_utils, smp_read_gpio(smp_utils)
134
135
136
137smp_utils-0.97 August 2011 SMP_WRITE_GPIO(8)