aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r--drivers/scsi/isci/host.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 2bb9f1073e73..675eddd3963e 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -932,6 +932,28 @@ static void scic_sds_controller_phy_timer_start(struct scic_sds_controller *scic
932 scic->phy_startup_timer_pending = true; 932 scic->phy_startup_timer_pending = true;
933} 933}
934 934
935static bool is_phy_starting(struct scic_sds_phy *sci_phy)
936{
937 enum scic_sds_phy_states state;
938
939 state = sci_phy->state_machine.current_state_id;
940 switch (state) {
941 case SCI_BASE_PHY_STATE_STARTING:
942 case SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL:
943 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_SPEED_EN:
944 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF:
945 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_POWER:
946 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_POWER:
947 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_PHY_EN:
948 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_SPEED_EN:
949 case SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF:
950 case SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL:
951 return true;
952 default:
953 return false;
954 }
955}
956
935/** 957/**
936 * scic_sds_controller_start_next_phy - start phy 958 * scic_sds_controller_start_next_phy - start phy
937 * @scic: controller 959 * @scic: controller
@@ -975,7 +997,7 @@ static enum sci_status scic_sds_controller_start_next_phy(struct scic_sds_contro
975 (sci_phy->is_in_link_training == false && 997 (sci_phy->is_in_link_training == false &&
976 state == SCI_BASE_PHY_STATE_STOPPED) || 998 state == SCI_BASE_PHY_STATE_STOPPED) ||
977 (sci_phy->is_in_link_training == true && 999 (sci_phy->is_in_link_training == true &&
978 state == SCI_BASE_PHY_STATE_STARTING)) { 1000 is_phy_starting(sci_phy))) {
979 is_controller_start_complete = false; 1001 is_controller_start_complete = false;
980 break; 1002 break;
981 } 1003 }