diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-10 05:28:48 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:47 -0400 |
commit | c72086e3c2897eaca5b99c005dd9844fdc784981 (patch) | |
tree | f15c4895fd0b761b360961bce15b9f07c7099548 /drivers/scsi/isci/request.h | |
parent | f139303d17c47eff4c5b5407dee0a6d43e8fd146 (diff) |
isci: merge smp request substates into primary state machine
Remove usage of the request substate machine for smp requests identified by:
task->task_proto == SAS_PROTOCOL_SMP
While merging over the smp_request infrastructure noticed that all the
assign buffer implementations are now equal, so moved it to
scic_sds_general_request_construct.
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.h | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h index b5c5b063a369..d090cb1a14d6 100644 --- a/drivers/scsi/isci/request.h +++ b/drivers/scsi/isci/request.h | |||
@@ -88,7 +88,7 @@ enum sci_request_protocol { | |||
88 | SCIC_SMP_PROTOCOL, | 88 | SCIC_SMP_PROTOCOL, |
89 | SCIC_SSP_PROTOCOL, | 89 | SCIC_SSP_PROTOCOL, |
90 | SCIC_STP_PROTOCOL | 90 | SCIC_STP_PROTOCOL |
91 | }; /* XXX remove me, use sas_task.dev instead */; | 91 | }; /* XXX remove me, use sas_task.{dev|task_proto} instead */; |
92 | 92 | ||
93 | struct scic_sds_request { | 93 | struct scic_sds_request { |
94 | /** | 94 | /** |
@@ -310,6 +310,19 @@ enum sci_base_request_states { | |||
310 | SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE, | 310 | SCIC_SDS_IO_REQUEST_STARTED_TASK_MGMT_SUBSTATE_AWAIT_TC_RESPONSE, |
311 | 311 | ||
312 | /** | 312 | /** |
313 | * This sub-state indicates that the started task management request | ||
314 | * is waiting for the reception of an unsolicited frame | ||
315 | * (i.e. response IU). | ||
316 | */ | ||
317 | SCIC_SDS_SMP_REQUEST_STARTED_SUBSTATE_AWAIT_RESPONSE, | ||
318 | |||
319 | /** | ||
320 | * The AWAIT_TC_COMPLETION sub-state indicates that the started SMP request is | ||
321 | * waiting for the transmission of the initial frame (i.e. command, task, etc.). | ||
322 | */ | ||
323 | SCIC_SDS_SMP_REQUEST_STARTED_SUBSTATE_AWAIT_TC_COMPLETION, | ||
324 | |||
325 | /** | ||
313 | * This state indicates that the request has completed. | 326 | * This state indicates that the request has completed. |
314 | * This state is entered from the STARTED state. This state is entered from | 327 | * This state is entered from the STARTED state. This state is entered from |
315 | * the ABORTING state. | 328 | * the ABORTING state. |
@@ -461,8 +474,6 @@ scic_sds_io_request_tc_completion(struct scic_sds_request *request, u32 completi | |||
461 | } | 474 | } |
462 | 475 | ||
463 | void scic_sds_request_build_sgl(struct scic_sds_request *sci_req); | 476 | void scic_sds_request_build_sgl(struct scic_sds_request *sci_req); |
464 | void scic_sds_stp_request_assign_buffers(struct scic_sds_request *sci_req); | ||
465 | void scic_sds_smp_request_assign_buffers(struct scic_sds_request *sci_req); | ||
466 | enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req); | 477 | enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req); |
467 | enum sci_status scic_sds_io_request_terminate(struct scic_sds_request *sci_req); | 478 | enum sci_status scic_sds_io_request_terminate(struct scic_sds_request *sci_req); |
468 | enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_req, | 479 | enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_req, |
@@ -473,30 +484,6 @@ enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req | |||
473 | enum sci_status scic_sds_request_started_state_abort_handler(struct scic_sds_request *sci_req); | 484 | enum sci_status scic_sds_request_started_state_abort_handler(struct scic_sds_request *sci_req); |
474 | 485 | ||
475 | 486 | ||
476 | /** | ||
477 | * enum _scic_sds_smp_request_started_substates - This enumeration depicts all | ||
478 | * of the substates for a SMP request to be performed in the STARTED | ||
479 | * super-state. | ||
480 | * | ||
481 | * | ||
482 | */ | ||
483 | enum scic_sds_smp_request_started_substates { | ||
484 | /** | ||
485 | * This sub-state indicates that the started task management request | ||
486 | * is waiting for the reception of an unsolicited frame | ||
487 | * (i.e. response IU). | ||
488 | */ | ||
489 | SCIC_SDS_SMP_REQUEST_STARTED_SUBSTATE_AWAIT_RESPONSE, | ||
490 | |||
491 | /** | ||
492 | * The AWAIT_TC_COMPLETION sub-state indicates that the started SMP request is | ||
493 | * waiting for the transmission of the initial frame (i.e. command, task, etc.). | ||
494 | */ | ||
495 | SCIC_SDS_SMP_REQUEST_STARTED_SUBSTATE_AWAIT_TC_COMPLETION, | ||
496 | }; | ||
497 | |||
498 | |||
499 | |||
500 | /* XXX open code in caller */ | 487 | /* XXX open code in caller */ |
501 | static inline void *scic_request_get_virt_addr(struct scic_sds_request *sci_req, | 488 | static inline void *scic_request_get_virt_addr(struct scic_sds_request *sci_req, |
502 | dma_addr_t phys_addr) | 489 | dma_addr_t phys_addr) |
@@ -791,7 +778,6 @@ enum sci_status scic_task_request_construct(struct scic_sds_controller *scic, | |||
791 | struct scic_sds_request *sci_req); | 778 | struct scic_sds_request *sci_req); |
792 | enum sci_status scic_task_request_construct_ssp(struct scic_sds_request *sci_req); | 779 | enum sci_status scic_task_request_construct_ssp(struct scic_sds_request *sci_req); |
793 | enum sci_status scic_task_request_construct_sata(struct scic_sds_request *sci_req); | 780 | enum sci_status scic_task_request_construct_sata(struct scic_sds_request *sci_req); |
794 | enum sci_status scic_io_request_construct_smp(struct scic_sds_request *sci_req); | ||
795 | void scic_stp_io_request_set_ncq_tag(struct scic_sds_request *sci_req, u16 ncq_tag); | 781 | void scic_stp_io_request_set_ncq_tag(struct scic_sds_request *sci_req, u16 ncq_tag); |
796 | void scic_sds_smp_request_copy_response(struct scic_sds_request *sci_req); | 782 | void scic_sds_smp_request_copy_response(struct scic_sds_request *sci_req); |
797 | #endif /* !defined(_ISCI_REQUEST_H_) */ | 783 | #endif /* !defined(_ISCI_REQUEST_H_) */ |