summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.h
diff options
context:
space:
mode:
authorPiotr Sawicki <piotr.sawicki@intel.com>2011-05-12 01:52:21 +0200
committerDan Williams <dan.j.williams@intel.com>2011-07-03 13:04:49 +0200
commite91f41ef809a2d1b8cdba52ac380aecd706c93dd (patch)
tree3b3a82136e398355f0b7e07215741798a6007233 /drivers/scsi/isci/port.h
parentisci: c99 port state handlers (diff)
downloadlinux-e91f41ef809a2d1b8cdba52ac380aecd706c93dd.tar.xz
linux-e91f41ef809a2d1b8cdba52ac380aecd706c93dd.zip
isci: merge port ready substates into primary state machine
This conversion was complicated by the fact that the ready state exit routine took unconditional action beyond just stopping the substate machine (like in previous conversions). In order to ensure identical behaviour every state transition needs to be instrumented to catch ready-->!ready transitions and execute scic_sds_port_invalidate_dummy_remote_node() Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> [fix ready state exit handling] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/port.h')
-rw-r--r--drivers/scsi/isci/port.h57
1 files changed, 21 insertions, 36 deletions
diff --git a/drivers/scsi/isci/port.h b/drivers/scsi/isci/port.h
index ea41dcead3ae..e63c34d02b7d 100644
--- a/drivers/scsi/isci/port.h
+++ b/drivers/scsi/isci/port.h
@@ -81,12 +81,13 @@ enum isci_status {
* The core port object provides the the abstraction for an SCU port.
*/
struct scic_sds_port {
-
/**
* This field contains the information for the base port state machine.
*/
struct sci_base_state_machine state_machine;
+ bool ready_exit;
+
/**
* This field is the port index that is reported to the SCI USER.
* This allows the actual hardware physical port to change without
@@ -150,11 +151,6 @@ struct scic_sds_port {
*/
struct scic_sds_port_state_handler *state_handlers;
- /**
- * This field is the ready substate machine for the port.
- */
- struct sci_base_state_machine ready_substate_machine;
-
/* / Memory mapped hardware register space */
/**
@@ -175,7 +171,6 @@ struct scic_sds_port {
* This field is the VIIT register space for ths port object.
*/
struct scu_viit_entry __iomem *viit_registers;
-
};
@@ -229,35 +224,6 @@ struct scic_port_properties {
};
/**
- * enum SCIC_SDS_PORT_READY_SUBSTATES -
- *
- * This enumeration depicts all of the states for the core port ready substate
- * machine.
- */
-enum scic_sds_port_ready_substates {
- /**
- * The substate where the port is started and ready but has no
- * active phys.
- */
- SCIC_SDS_PORT_READY_SUBSTATE_WAITING,
-
- /**
- * The substate where the port is started and ready and there is
- * at least one phy operational.
- */
- SCIC_SDS_PORT_READY_SUBSTATE_OPERATIONAL,
-
- /**
- * The substate where the port is started and there was an
- * add/remove phy event. This state is only used in Automatic
- * Port Configuration Mode (APC)
- */
- SCIC_SDS_PORT_READY_SUBSTATE_CONFIGURING,
-
- SCIC_SDS_PORT_READY_MAX_SUBSTATES
-};
-
-/**
* enum scic_sds_port_states - This enumeration depicts all the states for the
* common port state machine.
*
@@ -287,6 +253,25 @@ enum scic_sds_port_states {
SCI_BASE_PORT_STATE_READY,
/**
+ * The substate where the port is started and ready but has no
+ * active phys.
+ */
+ SCIC_SDS_PORT_READY_SUBSTATE_WAITING,
+
+ /**
+ * The substate where the port is started and ready and there is
+ * at least one phy operational.
+ */
+ SCIC_SDS_PORT_READY_SUBSTATE_OPERATIONAL,
+
+ /**
+ * The substate where the port is started and there was an
+ * add/remove phy event. This state is only used in Automatic
+ * Port Configuration Mode (APC)
+ */
+ SCIC_SDS_PORT_READY_SUBSTATE_CONFIGURING,
+
+ /**
* This state indicates the port is in the process of performing a hard
* reset. Thus, the user is unable to perform IO operations on this
* port.