isci: merge ssp task management substates into primary state machine

Remove usage of the request substate machine for ssp task management
requests identified by:
	ireq->ttype == tmf_task && dev->dev_type == SAS_END_DEV;

The only routine that checks the base 'started' state is
scic_sds_io_request_tc_completion which calls the substate machine
handler if we are not in the 'started' state or we are 'started' and no
substate machine is defined.  This routine requires no conversion
because we have transitioned out of 'started' and the substate routine
will be called naturally as a result.

There are also no side effects of this conversion on exiting the
'started', state because it only stops the substate machine, which is no
longer relevant for this transaction type.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams
2011-05-10 02:28:47 -07:00
parent e2f8db509f
commit f139303d17
4 ha cambiato i file con 178 aggiunte e 286 eliminazioni

Vedi File

@@ -295,6 +295,20 @@ enum sci_base_request_states {
*/
SCI_BASE_REQUEST_STATE_STARTED,
/**
* The AWAIT_TC_COMPLETION sub-state indicates that the started raw
* task management request is waiting for the transmission of the
* initial frame (i.e. command, task, etc.).
*/
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_COMPLETION,
/**
* This sub-state indicates that the started task management request
* is waiting for the reception of an unsolicited frame
* (i.e. response IU).
*/
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE,
/**
* This state indicates that the request has completed.
* This state is entered from the STARTED state. This state is entered from
@@ -451,7 +465,6 @@ void scic_sds_stp_request_assign_buffers(struct scic_sds_request *sci_req);
void scic_sds_smp_request_assign_buffers(struct scic_sds_request *sci_req);
enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req);
enum sci_status scic_sds_io_request_terminate(struct scic_sds_request *sci_req);
void scic_sds_io_request_copy_response(struct scic_sds_request *sci_req);
enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_req,
u32 event_code);
enum sci_status scic_sds_io_request_frame_handler(struct scic_sds_request *sci_req,
@@ -459,29 +472,6 @@ enum sci_status scic_sds_io_request_frame_handler(struct scic_sds_request *sci_r
enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req);
enum sci_status scic_sds_request_started_state_abort_handler(struct scic_sds_request *sci_req);
/**
* enum _scic_sds_io_request_started_task_mgmt_substates - This enumeration
* depicts all of the substates for a task management request to be
* performed in the STARTED super-state.
*
*
*/
enum scic_sds_raw_request_started_task_mgmt_substates {
/**
* The AWAIT_TC_COMPLETION sub-state indicates that the started raw
* task management request is waiting for the transmission of the
* initial frame (i.e. command, task, etc.).
*/
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_COMPLETION,
/**
* This sub-state indicates that the started task management request
* is waiting for the reception of an unsolicited frame
* (i.e. response IU).
*/
SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE,
};
/**
* enum _scic_sds_smp_request_started_substates - This enumeration depicts all