1SMP_PHY_TEST(8) SMP_UTILS SMP_PHY_TEST(8)
2
3
4
6 smp_phy_test - invoke PHY TEST FUNCTION SMP function
7
9 smp_phy_test [--control=CO] [--dwords=DW] [--expected=EX] [--func‐
10 tion=FN] [--help] [--hex] [--interface=PARAMS] [--linkrate=LR] [--pat‐
11 tern=PA] [--phy=ID] [--raw] [--sa=SAS_ADDR] [--sata] [--spread=SC]
12 [--verbose] [--version] SMP_DEVICE[,N]
13
15 Sends a SAS Serial Management Protocol (SMP) PHY TEST FUNCTION function
16 request to an SMP target. The SMP target is identified by the
17 SMP_DEVICE and the SAS_ADDR. Depending on the interface, the SAS_ADDR
18 may be deduced from the SMP_DEVICE. The mpt interface uses SMP_DEVICE
19 to identify a HBA (an SMP initiator) and needs the additional ,N to
20 differentiate between HBAs if there are multiple present.
21
22 The PHY TEST FUNCTION function can be used to start and stop test pat‐
23 tern transmission. When a phy associated with an SMP target (most
24 likely an expander) starts test pattern transmission then the attached
25 phy (if there is one) sees a link down.
26
27 SAS phys associated with SSP targets (e.g. a SAS disk) can generate
28 similar test patterns by using the SEND DIAGNOSTIC SCSI command with
29 page code 3fh . See the sg_senddiag utility.
30
32 Mandatory arguments to long options are mandatory for short options as
33 well.
34
35 -c, --control=CO
36 set the 'phy test pattern dwords control' field. The argument CO
37 can be from 0 to 255 inclusive, the default is 0 (each byte in
38 'dwords' sent as data byte (Dxx.y) without scrambling). Only
39 active when 'pattern' is set to 40h (i.e. "two_dwords").
40
41 -d, --dwords=DW
42 set the 'phy test pattern dwords' field which is 8 bytes long.
43 The argument DW would normally be entered in hex with a leading
44 '0x' or a trailing 'h' (otherwise it would be interpreted as
45 decimal). Due to a quirk in the command line parser, the argu‐
46 ment value ffffffffffffffffh (i.e. all bits sets) needs to be
47 entered as '-1'.
48
49 -E, --expected=EX
50 set the 'expected expander change count' field in the SMP
51 request. The value EX is from 0 to 65535 inclusive with 0 being
52 the default value. When EX is greater than zero then if the
53 value doesn't match the expander change count of the SMP target
54 (i.e. the expander) when the request arrives then the target
55 ignores the request and sets a function result of "invalid
56 expander change count" in the response.
57
58 -f, --function=FN
59 set the 'phy test function' field in the SMP request. Values
60 between 0 and 255 are accepted with the default being 0. The
61 value 0 stops the selected phy performing a phy test function.
62 The value 1 starts the selected phy transmitting the test pat‐
63 tern (and anything that the phy receives is discarded).
64
65 -h, --help
66 output the usage message then exit.
67
68 -H, --hex
69 output the response (less the CRC field) in hexadecimal.
70
71 -I, --interface=PARAMS
72 interface specific parameters. In this case "interface" refers
73 to the path through the operating system to the SMP initiator.
74 See the smp_utils man page for more information.
75
76 -l, --linkrate=LR
77 transmits the test pattern at the specified physical link rate:
78 8 -> 1.5 Gbps, 9 -> 3 Gbps, 10 -> 6 Gbps, 11 -> 12 Gbps. Default
79 value is 0xa (i.e. 6 Gbps). Prior to version 0.99 the default
80 value was 9 (i.e. 3 Gbps).
81
82 -P, --pattern=PA
83 specifies the type of test pattern to transmit. SPL-4 (rev 8)
84 values are: 1 -> JTPAT, 2 -> CJTPAT, 3 -> PRBS9, 4 -> PRBS15,
85 10h -> TRAIN, 11h -> TRAIN_DONE, 12h -> IDLE, 13h -> SCRAM‐
86 BLED_0, 40h -> TWO_DWORDS. The default value is 2 (i.e. CJT‐
87 PAT).
88
89 -p, --phy=ID
90 phy identifier. ID is a value between 0 and 254. Default is 0.
91
92 -r, --raw
93 send the response (less the CRC field) to stdout in binary. All
94 error messages are sent to stderr.
95
96 -s, --sa=SAS_ADDR
97 specifies the SAS address of the SMP target device. Typically
98 this is an expander. This option may not be needed if the
99 SMP_DEVICE has the target's SAS address within it. The SAS_ADDR
100 is in decimal but most SAS addresses are shown in hexadecimal.
101 To give a number in hexadecimal either prefix it with '0x' or
102 put a trailing 'h' on it.
103
104 -t, --sata
105 set phy test function SATA bit. The default action is to leave
106 that bit clear (zero).
107
108 -S, --spread=SC
109 set the phy test function Spread Spectrum Clocking (SSC) field
110 to SC. Default value is zero (no spreading). Other defined val‐
111 ues are 1 for centre spreading and 2 for down spreading.
112
113 -v, --verbose
114 increase the verbosity of the output. Can be used multiple times
115
116 -V, --version
117 print the version string and then exit.
118
120 The SMP PHY TEST function was introduced in SAS-1.1 and enhanced in
121 SAS-2 .
122
124 Written by Douglas Gilbert.
125
127 Report bugs to <dgilbert at interlog dot com>.
128
130 Copyright © 2006-2017 Douglas Gilbert
131 This software is distributed under a FreeBSD license. There is NO war‐
132 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
133 POSE.
134
136 smp_utils, sg_senddiag(sg3_utils)
137
138
139
140smp_utils-0.99 October 2017 SMP_PHY_TEST(8)