.TH SMP_PHY_TEST "8" "May 2011" "smp_utils\-0.96" SMP_UTILS .SH NAME smp_phy_test \- invoke PHY TEST FUNTION SMP function .SH SYNOPSIS .B smp_phy_test [\fI\-\-control=CO\fR] [\fI\-\-dwords=DW\fR] [\fI\-\-expected=EX\fR] [\fI\-\-function=FN\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-interface=PARAMS\fR] [\fI\-\-linkrate=LR\fR] [\fI\-\-pattern=PA\fR] [\fI\-\-phy=ID\fR] [\fI\-\-raw\fR] [\fI\-\-sa=SAS_ADDR\fR] [\fI\-\-sata\fR] [\fI\-\-spread=SC\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fISMP_DEVICE[,N]\fR .SH DESCRIPTION .\" Add any additional description here .PP Sends a SAS Management Protocol (SMP) PHY TEST FUNCTION function request to a SMP target. The SMP target is identified by the \fISMP_DEVICE\fR and the \fISAS_ADDR\fR. Depending on the interface, the \fISAS_ADDR\fR may be deduced from the \fISMP_DEVICE\fR. The mpt interface uses \fISMP_DEVICE\fR to identify a HBA (an SMP initiator) and needs the additional \fI,N\fR to differentiate between HBAs if there are multiple present. .PP The PHY TEST FUNCTION function can be used to start and stop test pattern transmission. When a phy associated with a SMP target (most likely an expander) starts test pattern transmission then the attached phy (if there is one) sees a link down. .PP 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. .SH OPTIONS Mandatory arguments to long options are mandatory for short options as well. .TP \fB\-c\fR, \fB\-\-control\fR=\fICO\fR set the 'phy test pattern dwords control' field. The argument \fICO\fR 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"). .TP \fB\-d\fR, \fB\-\-dwords\fR=\fIDW\fR set the 'phy test pattern dwords' field which is 8 bytes long. The argument \fIDW\fR 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'. .TP \fB\-E\fR, \fB\-\-expected\fR=\fIEX\fR set the 'expected expander change count' field in the SMP request. The value \fIEX\fR is from 0 to 65535 inclusive with 0 being the default value. When \fIEX\fR 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. .TP \fB\-f\fR, \fB\-\-function\fR=\fIFN\fR 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). .TP \fB\-h\fR, \fB\-\-help\fR output the usage message then exit. .TP \fB\-H\fR, \fB\-\-hex\fR output the response (less the CRC field) in hexadecimal. .TP \fB\-I\fR, \fB\-\-interface\fR=\fIPARAMS\fR 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. .TP \fB\-l\fR, \fB\-\-linkrate\fR=\fILR\fR 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 9. .TP \fB\-P\fR, \fB\-\-pattern\fR=\fIPA\fR specifies the type of test pattern to transmit. SAS\-2 (rev15) values are: 1 \-> JTPAT, 2 \-> CJTPAT, 10h \-> TRAIN, 11h \-> TRAIN_DONE, 12h \-> IDLE, 13h \-> SCRAMBLED_0, 40h \-> "two_dwords". Default value is 2. .TP \fB\-p\fR, \fB\-\-phy\fR=\fIID\fR phy identifier. \fIID\fR is a value between 0 and 254. Default is 0. .TP \fB\-r\fR, \fB\-\-raw\fR send the response (less the CRC field) to stdout in binary. All error messages are sent to stderr. .TP \fB\-s\fR, \fB\-\-sa\fR=\fISAS_ADDR\fR specifies the SAS address of the SMP target device. Typically this is an expander. This option may not be needed if the \fISMP_DEVICE\fR has the target's SAS address within it. The \fISAS_ADDR\fR 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. .TP \fB\-t\fR, \fB\-\-sata\fR set phy test function SATA bit. The default action is to leave that bit clear (zero). .TP \fB\-S\fR, \fB\-\-spread\fR=\fISC\fR set the phy test function Spread Spectrum Clocking (SSC) field to \fISC\fR. Default value is zero (no spreading). Other defined values are 1 for centre spreading and 2 for down spreading. .TP \fB\-v\fR, \fB\-\-verbose\fR increase the verbosity of the output. Can be used multiple times .TP \fB\-V\fR, \fB\-\-version\fR print the version string and then exit. .SH CONFORMING TO The SMP PHY TEST function was introduced in SAS\-1.1 and enhanced in SAS\-2 . .SH AUTHORS Written by Douglas Gilbert. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2006\-2011 Douglas Gilbert .br This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .B smp_utils, sg_senddiag(sg3_utils)