Provided by: smp-utils_0.99-1_amd64 bug

NAME

       smp_phy_test - invoke PHY TEST FUNCTION SMP function

SYNOPSIS

       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]

DESCRIPTION

       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.

OPTIONS

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

       -c, --control=CO
              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").

       -d, --dwords=DW
              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'.

       -E, --expected=EX
              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.

       -f, --function=FN
              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).

       -h, --help
              output the usage message then exit.

       -H, --hex
              output the response (less the CRC field) in hexadecimal.

       -I, --interface=PARAMS
              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.

       -l, --linkrate=LR
              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).

       -P, --pattern=PA
              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).

       -p, --phy=ID
              phy identifier. ID is a value between 0 and 254. Default is 0.

       -r, --raw
              send the response (less the CRC field) to stdout in binary. All error messages  are
              sent to stderr.

       -s, --sa=SAS_ADDR
              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.

       -t, --sata
              set  phy  test  function  SATA  bit.  The default action is to leave that bit clear
              (zero).

       -S, --spread=SC
              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.

       -v, --verbose
              increase the verbosity of the output. Can be used multiple times

       -V, --version
              print the version string and then exit.

CONFORMING TO

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

AUTHORS

       Written by Douglas Gilbert.

REPORTING BUGS

       Report bugs to <dgilbert at interlog dot com>.

COPYRIGHT

       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.

SEE ALSO

       smp_utils, sg_senddiag(sg3_utils)