aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_device.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-01 13:13:04 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:00:39 -0400
commitf619fffb4070a577524fd9eb68cea484d86d2b97 (patch)
treeede0b488c983db99bf855558243205c5333947d4 /drivers/scsi/isci/remote_device.c
parent8f304c36ee415600c6bbc5de300e6fa3dbe59d6d (diff)
isci: fix remote_device start_io regressions
While reducing indentation commits 7ab92c9e "isci: make a remote_node_context a proper member of a remote_device", 0879e6a6 "isci: merge remote_device substates into a single state machine" broke handling of situations where i/o's successfully started at the port level need to terminated when the remote_node declines to start the i/o. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_device.c')
-rw-r--r--drivers/scsi/isci/remote_device.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index 834a3feaca63..3e567bf84c74 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -1157,10 +1157,8 @@ static enum sci_status scic_sds_stp_remote_device_ready_ncq_substate_start_io_ha
1157 return status; 1157 return status;
1158 1158
1159 status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, request); 1159 status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, request);
1160 if (status != SCI_SUCCESS) 1160 if (status == SCI_SUCCESS)
1161 return status; 1161 status = request->state_handlers->start_handler(request);
1162
1163 status = request->state_handlers->start_handler(request);
1164 1162
1165 scic_sds_remote_device_start_request(sci_dev, request, status); 1163 scic_sds_remote_device_start_request(sci_dev, request, status);
1166 } else 1164 } else
@@ -1302,16 +1300,17 @@ static enum sci_status scic_sds_smp_remote_device_ready_idle_substate_start_io_h
1302 1300
1303 status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, sci_req); 1301 status = scic_sds_remote_node_context_start_io(&sci_dev->rnc, sci_req);
1304 if (status != SCI_SUCCESS) 1302 if (status != SCI_SUCCESS)
1305 return status; 1303 goto out;
1306 1304
1307 status = scic_sds_request_start(sci_req); 1305 status = scic_sds_request_start(sci_req);
1308 if (status != SCI_SUCCESS) 1306 if (status != SCI_SUCCESS)
1309 return status; 1307 goto out;
1310 1308
1311 sci_dev->working_request = sci_req; 1309 sci_dev->working_request = sci_req;
1312 sci_base_state_machine_change_state(&sci_dev->state_machine, 1310 sci_base_state_machine_change_state(&sci_dev->state_machine,
1313 SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD); 1311 SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD);
1314 1312
1313 out:
1315 scic_sds_remote_device_start_request(sci_dev, sci_req, status); 1314 scic_sds_remote_device_start_request(sci_dev, sci_req, status);
1316 1315
1317 return status; 1316 return status;