aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-10 05:28:47 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:47 -0400
commitf139303d17c47eff4c5b5407dee0a6d43e8fd146 (patch)
treeb58d13c01567500e7b0a451bbcd46dd78ceb4da7 /drivers/scsi/isci/request.h
parente2f8db509fdd354bb7a68c86515e9d2d8909ccc9 (diff)
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>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h38
1 files changed, 14 insertions, 24 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 932ea767c8c2..b5c5b063a369 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -296,6 +296,20 @@ enum sci_base_request_states {
296 SCI_BASE_REQUEST_STATE_STARTED, 296 SCI_BASE_REQUEST_STATE_STARTED,
297 297
298 /** 298 /**
299 * The AWAIT_TC_COMPLETION sub-state indicates that the started raw
300 * task management request is waiting for the transmission of the
301 * initial frame (i.e. command, task, etc.).
302 */
303 SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_COMPLETION,
304
305 /**
306 * This sub-state indicates that the started task management request
307 * is waiting for the reception of an unsolicited frame
308 * (i.e. response IU).
309 */
310 SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE,
311
312 /**
299 * This state indicates that the request has completed. 313 * This state indicates that the request has completed.
300 * This state is entered from the STARTED state. This state is entered from 314 * This state is entered from the STARTED state. This state is entered from
301 * the ABORTING state. 315 * the ABORTING state.
@@ -451,7 +465,6 @@ void scic_sds_stp_request_assign_buffers(struct scic_sds_request *sci_req);
451void scic_sds_smp_request_assign_buffers(struct scic_sds_request *sci_req); 465void scic_sds_smp_request_assign_buffers(struct scic_sds_request *sci_req);
452enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req); 466enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req);
453enum sci_status scic_sds_io_request_terminate(struct scic_sds_request *sci_req); 467enum sci_status scic_sds_io_request_terminate(struct scic_sds_request *sci_req);
454void scic_sds_io_request_copy_response(struct scic_sds_request *sci_req);
455enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_req, 468enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_req,
456 u32 event_code); 469 u32 event_code);
457enum sci_status scic_sds_io_request_frame_handler(struct scic_sds_request *sci_req, 470enum 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
459enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req); 472enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req);
460enum sci_status scic_sds_request_started_state_abort_handler(struct scic_sds_request *sci_req); 473enum sci_status scic_sds_request_started_state_abort_handler(struct scic_sds_request *sci_req);
461 474
462/**
463 * enum _scic_sds_io_request_started_task_mgmt_substates - This enumeration
464 * depicts all of the substates for a task management request to be
465 * performed in the STARTED super-state.
466 *
467 *
468 */
469enum scic_sds_raw_request_started_task_mgmt_substates {
470 /**
471 * The AWAIT_TC_COMPLETION sub-state indicates that the started raw
472 * task management request is waiting for the transmission of the
473 * initial frame (i.e. command, task, etc.).
474 */
475 SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_COMPLETION,
476
477 /**
478 * This sub-state indicates that the started task management request
479 * is waiting for the reception of an unsolicited frame
480 * (i.e. response IU).
481 */
482 SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE,
483};
484
485 475
486/** 476/**
487 * enum _scic_sds_smp_request_started_substates - This enumeration depicts all 477 * enum _scic_sds_smp_request_started_substates - This enumeration depicts all