linux-kernel-test/drivers/scsi/mpt2sas
Kashyap, Desai 50d5c60634 [SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support.
Added new callbacks phy_enable and set_phy_speed in the
mpt2sas_transport_functions template. This will allow end user to
enable/disable phys and change links rates using the SysFS interface.
Current implementation only supports direct attached phys, but we
could in the future add support for expander based phys.
A new subroutine mpt2sas_config_set_sas_iounit_pg1 was added;
this wrapper function used to send request to controller firmware to modify
the phys and link rates. A new subroutine _transport_find_local_phy was added;
a function for easly obtaining the local phy object for direct attached.

Example to disable a phy
echo 0 > /sys/class/phy3:0/enable

Example to enable the same phy
echo 1 > /sys/class/phy3:0/enable

Example to change the link rate to 1.5
#echo "1.5 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
1.5 Gbit

Example to change the link rate to 3.0
#echo "3.0 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
3.0 Gbit

Example to change the link rate to 6.0
#echo "6.0 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
6.0 Gbit

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:42 -06:00
..
mpi [SCSI] mpt2sas: Adding MPI Headers - revision L 2009-10-29 13:03:10 -04:00
Kconfig [SCSI] mpt2sas: Added raid transport support 2010-02-08 18:19:41 -06:00
Makefile
mpt2sas_base.c [SCSI] mpt2sas: Set ioc->fwfault_debug to the cmd line option mpt2sas_fwfault_debug. 2010-02-08 18:19:39 -06:00
mpt2sas_base.h [SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support. 2010-02-08 18:19:42 -06:00
mpt2sas_config.c [SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support. 2010-02-08 18:19:42 -06:00
mpt2sas_ctl.c [SCSI] mpt2sas: Use compat_ptr to setup the pointer compatibility. 2010-02-08 18:19:40 -06:00
mpt2sas_ctl.h [SCSI] mpt2sas: Add Extended Type for Diagnostic Buffer support 2009-10-29 13:03:11 -04:00
mpt2sas_debug.h [SCSI] mpt2sas: Copyright change to 2009. 2009-10-02 09:48:15 -05:00
mpt2sas_scsih.c [SCSI] mpt2sas: Added raid transport support 2010-02-08 18:19:41 -06:00
mpt2sas_transport.c [SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support. 2010-02-08 18:19:42 -06:00