summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-03-04 22:06:46 (GMT)
committerDan Williams <dan.j.williams@intel.com>2011-07-03 10:55:30 (GMT)
commit1fad9e934a43407c1ba397b1b6b8882aa8a2cafd (patch)
tree7fed301ac4a17e70b8a6d3ba1111e149cb04f05f /drivers
parentec6c9638b0d0537430f78a3e20503b5e68a537b6 (diff)
downloadlinux-fsl-qoriq-1fad9e934a43407c1ba397b1b6b8882aa8a2cafd.tar.xz
isci: save the i/o tag outside the scic request structure.
The pointer to the core representation of a request is marked NULL at completion, but we need to save the i/o tag for task management. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> [revise changelog] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/request.c6
-rw-r--r--drivers/scsi/isci/task.c10
-rw-r--r--drivers/scsi/isci/task.h2
3 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 6cd80bb..f19a952 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -463,6 +463,12 @@ int isci_request_execute(
*/
status = SCI_SUCCESS;
}
+ else
+ /* Save the tag for possible task mgmt later. */
+ request->io_tag = scic_io_request_get_io_tag(
+ request->sci_request_handle);
+
+
} else
dev_warn(&isci_host->pdev->dev,
"%s: failed request start\n",
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 02c40c0..e9bfc22 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -544,7 +544,7 @@ void isci_task_build_tmf(
void (*tmf_sent_cb)(enum isci_tmf_cb_state,
struct isci_tmf *,
void *),
- void *cb_data)
+ struct isci_request *old_request)
{
dev_dbg(&isci_device->isci_port->isci_host->pdev->dev,
"%s: isci_device = %p\n", __func__, isci_device);
@@ -555,7 +555,9 @@ void isci_task_build_tmf(
tmf->tmf_code = code;
tmf->timeout_timer = NULL;
tmf->cb_state_func = tmf_sent_cb;
- tmf->cb_data = cb_data;
+ tmf->cb_data = old_request;
+ tmf->io_tag = old_request->io_tag;
+
}
static struct isci_request *isci_task_get_request_from_task(
@@ -1248,10 +1250,6 @@ int isci_task_abort_task(struct sas_task *task)
isci_task_build_tmf(&tmf, isci_device, isci_tmf_ssp_task_abort,
isci_abort_task_process_cb, old_request);
- tmf.io_tag = scic_io_request_get_io_tag(
- old_request->sci_request_handle
- );
-
spin_unlock_irqrestore(&isci_host->scic_lock, flags);
#define ISCI_ABORT_TASK_TIMEOUT_MS 500 /* half second timeout. */
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index 68d8e5e..5a5a4ec 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -224,7 +224,7 @@ void isci_task_build_tmf(
void (*tmf_sent_cb)(
enum isci_tmf_cb_state,
struct isci_tmf *, void *),
- void *cb_data);
+ struct isci_request *old_request);
int isci_task_execute_tmf(
struct isci_host *isci_host,