DOKK / manpages / debian 12 / smp-utils / smp_phy_test.8.en
SMP_PHY_TEST(8) SMP_UTILS SMP_PHY_TEST(8)

smp_phy_test - invoke PHY TEST FUNCTION SMP function

smp_phy_test [--control=CO] [--dwords=DW] [--expected=EX] [--function=FN] [--help] [--hex] [--interface=PARAMS] [--linkrate=LR] [--pattern=PA] [--phy=ID] [--raw] [--sa=SAS_ADDR] [--sata] [--spread=SC] [--verbose] [--version] SMP_DEVICE[,N]

Sends a SAS Serial Management Protocol (SMP) PHY TEST FUNCTION function request to an SMP target. The SMP target is identified by the SMP_DEVICE and the SAS_ADDR. Depending on the interface, the SAS_ADDR may be deduced from the SMP_DEVICE. The mpt interface uses SMP_DEVICE to identify a HBA (an SMP initiator) and needs the additional ,N to differentiate between HBAs if there are multiple present.

The PHY TEST FUNCTION function can be used to start and stop test pattern transmission. When a phy associated with an SMP target (most likely an expander) starts test pattern transmission then the attached phy (if there is one) sees a link down.

SAS phys associated with SSP targets (e.g. a SAS disk) can generate similar test patterns by using the SEND DIAGNOSTIC SCSI command with page code 3fh . See the sg_senddiag utility.

Mandatory arguments to long options are mandatory for short options as well.

set the 'phy test pattern dwords control' field. The argument CO can be from 0 to 255 inclusive, the default is 0 (each byte in 'dwords' sent as data byte (Dxx.y) without scrambling). Only active when 'pattern' is set to 40h (i.e. "two_dwords").
set the 'phy test pattern dwords' field which is 8 bytes long. The argument DW would normally be entered in hex with a leading '0x' or a trailing 'h' (otherwise it would be interpreted as decimal). Due to a quirk in the command line parser, the argument value ffffffffffffffffh (i.e. all bits sets) needs to be entered as '-1'.
set the 'expected expander change count' field in the SMP request. The value EX is from 0 to 65535 inclusive with 0 being the default value. When EX is greater than zero then if the value doesn't match the expander change count of the SMP target (i.e. the expander) when the request arrives then the target ignores the request and sets a function result of "invalid expander change count" in the response.
set the 'phy test function' field in the SMP request. Values between 0 and 255 are accepted with the default being 0. The value 0 stops the selected phy performing a phy test function. The value 1 starts the selected phy transmitting the test pattern (and anything that the phy receives is discarded).
output the usage message then exit.
output the response (less the CRC field) in hexadecimal.
interface specific parameters. In this case "interface" refers to the path through the operating system to the SMP initiator. See the smp_utils man page for more information.
transmits the test pattern at the specified physical link rate: 8 -> 1.5 Gbps, 9 -> 3 Gbps, 10 -> 6 Gbps, 11 -> 12 Gbps. Default value is 0xa (i.e. 6 Gbps). Prior to version 0.99 the default value was 9 (i.e. 3 Gbps).
specifies the type of test pattern to transmit. SPL-4 (rev 8) values are: 1 -> JTPAT, 2 -> CJTPAT, 3 -> PRBS9, 4 -> PRBS15, 10h -> TRAIN, 11h -> TRAIN_DONE, 12h -> IDLE, 13h -> SCRAMBLED_0, 40h -> TWO_DWORDS. The default value is 2 (i.e. CJTPAT).
phy identifier. ID is a value between 0 and 254. Default is 0.
send the response (less the CRC field) to stdout in binary. All error messages are sent to stderr.
specifies the SAS address of the SMP target device. Typically this is an expander. This option may not be needed if the SMP_DEVICE has the target's SAS address within it. The SAS_ADDR is in decimal but most SAS addresses are shown in hexadecimal. To give a number in hexadecimal either prefix it with '0x' or put a trailing 'h' on it.
set phy test function SATA bit. The default action is to leave that bit clear (zero).
set the phy test function Spread Spectrum Clocking (SSC) field to SC. Default value is zero (no spreading). Other defined values are 1 for centre spreading and 2 for down spreading.
increase the verbosity of the output. Can be used multiple times
print the version string and then exit.

The SMP PHY TEST function was introduced in SAS-1.1 and enhanced in SAS-2 .

Written by Douglas Gilbert.

Report bugs to <dgilbert at interlog dot com>.

Copyright © 2006-2017 Douglas Gilbert
This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

smp_utils, sg_senddiag(sg3_utils)

October 2017 smp_utils-0.99