aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.h
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-12-16 18:55:26 +0530
committerJames Bottomley <James.Bottomley@suse.de>2010-02-08 18:19:42 -0600
commit50d5c60634673a79f8d88564e10345b50fca7378 (patch)
tree837ce67b8dad98caddfc9469acecaca124ceea1d /drivers/scsi/mpt2sas/mpt2sas_base.h
parentf7c95ef02b564d9984c0655c9659791b1dd5d7ad (diff)
downloadkernel_samsung_smdk4412-50d5c60634673a79f8d88564e10345b50fca7378.zip
kernel_samsung_smdk4412-50d5c60634673a79f8d88564e10345b50fca7378.tar.gz
kernel_samsung_smdk4412-50d5c60634673a79f8d88564e10345b50fca7378.tar.bz2
[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>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 014318f..93c067f 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -853,6 +853,8 @@ int mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
*mpi_reply, Mpi2IOUnitPage1_t *config_page);
int mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
*mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz);
+int mpt2sas_config_set_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
+ Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz);
int mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
*mpi_reply, Mpi2IOCPage8_t *config_page);
int mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t