diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-03-16 12:41:59 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:30 -0400 |
commit | c4b9e24c4be67aeed44cd46ef5ea92948d02a426 (patch) | |
tree | dc202ca9bd69321fc8b2540d20b8d1fc17a4eb89 | |
parent | 1077a574103177bff22b7cdd155d960f46ac1e8f (diff) |
isci: don't hold scic_lock over calls to sas_task_abort()
In the case where submitted I/Os fail with the status code
SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, the execute function now waits
until scic_lock is cleared before calling the helper function
"isci_request_signal_device_reset" which sets the flag for the pending
reset condition on the I/O.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/request.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 015643104311..eba8e0b3c873 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -449,26 +449,11 @@ int isci_request_execute( | |||
449 | list_add(&request->dev_node, | 449 | list_add(&request->dev_node, |
450 | &isci_device->reqs_in_process); | 450 | &isci_device->reqs_in_process); |
451 | 451 | ||
452 | if (status == | 452 | if (status == SCI_SUCCESS) { |
453 | SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) { | ||
454 | /* Signal libsas that we need the SCSI error | ||
455 | * handler thread to work on this I/O and that | ||
456 | * we want a device reset. | ||
457 | */ | ||
458 | isci_request_signal_device_reset(request); | ||
459 | |||
460 | /* Change the status, since we are holding | ||
461 | * the I/O until it is managed by the SCSI | ||
462 | * error handler. | ||
463 | */ | ||
464 | status = SCI_SUCCESS; | ||
465 | } | ||
466 | else | ||
467 | /* Save the tag for possible task mgmt later. */ | 453 | /* Save the tag for possible task mgmt later. */ |
468 | request->io_tag = scic_io_request_get_io_tag( | 454 | request->io_tag = scic_io_request_get_io_tag( |
469 | request->sci_request_handle); | 455 | request->sci_request_handle); |
470 | 456 | } | |
471 | |||
472 | } else | 457 | } else |
473 | dev_warn(&isci_host->pdev->dev, | 458 | dev_warn(&isci_host->pdev->dev, |
474 | "%s: failed request start\n", | 459 | "%s: failed request start\n", |
@@ -476,6 +461,21 @@ int isci_request_execute( | |||
476 | 461 | ||
477 | spin_unlock_irqrestore(&isci_host->scic_lock, flags); | 462 | spin_unlock_irqrestore(&isci_host->scic_lock, flags); |
478 | 463 | ||
464 | if (status == | ||
465 | SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) { | ||
466 | /* Signal libsas that we need the SCSI error | ||
467 | * handler thread to work on this I/O and that | ||
468 | * we want a device reset. | ||
469 | */ | ||
470 | isci_request_signal_device_reset(request); | ||
471 | |||
472 | /* Change the status, since we are holding | ||
473 | * the I/O until it is managed by the SCSI | ||
474 | * error handler. | ||
475 | */ | ||
476 | status = SCI_SUCCESS; | ||
477 | } | ||
478 | |||
479 | } else | 479 | } else |
480 | dev_warn(&isci_host->pdev->dev, | 480 | dev_warn(&isci_host->pdev->dev, |
481 | "%s: request_construct failed - status = 0x%x\n", | 481 | "%s: request_construct failed - status = 0x%x\n", |