diff options
author | Adam Gruchala <adam.gruchala@intel.com> | 2011-05-10 23:54:23 +0000 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:04:48 -0700 |
commit | 4a33c525f0e94b57602abd1e43644cbf6f5418f4 (patch) | |
tree | 4f42dccac26c36af150322c6b7e152d31efe4aa1 /drivers/scsi/isci/phy.h | |
parent | 79e2b6b27699c916e3c7cda18a26d47fea6017fb (diff) | |
download | linux-4a33c525f0e94b57602abd1e43644cbf6f5418f4.tar.gz linux-4a33c525f0e94b57602abd1e43644cbf6f5418f4.tar.bz2 linux-4a33c525f0e94b57602abd1e43644cbf6f5418f4.zip |
isci: merge phy substates
Merged states and substates into one state machine, as we always
unconditionally transitioned to the substate machine it was straightforward to
enter that substate from the starting state.
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Adam Gruchala <adam.gruchala@intel.com>
[fixed construction, starting_state_enter, and starting check]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/phy.h')
-rw-r--r-- | drivers/scsi/isci/phy.h | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/drivers/scsi/isci/phy.h b/drivers/scsi/isci/phy.h index f1800368eda5..bf0296463c80 100644 --- a/drivers/scsi/isci/phy.h +++ b/drivers/scsi/isci/phy.h @@ -142,8 +142,6 @@ struct scic_sds_phy { const struct scic_sds_phy_state_handler *state_handlers; - struct sci_base_state_machine starting_substate_machine; - /** * This field is the pointer to the transport layer register for the SCU * hardware. @@ -436,34 +434,6 @@ enum scic_sds_phy_states { SCI_BASE_PHY_STATE_STARTING, /** - * This state indicates the the phy is now ready. Thus, the user - * is able to perform IO operations utilizing this phy as long as it - * is currently part of a valid port. - * This state is entered from the STARTING state. - */ - SCI_BASE_PHY_STATE_READY, - - /** - * This state indicates that the phy is in the process of being reset. - * In this state no new IO operations are permitted on this phy. - * This state is entered from the READY state. - */ - SCI_BASE_PHY_STATE_RESETTING, - - /** - * Simply the final state for the base phy state machine. - */ - SCI_BASE_PHY_STATE_FINAL, -}; - - -/** - * enum scic_sds_phy_starting_substates - - * - * - */ -enum scic_sds_phy_starting_substates { - /** * Initial state */ SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL, @@ -512,8 +482,27 @@ enum scic_sds_phy_starting_substates { * Exit state for this state machine */ SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL, -}; + /** + * This state indicates the the phy is now ready. Thus, the user + * is able to perform IO operations utilizing this phy as long as it + * is currently part of a valid port. + * This state is entered from the STARTING state. + */ + SCI_BASE_PHY_STATE_READY, + + /** + * This state indicates that the phy is in the process of being reset. + * In this state no new IO operations are permitted on this phy. + * This state is entered from the READY state. + */ + SCI_BASE_PHY_STATE_RESETTING, + + /** + * Simply the final state for the base phy state machine. + */ + SCI_BASE_PHY_STATE_FINAL, +}; typedef enum sci_status (*scic_sds_phy_handler_t)(struct scic_sds_phy *); |