Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a0fff7b authored by Maciej Patelczyk's avatar Maciej Patelczyk Committed by Dan Williams
Browse files

isci: Removed struct sci_base_object from state machine.



Changed any occurrence of struct sci_base_object into void.

Signed-off-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent e76d8057
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -58,13 +58,9 @@

#include "sci_object.h"

typedef void (*sci_base_state_handler_t)(
	void
	);
typedef void (*sci_base_state_handler_t)(void);

typedef void (*sci_state_transition_t)(
	struct sci_base_object *base_object
	);
typedef void (*sci_state_transition_t)(void *base_object);

/**
 * struct sci_base_state - The base state object abstracts the fields common to
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static void sci_state_machine_enter_state(struct sci_base_state_machine *sm)
 *
 */
void sci_base_state_machine_construct(struct sci_base_state_machine *sm,
				      struct sci_base_object *owner,
				      void *owner,
				      const struct sci_base_state *state_table,
				      u32 initial_state)
{
+2 −2
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ struct sci_base_state_machine {
	 * associated.  It serves as a cookie to be provided to the state
	 * enter/exit methods.
	 */
	struct sci_base_object *state_machine_owner;
	void *state_machine_owner;

	/**
	 * This field simply indicates the state value for the state machine's
@@ -121,7 +121,7 @@ struct sci_base_state_machine {

void sci_base_state_machine_construct(
	struct sci_base_state_machine *this_state_machine,
	struct sci_base_object *state_machine_owner,
	void *state_machine_owner,
	const struct sci_base_state *state_table,
	u32 initial_state);

+13 −19
Original line number Diff line number Diff line
@@ -2882,7 +2882,7 @@ enum sci_status scic_controller_start(struct scic_sds_controller *scic,

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_controller
 * @object: This is the object which is cast to a struct scic_sds_controller
 *    object.
 *
 * This method implements the actions taken by the struct scic_sds_controller on entry
@@ -2890,8 +2890,7 @@ enum sci_status scic_controller_start(struct scic_sds_controller *scic,
 * controllers initial state. none This function should initialze the
 * controller object.
 */
static void scic_sds_controller_initial_state_enter(
	struct sci_base_object *object)
static void scic_sds_controller_initial_state_enter(void *object)
{
	struct scic_sds_controller *scic;

@@ -2903,15 +2902,14 @@ static void scic_sds_controller_initial_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_controller
 * @object: This is the object which is cast to a struct scic_sds_controller
 *    object.
 *
 * This method implements the actions taken by the struct scic_sds_controller on exit
 * from the SCI_BASE_CONTROLLER_STATE_STARTING. - This function stops the
 * controller starting timeout timer. none
 */
static inline void scic_sds_controller_starting_state_exit(
	struct sci_base_object *object)
static inline void scic_sds_controller_starting_state_exit(void *object)
{
	struct scic_sds_controller *scic = (struct scic_sds_controller *)object;

@@ -2920,15 +2918,14 @@ static inline void scic_sds_controller_starting_state_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_controller
 * @object: This is the object which is cast to a struct scic_sds_controller
 *    object.
 *
 * This method implements the actions taken by the struct scic_sds_controller on entry
 * to the SCI_BASE_CONTROLLER_STATE_READY. - Set the state handlers to the
 * controllers ready state. none
 */
static void scic_sds_controller_ready_state_enter(
	struct sci_base_object *object)
static void scic_sds_controller_ready_state_enter(void *object)
{
	struct scic_sds_controller *scic;

@@ -2941,14 +2938,13 @@ static void scic_sds_controller_ready_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_controller
 * @object: This is the object which is cast to a struct scic_sds_controller
 *    object.
 *
 * This method implements the actions taken by the struct scic_sds_controller on exit
 * from the SCI_BASE_CONTROLLER_STATE_READY. - This function does nothing. none
 */
static void scic_sds_controller_ready_state_exit(
	struct sci_base_object *object)
static void scic_sds_controller_ready_state_exit(void *object)
{
	struct scic_sds_controller *scic;

@@ -2960,7 +2956,7 @@ static void scic_sds_controller_ready_state_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_controller
 * @object: This is the object which is cast to a struct scic_sds_controller
 *    object.
 *
 * This method implements the actions taken by the struct scic_sds_controller on entry
@@ -2968,8 +2964,7 @@ static void scic_sds_controller_ready_state_exit(
 * controllers ready state. - Stop the phys on this controller - Stop the ports
 * on this controller - Stop all of the remote devices on this controller none
 */
static void scic_sds_controller_stopping_state_enter(
	struct sci_base_object *object)
static void scic_sds_controller_stopping_state_enter(void *object)
{
	struct scic_sds_controller *scic;

@@ -2983,15 +2978,14 @@ static void scic_sds_controller_stopping_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct
 * @object: This is the object which is cast to a struct
 * scic_sds_controller object.
 *
 * This funciton implements the actions taken by the struct scic_sds_controller
 * on exit from the SCI_BASE_CONTROLLER_STATE_STOPPING. -
 * This function stops the controller stopping timeout timer.
 */
static inline void scic_sds_controller_stopping_state_exit(
	struct sci_base_object *object)
static inline void scic_sds_controller_stopping_state_exit(void *object)
{
	struct scic_sds_controller *scic =
		(struct scic_sds_controller *)object;
@@ -2999,7 +2993,7 @@ static inline void scic_sds_controller_stopping_state_exit(
	isci_timer_stop(scic->timeout_timer);
}

static void scic_sds_controller_resetting_state_enter(struct sci_base_object *object)
static void scic_sds_controller_resetting_state_enter(void *object)
{
	struct scic_sds_controller *scic;

+44 −65
Original line number Diff line number Diff line
@@ -1556,14 +1556,14 @@ static const struct scic_sds_phy_state_handler scic_sds_phy_starting_substate_ha

/**
 * scic_sds_phy_starting_initial_substate_enter -
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL. - The initial state
 * handlers are put in place for the struct scic_sds_phy object. - The state is
 * changed to the wait phy type event notification. none
 */
static void scic_sds_phy_starting_initial_substate_enter(struct sci_base_object *object)
static void scic_sds_phy_starting_initial_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1579,14 +1579,13 @@ static void scic_sds_phy_starting_initial_substate_enter(struct sci_base_object

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_PHY_TYPE_EN. - Set the
 * struct scic_sds_phy object state handlers for this state. none
 */
static void scic_sds_phy_starting_await_ossp_en_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_ossp_en_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1599,14 +1598,14 @@ static void scic_sds_phy_starting_await_ossp_en_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SPEED_EN. - Set the
 * struct scic_sds_phy object state handlers for this state. none
 */
static void scic_sds_phy_starting_await_sas_speed_en_substate_enter(
	struct sci_base_object *object)
		void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1619,14 +1618,13 @@ static void scic_sds_phy_starting_await_sas_speed_en_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF. - Set the
 * struct scic_sds_phy object state handlers for this state. none
 */
static void scic_sds_phy_starting_await_iaf_uf_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_iaf_uf_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1639,15 +1637,14 @@ static void scic_sds_phy_starting_await_iaf_uf_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_POWER. - Set the
 * struct scic_sds_phy object state handlers for this state. - Add this phy object to
 * the power control queue none
 */
static void scic_sds_phy_starting_await_sas_power_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sas_power_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1665,14 +1662,13 @@ static void scic_sds_phy_starting_await_sas_power_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on exiting
 * the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_POWER. - Remove the
 * struct scic_sds_phy object from the power control queue. none
 */
static void scic_sds_phy_starting_await_sas_power_substate_exit(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sas_power_substate_exit(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1685,15 +1681,14 @@ static void scic_sds_phy_starting_await_sas_power_substate_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_POWER. - Set the
 * struct scic_sds_phy object state handlers for this state. - Add this phy object to
 * the power control queue none
 */
static void scic_sds_phy_starting_await_sata_power_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sata_power_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1711,14 +1706,13 @@ static void scic_sds_phy_starting_await_sata_power_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on exiting
 * the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_POWER. - Remove the
 * struct scic_sds_phy object from the power control queue. none
 */
static void scic_sds_phy_starting_await_sata_power_substate_exit(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sata_power_substate_exit(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1732,15 +1726,13 @@ static void scic_sds_phy_starting_await_sata_power_substate_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This function will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_PHY_EN. - Set the
 * struct scic_sds_phy object state handlers for this state. none
 */
static void scic_sds_phy_starting_await_sata_phy_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sata_phy_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;

@@ -1754,8 +1746,7 @@ static void scic_sds_phy_starting_await_sata_phy_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy
 * on exiting
@@ -1763,7 +1754,7 @@ static void scic_sds_phy_starting_await_sata_phy_substate_enter(
 * that was started on entry to await sata phy event notification none
 */
static inline void scic_sds_phy_starting_await_sata_phy_substate_exit(
	struct sci_base_object *object)
		void *object)
{
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;

@@ -1772,14 +1763,13 @@ static inline void scic_sds_phy_starting_await_sata_phy_substate_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_SPEED_EN. - Set the
 * struct scic_sds_phy object state handlers for this state. none
 */
static void scic_sds_phy_starting_await_sata_speed_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sata_speed_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;

@@ -1793,8 +1783,7 @@ static void scic_sds_phy_starting_await_sata_speed_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This function will perform the actions required by the
 * struct scic_sds_phy on exiting
@@ -1802,7 +1791,7 @@ static void scic_sds_phy_starting_await_sata_speed_substate_enter(
 * that was started on entry to await sata phy event notification none
 */
static inline void scic_sds_phy_starting_await_sata_speed_substate_exit(
	struct sci_base_object *object)
	void *object)
{
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;

@@ -1811,8 +1800,7 @@ static inline void scic_sds_phy_starting_await_sata_speed_substate_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This function will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SIG_FIS_UF. - Set the
@@ -1820,8 +1808,7 @@ static inline void scic_sds_phy_starting_await_sata_speed_substate_exit(
 * - Start the SIGNATURE FIS
 * timeout timer none
 */
static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(void *object)
{
	bool continue_to_ready_state;
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;
@@ -1851,8 +1838,7 @@ static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This function will perform the actions required by the
 * struct scic_sds_phy on exiting
@@ -1860,7 +1846,7 @@ static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(
 * FIS timeout timer. none
 */
static inline void scic_sds_phy_starting_await_sig_fis_uf_substate_exit(
	struct sci_base_object *object)
	void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -1871,14 +1857,14 @@ static inline void scic_sds_phy_starting_await_sig_fis_uf_substate_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL. - Set the struct scic_sds_phy
 * object state handlers for this state. - Change base state machine to the
 * ready state. none
 */
static void scic_sds_phy_starting_final_substate_enter(struct sci_base_object *object)
static void scic_sds_phy_starting_final_substate_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2206,14 +2192,13 @@ static void scu_link_layer_tx_hard_reset(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_INITIAL. - This function sets the state
 * handlers for the phy object base state machine initial state. none
 */
static void scic_sds_phy_initial_state_enter(
	struct sci_base_object *object)
static void scic_sds_phy_initial_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2224,15 +2209,14 @@ static void scic_sds_phy_initial_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a
 * struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This function will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_INITIAL. - This function sets the state
 * handlers for the phy object base state machine initial state. - The SCU
 * hardware is requested to stop the protocol engine. none
 */
static void scic_sds_phy_stopped_state_enter(struct sci_base_object *object)
static void scic_sds_phy_stopped_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object;
	struct scic_sds_controller *scic = scic_sds_phy_get_controller(sci_phy);
@@ -2266,7 +2250,7 @@ static void scic_sds_phy_stopped_state_enter(struct sci_base_object *object)

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_STARTING. - This function sets the state
@@ -2276,8 +2260,7 @@ static void scic_sds_phy_stopped_state_enter(struct sci_base_object *object)
 * state then the struct scic_sds_controller is informed that the phy has gone link
 * down. none
 */
static void scic_sds_phy_starting_state_enter(
	struct sci_base_object *object)
static void scic_sds_phy_starting_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2307,7 +2290,7 @@ static void scic_sds_phy_starting_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_READY. - This function sets the state
@@ -2315,8 +2298,7 @@ static void scic_sds_phy_starting_state_enter(
 * hardware protocol engine is resumed. - The struct scic_sds_controller is informed
 * that the phy object has gone link up. none
 */
static void scic_sds_phy_ready_state_enter(
	struct sci_base_object *object)
static void scic_sds_phy_ready_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2333,14 +2315,13 @@ static void scic_sds_phy_ready_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on exiting
 * the SCI_BASE_PHY_STATE_INITIAL. This function suspends the SCU hardware
 * protocol engine represented by this struct scic_sds_phy object. none
 */
static void scic_sds_phy_ready_state_exit(
	struct sci_base_object *object)
static void scic_sds_phy_ready_state_exit(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2351,14 +2332,13 @@ static void scic_sds_phy_ready_state_exit(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_RESETTING. - This function sets the state
 * handlers for the phy object base state machine resetting state. none
 */
static void scic_sds_phy_resetting_state_enter(
	struct sci_base_object *object)
static void scic_sds_phy_resetting_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

@@ -2387,14 +2367,13 @@ static void scic_sds_phy_resetting_state_enter(

/**
 *
 * @object: This is the struct sci_base_object which is cast to a struct scic_sds_phy object.
 * @object: This is the object which is cast to a struct scic_sds_phy object.
 *
 * This method will perform the actions required by the struct scic_sds_phy on
 * entering the SCI_BASE_PHY_STATE_FINAL. - This function sets the state
 * handlers for the phy object base state machine final state. none
 */
static void scic_sds_phy_final_state_enter(
	struct sci_base_object *object)
static void scic_sds_phy_final_state_enter(void *object)
{
	struct scic_sds_phy *sci_phy;

Loading