aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenryk Dembkowski <Henryk.Dembkowski@intel.com>2011-02-23 19:55:11 -0500
committerDan Williams <dan.j.williams@intel.com>2011-07-03 06:55:30 -0400
commit07373a5caa29e4159ef1ea5e72985ddaf013519a (patch)
tree0ea13c0ede1012dec6e6d491ed181418e62453ee
parent8db37aabaceb3dcd18754c1e782d4474e4052c81 (diff)
isci: add support for 2 more oem parmeters
1/ add OEM paramater support for mode_type (MPC vs APC) 2/ add OEM parameter support for max_number_concurrent_device_spin_up 3/ cleanup scic_sds_controller_start_next_phy todo: hook up the amp control afe parameters into the afe init code Signed-off-by: Henryk Dembkowski <henryk.dembkowski@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> [cleaned up scic_sds_controller_start_next_phy] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/core/scic_config_parameters.h3
-rw-r--r--drivers/scsi/isci/core/scic_sds_controller.c271
-rw-r--r--drivers/scsi/isci/core/scic_sds_controller.h30
-rw-r--r--drivers/scsi/isci/core/scic_sds_port_configuration_agent.c2
-rw-r--r--drivers/scsi/isci/firmware/create_fw.h7
-rw-r--r--drivers/scsi/isci/probe_roms.h14
-rw-r--r--firmware/isci/isci_firmware.bin.ihex4
7 files changed, 176 insertions, 155 deletions
diff --git a/drivers/scsi/isci/core/scic_config_parameters.h b/drivers/scsi/isci/core/scic_config_parameters.h
index 5e1345daf014..f64f24fad5a3 100644
--- a/drivers/scsi/isci/core/scic_config_parameters.h
+++ b/drivers/scsi/isci/core/scic_config_parameters.h
@@ -224,6 +224,8 @@ union scic_user_parameters {
224 */ 224 */
225#define SCIC_SDS_PARM_PHY_MASK_MAX 0xF 225#define SCIC_SDS_PARM_PHY_MASK_MAX 0xF
226 226
227#define MAX_CONCURRENT_DEVICE_SPIN_UP_COUNT 4
228
227/** 229/**
228 * This structure/union specifies the various different OEM parameter sets 230 * This structure/union specifies the various different OEM parameter sets
229 * available. Each type is specific to a hardware controller version. 231 * available. Each type is specific to a hardware controller version.
@@ -237,7 +239,6 @@ union scic_oem_parameters {
237 * 1. 239 * 1.
238 */ 240 */
239 struct scic_sds_oem_params sds1; 241 struct scic_sds_oem_params sds1;
240
241}; 242};
242 243
243/** 244/**
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c
index e7f3711b4afc..12b2ad5a28b0 100644
--- a/drivers/scsi/isci/core/scic_sds_controller.c
+++ b/drivers/scsi/isci/core/scic_sds_controller.c
@@ -293,6 +293,7 @@ void scic_sds_controller_initialize_power_control(
293 ); 293 );
294 294
295 this_controller->power_control.phys_waiting = 0; 295 this_controller->power_control.phys_waiting = 0;
296 this_controller->power_control.phys_granted_power = 0;
296} 297}
297 298
298/* --------------------------------------------------------------------------- */ 299/* --------------------------------------------------------------------------- */
@@ -770,31 +771,6 @@ void scic_sds_controller_timeout_handler(
770 __func__); 771 __func__);
771} 772}
772 773
773/**
774 * scic_sds_controller_get_port_configuration_mode
775 * @this_controller: This is the controller to use to determine if we are using
776 * manual or automatic port configuration.
777 *
778 * SCIC_PORT_CONFIGURATION_MODE
779 */
780enum SCIC_PORT_CONFIGURATION_MODE scic_sds_controller_get_port_configuration_mode(
781 struct scic_sds_controller *this_controller)
782{
783 u32 index;
784 enum SCIC_PORT_CONFIGURATION_MODE mode;
785
786 mode = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE;
787
788 for (index = 0; index < SCI_MAX_PORTS; index++) {
789 if (this_controller->oem_parameters.sds1.ports[index].phy_mask != 0) {
790 mode = SCIC_PORT_MANUAL_CONFIGURATION_MODE;
791 break;
792 }
793 }
794
795 return mode;
796}
797
798enum sci_status scic_sds_controller_stop_ports(struct scic_sds_controller *scic) 774enum sci_status scic_sds_controller_stop_ports(struct scic_sds_controller *scic)
799{ 775{
800 u32 index; 776 u32 index;
@@ -859,7 +835,7 @@ void scic_sds_controller_phy_timer_stop(
859 835
860/** 836/**
861 * This method is called internally by the controller object to start the next 837 * This method is called internally by the controller object to start the next
862 * phy on the controller. If all the phys have been starte, then this 838 * phy on the controller. If all the phys have been started, then this
863 * method will attempt to transition the controller to the READY state and 839 * method will attempt to transition the controller to the READY state and
864 * inform the user (scic_cb_controller_start_complete()). 840 * inform the user (scic_cb_controller_start_complete()).
865 * @this_controller: This parameter specifies the controller object for which 841 * @this_controller: This parameter specifies the controller object for which
@@ -867,101 +843,88 @@ void scic_sds_controller_phy_timer_stop(
867 * 843 *
868 * enum sci_status 844 * enum sci_status
869 */ 845 */
870enum sci_status scic_sds_controller_start_next_phy( 846enum sci_status scic_sds_controller_start_next_phy(struct scic_sds_controller *scic)
871 struct scic_sds_controller *this_controller)
872{ 847{
848 struct scic_sds_oem_params *oem = &scic->oem_parameters.sds1;
849 struct scic_sds_phy *sci_phy;
873 enum sci_status status; 850 enum sci_status status;
874 851
875 status = SCI_SUCCESS; 852 status = SCI_SUCCESS;
876 853
877 if (this_controller->phy_startup_timer_pending == false) { 854 if (scic->phy_startup_timer_pending)
878 if (this_controller->next_phy_to_start == SCI_MAX_PHYS) { 855 return status;
879 bool is_controller_start_complete = true;
880 struct scic_sds_phy *the_phy;
881 u8 index;
882 856
883 for (index = 0; index < SCI_MAX_PHYS; index++) { 857 if (scic->next_phy_to_start >= SCI_MAX_PHYS) {
884 the_phy = &this_controller->phy_table[index]; 858 bool is_controller_start_complete = true;
885 859 u32 state;
886 if (scic_sds_phy_get_port(the_phy) != NULL) { 860 u8 index;
887 /**
888 * The controller start operation is complete if and only
889 * if:
890 * - all links have been given an opportunity to start
891 * - have no indication of a connected device
892 * - have an indication of a connected device and it has
893 * finished the link training process.
894 */
895 if (
896 (
897 (the_phy->is_in_link_training == false)
898 && (the_phy->parent.state_machine.current_state_id
899 == SCI_BASE_PHY_STATE_INITIAL)
900 )
901 || (
902 (the_phy->is_in_link_training == false)
903 && (the_phy->parent.state_machine.current_state_id
904 == SCI_BASE_PHY_STATE_STOPPED)
905 )
906 || (
907 (the_phy->is_in_link_training == true)
908 && (the_phy->parent.state_machine.current_state_id
909 == SCI_BASE_PHY_STATE_STARTING)
910 )
911 ) {
912 is_controller_start_complete = false;
913 break;
914 }
915 }
916 }
917 861
918 /* 862 for (index = 0; index < SCI_MAX_PHYS; index++) {
919 * The controller has successfully finished the start process. 863 sci_phy = &scic->phy_table[index];
920 * Inform the SCI Core user and transition to the READY state. */ 864 state = sci_phy->parent.state_machine.current_state_id;
921 if (is_controller_start_complete == true) { 865
922 scic_sds_controller_transition_to_ready( 866 if (!scic_sds_phy_get_port(sci_phy))
923 this_controller, SCI_SUCCESS 867 continue;
924 ); 868
925 scic_sds_controller_phy_timer_stop(this_controller); 869 /* The controller start operation is complete iff:
870 * - all links have been given an opportunity to start
871 * - have no indication of a connected device
872 * - have an indication of a connected device and it has
873 * finished the link training process.
874 */
875 if ((sci_phy->is_in_link_training == false &&
876 state == SCI_BASE_PHY_STATE_INITIAL) ||