isci: Redesign device suspension, abort, cleanup.
This commit changes the means by which outstanding I/Os are handled
for cleanup.
The likelihood is that this commit will be broken into smaller pieces,
however that will be a later revision. Among the changes:
- All completion structures have been removed from the tmf and
abort paths.
- Now using one completed I/O list, with the I/O completed in host bit being
used to select error or normal callback paths.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
index 7a8347e..feeca17 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -317,8 +317,6 @@
struct isci_remote_device *idev = rnc_to_dev(rnc);
struct isci_host *ihost = idev->owning_port->owning_controller;
- set_bit(IDEV_TXRX_SUSPENDED, &idev->flags);
-
/* Terminate outstanding requests pending abort. */
sci_remote_device_abort_requests_pending_abort(idev);
@@ -326,16 +324,6 @@
sci_remote_node_context_continue_state_transitions(rnc);
}
-static void sci_remote_node_context_tx_rx_suspended_state_exit(
- struct sci_base_state_machine *sm)
-{
- struct sci_remote_node_context *rnc
- = container_of(sm, typeof(*rnc), sm);
- struct isci_remote_device *idev = rnc_to_dev(rnc);
-
- clear_bit(IDEV_TXRX_SUSPENDED, &idev->flags);
-}
-
static void sci_remote_node_context_await_suspend_state_exit(
struct sci_base_state_machine *sm)
{
@@ -366,8 +354,6 @@
},
[SCI_RNC_TX_RX_SUSPENDED] = {
.enter_state = sci_remote_node_context_tx_rx_suspended_state_enter,
- .exit_state
- = sci_remote_node_context_tx_rx_suspended_state_exit,
},
[SCI_RNC_AWAIT_SUSPENSION] = {
.exit_state = sci_remote_node_context_await_suspend_state_exit,
@@ -671,8 +657,11 @@
}
}
-enum sci_status sci_remote_node_context_start_task(struct sci_remote_node_context *sci_rnc,
- struct isci_request *ireq)
+enum sci_status sci_remote_node_context_start_task(
+ struct sci_remote_node_context *sci_rnc,
+ struct isci_request *ireq,
+ scics_sds_remote_node_context_callback cb_fn,
+ void *cb_p)
{
enum scis_sds_remote_node_context_states state;
@@ -684,7 +673,7 @@
return SCI_SUCCESS;
case SCI_RNC_TX_SUSPENDED:
case SCI_RNC_TX_RX_SUSPENDED:
- sci_remote_node_context_resume(sci_rnc, NULL, NULL);
+ sci_remote_node_context_resume(sci_rnc, cb_fn, cb_p);
return SCI_SUCCESS;
default:
dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),