SMP_PHY_CONTROL(8)

NAME
smp_phy_control - invoke PHY CONTROL SMP function

SYNOPSIS
smp_phy_control [--attached=ADN] [--expected=EX] [--help] [--hex] [--interface=PARAMS] [--max=MA] [--min=MI] [--op=OP] [--phy=ID] [--pptv=TI] [--raw] [--sa=SAS_ADDR] [--sas_pa=CO] [--sas_sl=CO] [--sata_pa=CO] [--sata_sl=CO] [--verbose] [--version] SMP_DEVICE[,N]

DESCRIPTION

Sends a SAS Serial Management Protocol (SMP) PHY CONTROL 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 CONTROL function is used to change the state of a phy within an SMP target. SMP targets are typically SAS expanders which have multiple phys. Certain operation values (e.g. 'lr' (link reset) and 'hr' (hard reset)) change the state of the attached phy. Sending such operation values to the phy in the SMP target that is attached to the originator (i.e. the SMP initiator) may lead to a bad response.

Invoking this utility with no arguments (other than SMP_DEVICE which might be in an environment variable and --sa=SAS_ADDR which might be in an environment variable or not needed) is harmless. In other words a phy's state is only changed when either --max=MA, --min=MI, --op=OP or --pptv=TI is given with a non default value.

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

-a, --attached=ADN
    specifies the attached device name (ADN). The default value is 0 . The ADN is in decimal but is likely to be a SAS address which is typically shown in hexadecimal. To specify a number in hexadecimal either prefix it with '0x' or put a trailing 'h' on it. This option is ignored by the expander unless the '--op=sadn' option is also given.

-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.

-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.

-M, --max=MA
    permits the programmed maximum physical link rate to be changed on the gven phy. Permitted values are: 0 -> no change, 8 -> 1.5 Gbps, 9 -> 3 Gbps, 10 -> 6 Gbps or 11 -> 12 Gbps. Default value is 0.

-m, --min=MI
    permits the programmed minimum physical link rate to be changed on the given phy. Permitted values are: 0 -> no change, 8 -> 1.5 Gbps, 9 -> 3 Gbps, 10 -> 6 Gbps or 11 -> 12 Gbps. Default value is 0.

-o, --op=OP
    specifies the operation to be performed on the given phy. The OP argument can be either numeric or a string. If a number is given, it is put into the 'phy operation' field of the request. Allowable strings are abbreviations of which only the first two characters need to match. The supported strings (with corresponding value in square brackets) are: 'nop' [0] (no operation), 'lr' [1] (link reset), 'hr' [2] (hard reset), 'dis' [3] (disable phy), 'cel' [5] (clear error log), 'ca' [6] (clear affiliation), 'tspss' [7] (transmit SATA port selection signal), 'citnl' [8] (clear STP I_T nexus loss (bit)), and 'sadn' [9] (set attached device name). The default value is 0 (no operation).

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

-P, --pptv=TI
    partial pathway timeout value. The units are microseconds and the permitted values are between 0 and 15 inclusive. 7 microseconds is recommended by sas2r07.

-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.

-q, --sas_pa=CO
    set the Enable SAS Partial field to CO which is two bits wide. The defined values for CO are 0 for no change; 1 for manage partial phy power conditions; 2 for disable partial phy power conditions.

-l, --sas_sl=CO
    set the Enable SAS Slumber field to CO which is two bits wide. The defined values for CO are 0 for no change; 1 for manage slumber phy power conditions; 2 for disable slumber phy power conditions.

-Q, --sata_pa=CO
    set the Enable SATA Partial field to CO which is two bits wide. The defined values for CO are 0 for no change; 1 for manage partial phy power conditions; 2 for disable partial phy power conditions.

-L, --sata_sl=CO
    set the Enable SATA Slumber field to CO which is two bits wide. The defined values for CO are 0 for no change; 1 for manage slumber phy power conditions; 2 for disable slumber phy power conditions.

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

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

NOTES
Once an expander phy has been disabled with --op=dis then it can be later re-enabled with a link reset or hard reset (e.g. --op=lr).

EXAMPLES
See "Examples" section in http://sg.danny.cz/sg/smp_utils.html

CONFORMING TO
The SMP PHY CONTROL function was introduced in SAS-1 .

AUTHORS
Written by Douglas Gilbert.

REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>.

COPYRIGHT
Copyright © 2006-2011 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, smp_discover(smp_utils)