aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-01 18:53:25 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:45 -0400
commit84b9b029bc4121c43294e27aeaa0350a6d07450c (patch)
tree92d10d8b2982f81f38f75449a5ab148863c84ea7 /drivers/scsi/isci
parentc027a20bf3fa831fed70b1662e526be04447ab07 (diff)
isci: unify remote_device start_task_handlers
Implement all states in scic_sds_remote_device_start_task() and delete the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/remote_device.c236
-rw-r--r--drivers/scsi/isci/remote_device.h6
2 files changed, 90 insertions, 152 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index 3580c0a5a719..3e7e95200a1e 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -521,22 +521,97 @@ enum sci_status scic_sds_remote_device_complete_io(struct scic_sds_controller *s
521 return status; 521 return status;
522} 522}
523 523
524/** 524static void scic_sds_remote_device_continue_request(void *dev)
525 * 525{
526 * @controller: The controller that is starting the task request. 526 struct scic_sds_remote_device *sci_dev = dev;
527 * @sci_dev: The remote device for which the start task handling is being 527
528 * requested. 528 /* we need to check if this request is still valid to continue. */
529 * @io_request: The task request that is being started. 529 if (sci_dev->working_request)
530 * 530 scic_controller_continue_io(sci_dev->working_request);
531 * This method invokes the remote device start task handler. enum sci_status 531}
532 */ 532
533enum sci_status scic_sds_remote_device_start_task( 533enum sci_status scic_sds_remote_device_start_task(struct scic_sds_controller *scic,
534 struct scic_sds_controller *controller, 534 struct scic_sds_remote_device *sci_dev,
535 struct scic_sds_remote_device *sci_dev, 535 struct scic_sds_request *sci_req)
536 struct scic_sds_request *io_request)
537{ 536{
538 return sci_dev->state_handlers->start_task_handler( 537 struct sci_base_state_machine *sm = &sci_dev->state_machine;
539 sci_dev, io_request); 538 enum scic_sds_remote_device_states state = sm->current_state_id;
539 struct scic_sds_port *sci_port = sci_dev->owning_port;
540 enum sci_status status;
541
542 switch (state) {
543 case SCI_BASE_REMOTE_DEVICE_STATE_INITIAL:
544 case SCI_BASE_REMOTE_DEVICE_STATE_STOPPED:
545 case SCI_BASE_REMOTE_DEVICE_STATE_STARTING:
546 case SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE:
547 case SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD:
548 case SCI_BASE_REMOTE_DEVICE_STATE_STOPPING:
549 case SCI_BASE_REMOTE_DEVICE_STATE_FAILED:
550 case SCI_BASE_REMOTE_DEVICE_STATE_RESETTING:
551 case SCI_BASE_REMOTE_DEVICE_STATE_FINAL:
552 default:
553 dev_warn(scirdev_to_dev(sci_dev), "%s: in wrong state: %d\n",
554 __func__, state);
555 return SCI_FAILURE_INVALID_STATE;
556 case SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE:
557 case SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD:
558 case SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ:
559 case SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR:
560 case SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_AWAIT_RESET:
561 status = scic_sds_port_start_io(sci_port, sci_dev, sci_req);
562 if (status != SCI_SUCCESS)
563 return status;
564
565 status = scic_sds_remote_node_context_start_task(&sci_dev->rnc, sci_req);
566 if (status != SCI_SUCCESS)
567 goto out;
568
569 status = sci_req->state_handlers->start_handler(sci_req);
570 if (status != SCI_SUCCESS)
571 goto out;
572
573 /* Note: If the remote device state is not IDLE this will
574 * replace the request that probably resulted in the task
575 * management request.
576 */
577 sci_dev->working_request = sci_req;
578 sci_base_state_machine_change_state(sm, SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD);
579
580 /* The remote node context must cleanup the TCi to NCQ mapping
581 * table. The only way to do this correctly is to either write
582 * to the TLCR register or to invalidate and repost the RNC. In
583 * either case the remote node context state machine will take
584 * the correct action when the remote node context is suspended
585 * and later resumed.
586 */
587 scic_sds_remote_node_context_suspend(&sci_dev->rnc,
588 SCI_SOFTWARE_SUSPENSION, NULL, NULL);
589 scic_sds_remote_node_context_resume(&sci_dev->rnc,
590 scic_sds_remote_device_continue_request,
591 sci_dev);
592
593 out:
594 scic_sds_remote_device_start_request(sci_dev, sci_req, status);
595 /* We need to let the controller start request handler know that
596 * it can't post TC yet. We will provide a callback function to
597 * post TC when RNC gets resumed.
598 */
599 return SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS;
600 case SCI_BASE_REMOTE_DEVICE_STATE_READY:
601 status = scic_sds_port_start_io(sci_port, sci_dev, sci_req);
602 if (status != SCI_SUCCESS)
603 return status;
604
605 status = scic_sds_remote_node_context_start_task(&sci_dev->rnc, sci_req);
606 if (status != SCI_SUCCESS)
607 break;
608
609 status = scic_sds_request_start(sci_req);
610 break;
611 }
612 scic_sds_remote_device_start_request(sci_dev, sci_req, status);
613
614 return status;
540} 615}
541 616
542/** 617/**
@@ -589,23 +664,6 @@ static void remote_device_resume_done(void *_dev)
589 } 664 }
590} 665}
591 666
592/**
593 *
594 * @request: This parameter specifies the request being continued.
595 *
596 * This method will continue to post tc for a STP request. This method usually
597 * serves as a callback when RNC gets resumed during a task management
598 * sequence. none
599 */
600static void scic_sds_remote_device_continue_request(void *dev)
601{
602 struct scic_sds_remote_device *sci_dev = dev;
603
604 /* we need to check if this request is still valid to continue. */
605 if (sci_dev->working_request)
606 scic_controller_continue_io(sci_dev->working_request);
607}
608
609static enum sci_status 667static enum sci_status
610default_device_handler(struct scic_sds_remote_device *sci_dev, 668default_device_handler(struct scic_sds_remote_device *sci_dev,
611 const char *func) 669 const char *func)
@@ -737,13 +795,6 @@ static enum sci_status scic_sds_remote_device_default_frame_handler(
737 return SCI_FAILURE_INVALID_STATE; 795 return SCI_FAILURE_INVALID_STATE;
738} 796}
739 797
740static enum sci_status scic_sds_remote_device_default_start_request_handler(
741 struct scic_sds_remote_device *sci_dev,
742 struct scic_sds_request *request)
743{
744 return default_device_handler(sci_dev, __func__);
745}
746
747static enum sci_status scic_sds_remote_device_default_complete_request_handler( 798static enum sci_status scic_sds_remote_device_default_complete_request_handler(
748 struct scic_sds_remote_device *sci_dev, 799 struct scic_sds_remote_device *sci_dev,
749 struct scic_sds_request *request) 800 struct scic_sds_request *request)
@@ -817,36 +868,6 @@ static enum sci_status scic_sds_remote_device_general_event_handler(
817} 868}
818 869
819/* 870/*
820 * This method will attempt to start a task request for this device object. The
821 * remote device object will issue the start request for the task and if
822 * successful it will start the request for the port object then increment its
823 * own requet count. enum sci_status SCI_SUCCESS if the task request is started for
824 * this device object. SCI_FAILURE_INSUFFICIENT_RESOURCES if the io request
825 * object could not get the resources to start.
826 */
827static enum sci_status scic_sds_remote_device_ready_state_start_task_handler(
828 struct scic_sds_remote_device *sci_dev,
829 struct scic_sds_request *request)
830{
831 enum sci_status result;
832
833 /* See if the port is in a state where we can start the IO request */
834 result = scic_sds_port_start_io(
835 scic_sds_remote_device_get_port(sci_dev), sci_dev, request);
836
837 if (result == SCI_SUCCESS) {
838 result = scic_sds_remote_node_context_start_task(&sci_dev->rnc,
839 request);
840 if (result == SCI_SUCCESS)
841 result = scic_sds_request_start(request);
842
843 scic_sds_remote_device_start_request(sci_dev, request, result);
844 }
845
846 return result;
847}
848
849/*
850 * This method will complete the request for the remote device object. The 871 * This method will complete the request for the remote device object. The
851 * method will call the completion handler for the request object and if 872 * method will call the completion handler for the request object and if
852 * successful it will complete the request on the port object then decrement 873 * successful it will complete the request on the port object then decrement
@@ -976,68 +997,6 @@ static enum sci_status scic_sds_stp_remote_device_complete_request(struct scic_s
976 return status; 997 return status;
977} 998}
978 999
979/* scic_sds_stp_remote_device_ready_substate_start_request_handler - start stp
980 * @device: The target device a task management request towards to.
981 * @request: The task request.
982 *
983 * This is the READY NCQ substate handler to start task management request. In
984 * this routine, we suspend and resume the RNC. enum sci_status Always return
985 * SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS status to let
986 * controller_start_task_handler know that the controller can't post TC for
987 * task request yet, instead, when RNC gets resumed, a controller_continue_task
988 * callback will be called.
989 */
990static enum sci_status scic_sds_stp_remote_device_ready_substate_start_request_handler(
991 struct scic_sds_remote_device *device,
992 struct scic_sds_request *request)
993{
994 enum sci_status status;
995
996 /* Will the port allow the io request to start? */
997 status = device->owning_port->state_handlers->start_io_handler(
998 device->owning_port, device, request);
999 if (status != SCI_SUCCESS)
1000 return status;
1001
1002 status = scic_sds_remote_node_context_start_task(&device->rnc, request);
1003 if (status != SCI_SUCCESS)
1004 goto out;
1005
1006 status = request->state_handlers->start_handler(request);
1007 if (status != SCI_SUCCESS)
1008 goto out;
1009
1010 /*
1011 * Note: If the remote device state is not IDLE this will replace
1012 * the request that probably resulted in the task management request.
1013 */
1014 device->working_request = request;
1015 sci_base_state_machine_change_state(&device->state_machine,
1016 SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD);
1017
1018 /*
1019 * The remote node context must cleanup the TCi to NCQ mapping table.
1020 * The only way to do this correctly is to either write to the TLCR
1021 * register or to invalidate and repost the RNC. In either case the
1022 * remote node context state machine will take the correct action when
1023 * the remote node context is suspended and later resumed.
1024 */
1025 scic_sds_remote_node_context_suspend(&device->rnc,
1026 SCI_SOFTWARE_SUSPENSION, NULL, NULL);
1027 scic_sds_remote_node_context_resume(&device->rnc,
1028 scic_sds_remote_device_continue_request,
1029 device);
1030
1031out:
1032 scic_sds_remote_device_start_request(device, request, status);
1033 /*
1034 * We need to let the controller start request handler know that it can't
1035 * post TC yet. We will provide a callback function to post TC when RNC gets
1036 * resumed.
1037 */
1038 return SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS;
1039}
1040
1041static enum sci_status scic_sds_stp_remote_device_ready_idle_substate_event_handler( 1000static enum sci_status scic_sds_stp_remote_device_ready_idle_substate_event_handler(
1042 struct scic_sds_remote_device *sci_dev, 1001 struct scic_sds_remote_device *sci_dev,
1043 u32 event_code) 1002 u32 event_code)
@@ -1154,7 +1113,6 @@ static enum sci_status scic_sds_smp_remote_device_ready_cmd_substate_frame_handl
1154 1113
1155static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_state_handler_table[] = { 1114static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_state_handler_table[] = {
1156 [SCI_BASE_REMOTE_DEVICE_STATE_INITIAL] = { 1115 [SCI_BASE_REMOTE_DEVICE_STATE_INITIAL] = {
1157 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1158 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1116 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1159 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1117 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1160 .resume_handler = scic_sds_remote_device_default_resume_handler, 1118 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1162,7 +1120,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1162 .frame_handler = scic_sds_remote_device_default_frame_handler 1120 .frame_handler = scic_sds_remote_device_default_frame_handler
1163 }, 1121 },
1164 [SCI_BASE_REMOTE_DEVICE_STATE_STOPPED] = { 1122 [SCI_BASE_REMOTE_DEVICE_STATE_STOPPED] = {
1165 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1166 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1123 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1167 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1124 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1168 .resume_handler = scic_sds_remote_device_default_resume_handler, 1125 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1170,7 +1127,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1170 .frame_handler = scic_sds_remote_device_default_frame_handler 1127 .frame_handler = scic_sds_remote_device_default_frame_handler
1171 }, 1128 },
1172 [SCI_BASE_REMOTE_DEVICE_STATE_STARTING] = { 1129 [SCI_BASE_REMOTE_DEVICE_STATE_STARTING] = {
1173 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1174 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1130 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1175 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1131 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1176 .resume_handler = scic_sds_remote_device_default_resume_handler, 1132 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1178,7 +1134,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1178 .frame_handler = scic_sds_remote_device_default_frame_handler 1134 .frame_handler = scic_sds_remote_device_default_frame_handler
1179 }, 1135 },
1180 [SCI_BASE_REMOTE_DEVICE_STATE_READY] = { 1136 [SCI_BASE_REMOTE_DEVICE_STATE_READY] = {
1181 .start_task_handler = scic_sds_remote_device_ready_state_start_task_handler,
1182 .complete_task_handler = scic_sds_remote_device_ready_state_complete_request_handler, 1137 .complete_task_handler = scic_sds_remote_device_ready_state_complete_request_handler,
1183 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1138 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1184 .resume_handler = scic_sds_remote_device_default_resume_handler, 1139 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1186,7 +1141,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1186 .frame_handler = scic_sds_remote_device_general_frame_handler, 1141 .frame_handler = scic_sds_remote_device_general_frame_handler,
1187 }, 1142 },
1188 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE] = { 1143 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE] = {
1189 .start_task_handler = scic_sds_stp_remote_device_ready_substate_start_request_handler,
1190 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1144 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1191 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1145 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1192 .resume_handler = scic_sds_remote_device_default_resume_handler, 1146 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1194,7 +1148,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1194 .frame_handler = scic_sds_remote_device_default_frame_handler 1148 .frame_handler = scic_sds_remote_device_default_frame_handler
1195 }, 1149 },
1196 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD] = { 1150 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD] = {
1197 .start_task_handler = scic_sds_stp_remote_device_ready_substate_start_request_handler,
1198 .complete_task_handler = scic_sds_stp_remote_device_complete_request, 1151 .complete_task_handler = scic_sds_stp_remote_device_complete_request,
1199 .suspend_handler = scic_sds_stp_remote_device_ready_cmd_substate_suspend_handler, 1152 .suspend_handler = scic_sds_stp_remote_device_ready_cmd_substate_suspend_handler,
1200 .resume_handler = scic_sds_remote_device_default_resume_handler, 1153 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1202,7 +1155,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1202 .frame_handler = scic_sds_stp_remote_device_ready_cmd_substate_frame_handler 1155 .frame_handler = scic_sds_stp_remote_device_ready_cmd_substate_frame_handler
1203 }, 1156 },
1204 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ] = { 1157 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ] = {
1205 .start_task_handler = scic_sds_stp_remote_device_ready_substate_start_request_handler,
1206 .complete_task_handler = scic_sds_stp_remote_device_complete_request, 1158 .complete_task_handler = scic_sds_stp_remote_device_complete_request,
1207 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1159 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1208 .resume_handler = scic_sds_remote_device_default_resume_handler, 1160 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1210,7 +1162,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1210 .frame_handler = scic_sds_stp_remote_device_ready_ncq_substate_frame_handler 1162 .frame_handler = scic_sds_stp_remote_device_ready_ncq_substate_frame_handler
1211 }, 1163 },
1212 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR] = { 1164 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR] = {
1213 .start_task_handler = scic_sds_stp_remote_device_ready_substate_start_request_handler,
1214 .complete_task_handler = scic_sds_stp_remote_device_complete_request, 1165 .complete_task_handler = scic_sds_stp_remote_device_complete_request,
1215 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1166 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1216 .resume_handler = scic_sds_remote_device_default_resume_handler, 1167 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1218,7 +1169,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1218 .frame_handler = scic_sds_remote_device_general_frame_handler 1169 .frame_handler = scic_sds_remote_device_general_frame_handler
1219 }, 1170 },
1220 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_AWAIT_RESET] = { 1171 [SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_AWAIT_RESET] = {
1221 .start_task_handler = scic_sds_stp_remote_device_ready_substate_start_request_handler,
1222 .complete_task_handler = scic_sds_stp_remote_device_complete_request, 1172 .complete_task_handler = scic_sds_stp_remote_device_complete_request,
1223 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1173 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1224 .resume_handler = scic_sds_remote_device_default_resume_handler, 1174 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1226,7 +1176,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1226 .frame_handler = scic_sds_remote_device_general_frame_handler 1176 .frame_handler = scic_sds_remote_device_general_frame_handler
1227 }, 1177 },
1228 [SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE] = { 1178 [SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE] = {
1229 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1230 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1179 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1231 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1180 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1232 .resume_handler = scic_sds_remote_device_default_resume_handler, 1181 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1234,7 +1183,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1234 .frame_handler = scic_sds_remote_device_default_frame_handler 1183 .frame_handler = scic_sds_remote_device_default_frame_handler
1235 }, 1184 },
1236 [SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD] = { 1185 [SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD] = {
1237 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1238 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1186 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1239 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1187 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1240 .resume_handler = scic_sds_remote_device_default_resume_handler, 1188 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1242,7 +1190,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1242 .frame_handler = scic_sds_smp_remote_device_ready_cmd_substate_frame_handler 1190 .frame_handler = scic_sds_smp_remote_device_ready_cmd_substate_frame_handler
1243 }, 1191 },
1244 [SCI_BASE_REMOTE_DEVICE_STATE_STOPPING] = { 1192 [SCI_BASE_REMOTE_DEVICE_STATE_STOPPING] = {
1245 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1246 .complete_task_handler = scic_sds_remote_device_stopping_state_complete_request_handler, 1193 .complete_task_handler = scic_sds_remote_device_stopping_state_complete_request_handler,
1247 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1194 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1248 .resume_handler = scic_sds_remote_device_default_resume_handler, 1195 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1250,7 +1197,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1250 .frame_handler = scic_sds_remote_device_general_frame_handler 1197 .frame_handler = scic_sds_remote_device_general_frame_handler
1251 }, 1198 },
1252 [SCI_BASE_REMOTE_DEVICE_STATE_FAILED] = { 1199 [SCI_BASE_REMOTE_DEVICE_STATE_FAILED] = {
1253 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1254 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1200 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1255 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1201 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1256 .resume_handler = scic_sds_remote_device_default_resume_handler, 1202 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1258,7 +1204,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1258 .frame_handler = scic_sds_remote_device_general_frame_handler 1204 .frame_handler = scic_sds_remote_device_general_frame_handler
1259 }, 1205 },
1260 [SCI_BASE_REMOTE_DEVICE_STATE_RESETTING] = { 1206 [SCI_BASE_REMOTE_DEVICE_STATE_RESETTING] = {
1261 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1262 .complete_task_handler = scic_sds_remote_device_resetting_state_complete_request_handler, 1207 .complete_task_handler = scic_sds_remote_device_resetting_state_complete_request_handler,
1263 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1208 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1264 .resume_handler = scic_sds_remote_device_default_resume_handler, 1209 .resume_handler = scic_sds_remote_device_default_resume_handler,
@@ -1266,7 +1211,6 @@ static const struct scic_sds_remote_device_state_handler scic_sds_remote_device_
1266 .frame_handler = scic_sds_remote_device_general_frame_handler 1211 .frame_handler = scic_sds_remote_device_general_frame_handler
1267 }, 1212 },
1268 [SCI_BASE_REMOTE_DEVICE_STATE_FINAL] = { 1213 [SCI_BASE_REMOTE_DEVICE_STATE_FINAL] = {
1269 .start_task_handler = scic_sds_remote_device_default_start_request_handler,
1270 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler, 1214 .complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
1271 .suspend_handler = scic_sds_remote_device_default_suspend_handler, 1215 .suspend_handler = scic_sds_remote_device_default_suspend_handler,
1272 .resume_handler = scic_sds_remote_device_default_resume_handler, 1216 .resume_handler = scic_sds_remote_device_default_resume_handler,
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index 04a2b54a0dd5..fb2b0079fe75 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -387,12 +387,6 @@ typedef void (*scic_sds_remote_device_ready_not_ready_handler_t)(
387 */ 387 */
388struct scic_sds_remote_device_state_handler { 388struct scic_sds_remote_device_state_handler {
389 /** 389 /**
390 * The start_task_handler specifies the method invoked when a user
391 * attempts to start a task management request for a remote device.
392 */
393 scic_sds_remote_device_request_handler_t start_task_handler;
394
395 /**
396 * The complete_task_handler specifies the method invoked when a user 390 * The complete_task_handler specifies the method invoked when a user
397 * attempts to complete a task management request for a remote device. 391 * attempts to complete a task management request for a remote device.
398 */ 392 */