diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2012-03-09 01:41:54 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2012-05-17 17:33:38 -0400 |
commit | 14aaa9f0a318bd04cbb9d822524b817e95d8b343 (patch) | |
tree | 5f6292ec671d0993c1df51586dea4fb7750d1cd9 /drivers/scsi/isci/remote_node_context.c | |
parent | d80ecd5726ce49b5da457d562804b40f0183e8f7 (diff) |
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>
Diffstat (limited to 'drivers/scsi/isci/remote_node_context.c')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 7a8347e51767..feeca17f0f13 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c | |||
@@ -317,8 +317,6 @@ static void sci_remote_node_context_tx_rx_suspended_state_enter(struct sci_base_ | |||
317 | struct isci_remote_device *idev = rnc_to_dev(rnc); | 317 | struct isci_remote_device *idev = rnc_to_dev(rnc); |
318 | struct isci_host *ihost = idev->owning_port->owning_controller; | 318 | struct isci_host *ihost = idev->owning_port->owning_controller; |
319 | 319 | ||
320 | set_bit(IDEV_TXRX_SUSPENDED, &idev->flags); | ||
321 | |||
322 | /* Terminate outstanding requests pending abort. */ | 320 | /* Terminate outstanding requests pending abort. */ |
323 | sci_remote_device_abort_requests_pending_abort(idev); | 321 | sci_remote_device_abort_requests_pending_abort(idev); |
324 | 322 | ||
@@ -326,16 +324,6 @@ static void sci_remote_node_context_tx_rx_suspended_state_enter(struct sci_base_ | |||
326 | sci_remote_node_context_continue_state_transitions(rnc); | 324 | sci_remote_node_context_continue_state_transitions(rnc); |
327 | } | 325 | } |
328 | 326 | ||
329 | static void sci_remote_node_context_tx_rx_suspended_state_exit( | ||
330 | struct sci_base_state_machine *sm) | ||
331 | { | ||
332 | struct sci_remote_node_context *rnc | ||
333 | = container_of(sm, typeof(*rnc), sm); | ||
334 | struct isci_remote_device *idev = rnc_to_dev(rnc); | ||
335 | |||
336 | clear_bit(IDEV_TXRX_SUSPENDED, &idev->flags); | ||
337 | } | ||
338 | |||
339 | static void sci_remote_node_context_await_suspend_state_exit( | 327 | static void sci_remote_node_context_await_suspend_state_exit( |
340 | struct sci_base_state_machine *sm) | 328 | struct sci_base_state_machine *sm) |
341 | { | 329 | { |
@@ -366,8 +354,6 @@ static const struct sci_base_state sci_remote_node_context_state_table[] = { | |||
366 | }, | 354 | }, |
367 | [SCI_RNC_TX_RX_SUSPENDED] = { | 355 | [SCI_RNC_TX_RX_SUSPENDED] = { |
368 | .enter_state = sci_remote_node_context_tx_rx_suspended_state_enter, | 356 | .enter_state = sci_remote_node_context_tx_rx_suspended_state_enter, |
369 | .exit_state | ||
370 | = sci_remote_node_context_tx_rx_suspended_state_exit, | ||
371 | }, | 357 | }, |
372 | [SCI_RNC_AWAIT_SUSPENSION] = { | 358 | [SCI_RNC_AWAIT_SUSPENSION] = { |
373 | .exit_state = sci_remote_node_context_await_suspend_state_exit, | 359 | .exit_state = sci_remote_node_context_await_suspend_state_exit, |
@@ -671,8 +657,11 @@ enum sci_status sci_remote_node_context_start_io(struct sci_remote_node_context | |||
671 | } | 657 | } |
672 | } | 658 | } |
673 | 659 | ||
674 | enum sci_status sci_remote_node_context_start_task(struct sci_remote_node_context *sci_rnc, | 660 | enum sci_status sci_remote_node_context_start_task( |
675 | struct isci_request *ireq) | 661 | struct sci_remote_node_context *sci_rnc, |
662 | struct isci_request *ireq, | ||
663 | scics_sds_remote_node_context_callback cb_fn, | ||
664 | void *cb_p) | ||
676 | { | 665 | { |
677 | enum scis_sds_remote_node_context_states state; | 666 | enum scis_sds_remote_node_context_states state; |
678 | 667 | ||
@@ -684,7 +673,7 @@ enum sci_status sci_remote_node_context_start_task(struct sci_remote_node_contex | |||
684 | return SCI_SUCCESS; | 673 | return SCI_SUCCESS; |
685 | case SCI_RNC_TX_SUSPENDED: | 674 | case SCI_RNC_TX_SUSPENDED: |
686 | case SCI_RNC_TX_RX_SUSPENDED: | 675 | case SCI_RNC_TX_RX_SUSPENDED: |
687 | sci_remote_node_context_resume(sci_rnc, NULL, NULL); | 676 | sci_remote_node_context_resume(sci_rnc, cb_fn, cb_p); |
688 | return SCI_SUCCESS; | 677 | return SCI_SUCCESS; |
689 | default: | 678 | default: |
690 | dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), | 679 | dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), |